Commit Graph

393 Commits

Author SHA1 Message Date
Damien Arrachequesne
4f6030f2c4 chore(release): 4.7.5
Diff: https://github.com/socketio/socket.io-client/compare/4.7.4...4.7.5
2024-03-14 17:43:43 +01:00
Damien Arrachequesne
8cfea8c30b chore(release): 4.7.4
Diff: https://github.com/socketio/socket.io-client/compare/4.7.3...4.7.4
2024-01-12 11:03:23 +01:00
Damien Arrachequesne
ca5d50ebac chore(release): 4.7.3
Diff: https://github.com/socketio/socket.io-client/compare/4.7.2...4.7.3
2024-01-03 21:25:21 +01:00
Tyler Butler
605de78d2c fix: improve compatibility with node16 module resolution (#1595)
Related:

- https://github.com/microsoft/TypeScript/issues/46770#issuecomment-966612103
- https://github.com/socketio/socket.io-client/issues/1589
2023-11-06 23:34:58 +01:00
Damien Arrachequesne
928d76d255 chore(release): 4.7.2
Diff: https://github.com/socketio/socket.io-client/compare/4.7.1...4.7.2
2023-08-03 01:40:17 +02:00
Damien Arrachequesne
74ca7ac0c7 chore: bump engine.io-client to version 6.5.2
Diff: https://github.com/socketio/engine.io-client/compare/6.5.1...6.5.2
Release notes: https://github.com/socketio/engine.io-client/releases/tag/6.5.2
2023-08-03 00:30:57 +02:00
Damien Arrachequesne
0536fccfc2 chore(release): 4.7.1
Diff: https://github.com/socketio/socket.io-client/compare/4.7.0...4.7.1
2023-06-28 09:18:27 +02:00
Damien Arrachequesne
84ec6cf427 refactor: expose the ESM build with debug (bis)
This reverts the previous commit ([1]), and expose the ESM build that
includes the debug package on a subpath:

```js
import { io } from "socket.io-client/debug";
```

Reference: https://nodejs.org/api/packages.html#subpath-exports

Related: https://github.com/socketio/socket.io-client/issues/1586

[1]: 781d753a62
2023-06-28 09:11:24 +02:00
Damien Arrachequesne
630ff412a4 chore: bump engine.io-client to version 6.5.1
Diff: https://github.com/socketio/engine.io-client/compare/6.5.0...6.5.1
Release notes: https://github.com/socketio/engine.io-client/releases/tag/6.5.1
2023-06-28 08:56:49 +02:00
Damien Arrachequesne
9b235ec01d chore(release): 4.7.0
Diff: https://github.com/socketio/socket.io-client/compare/4.6.2...4.7.0
2023-06-22 11:20:22 +02:00
Ray Foss
781d753a62 feat: expose ESM build with debug (#1585)
So that debug logs can be printed with vite:

```js
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

export default defineConfig({
  plugins: [react()],
  server: {
    port: 4000
  },
  resolve: {
    conditions: ["development"]
  }
})
```

Reference: https://v2.vitejs.dev/config/#resolve-conditions

Related:

- https://github.com/socketio/socket.io/issues/4731
- https://github.com/socketio/socket.io/issues/4635
- https://github.com/socketio/socket.io-client/issues/1516
2023-06-20 14:30:54 +02:00
Damien Arrachequesne
8f14b98fff chore: bump engine.io-client to version 6.5.0
Diff: https://github.com/socketio/engine.io-client/compare/6.4.0...6.5.0
Release notes: https://github.com/socketio/engine.io-client/releases/tag/6.5.0
2023-06-16 12:40:51 +02:00
Damien Arrachequesne
a04ae1b094 chore(release): 4.6.2
Diff: https://github.com/socketio/socket.io-client/compare/4.6.1...4.6.2
2023-05-31 11:07:13 +02:00
Damien Arrachequesne
7c1db9d225 chore: bump socket.io-parser to version 4.2.3
Reference: https://github.com/advisories/GHSA-cqmj-92xf-r6r9
2023-05-31 11:02:00 +02:00
Damien Arrachequesne
61dea7135f refactor: remove invalid comma from package.json 2023-05-25 15:00:46 +02:00
Mateusz Burzyński
7ead241ecf fix(exports): move types condition to the top (#1580)
Related: https://github.com/microsoft/TypeScript/issues/50762
2023-05-04 07:29:00 +02:00
Damien Arrachequesne
89175d0481 chore(release): 4.6.1
Diff: https://github.com/socketio/socket.io-client/compare/4.6.0...4.6.1
2023-02-20 17:46:20 +01:00
Damien Arrachequesne
5980918b89 chore(release): 4.6.0
Diff: https://github.com/socketio/socket.io-client/compare/4.5.4...4.6.0
2023-02-07 00:26:46 +01:00
Damien Arrachequesne
dff34a3f17 chore: bump engine.io-client to version 6.4.0
The minor bump is due to changes on the server side, but we'll keep the
versions in sync.

Diff: https://github.com/socketio/engine.io-client/compare/6.3.1...6.4.0
Release notes: https://github.com/socketio/engine.io-client/releases/tag/6.4.0
2023-02-06 17:23:45 +01:00
Damien Arrachequesne
0110e46842 chore: bump engine.io-client to version 6.3.1
Diff: https://github.com/socketio/engine.io-client/compare/6.3.0...6.3.1
Release notes: https://github.com/socketio/engine.io-client/releases/tag/6.3.1
2023-02-04 07:29:54 +01:00
Damien Arrachequesne
b1eed5fd75 chore: bump engine.io-client to version 6.3.0
Diff: https://github.com/socketio/engine.io-client/compare/6.2.3...6.3.0
Release notes: https://github.com/socketio/engine.io-client/releases/tag/6.3.0
2023-02-03 08:20:45 +01:00
Damien Arrachequesne
b4e20c5c70 feat: implement connection state recovery
Connection state recovery allows a client to reconnect after a
temporary disconnection and restore its state:

- id
- rooms
- data
- missed packets

See also: 54d5ee05a6
2023-01-25 09:21:08 +01:00
Damien Arrachequesne
91ef8395d5 chore(release): 4.5.4
Diff: https://github.com/socketio/socket.io-client/compare/4.5.3...4.5.4
2022-11-22 22:28:31 +01:00
Damien Arrachequesne
d882822908 ci: migrate from zuul to webdriver.io
zuul is now archived [1] and does not support the new W3C WebDriver
protocol, since it relies on the wd package [2] under the hood, which
uses the (now deprecated) JSON Wire Protocol.

We will now use the webdriver.io test framework, which allows to run
our tests in local and on Sauce Labs (cross-browser and mobile tests).
This allows us to run our tests on latest versions of Android and iOS,
since Sauce Labs only supports the W3C WebDriver protocol for these
platforms ([3]).

[1]: https://github.com/defunctzombie/zuul
[2]: https://github.com/admc/wd
[3]: https://docs.saucelabs.com/dev/w3c-webdriver-capabilities/
2022-11-17 09:51:12 +01:00
Annniee1
cedd3117cf chore: bump socket.io-parser to version 4.2.1 (#1559) 2022-11-05 23:05:44 +01:00
Damien Arrachequesne
2eca8dad28 chore(release): 4.5.3
Diff: https://github.com/socketio/socket.io-client/compare/4.5.2...4.5.3
2022-10-15 07:04:22 +02:00
Damien Arrachequesne
2403b88057 fix: do not swallow user exceptions
Following [1], any exception in a user-provided event listener would
get caught in the try...catch of the decoder and result in the
reconnection of the socket.

[1]: c597023169

Related:

- https://github.com/socketio/socket.io-client/issues/1551
- https://github.com/socketio/socket.io-client/issues/1554
- https://github.com/socketio/socket.io-client/issues/1557
2022-10-13 16:26:35 +02:00
Damien Arrachequesne
2d70813729 chore(release): 4.5.2
Diff: https://github.com/socketio/socket.io-client/compare/4.5.1...4.5.2
2022-09-02 23:36:55 +01:00
Damien Arrachequesne
8c659bcccf 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).
2022-06-26 08:19:46 +02:00
Damien Arrachequesne
f0350a0100 chore(release): 4.5.1
Diff: https://github.com/socketio/socket.io-client/compare/4.5.0...4.5.1
2022-05-17 23:34:19 +02:00
Damien Arrachequesne
abdba07030 chore(release): 4.5.0
Diff: https://github.com/socketio/socket.io-client/compare/4.4.1...4.5.0
2022-04-24 00:37:51 +02:00
Damien Arrachequesne
6fdf3c9bfa refactor: import single-file 3rd party modules
This commit allows to:

- provide an ESM version of those modules ([1])
- reduce the attack surface in case of supply chain attacks
- reduce the size of the bundle with tree-shaking

As a downside, we won't receive security updates for those modules
anymore.

[1]: socketio/socket.io-client#1536

Related: df32277c3f
2022-04-23 22:55:39 +02:00
Damien Arrachequesne
b862924b7f feat: add details to the disconnect event
The "disconnect" event will now include additional details to help
debugging if anything has gone wrong.

Example when a payload is over the maxHttpBufferSize value in HTTP
long-polling mode:

```js
socket.on("disconnect", (reason, details) => {
  console.log(reason); // "transport error"

  // in that case, details is an error object
  console.log(details.message); "xhr post error"
  console.log(details.description); // 413 (the HTTP status of the response)

  // details.context refers to the XMLHttpRequest object
  console.log(details.context.status); // 413
  console.log(details.context.responseText); // ""
});
```

Related: b9252e2074
2022-04-23 00:57:23 +02:00
Damien Arrachequesne
359d1e25e7 chore(release): 4.4.1
Diff: https://github.com/socketio/socket.io-client/compare/4.4.0...4.4.1
2022-01-06 07:24:53 +01:00
Gray Zhang
19836d9abf chore: add types to exports field to be compatible with nodenext module resolution (#1522)
See [1] for detail, in `nodenext` module resolution it requires a
`types` field in `exports` with full filename including extension.

[1]: https://github.com/microsoft/TypeScript/issues/46770#issuecomment-966612103

Reference: https://www.typescriptlang.org/tsconfig/#module
2021-12-28 10:22:45 +01:00
Damien Arrachequesne
71e34a3826 chore(release): 4.4.0
Diff: https://github.com/socketio/socket.io-client/compare/4.3.2...4.4.0
2021-11-18 13:51:36 +01:00
Damien Arrachequesne
1e1952b817 chore: bump engine.io-client version
Diff: https://github.com/socketio/engine.io-client/compare/6.0.1...6.1.1
2021-11-18 13:47:41 +01:00
Damien Arrachequesne
da0b8282f3 chore(release): 4.3.2
Diff: https://github.com/socketio/socket.io-client/compare/4.3.1...4.3.2
2021-10-17 01:13:27 +02:00
Damien Arrachequesne
ca614b28f8 chore(release): 4.3.1
Diff: https://github.com/socketio/socket.io-client/compare/4.3.0...4.3.1
2021-10-16 01:13:08 +02:00
Damien Arrachequesne
c76d36778d chore(release): 4.3.0
Diff: https://github.com/socketio/socket.io-client/compare/4.2.0...4.3.0
2021-10-14 14:37:33 +02:00
Damien Arrachequesne
91b948b860 refactor: move the typed events to @socket.io/component-emitter
The typed events have been moved to [1] in order to remove the
intermediary class and reduce the bundle size.

Diff: https://github.com/socketio/emitter/compare/2.0.0...3.0.0

[1]: https://github.com/socketio/emitter/
2021-10-14 14:09:23 +02:00
Damien Arrachequesne
0661564dc2 chore: migrate to rollup
This change allows us to:

- reduce the size of the bundle
- provide an ESM bundle (for usage in <script type="module">)

Related: https://github.com/socketio/socket.io-client/issues/1198
2021-10-13 18:09:41 +02:00
Damien Arrachequesne
16b65698ae feat: provide an ESM build with and without debug
See also: 00d7e7d7ee

Related:

- https://github.com/socketio/socket.io-client/issues/1188
- https://github.com/socketio/socket.io-client/issues/1378
2021-10-13 18:09:41 +02:00
Damien Arrachequesne
718745305f chore: bump socket.io-parser to version 4.1.0
Diff: https://github.com/socketio/socket.io-parser/compare/4.0.4...4.1.0
2021-10-11 23:19:51 +02:00
Damien Arrachequesne
91fbd47e1e chore: bump engine.io-client to version 6.0.0
Release notes: https://github.com/socketio/engine.io-client/releases/6.0.0
Diff: https://github.com/socketio/engine.io-client/compare/5.2.0...6.0.0
2021-10-11 23:19:51 +02:00
Damien Arrachequesne
0a7efc8217 chore(release): 4.2.0
Diff: https://github.com/socketio/socket.io-client/compare/4.1.3...4.2.0
2021-08-30 09:15:30 +02:00
Damien Arrachequesne
ec3a784fa6 chore: bump dependencies 2021-08-30 08:21:47 +02:00
Michael Vartan
4e1b65699d feat: add an option to use native timer functions (#1479)
This allows to control the behavior of mocked timers (@sinonjs/fake-timers),
depending on the value of the "useNativeTimers" option:

- true: use native setTimeout function
- false (default): use classic timers, that may be mocked

Related: 5d1d5bea11
2021-08-29 09:31:25 +02:00
Damien Arrachequesne
7326bd50df chore(release): 4.1.3
Diff: https://github.com/socketio/socket.io-client/compare/4.1.2...4.1.3
2021-07-10 12:03:09 +02:00
Damien Arrachequesne
cef471bb93 chore: bump dependencies
`engine.io-client` diff: https://github.com/socketio/engine.io-client/compare/5.1.1...5.1.2
2021-07-04 00:53:16 +02:00