Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: socketio/socket.io-client
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.5.1
Choose a base ref
...
head repository: socketio/socket.io-client
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4.5.2
Choose a head ref
  • 3 commits
  • 13 files changed
  • 1 contributor

Commits on Jun 26, 2022

  1. chore: regenerate lockfile

    For some reason, the lockfile was not in sync anymore with the
    package.json file:
    
    > `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync.
    
    That may be linked to a new version of Node.js (v16.15.1).
    darrachequesne committed Jun 26, 2022
    Copy the full SHA
    8c659bc View commit details

Commits on Sep 2, 2022

  1. fix: handle ill-formatted packet from server

    The decoder can throw an error when trying to decode an invalid payload
    sent by the server, so the manager will now catch it, close the
    connection and then reconnect instead of crashing.
    
    Related:
    
    - socketio/socket.io#4392
    - #1551
    darrachequesne committed Sep 2, 2022
    Copy the full SHA
    c597023 View commit details
  2. chore(release): 4.5.2

    darrachequesne committed Sep 2, 2022
    Copy the full SHA
    2d70813 View commit details
Showing with 6,409 additions and 5,377 deletions.
  1. +9 −0 CHANGELOG.md
  2. +2 −2 dist/socket.io.esm.min.js
  3. +1 −1 dist/socket.io.esm.min.js.map
  4. +42 −44 dist/socket.io.js
  5. +1 −1 dist/socket.io.js.map
  6. +2 −2 dist/socket.io.min.js
  7. +1 −1 dist/socket.io.min.js.map
  8. +2 −2 dist/socket.io.msgpack.min.js
  9. +1 −1 dist/socket.io.msgpack.min.js.map
  10. +5 −1 lib/manager.ts
  11. +1 −1 lib/socket.ts
  12. +6,338 −5,320 package-lock.json
  13. +4 −1 package.json
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## [4.5.2](https://github.com/socketio/socket.io-client/compare/4.5.1...4.5.2) (2022-09-02)


### Bug Fixes

* handle ill-formatted packet from server ([c597023](https://github.com/socketio/socket.io-client/commit/c5970231699aa47b00c4a617af4239d0fa90fa53))



## [4.5.1](https://github.com/socketio/socket.io-client/compare/4.5.0...4.5.1) (2022-05-17)

There were some minor bug fixes on the server side, which mandate a client bump.
4 changes: 2 additions & 2 deletions dist/socket.io.esm.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/socket.io.esm.min.js.map

Large diffs are not rendered by default.

86 changes: 42 additions & 44 deletions dist/socket.io.js
2 changes: 1 addition & 1 deletion dist/socket.io.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/socket.io.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/socket.io.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/socket.io.msgpack.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/socket.io.msgpack.min.js.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion lib/manager.ts
Original file line number Diff line number Diff line change
@@ -424,7 +424,11 @@ export class Manager<
* @private
*/
private ondata(data): void {
this.decoder.add(data);
try {
this.decoder.add(data);
} catch (e) {
this.onclose("parse error");
}
}

/**
2 changes: 1 addition & 1 deletion lib/socket.ts
Original file line number Diff line number Diff line change
@@ -168,7 +168,7 @@ export class Socket<
...args: EventParams<EmitEvents, Ev>
): this {
if (RESERVED_EVENTS.hasOwnProperty(ev)) {
throw new Error('"' + ev + '" is a reserved event name');
throw new Error('"' + ev.toString() + '" is a reserved event name');
}

args.unshift(ev);
11,658 changes: 6,338 additions & 5,320 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "socket.io-client",
"version": "4.5.1",
"version": "4.5.2",
"description": "Realtime application framework client",
"keywords": [
"realtime",
@@ -118,5 +118,8 @@
},
"browser": {
"./test/node.ts": false
},
"overrides": {
"@types/estree": "0.0.52"
}
}