diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index a7cd3cc3e..000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "prettier", - "parser": "babel-eslint", - "env": { - "node": true, - "browser": true - } -} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3a62a10d..ee626d3c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x, 14.x] + node-version: [14, 16] steps: - uses: actions/checkout@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ba93f0b7..c584278ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,95 @@ +## [6.0.3](https://github.com/socketio/engine.io-client/compare/6.0.2...6.0.3) (2021-11-14) + +Some bug fixes were backported from master, to be included by the latest `socket.io-client` version. + +### Bug Fixes + +* add package name in nested package.json ([32511ee](https://github.com/socketio/engine.io-client/commit/32511ee32a0a6122e99db35833ed948aa4e427ac)) +* fix vite build for CommonJS users ([9fcaf58](https://github.com/socketio/engine.io-client/commit/9fcaf58d18c013c0b92fdaf27481f0383efb3658)) + + + +## [6.1.1](https://github.com/socketio/engine.io-client/compare/6.1.0...6.1.1) (2021-11-14) + + +### Bug Fixes + +* add package name in nested package.json ([6e798fb](https://github.com/socketio/engine.io-client/commit/6e798fbb5b11a1cfec03ece3dfce03213b5f9a12)) +* fix vite build for CommonJS users ([c557707](https://github.com/socketio/engine.io-client/commit/c557707fb694bd10397b4cd8b4ec2fbe59128faa)) + + + +# [6.1.0](https://github.com/socketio/engine.io-client/compare/6.0.2...6.1.0) (2021-11-08) + +The minor bump is due to changes on the server side. + +### Bug Fixes + +* **typings:** allow any value in the query option ([018e1af](https://github.com/socketio/engine.io-client/commit/018e1afcc5ef5eac81e9e1629db053bda44120ee)) +* **typings:** allow port to be a number ([#680](https://github.com/socketio/engine.io-client/issues/680)) ([8f68f77](https://github.com/socketio/engine.io-client/commit/8f68f77825af069fe2c612a3200a025d4130ac0a)) + + + +## [6.0.2](https://github.com/socketio/engine.io-client/compare/6.0.1...6.0.2) (2021-10-15) + + +### Bug Fixes + +* **bundle:** fix vite build ([faa9f31](https://github.com/socketio/engine.io-client/commit/faa9f318e70cd037af79bfa20e9d21b284ddf257)) + + + +## [6.0.1](https://github.com/socketio/engine.io-client/compare/6.0.0...6.0.1) (2021-10-14) + + +### Bug Fixes + +* fix usage with vite ([4971914](https://github.com/socketio/engine.io-client/commit/49719142f65e23efa65fca4f66765ded5d955972)) + + +# [6.0.0](https://github.com/socketio/engine.io-client/compare/5.2.0...6.0.0) (2021-10-08) + +This major release contains three important changes: + +- the codebase was migrated to TypeScript ([7245b80](https://github.com/socketio/engine.io-client/commit/7245b803e0c8d57cfc1f1cd8b8c8d598e8397967)) +- rollup is now used instead of webpack to create the bundles ([27de300](https://github.com/socketio/engine.io-client/commit/27de300de42420ab59a02ec7a3445e636cbcc78e)) +- code that provided support for ancient browsers (think IE8) was removed ([c656192](https://github.com/socketio/engine.io-client/commit/c6561928be628084fd2f5e7a70943c8e5c582873) and [b2c7381](https://github.com/socketio/engine.io-client/commit/b2c73812e978489b5dfbe516a26b6b8fd628856d)) + +There is now three distinct builds (in the build/ directory): + +- CommonJS +- ESM with debug +- ESM without debug (rationale here: [00d7e7d](https://github.com/socketio/engine.io-client/commit/00d7e7d7ee85b4cfa6f9f547203cc692083ac61c)) + +And three bundles (in the dist/ directory) : + +- `engine.io.js`: unminified UMD bundle +- `engine.io.min.js`: minified UMD bundle +- `engine.io.esm.min.js`: ESM bundle + +Please note that the communication protocol was not updated, so a v5 client will be able to reach a v6 server (and vice-versa). + +Reference: https://github.com/socketio/engine.io-protocol + +### Features + +* provide an ESM build without debug ([00d7e7d](https://github.com/socketio/engine.io-client/commit/00d7e7d7ee85b4cfa6f9f547203cc692083ac61c)) + +### BREAKING CHANGES + +* the enableXDR option is removed ([c656192](https://github.com/socketio/engine.io-client/commit/c6561928be628084fd2f5e7a70943c8e5c582873)) +* the jsonp and forceJSONP options are removed ([b2c7381](https://github.com/socketio/engine.io-client/commit/b2c73812e978489b5dfbe516a26b6b8fd628856d)) + +`ws` version: `~8.2.3` + +# [5.2.0](https://github.com/socketio/engine.io-client/compare/5.1.2...5.2.0) (2021-08-29) + + +### Features + +* add an option to use native timer functions ([#672](https://github.com/socketio/engine.io-client/issues/672)) ([5d1d5be](https://github.com/socketio/engine.io-client/commit/5d1d5bea11ab6854473ddc02a3391929ea4fc8f4)) + + ## [5.1.2](https://github.com/socketio/engine.io-client/compare/5.1.1...5.1.2) (2021-06-24) diff --git a/README.md b/README.md index c29ff28df..94baf6f74 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,8 @@ Engine.IO is a commonjs module, which means you can include it by using 1. write your app code ```js - const socket = require('engine.io-client')('ws://localhost'); + const { Socket } = require('engine.io-client'); + const socket = new Socket('ws://localhost'); socket.on('open', () => { socket.on('message', (data) => {}); socket.on('close', () => {}); @@ -65,7 +66,7 @@ Engine.IO is a commonjs module, which means you can include it by using ```html