Commit Graph

1665 Commits

Author SHA1 Message Date
Damien Arrachequesne
76338d79fb refactor: use globalObject "this" in webpack configuration 2021-02-25 00:29:37 +01:00
Damien Arrachequesne
ee0a35d0e4 chore(release): 4.1.1
Diff: https://github.com/socketio/engine.io-client/compare/4.1.0...4.1.1
2021-02-02 09:59:44 +01:00
Damien Arrachequesne
e551fc082a chore: point towards the master branch for the CI badge
Reference: https://docs.github.com/en/actions/managing-workflow-runs/adding-a-workflow-status-badge#using-the-branch-parameter
2021-02-02 09:58:40 +01:00
Damien Arrachequesne
c95fdea833 fix: remove polyfill for process in the bundle
A polyfill for Node.js "process" was included in the final bundle.

Reference: https://webpack.js.org/configuration/node/
2021-02-02 09:52:57 +01:00
Damien Arrachequesne
63939e6ae2 chore(release): 4.1.0
Diff: https://github.com/socketio/engine.io-client/compare/4.0.6...4.1.0
2021-01-14 01:25:48 +01:00
Damien Arrachequesne
8ad533fc6e chore: ignore generated file 2021-01-14 01:22:46 +01:00
Damien Arrachequesne
d134feeaa6 feat: add missing ws options
Reference: https://github.com/websockets/ws/blob/master/doc/ws.md#new-websocketaddress-protocols-options

Related:

