json-rpc-middleware-stream
Advanced tools
Comparing version 4.2.1 to 4.2.2
@@ -9,2 +9,10 @@ # Changelog | ||
## [4.2.2] | ||
### Changed | ||
- Bump @metamask/safe-event-emitter from 2.0.0 to 3.0.0 ([#44](https://github.com/MetaMask/json-rpc-middleware-stream/pull/44)) | ||
### Fixed | ||
- Fix race condition in `createStreamMiddleware` ([#47](https://github.com/MetaMask/json-rpc-middleware-stream/pull/47)) | ||
- Previously this middleware would fail to process synchronous responses on initialized streams | ||
## [4.2.1] | ||
@@ -34,3 +42,4 @@ ### Fixed | ||
[Unreleased]: https://github.com/MetaMask/json-rpc-middleware-stream/compare/v4.2.1...HEAD | ||
[Unreleased]: https://github.com/MetaMask/json-rpc-middleware-stream/compare/v4.2.2...HEAD | ||
[4.2.2]: https://github.com/MetaMask/json-rpc-middleware-stream/compare/v4.2.1...v4.2.2 | ||
[4.2.1]: https://github.com/MetaMask/json-rpc-middleware-stream/compare/v4.2.0...v4.2.1 | ||
@@ -37,0 +46,0 @@ [4.2.0]: https://github.com/MetaMask/json-rpc-middleware-stream/compare/v4.1.0...v4.2.0 |
@@ -26,6 +26,6 @@ "use strict"; | ||
const middleware = (req, res, next, end) => { | ||
// register request on id map *before* sending it to the stream, to avoid race issues | ||
idMap[req.id] = { req, res, next, end }; | ||
// write req to stream | ||
sendToStream(req); | ||
// register request on id map | ||
idMap[req.id] = { req, res, next, end }; | ||
}; | ||
@@ -32,0 +32,0 @@ return { events, middleware, stream }; |
{ | ||
"name": "json-rpc-middleware-stream", | ||
"version": "4.2.1", | ||
"version": "4.2.2", | ||
"description": "A small toolset for streaming JSON-RPC data and matching requests and responses.", | ||
@@ -27,3 +27,3 @@ "repository": { | ||
"dependencies": { | ||
"@metamask/safe-event-emitter": "^2.0.0", | ||
"@metamask/safe-event-emitter": "^3.0.0", | ||
"readable-stream": "^2.3.3" | ||
@@ -30,0 +30,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22007
+ Added@metamask/safe-event-emitter@3.1.1(transitive)
- Removed@metamask/safe-event-emitter@2.0.0(transitive)