Commit Graph

21 Commits

Author SHA1 Message Date
Damien Arrachequesne
029e010901 chore(release): engine.io-client@6.6.2
Diff: https://github.com/socketio/socket.io/compare/engine.io-client@6.6.1...engine.io-client@6.6.2
2024-10-23 10:48:16 +02:00
Damien Arrachequesne
4865f2e62e fix(eio-client): prevent infinite loop with Node.js built-in WebSocket
Related: https://github.com/socketio/socket.io/issues/5194
2024-10-22 00:49:25 +02:00
Damien Arrachequesne
d4b3ddedff ci: use Node.js 22
Reference: https://github.com/nodejs/Release
2024-10-21 23:30:11 +02:00
Damien Arrachequesne
3b68658201 chore: bump @fails-components/webtransport to version 1.1.4 (dev) 2024-10-21 23:29:29 +02:00
Damien Arrachequesne
175a2c58c1 fix(eio-client/types): remove ws type from .d.ts file
Before this change, the following error would be thrown when compiling
with TypeScript:

```
node_modules/engine.io-client/build/esm/transports/websocket.node.d.ts:12:101 - error TS1340: Module 'ws' does not refer to a type, but is used as a type here. Did you mean 'typeof import('ws')'?

12     createSocket(uri: string, protocols: string | string[] | undefined, opts: Record<string, any>): import("ws");
                                                                                                       ~~~~~~~~~~~~
```

This behavior was introduced in [1], included in version `6.6.0`.

The return type is forced as `any`, so that the `@types/ws` dependency
is optional.

[1]: f4d898ee96

Related: https://github.com/socketio/socket.io/issues/5202
2024-10-19 07:09:19 +02:00
Damien Arrachequesne
c251ae7ba7 chore(release): engine.io-client@6.6.1
Diff: https://github.com/socketio/socket.io/compare/engine.io-client@6.6.0...engine.io-client@6.6.1
2024-09-21 09:07:48 +02:00
Damien Arrachequesne
8a2f5a3da0 fix(eio-client): move 'offline' event listener at the top
Related: https://github.com/socketio/socket.io/issues/5125
2024-09-21 08:47:20 +02:00
Damien Arrachequesne
93010ca3c4 chore(eio-client): bump xmlhttprequest-ssl to version 2.1.1
Related:

- https://github.com/socketio/socket.io/issues/4402
- b01f69a689
2024-09-21 07:32:12 +02:00
Damien Arrachequesne
9b3c9abeca fix(eio-client): only remove the event listener if it exists
Related: https://github.com/socketio/socket.io/issues/5088#issuecomment-2217202350
2024-09-19 09:26:26 +02:00
Tom Jenkinson
8adcfbfde5 fix(sio-client): do not send a packet on an expired connection (#5134)
When a laptop is suspended or a phone is locked, the timer that is used
to check the liveness of the connection is paused and is not able to
detect that the heartbeat has failed.

Previously, emitting a message after resuming the page would lose the
message. The status of the timer will now be checked before sending the
message, so that it gets buffered and sent upon reconnection.

Note: we could also have used the Page Visibility API or a custom
setTimeout() method based on setInterval(), but this would not be as
reliable as the current solution.

Reference: https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API

Related: https://github.com/socketio/socket.io/issues/5135
2024-09-18 11:11:22 +02:00
Damien Arrachequesne
7a23dde6ef perf: do not reset the hearbeat timer on each packet
This reverts ed34a45a07

See also: 5359bae683
2024-09-18 11:06:39 +02:00
Damien Arrachequesne
2194264820 test(eio-client): reduce test suite duration 2024-09-18 07:52:12 +02:00
Wang Guan
a1ccba3a77 chore: use prettier v3 everywhere (#5169) 2024-09-16 08:43:08 +02:00
nayounsang
b5ccfd4838 refactor(eio-client): improve transports type (#5188)
Related: https://github.com/socketio/socket.io/issues/5187
2024-09-14 08:17:36 +02:00
Damien Arrachequesne
b7da542890 chore: normalize repository URLs
In order to address the following warning when publishing:

> npm warn publish npm auto-corrected some errors in your package.json when publishing.  Please run "npm pkg fix" to address these errors.
> npm warn publish errors corrected:
> npm warn publish "repository.url" was normalized to "git+https://github.com/socketio/socket.io.git"
2024-07-11 14:59:00 +02:00
Damien Arrachequesne
2a29c4c30e chore: move dev dependencies in the parent package.json file
Notes:

- TypeScript is updated from v4 to v5
- WebDriverIO is updated from v7 to v8
- prettier is kept in v2, in order to reduce style changes
2024-07-10 10:42:22 +02:00
Damien Arrachequesne
d3761e3e9e docs(security): add the list of CVE for the socket.io-client package 2024-07-09 12:32:14 +02:00
Damien Arrachequesne
84d2aa74cd chore: update the repository URLs 2024-07-09 10:51:43 +02:00
Damien Arrachequesne
5fae41a0d5 chore: align all MIT licenses text
Note: the owner of the `socket.io` repository was updated to Automattic
in [1], though it was never applied to the other repositories nor
mentioned in the client bundles.

[1]: 340281152f
2024-07-09 10:44:20 +02:00
Damien Arrachequesne
34137d39a9 chore: add new npm workspaces
The following repositories were merged:

- https://github.com/socketio/engine.io-parser
- https://github.com/socketio/engine.io-client
- https://github.com/socketio/engine.io-parser
- https://github.com/socketio/socket.io-adapter
- https://github.com/socketio/emitter
2024-07-08 12:10:24 +02:00
Damien Arrachequesne
32a1a6039f refactor: prepare the migration to a monorepo 2024-07-08 10:59:50 +02:00