- https://github.com/socketio/engine.io-client/issues/574
- https://github.com/socketio/engine.io-client/issues/615
2021-01-14 01:19:25 +01:00
Damien Arrachequesne
2bd444ae9f chore(release): 4.0.6
Diff: https://github.com/socketio/engine.io-client/compare/4.0.5...4.0.6
2021-01-04 23:18:53 +01:00
Damien Arrachequesne
aeaf072b5e chore: bump ws and debug versions 2021-01-04 23:07:25 +01:00
Damien Arrachequesne
acb221688e chore: update GitHub issue templates 2020-12-30 10:31:10 +01:00
Damien Arrachequesne
ab8c746a73 docs(changelog): include changelog for release 3.5.0
Merged from the 3.5.x branch.
2020-12-30 09:55:05 +01:00
7006
70b3551503 style: fix Russian spelling (#650) 2020-12-30 08:16:01 +01:00
Damien Arrachequesne
afd25b4902 chore(release): 4.0.5
Diff: https://github.com/socketio/engine.io-client/compare/4.0.4...4.0.5
2020-12-07 11:08:13 +01:00
Damien Arrachequesne
5c9726ce68 docs: fix withCredentials default value 2020-12-07 10:59:43 +01:00
Damien Arrachequesne
587ccf3380 refactor: remove the policyPort option
This option was used by the flash-websocket transport.
2020-12-07 10:59:43 +01:00
Damien Arrachequesne
9146a577bc chore: bump dev dependencies 2020-12-07 10:35:49 +01:00
Damien Arrachequesne
20f7fe0363 ci: migrate to GitHub Actions
Due to the recent changes to the Travis CI platform (see [1]), we will
now use GitHub Actions to run the tests.

Reference: https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-nodejs

[1]: https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing
2020-12-05 01:11:41 +01:00
Camilo Rodríguez
c22681542c refactor: avoid redeclaring const in xhr polling transport (#645) 2020-12-03 16:26:41 +01:00
Damien Arrachequesne
091a619405 chore(release): 4.0.4
Diff: https://github.com/socketio/engine.io-client/compare/4.0.3...4.0.4
2020-11-17 11:37:29 +01:00
Damien Arrachequesne
1c8cba8818 fix: check the type of the initial packet
Before this fix, the client could mark the polling transport as open
even though the handshake packet was not received properly (for
example, after a parsing error).

This could lead to writes (POST requests) without "sid" query param,
which failed with:

```
{"code":2,"message":"Bad handshake method"}
```

Related:

- https://github.com/socketio/engine.io-client/issues/636
- https://github.com/socketio/socket.io-client/issues/1390
2020-11-17 11:19:07 +01:00
Damien Arrachequesne
4873a237f1 fix: restore the cherry-picking of the WebSocket options
The previous commit ([1]) makes the Engine.IO tests with Node.js SSL
options fail.

[1]: 177b95fe46
2020-11-17 11:15:53 +01:00
Damien Arrachequesne
8228a43335 chore(release): 4.0.3
Diff: https://github.com/socketio/engine.io-client/compare/4.0.2...4.0.3
2020-11-17 09:25:41 +01:00
Damien Arrachequesne
89cb771cf0 refactor: remove binary handling for the polling transport (bis)
The `supportsBinary` attribute and the `forceBase64` option are kept
untouched, though they are not used by the polling transport, which
now always converts the payloads to base64.

Related: https://github.com/socketio/socket.io-client/issues/1391
2020-11-17 09:19:28 +01:00
Damien Arrachequesne
177b95fe46 fix(react-native): exclude the localAddress option
React Native only supports the "headers" option in the WebSocket constructor.

Related: https://github.com/socketio/socket.io-client/issues/1397
2020-11-16 23:17:21 +01:00
Damien Arrachequesne
ccb99e3718 fix(react-native): add a default value for the withCredentials option
The undefined value breaks React Native on Android with a rather cryptic error message:

```
Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue() on a null object reference
```

This bug was introduced by [1].

[1]: 5f47a50ee5

Related: https://github.com/socketio/socket.io-client/issues/1403
2020-11-16 23:17:21 +01:00
Damien Arrachequesne
82987d5efb chore: bump engine.io version 2020-11-09 10:12:02 +01:00
Damien Arrachequesne
b6df250c5c chore(release): 4.0.2
Diff: https://github.com/socketio/engine.io-client/compare/4.0.1...4.0.2
2020-11-09 10:03:19 +01:00
Damien Arrachequesne
ec3f677e92 refactor: remove binary handling for the polling transport
Since Engine.IO v4, the binary payloads are always encoded as base64
with the polling transport.

See https://github.com/socketio/engine.io-protocol#difference-between-v3-and-v4

Possibly related: https://github.com/socketio/socket.io-client/issues/1391
2020-11-08 02:12:11 +01:00
Damien Arrachequesne
17649168d3 chore: bump engine.io 2020-10-22 00:38:13 +02:00
Damien Arrachequesne
276597f92d chore(release): 4.0.1
Diff: https://github.com/socketio/engine.io-client/compare/4.0.0...4.0.1
2020-10-22 00:31:35 +02:00
dependabot[bot]
a54e417bb7 chore: bump elliptic from 6.5.2 to 6.5.3 (#641)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-22 00:01:34 +02:00
Damien Arrachequesne
6d3d83687c chore: bump parseuri version (#642)
parseuri now lists better-assert as devDependency.

Source: https://github.com/galkn/parseuri
2020-10-21 23:36:42 +02:00
dependabot[bot]
45670a14f0 chore: bump js-yaml from 3.4.5 to 3.14.0 (#640)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.4.5 to 3.14.0.
- [Release notes](https://github.com/nodeca/js-yaml/releases)
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.4.5...3.14.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-30 23:41:37 +02:00
Damien Arrachequesne
0ba4615822 docs(changelog): include changelog for release 3.4.4
Merged from the 3.4.x branch.
2020-09-30 02:32:48 +02:00
Damien Arrachequesne
bc9d6c1669 refactor: fix typo
Closes https://github.com/socketio/socket.io-client/pull/1354
2020-09-30 01:46:50 +02:00
Damien Arrachequesne
2ea0d13094 chore(release): 4.0.0
Diff: https://github.com/socketio/engine.io-client/compare/v4.0.0-alpha.1...4.0.0
Full diff: https://github.com/socketio/engine.io-client/compare/3.4.0...4.0.0
2020-09-11 01:01:49 +02:00
Damien Arrachequesne
4683a954d4 chore: provide a development bundle
Two bundles will now be created:

- one for development, with debug and unminified: dist/engine.io.js
- one for production, without debug and minified: dist/engine.io.min.js
2020-09-10 15:17:53 +02:00
Damien Arrachequesne
f7ba966e53 feat: strip debug from the browser bundle
Striping the debug module (both imports and method calls) helps
reduce the bundle size from 41 to 33 KB.

Note: while removing debug from the source code is not desirable, it
might be interesting to provide the library without debug included, so
that users don't have to use something like webpack-remove-debug when
bundling the library.
2020-09-09 01:53:22 +02:00
Damien Arrachequesne
ab3de6ab53 test: add Node.js 14 in the test matrix
Reference: https://github.com/nodejs/Release
2020-09-09 01:36:13 +02:00
Damien Arrachequesne
8440a57f76 chore: bump engine.io-parser version
See also: https://github.com/socketio/engine.io-protocol#difference-between-v3-and-v4

Release: https://github.com/socketio/engine.io-parser/releases/tag/4.0.0
Diff: https://github.com/socketio/engine.io-parser/compare/2.2.0...4.0.0
2020-09-09 00:02:24 +02:00
Gal Koren
cabb78d666 chore: bump parseqs version (#639)
Release notes: https://github.com/galkn/querystring/releases/tag/v0.0.6
2020-09-08 01:54:50 +02:00
Damien Arrachequesne
a5e76bc011 docs: add example with extraHeaders in the browser 2020-06-04 10:20:42 +02:00
Damien Arrachequesne
dac76f249b docs: use ES6 syntax for the code examples 2020-06-04 10:09:22 +02:00
Damien Arrachequesne
d5d81a7c75 chore: bump component-emitter dependency
Subscribing/unsubscribing for a lot of different event types could lead
to a memory leak.

See aa2e57acc7

Diff: https://github.com/component/emitter/compare/1.2.1...1.3.0
2020-06-04 08:12:10 +02:00
Damien Arrachequesne
f3a48329e7 test: restore tests on all browsers
iphone / ipad / edge were excluded in [1], though there is no clear
explanation.

[1] 28765c5430
2020-06-04 07:43:47 +02:00
Damien Arrachequesne
2f5c948abe fix(react-native): restrict the list of options for the WebSocket object
Only 'headers' and 'localAddress' options are supported by the
WebSocket implementation in React Native.

The following message was printed to the console:

> Unrecognized WebSocket connection option(s) `agent`, `perMessageDeflate`, `pfx`, `key`, `passphrase`, `cert`, `ca`, `ciphers`, `rejectUnauthorized`. Did you mean to put these under `headers`?

Reference: https://reactnative.dev/docs/network.html#websocket-support
2020-05-25 07:34:17 +02:00
Damien Arrachequesne
86d4e8d4da docs(changelog): include changelog for release 3.4.1
Merged from the 3.4.x branch.
2020-04-17 15:08:17 +02:00
Damien Arrachequesne
3f3a6f9914 fix: use globalThis polyfill instead of self/global (#634)
In order to fix the "self is not defined" issues in Android 8 and React
Native.

Fixes https://github.com/socketio/engine.io-client/issues/611, https://github.com/socketio/engine.io-client/issues/626
Closes https://github.com/socketio/engine.io-client/pull/627
2020-04-16 16:08:37 +02:00
Chris West (Faux)
27fa6949f3 refactor: remove indexof dependency
This is a polyfill for indexOf(), which we use literally everywhere else.
2020-04-16 10:06:44 +02:00
Damien Arrachequesne
804e871d4a chore(release): 4.0.0-alpha.1 2020-02-12 08:26:52 +01:00