The "_placeholder" attribute is used when sending binary data, and was
incorrectly mangled (converted to a random short property, like "it",
to reduce the bundle size).
Related:
- ca9e994815
- https://github.com/socketio/socket.io/issues/5215
[skip ci]
The "_placeholder" attribute is used when sending binary data, and was
incorrectly mangled (converted to a random short property, like "it",
to reduce the bundle size).
This bug was introduced in [1], included in `socket.io-client@4.8.0`.
[1]: 7085f0e3e4
Related: https://github.com/socketio/socket.io/issues/5215
By default, Babel uses `Object.defineProperty()` when transpiling
classes. We'll now use the loose mode which creates a more terse
output.
| | before | after |
|----------|---------|---------|
| min+gzip | 14.9 KB | 14.6 KB |
| min+br | 13.4 KB | 13.1 KB |
Reference: https://babeljs.io/docs/babel-plugin-transform-classes
When a laptop is suspended or a phone is locked, the timer that is used
to check the liveness of the connection is paused and is not able to
detect that the heartbeat has failed.
Previously, emitting a message after resuming the page would lose the
message. The status of the timer will now be checked before sending the
message, so that it gets buffered and sent upon reconnection.
Note: we could also have used the Page Visibility API or a custom
setTimeout() method based on setInterval(), but this would not be as
reliable as the current solution.
Reference: https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
Related: https://github.com/socketio/socket.io/issues/5135
In order to address the following warning when publishing:
> npm warn publish npm auto-corrected some errors in your package.json when publishing. Please run "npm pkg fix" to address these errors.
> npm warn publish errors corrected:
> npm warn publish "repository.url" was normalized to "git+https://github.com/socketio/socket.io.git"
Note: the owner of the `socket.io` repository was updated to Automattic
in [1], though it was never applied to the other repositories nor
mentioned in the client bundles.
[1]: 340281152f