Commit Graph

7693 Commits

Author SHA1 Message Date
Stijn de Witt
230cd19164 chore: bump dependencies 2021-01-04 10:28:17 +01:00
Damien Arrachequesne
a0a3481c64 test: fix random test failure 2021-01-04 10:27:57 +01:00
Nika Jones
65b657428a docs: fix the protocol CONNECT character (#22)
The correct connect character is `0` (zero) and not `O` (the capital
letter 'o').
2021-01-02 23:27:34 +01:00
Dante Calderón
4111013bc7 refactor: validate socket id before loop in addAll (#64) 2021-01-02 23:24:15 +01:00
Damien Arrachequesne
788d95ad1c ci: init GitHub actions
Reference: https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-nodejs
2021-01-02 23:23:01 +01:00
Damien Arrachequesne
2874d5f972 chore: update GitHub issue templates 2020-12-30 11:45:17 +01:00
Damien Arrachequesne
f773b4889c chore: update GitHub issue templates 2020-12-30 11:34:30 +01:00
Damien Arrachequesne
acb221688e chore: update GitHub issue templates 2020-12-30 10:31:10 +01:00
Damien Arrachequesne
fffa0a3fb7 chore: update GitHub issue templates 2020-12-30 10:28:34 +01:00
Marko Žarković
cec27502f5 fix: correctly pass the options when using the Server constructor (#610)
Fixes https://github.com/socketio/engine.io/issues/580
2020-12-30 10:04:47 +01:00
Damien Arrachequesne
04ea3585e8 docs(changelog): include changelog for release 3.5.0
Merged from the 3.5.x branch.
2020-12-30 10:01:18 +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
Damien Arrachequesne
292d62ea69 docs(examples): update TypeScript example
Includes b3de861a92
2020-12-30 09:45:22 +01:00
7006
70b3551503 style: fix Russian spelling (#650) 2020-12-30 08:16:01 +01:00
Damien Arrachequesne
178e899f48 docs(examples): add Angular TodoMVC + Socket.IO example 2020-12-17 12:42:23 +01:00
David Fong
d1bfe40dbb refactor: add more typing info and upgrade prettier (#3725)
This upgrades prettier to 2.2.0 to gain support for TypeScript's new
type-only-imports feature.
2020-12-11 12:19:20 +01:00
david-fong
7bc7a7b624 refactor: switch to native javascript bind (#1423)
The polyfill for the bind() method was necessary for IE6/7/8, which we
do not support anymore.

Related: https://caniuse.com/mdn-javascript_builtins_function_bind
2020-12-11 11:55:57 +01:00
Damien Arrachequesne
81c1f4e819 chore(release): 3.0.4
Diff: https://github.com/socketio/socket.io/compare/3.0.3...3.0.4
3.0.4
2020-12-07 12:01:24 +01:00
Damien Arrachequesne
085cd6c56d chore(release): 3.0.4
Diff: https://github.com/socketio/socket.io-client/compare/3.0.3...3.0.4
2020-12-07 11:43:11 +01:00
Damien Arrachequesne
1fba399b17 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-07 11:37:03 +01:00
Damien Arrachequesne
e7115b88bb chore(release): 4.0.5
Diff: https://github.com/socketio/engine.io/compare/4.0.4...4.0.5
2020-12-07 11:26:35 +01:00
Damien Arrachequesne
f8f60fc860 fix: keep track of active sockets
When a given socket was disconnected, either by the server-side or by the client-side, the manager was closed too, regardless of the other connected sockets.

```js
const socket1 = io({
  autoConnect: false
});
const socket2 = io("/test");

socket1.disconnect(); // also disconnect socket2
```

This bug was introduced in [1].

[1]: b60e909039
2020-12-07 11:24:15 +01:00
Damien Arrachequesne
ec1f8c3474 fix: emit an error when reaching a v2.x server
A WebSocket-only v3.x client is able to reach a v2.x server, as the
Engine.IO handshake are compatible, but the v2.x server does not send
a sid in the Socket.IO handshake, which resulted in:

> Uncaught TypeError: Cannot read property 'sid' of undefined

A 'connect_error' event will now be emitted.

References:

- https://github.com/socketio/engine.io-protocol#difference-between-v3-and-v4
- https://github.com/socketio/socket.io-protocol#difference-between-v5-and-v4
- https://socket.io/docs/v3/migrating-from-2-x-to-3-0/
2020-12-07 11:18:55 +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
f5efa1e02a refactor: use ES6 syntax for the tests 2020-12-07 10:57:28 +01:00
Damien Arrachequesne
312bd356c7 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-07 10:52:08 +01:00
Damien Arrachequesne
9146a577bc chore: bump dev dependencies 2020-12-07 10:35:49 +01:00
Damien Arrachequesne
88799daa22 chore(release): 4.0.2
Diff: https://github.com/socketio/engine.io-parser/compare/4.0.1...4.0.2
2020-12-07 10:13:22 +01:00
Damien Arrachequesne
2ccdeb2779 fix: add base64-arraybuffer as prod dependency
The dependency was previously only listed as dev dependency, so that it
was not included when installing the server (the "engine.io" package,
which does not require it) and was explicitly included by the client
(the "engine.io-client" package, which needs it for the browser build).

But it failed with yarn v2, due to its stricter package boundaries:

> ERROR in ../../../.yarn/cache/engine.io-parser-npm-4.0.1-6bdb879e8a-3b71ef8b5a.zip/node_modules/engine.io-parser/lib/decodePacket.browser.js 7:18-47
> Module not found: Error: engine.io-parser tried to access base64-arraybuffer, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

> Required package: base64-arraybuffer (via "base64-arraybuffer")
> Required by: engine.io-parser@npm:4.0.1 (via xxx/.yarn/cache/engine.io-parser-npm-4.0.1-6bdb879e8a-3b71ef8b5a.zip/node_modules/engine.io-parser/lib/)

Related:

- https://dev.to/arcanis/introducing-yarn-2-4eh1#strict-package-boundaries
- https://github.com/socketio/engine.io-parser/issues/116
2020-12-07 09:53:28 +01:00
Damien Arrachequesne
b26993e51b ci: update configuration for GitHub Actions
The specific cron hour is meant to prevent concurrent usage of the
Sauce Labs account.
2020-12-07 09:50:41 +01:00
david-fong
226b491846 refactor(typings): make typing information more specific (#1418) 2020-12-07 09:06:57 +01:00
Damien Arrachequesne
adffc03977 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-07 09:02:41 +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
683fc1dd8e docs: update CI badge
[skip ci]
2020-12-03 16:17:47 +01:00
Damien Arrachequesne
f5bdf6c40d 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-03 16:05:05 +01:00
Stijn de Witt
4e6d40493d chore: make tests work on Windows (#3708) 2020-11-28 01:55:19 +01:00
Pablo Tejada
28c7cc0856 style(issue-template): fix typo (#3700)
[skip ci]
2020-11-25 11:09:17 +01:00
Damien Arrachequesne
f2098b031d chore(release): 4.0.2
Diff: https://github.com/socketio/socket.io-parser/compare/4.0.1...4.0.2
2020-11-25 11:00:16 +01:00
Damien Arrachequesne
66973a340c chore: cleanup dist folder before compilation 2020-11-25 10:59:02 +01:00
Pascal Sthamer
4efa005846 fix: move @types/component-emitter to dependencies (#99)
Otherwise consumers of socket.io-parser (and socket.io) need to have it
listed in their devDependencies.
2020-11-25 10:51:40 +01:00
Luiz Pereira
b3de861a92 fix(typings): export extraHeaders option (#1410) 2020-11-20 23:09:27 +01:00
Damien Arrachequesne
06a2bd313a chore(release): 3.0.3
Diff: https://github.com/socketio/socket.io/compare/3.0.2...3.0.3
3.0.3
2020-11-19 01:31:31 +01:00
Damien Arrachequesne
85ebd356e9 chore: cleanup dist folder before compilation 2020-11-19 01:28:27 +01:00
Damien Arrachequesne
66e4fdf2e6 chore(release): 3.0.3
Diff: https://github.com/socketio/socket.io-client/compare/3.0.2...3.0.3
2020-11-19 01:01:33 +01:00
Damien Arrachequesne
e2a4c56709 chore: cleanup dist folder before compilation 2020-11-19 00:59:42 +01:00
Damien Arrachequesne
bec15240ea fix: properly export io in ES modules wrapper
The syntax was invalid:

```
export const io = io;
             ^

SyntaxError: Identifier 'io' has already been declared
    at Loader.moduleStrategy (internal/modules/esm/translators.js:122:18)
```
2020-11-19 00:56:25 +01:00
Damien Arrachequesne
9b6f9711da chore(release): 3.0.2
Diff: https://github.com/socketio/socket.io/compare/3.0.1...3.0.2
3.0.2
2020-11-18 00:53:51 +01:00