Upgrading ws from 7.x to 8.x
Comparison of the public API of ws 7.5.13 and 8.23.0, computed automatically from their TypeScript types. A changed signature is a candidate for a breaking change, not a certainty.
Summary
| Removed import paths | 0 |
|---|---|
| Removed exports | 1 |
| Changed signatures | 2 |
| Removed class or interface members | 0 |
| Changed class or interface members | 13 |
| Newly deprecated | 0 |
| Requirement changes (engines, peer dependencies) | 3 |
| New exports | 6 |
Removed exports
| import | export | kind | Before |
|---|---|---|---|
ws | OpenEvent | interface | interface |
Changed signatures
| export | Before | After |
|---|---|---|
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 |
Removed class or interface members
None detected.
Changed class or interface members
| member | Before | After |
|---|---|---|
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.clients | Set<WebSocket> | Set<InstanceType<T>> |
Server.options | ServerOptions | ServerOptions<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.verifyClient | VerifyClientCallbackSync | VerifyClientCallbackAsync | undefined | VerifyClientCallbackAsync<InstanceType<V>> | VerifyClientCallbackSync<InstanceType<V>> | undefined |
ServerOptions.handleProtocols | any | ((protocols: Set<string>, request: InstanceType<V>) => string | false) | undefined |
Newly deprecated
None detected.
Requirement changes (engines, peer dependencies)
| Before | After | |
|---|---|---|
engines.node | >=8.3.0 | — |
peerDependencies.bufferutil | ^4.0.1 | — |
peerDependencies.utf-8-validate | ^5.0.2 | — |
New exports (6)
| import | export | kind |
|---|---|---|
ws | Event | interface |
ws | RawData | type |
ws | WebSocket | interface |
ws | WebSocketServer | interface |
ws | WebSocketEventMap | interface |
ws | FinishRequestCallback | type |
Give your AI agent these facts
Vigia is a free MCP server: your coding agent checks versions, breaking changes and vulnerabilities before it writes code. No signup, no API key.
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
Add to CursorAdd to VS Code★ Star on GitHub
Any other MCP client
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }Agent skill (SKILL.md): tells the agent when to use Vigia · GitHub Action for pull requests
Frequently asked questions
What are the breaking changes when upgrading ws from 7 to 8?
Between ws 7.5.13 and 8.23.0, Vigia found 1 removed exports, 2 changed signatures and 13 removed or changed class or interface members.
What became deprecated in ws 8?
0 exports or members are newly marked as deprecated in ws 8.23.0.
For agents
GET https://vigia.coredls.cloud/v1/packages/npm/ws/upgrade?from=7.5.13&to=8.23.0