Vigia

ws을(를) 7.x에서 8.x로 업그레이드하기

ws 7.5.13과 8.22.0의 공개 API를 TypeScript 타입에서 자동으로 비교한 결과입니다. 시그니처 변경은 호환성이 깨질 가능성이 있다는 뜻이며 확정은 아닙니다.

요약

삭제된 import 경로0
삭제된 export1
변경된 시그니처2
삭제된 클래스·인터페이스 멤버0
변경된 클래스·인터페이스 멤버13
새로 지원 중단됨0
요구 사항 변경 (engines, peer 의존성)2
새 export6

삭제된 export

importexportkind이전
wsOpenEventinterfaceinterface

변경된 시그니처

export이전이후
ws · VerifyClientCallbackSync(info: { origin: string; secure: boolean; req: IncomingMessage; }) => boolean(info: { origin: string; secure: boolean; req: Request; }) => boolean
ws · VerifyClientCallbackAsync(info: { origin: string; secure: boolean; req: IncomingMessage; }, callback: (res: boolean, code?: number | undefined, message?: string | undefined, headers?: any) => void) => void(info: { origin: string; secure: boolean; req: Request; }, callback: (res: boolean, code?: number | undefined, message?: string | undefined, headers?: any) => void) => void

삭제된 클래스·인터페이스 멤버

감지되지 않았습니다.

변경된 클래스·인터페이스 멤버

member이전이후
Server.on(event: "connection", cb: (this: Server, socket: WebSocket, request: IncomingMessage) => void): Server | (event: "error", cb: (this: Server, error: Error) => void): Server | (event: "headers", cb: (this: Server, headers: string[], request: IncomingMessage) => void): Server | (event: "close" | "liste…(event: "connection", cb: (this: Server<T, any>, websocket: InstanceType<T>, request: InstanceType<U>) => void): Server<T, U> | (event: "error", cb: (this: Server<T, any>, error: Error) => void): Server<T, U> | (event: "headers", cb: (this: Server<T, any>, headers: string[], request: InstanceType<U>…
Server.off(event: "connection", cb: (this: Server, socket: WebSocket, request: IncomingMessage) => void): Server | (event: "error", cb: (this: Server, error: Error) => void): Server | (event: "headers", cb: (this: Server, headers: string[], request: IncomingMessage) => void): Server | (event: "close" | "liste…(event: "connection", cb: (this: Server<T, any>, socket: InstanceType<T>, request: InstanceType<U>) => void): Server<T, U> | (event: "error", cb: (this: Server<T, any>, error: Error) => void): Server<T, U> | (event: "headers", cb: (this: Server<T, any>, headers: string[], request: InstanceType<U>) =…
Server.once(event: "connection", cb: (this: Server, socket: WebSocket, request: IncomingMessage) => void): Server | (event: "error", cb: (this: Server, error: Error) => void): Server | (event: "headers", cb: (this: Server, headers: string[], request: IncomingMessage) => void): Server | (event: "close" | "liste…(event: "connection", cb: (this: Server<T, any>, websocket: InstanceType<T>, request: InstanceType<U>) => void): Server<T, U> | (event: "error", cb: (this: Server<T, any>, error: Error) => void): Server<T, U> | (event: "headers", cb: (this: Server<T, any>, headers: string[], request: InstanceType<U>…
Server.address(): string | AddressInfo(): string | AddressInfo | null
Server.clientsSet<WebSocket>Set<InstanceType<T>>
Server.optionsServerOptionsServerOptions<T, U>
Server.addListener(event: "connection", cb: (client: WebSocket, request: IncomingMessage) => void): Server | (event: "error", cb: (err: Error) => void): Server | (event: "headers", cb: (headers: string[], request: IncomingMessage) => void): Server | (event: "close" | "listening", cb: () => void): Server | (event: str…(event: "connection", cb: (websocket: InstanceType<T>, request: InstanceType<U>) => void): Server<T, U> | (event: "error", cb: (error: Error) => void): Server<T, U> | (event: "headers", cb: (headers: string[], request: InstanceType<U>) => void): Server<T, U> | (event: "close" | "listening", cb: () =…
Server.constructor(options?: ServerOptions | undefined, callback?: (() => void) | undefined): Server<T extends typeof WebSocket.WebSocket = typeof WebSocket, U extends typeof IncomingMessage = any>(options?: ServerOptions<T, U> | undefined, callback?: (() => void) | undefined): Server<T, U>
Server.shouldHandle(request: IncomingMessage): boolean | Promise<boolean>(request: InstanceType<U>): boolean | Promise<boolean>
Server.handleUpgrade(request: IncomingMessage, socket: Socket, upgradeHead: Buffer, callback: (client: WebSocket, request: IncomingMessage) => void): void(request: InstanceType<U>, socket: Duplex, upgradeHead: Buffer, callback: (client: InstanceType<T>, request: InstanceType<U>) => void): void
Server.removeListener(event: "connection", cb: (client: WebSocket) => void): Server | (event: "error", cb: (err: Error) => void): Server | (event: "headers", cb: (headers: string[], request: IncomingMessage) => void): Server | (event: "close" | "listening", cb: () => void): Server | (event: string | symbol, listener: (.…(event: "connection", cb: (websocket: InstanceType<T>, request: InstanceType<U>) => void): Server<T, U> | (event: "error", cb: (error: Error) => void): Server<T, U> | (event: "headers", cb: (headers: string[], request: InstanceType<U>) => void): Server<T, U> | (event: "close" | "listening", cb: () =…
ServerOptions.verifyClientVerifyClientCallbackSync | VerifyClientCallbackAsync | undefinedVerifyClientCallbackAsync<InstanceType<V>> | VerifyClientCallbackSync<InstanceType<V>> | undefined
ServerOptions.handleProtocolsany((protocols: Set<string>, request: InstanceType<V>) => string | false) | undefined

새로 지원 중단됨

감지되지 않았습니다.

요구 사항 변경 (engines, peer 의존성)

이전이후
engines.node>=8.3.0>=10.0.0
peerDependencies.utf-8-validate^5.0.2>=5.0.2
새 export (6)
importexportkind
wsEventinterface
wsRawDatatype
wsWebSocketinterface
wsWebSocketServerinterface
wsWebSocketEventMapinterface
wsFinishRequestCallbacktype

자주 묻는 질문

ws을(를) 7에서 8(으)로 업그레이드할 때 호환성이 깨지는 변경은 무엇인가요?

ws 7.5.13과 8.22.0 사이에서 Vigia는 삭제된 export 1개, 변경된 시그니처 2개, 삭제되거나 변경된 클래스·인터페이스 멤버 13개를 찾았습니다.

ws 8에서 지원 중단된 것은 무엇인가요?

ws 8.22.0에서 export 또는 멤버 0개가 새로 지원 중단으로 표시되었습니다.

에이전트용

GET https://vigia.coredls.cloud/v1/packages/npm/ws/upgrade?from=7.5.13&to=8.22.0