|
| 1 | +# [4.0.0](https://github.com/socketio/engine.io-parser/compare/v4.0.0-alpha.1...v4.0.0) (2020-09-08) |
| 2 | + |
| 3 | +This major release contains the necessary changes for the version 4 of the Engine.IO protocol. More information about the new version can be found [there](https://github.com/socketio/engine.io-protocol#difference-between-v3-and-v4). |
| 4 | + |
| 5 | +Encoding changes between v3 and v4: |
| 6 | + |
| 7 | +- encodePacket with string |
| 8 | + - input: `{ type: "message", data: "hello" }` |
| 9 | + - output in v3: `"4hello"` |
| 10 | + - output in v4: `"4hello"` |
| 11 | + |
| 12 | +- encodePacket with binary |
| 13 | + - input: `{ type: 'message', data: <Buffer 01 02 03> }` |
| 14 | + - output in v3: `<Buffer 04 01 02 03>` |
| 15 | + - output in v4: `<Buffer 01 02 03>` |
| 16 | + |
| 17 | +- encodePayload with strings |
| 18 | + - input: `[ { type: 'message', data: 'hello' }, { type: 'message', data: '€€€' } ]` |
| 19 | + - output in v3: `"6:4hello4:4€€€"` |
| 20 | + - output in v4: `"4hello\x1e4€€€"` |
| 21 | + |
| 22 | +- encodePayload with string and binary |
| 23 | + - input: `[ { type: 'message', data: 'hello' }, { type: 'message', data: <Buffer 01 02 03> } ]` |
| 24 | + - output in v3: `<Buffer 00 06 ff 34 68 65 6c 6c 6f 01 04 ff 04 01 02 03>` |
| 25 | + - output in v4: `"4hello\x1ebAQID"` |
| 26 | + |
| 27 | +Please note that the parser is now dependency-free! This should help reduce the size of the browser bundle. |
| 28 | + |
| 29 | +### Bug Fixes |
| 30 | + |
| 31 | +* keep track of the buffer initial length ([8edf2d1](https://github.com/socketio/engine.io-parser/commit/8edf2d1478026da442f519c2d2521af43ba01832)) |
| 32 | + |
| 33 | + |
| 34 | +### Features |
| 35 | + |
| 36 | +* restore the upgrade mechanism ([6efedfa](https://github.com/socketio/engine.io-parser/commit/6efedfa0f3048506a4ba99e70674ddf4c0732e0c)) |
| 37 | + |
| 38 | + |
| 39 | + |
1 | 40 | # [4.0.0-alpha.1](https://github.com/socketio/engine.io-parser/compare/v4.0.0-alpha.0...v4.0.0-alpha.1) (2020-05-19)
|
2 | 41 |
|
3 | 42 |
|
|
0 commit comments