@metamask-previews/json-rpc-middleware-stream 5.0.1-preview.4ae7d84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -0
- package/LICENSE +15 -0
- package/README.md +15 -0
- package/package.json +59 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
All notable changes to this project will be documented in this file.
|
|
3
|
+
|
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [5.0.1]
|
|
10
|
+
### Changed
|
|
11
|
+
- Upgrade typescript version to 4.8.4 ([#68](https://github.com/MetaMask/json-rpc-middleware-stream/pull/68))
|
|
12
|
+
|
|
13
|
+
## [5.0.0]
|
|
14
|
+
### Changed
|
|
15
|
+
- **BREAKING**: Increase minimum Node.js version to 16 ([#59](https://github.com/MetaMask/json-rpc-middleware-stream/pull/59))
|
|
16
|
+
- **BREAKING**: Update `readable-stream` from `^2.3.3` to `^3.6.2` ([#55](https://github.com/MetaMask/json-rpc-middleware-stream/pull/55))
|
|
17
|
+
- **BREAKING**: Switch from legacy `json-rpc-engine`@`^6.1.0` to `@metamask/json-rpc-engine`@`^7.1.1` ([#54](https://github.com/MetaMask/json-rpc-middleware-stream/pull/54))
|
|
18
|
+
- Add dependency `@metamask/utils` ([#54](https://github.com/MetaMask/json-rpc-middleware-stream/pull/54))
|
|
19
|
+
|
|
20
|
+
## [4.2.3]
|
|
21
|
+
### Fixed
|
|
22
|
+
- Moved json-rpc-engine from devDependencies to dependencies ([#56](https://github.com/MetaMask/json-rpc-middleware-stream/pull/56))
|
|
23
|
+
|
|
24
|
+
## [4.2.2]
|
|
25
|
+
### Changed
|
|
26
|
+
- Bump @metamask/safe-event-emitter from 2.0.0 to 3.0.0 ([#44](https://github.com/MetaMask/json-rpc-middleware-stream/pull/44))
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
- Fix race condition in `createStreamMiddleware` ([#47](https://github.com/MetaMask/json-rpc-middleware-stream/pull/47))
|
|
30
|
+
- Previously this middleware would fail to process synchronous responses on initialized streams
|
|
31
|
+
|
|
32
|
+
## [4.2.1]
|
|
33
|
+
### Fixed
|
|
34
|
+
- Add early return in createStreamMiddleware.processsResponse method if JSON RPC request is not found ([#35](https://github.com/MetaMask/json-rpc-middleware-stream/pull/35))
|
|
35
|
+
|
|
36
|
+
## [4.2.0]
|
|
37
|
+
### Changed
|
|
38
|
+
- Change error throw when response is seen for unknown request into warning displayed in console ([#32](https://github.com/MetaMask/json-rpc-middleware-stream/pull/32))
|
|
39
|
+
|
|
40
|
+
## [4.1.0]
|
|
41
|
+
### Changed
|
|
42
|
+
- Added retry limit of 3 to requests ([#30](https://github.com/MetaMask/json-rpc-middleware-stream/pull/30))
|
|
43
|
+
|
|
44
|
+
## [4.0.0] - 2022-10-03
|
|
45
|
+
### Changed
|
|
46
|
+
- BREAKING: Add Node 12 as minimum required version [#15](https://github.com/MetaMask/json-rpc-middleware-stream/pull/15)
|
|
47
|
+
- Retry pending requests when notification to reconnect is received ([#27](https://github.com/MetaMask/json-rpc-middleware-stream/pull/27))
|
|
48
|
+
|
|
49
|
+
### Security
|
|
50
|
+
- Add `@lavamoat/allow-scripts` to make dependency install scripts opt-in ([#25](https://github.com/MetaMask/json-rpc-middleware-stream/pull/25))
|
|
51
|
+
|
|
52
|
+
## [3.0.0] - 2020-12-08
|
|
53
|
+
### Added
|
|
54
|
+
- TypeScript typings ([#11](https://github.com/MetaMask/json-rpc-middleware-stream/pull/11))
|
|
55
|
+
|
|
56
|
+
[Unreleased]: https://github.com/MetaMask/core/compare/json-rpc-middleware-stream@5.0.1...HEAD
|
|
57
|
+
[5.0.1]: https://github.com/MetaMask/core/compare/json-rpc-middleware-stream@5.0.0...json-rpc-middleware-stream@5.0.1
|
|
58
|
+
[5.0.0]: https://github.com/MetaMask/core/compare/json-rpc-middleware-stream@4.2.3...json-rpc-middleware-stream@5.0.0
|
|
59
|
+
[4.2.3]: https://github.com/MetaMask/core/compare/json-rpc-middleware-stream@4.2.2...json-rpc-middleware-stream@4.2.3
|
|
60
|
+
[4.2.2]: https://github.com/MetaMask/core/compare/json-rpc-middleware-stream@4.2.1...json-rpc-middleware-stream@4.2.2
|
|
61
|
+
[4.2.1]: https://github.com/MetaMask/core/compare/json-rpc-middleware-stream@4.2.0...json-rpc-middleware-stream@4.2.1
|
|
62
|
+
[4.2.0]: https://github.com/MetaMask/core/compare/json-rpc-middleware-stream@4.1.0...json-rpc-middleware-stream@4.2.0
|
|
63
|
+
[4.1.0]: https://github.com/MetaMask/core/compare/json-rpc-middleware-stream@4.0.0...json-rpc-middleware-stream@4.1.0
|
|
64
|
+
[4.0.0]: https://github.com/MetaMask/core/compare/json-rpc-middleware-stream@3.0.0...json-rpc-middleware-stream@4.0.0
|
|
65
|
+
[3.0.0]: https://github.com/MetaMask/core/releases/tag/json-rpc-middleware-stream@3.0.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 MetaMask
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# @metamask/json-rpc-middleware-stream
|
|
2
|
+
|
|
3
|
+
A small toolset for streaming JSON RPC data and matching requests and responses. Made to be used with [`@metamask/json-rpc-engine`](https://npmjs.com/package/@metamask/json-rpc-engine).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
`yarn add @metamask/json-rpc-middleware-stream`
|
|
8
|
+
|
|
9
|
+
or
|
|
10
|
+
|
|
11
|
+
`npm install @metamask/json-rpc-middleware-stream`
|
|
12
|
+
|
|
13
|
+
## Contributing
|
|
14
|
+
|
|
15
|
+
This package is part of a monorepo. Instructions for contributing can be found in the [monorepo README](https://github.com/MetaMask/core#readme).
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@metamask-previews/json-rpc-middleware-stream",
|
|
3
|
+
"version": "5.0.1-preview.4ae7d84",
|
|
4
|
+
"description": "A small toolset for streaming JSON-RPC data and matching requests and responses",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"MetaMask",
|
|
7
|
+
"Ethereum"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://github.com/MetaMask/core/tree/main/packages/json-rpc-middleware-stream#readme",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/MetaMask/core/issues"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/MetaMask/core.git"
|
|
16
|
+
},
|
|
17
|
+
"license": "ISC",
|
|
18
|
+
"main": "./dist/index.js",
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"files": [
|
|
21
|
+
"dist/"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build:docs": "typedoc",
|
|
25
|
+
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/json-rpc-middleware-stream --tag-prefix-before-package-rename json-rpc-middleware-stream@ --version-before-package-rename 5.0.1",
|
|
26
|
+
"publish:preview": "yarn npm publish --tag preview",
|
|
27
|
+
"test": "jest --reporters=jest-silent-reporter",
|
|
28
|
+
"test:clean": "jest --clearCache",
|
|
29
|
+
"test:verbose": "jest --verbose",
|
|
30
|
+
"test:watch": "jest --watch"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@metamask/json-rpc-engine": "^7.2.0",
|
|
34
|
+
"@metamask/safe-event-emitter": "^3.0.0",
|
|
35
|
+
"@metamask/utils": "^8.2.0",
|
|
36
|
+
"readable-stream": "^3.6.2"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@metamask/auto-changelog": "^3.4.3",
|
|
40
|
+
"@types/jest": "^27.4.1",
|
|
41
|
+
"@types/readable-stream": "^2.3.0",
|
|
42
|
+
"deepmerge": "^4.2.2",
|
|
43
|
+
"extension-port-stream": "^2.0.1",
|
|
44
|
+
"jest": "^27.5.1",
|
|
45
|
+
"jest-it-up": "^2.0.2",
|
|
46
|
+
"ts-jest": "^27.1.4",
|
|
47
|
+
"typedoc": "^0.24.8",
|
|
48
|
+
"typedoc-plugin-missing-exports": "^2.0.0",
|
|
49
|
+
"typescript": "~4.8.4",
|
|
50
|
+
"webextension-polyfill-ts": "^0.26.0"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=16.0.0"
|
|
54
|
+
},
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public",
|
|
57
|
+
"registry": "https://registry.npmjs.org/"
|
|
58
|
+
}
|
|
59
|
+
}
|