elpheria/rpc-websockets
JSON-RPC 2.0 implementation over WebSockets for Node.js and JavaScript/TypeScript
This release requires Node.js >= 18 because the project now uses the core UUID crypto library that was introduced on Node.js v18.
✨ New Features
- Add reconnection state management capabilities to resolve issue #178.
✨ New Event
- - Fired when all reconnection attempts have been exhausted
✨ New Methods
- - Get current reconnection attempt count
- - Get maximum reconnection attempts configured
- - Check if reconnection is in progress
- - Check if client will attempt to reconnect
📦 Example Usage
- ```js
- client.on('max_reconnects_reached', (code, reason) => {
- console.log('All reconnection attempts failed');
- // Handle permanent disconnection
- });
- if (client.willReconnect()) {
- showMessage('Will attempt to reconnect...');
- } else {
- + 3 more
📋 Changes
- ✅ Fully backward compatible - no breaking changes
- ✅ Comprehensive test coverage
- ✅ Updated API documentation
- ✅ Fixed edge case in `close()` method
- Full Changelog: https://github.com/elpheria/rpc-websockets/compare/v9.1.3...v9.2.0
📋 What's Changed
- Revert breaking change wrt to `rpc_id` by @cryptopapi997 in https://github.com/elpheria/rpc-websockets/pull/174
✨ New Contributors
- @cryptopapi997 made their first contribution in https://github.com/elpheria/rpc-websockets/pull/174
- Full Changelog: https://github.com/elpheria/rpc-websockets/compare/v9.1.0...v9.1.1
📋 What's Changed
- build(deps): bump serialize-javascript and mocha by @dependabot in https://github.com/elpheria/rpc-websockets/pull/171
- Full Changelog: https://github.com/elpheria/rpc-websockets/compare/v9.0.4...v9.0.5
**Full Changelog**: https://github.com/elpheria/rpc-websockets/compare/v9.0.3...v9.0.4
Update eventemitter3 to v5.
Dual-build for ESM and CJS Please check this PR description for important changes happening in v9: https://github.com/elpheria/rpc-websockets/pull/164
Switched to ESNext (ESM). Make sure to use `import` instead of `require` to import this package.
Makes RPC params optional on client request. #152
Adds support for optional defining of Data Packs. https://github.com/elpheria/rpc-websockets/commit/c7a07fc428ac3b7ff7d30107f33acbb4a03a0103
**7.4.16 (Oct 25, 2021)** BUGFIXES: Use delete to avoid memory leak #122
**7.4.15 (Oct 7, 2021)** BUGFIXES: Pass socket_id to setAuth #121
**7.4.14 (Aug 26, 2021)** BUGFIXES: Fixes #105
📋 Changes
- Cleanup package-lock file
- Cleanup unit tests
- Take care of security vulnerabilities
📋 Changes
- Wrap login methods into try/catch
- Use ws version 7.4.5
**7.4.10 (April 1, 2021)** BUGFIXES: Bump y18n dependency to fix security vulnerability (#100)
📋 Changes
- Bump elliptic dependency to fix security vulnerability (#98)
7.4.7 (November 20, 2020) BUGFIXES: Server: Check if request data is null (#95)
📋 Changes
- Client: Check if response violates spec (#93)
📋 Changes
- Fixes an issue brought up with 30a2192
📋 Changes
- Remove useless console.log
📋 Changes
- Client should validate a response object (#91)
📋 Changes
- Delay close event until socket is reset(#90)
- Update package dependencies
📋 Changes
- Server should check socket state before calling 'send' method(#44)
📋 Changes
- Unset socket when closed to allow reconnects (#89)
📋 Changes
- Use promise microtask instead of nexttick (#88)
📋 Changes
- Removed assert-args because this lib is ts-native. Updated all outdated dependencies with minor code adaptation
