@metamask-previews/json-rpc-engine 11.0.0-preview-e92ccc12d → 11.0.0-preview-eb6c0745c

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +112 -10
  2. package/package.json +17 -16
package/CHANGELOG.md CHANGED
@@ -7,13 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ### Added
11
-
12
- - Add support for Node.js 26 ([#10981](https://github.com/MetaMask/core/pull/10981))
13
-
14
10
  ### Changed
15
11
 
16
- - Bump `@metamask/utils` from `^11.12.0` to `^12.0.2` ([#10192](https://github.com/MetaMask/core/pull/10192), [#11107](https://github.com/MetaMask/core/pull/11107), [#11474](https://github.com/MetaMask/core/pull/11474))
12
+ - Bump `@metamask/utils` from `^11.12.0` to `^12.0.0` ([#10192](https://github.com/MetaMask/core/pull/10192))
17
13
  - Bump `@metamask/rpc-errors` from `^7.0.2` to `^7.0.3` ([#10718](https://github.com/MetaMask/core/pull/10718))
18
14
 
19
15
  ## [11.0.0]
@@ -223,10 +219,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
223
219
 
224
220
  ### Added
225
221
 
226
- - This package was migrated from `MetaMask/json-rpc-engine` to the
227
- `MetaMask/core` monorepo ([#1895](https://github.com/MetaMask/core/pull/1895))
228
- - See [`MetaMask/json-rpc-engine`](https://github.com/MetaMask/json-rpc-engine/blob/main/CHANGELOG.md)
229
- for the original changelog.
222
+ - Migrate `@metamask/json-rpc-engine` into the core monorepo ([#1895](https://github.com/MetaMask/core/pull/1895))
230
223
 
231
224
  ### Changed
232
225
 
@@ -234,6 +227,106 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
234
227
  - Bump `@metamask/rpc-errors` from `^6.0.0` to `^6.1.0` ([#1882](https://github.com/MetaMask/core/pull/1882))
235
228
  - Bump `@metamask/auto-changelog` from `3.4.2` to `3.4.3` ([#1997](https://github.com/MetaMask/core/pull/1997))
236
229
 
230
+ ## [7.2.0]
231
+
232
+ ### Added
233
+
234
+ - Applied eslint rules from core monorepo ([#172](https://github.com/MetaMask/json-rpc-engine/pull/172))
235
+
236
+ ## [7.1.1]
237
+
238
+ ### Changed
239
+
240
+ - Bumped `@metamask/utils` from `^5.0.2` to `^8.1.0` [#158](https://github.com/MetaMask/json-rpc-engine/pull/158) ([#162](https://github.com/MetaMask/json-rpc-engine/pull/162))
241
+ - Bumped `@metamask/rpc-errors` from `^5.0.0` to `^6.0.0` ([#162](https://github.com/MetaMask/json-rpc-engine/pull/162))
242
+
243
+ ## [7.1.0]
244
+
245
+ ### Changed
246
+
247
+ - Bumped `@metamask/safe-event-emitter` from `^2.0.0` to `^3.0.0` ([#148](https://github.com/MetaMask/json-rpc-engine/pull/148))
248
+ - Bumped `@metamask/utils` from `^5.0.1` to `^5.0.2` ([#151](https://github.com/MetaMask/json-rpc-engine/pull/151))
249
+
250
+ ### Fixed
251
+
252
+ - Fixed handling of empty batch array in requests ([#153](https://github.com/MetaMask/json-rpc-engine/pull/153))
253
+
254
+ ## [7.0.0]
255
+
256
+ ### Added
257
+
258
+ - Added JSON-RPC notification handling ([#104](https://github.com/MetaMask/json-rpc-engine/pull/104))
259
+ - Added `destroy` method ([#106](https://github.com/MetaMask/json-rpc-engine/pull/106))
260
+
261
+ ### Changed
262
+
263
+ - **BREAKING:** Require a minimum Node version of 16 ([#139](https://github.com/MetaMask/json-rpc-engine/pull/139))
264
+ - **BREAKING:** Use `@metamask/utils` types ([#105](https://github.com/MetaMask/json-rpc-engine/pull/105))
265
+ - The JSON-RPC engine and all middleware now use `@metamask/utils` JSON-RPC types
266
+ - **(BREAKING)** Return a `null` instead of `undefined` response `id` for malformed request objects ([#91](https://github.com/MetaMask/json-rpc-engine/pull/91))
267
+ - This is very unlikely to be breaking in practice, but the behavior could have been relied on.
268
+ - Change package name to `@metamask/json-rpc-engine` ([#139](https://github.com/MetaMask/json-rpc-engine/pull/139))
269
+ - Use `@metamask/rpc-errors` ([#138](https://github.com/MetaMask/json-rpc-engine/pull/138))
270
+
271
+ ## [6.1.0] - 2020-11-20
272
+
273
+ ### Added
274
+
275
+ - Add `PendingJsonRpcResponse` interface for use in middleware ([#75](https://github.com/MetaMask/json-rpc-engine/pull/75))
276
+
277
+ ### Changed
278
+
279
+ - Use `async`/`await` and `try`/`catch` instead of Promise methods everywhere ([#74](https://github.com/MetaMask/json-rpc-engine/pull/74))
280
+ - Consumers may notice improved stack traces on certain platforms.
281
+
282
+ ## [6.0.0] - 2020-11-19
283
+
284
+ ### Added
285
+
286
+ - Add docstrings for public `JsonRpcEngine` methods ([#70](https://github.com/MetaMask/json-rpc-engine/pull/70))
287
+
288
+ ### Changed
289
+
290
+ - **(BREAKING)** Refactor exports ([#69](https://github.com/MetaMask/json-rpc-engine/pull/69))
291
+ - All exports are now named, and available via the package entry point.
292
+ - All default exports have been removed.
293
+ - **(BREAKING)** Convert `asMiddleware` to instance method ([#69](https://github.com/MetaMask/json-rpc-engine/pull/69))
294
+ - The `asMiddleware` export has been removed.
295
+ - **(BREAKING)** Add runtime typechecks to `JsonRpcEngine.handle()`, and error responses if they fail ([#70](https://github.com/MetaMask/json-rpc-engine/pull/70))
296
+ - Requests will now error if:
297
+ - The request is not a plain object, or if the `method` property is not a `string`. Empty strings are allowed.
298
+ - A `next` middleware callback is called with a truthy, non-function parameter.
299
+ - Migrate to TypeScript ([#69](https://github.com/MetaMask/json-rpc-engine/pull/69))
300
+ - Hopefully improve stack traces by removing uses of `Promise.then` and `.catch` internally ([#70](https://github.com/MetaMask/json-rpc-engine/pull/70))
301
+ - Make some internal `JsonRpcEngine` methods `static` ([#71](https://github.com/MetaMask/json-rpc-engine/pull/71))
302
+
303
+ ## [5.4.0] - 2020-11-07
304
+
305
+ ### Changed
306
+
307
+ - Make the TypeScript types not terrible ([#66](https://github.com/MetaMask/json-rpc-engine/pull/66), [#67](https://github.com/MetaMask/json-rpc-engine/pull/67))
308
+
309
+ ## [5.3.0] - 2020-07-30
310
+
311
+ ### Changed
312
+
313
+ - Response object errors no longer include a `stack` property
314
+
315
+ ## [5.2.0] - 2020-07-24
316
+
317
+ ### Added
318
+
319
+ - Promise signatures for `engine.handle` ([#55](https://github.com/MetaMask/json-rpc-engine/pull/55))
320
+ - So, in addition to `engine.handle(request, callback)`, you can do e.g. `await engine.handle(request)`.
321
+
322
+ ### Changed
323
+
324
+ - Remove `async` and `promise-to-callback` dependencies
325
+ - These dependencies were used internally for middleware flow control.
326
+ They have been replaced with Promises and native `async`/`await`, which means that some operations are _no longer_ eagerly executed.
327
+ This change may affect consumers that depend on the eager execution of middleware _during_ request processing, _outside of_ middleware functions and request handlers.
328
+ - In general, it is a bad practice to work with state that depends on middleware execution, while the middleware are executing.
329
+
237
330
  [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-engine@11.0.0...HEAD
238
331
  [11.0.0]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-engine@10.5.0...@metamask/json-rpc-engine@11.0.0
239
332
  [10.5.0]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-engine@10.4.0...@metamask/json-rpc-engine@10.5.0
@@ -260,4 +353,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
260
353
  [7.3.3]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-engine@7.3.2...@metamask/json-rpc-engine@7.3.3
261
354
  [7.3.2]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-engine@7.3.1...@metamask/json-rpc-engine@7.3.2
262
355
  [7.3.1]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-engine@7.3.0...@metamask/json-rpc-engine@7.3.1
263
- [7.3.0]: https://github.com/MetaMask/core/releases/tag/@metamask/json-rpc-engine@7.3.0
356
+ [7.3.0]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-engine@7.2.0...@metamask/json-rpc-engine@7.3.0
357
+ [7.2.0]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-engine@7.1.1...@metamask/json-rpc-engine@7.2.0
358
+ [7.1.1]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-engine@7.1.0...@metamask/json-rpc-engine@7.1.1
359
+ [7.1.0]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-engine@7.0.0...@metamask/json-rpc-engine@7.1.0
360
+ [7.0.0]: https://github.com/MetaMask/core/compare/json-rpc-engine@6.1.0...@metamask/json-rpc-engine@7.0.0
361
+ [6.1.0]: https://github.com/MetaMask/core/compare/json-rpc-engine@6.0.0...json-rpc-engine@6.1.0
362
+ [6.0.0]: https://github.com/MetaMask/core/compare/json-rpc-engine@5.4.0...json-rpc-engine@6.0.0
363
+ [5.4.0]: https://github.com/MetaMask/core/compare/json-rpc-engine@5.3.0...json-rpc-engine@5.4.0
364
+ [5.3.0]: https://github.com/MetaMask/core/compare/json-rpc-engine@5.2.0...json-rpc-engine@5.3.0
365
+ [5.2.0]: https://github.com/MetaMask/core/releases/tag/json-rpc-engine@5.2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/json-rpc-engine",
3
- "version": "11.0.0-preview-e92ccc12d",
3
+ "version": "11.0.0-preview-eb6c0745c",
4
4
  "description": "A tool for processing JSON-RPC messages",
5
5
  "keywords": [
6
6
  "Ethereum",
@@ -40,28 +40,26 @@
40
40
  "registry": "https://registry.npmjs.org/"
41
41
  },
42
42
  "scripts": {
43
- "allow-scripts": "yarn workspace @metamask/core-monorepo run allow-scripts",
44
43
  "build": "tsc --project tsconfig.build.json",
45
44
  "build:all": "tsc --build tsconfig.build.json --verbose",
46
45
  "build:clean": "yarn build:only-clean && yarn build",
47
46
  "build:docs": "typedoc",
48
47
  "build:only-clean": "rimraf './dist' './tsconfig.build.tsbuildinfo'",
49
- "changelog:update": "../../scripts/update-changelog.sh @metamask/json-rpc-engine",
50
- "changelog:validate": "../../scripts/validate-changelog.sh",
51
- "lint:tsconfigs": "node --import ../../scripts/resolver/register.ts ../../scripts/lint-tsconfigs/lint-tsconfigs.ts",
52
- "lint:tsconfigs:fix": "node --import ../../scripts/resolver/register.ts ../../scripts/lint-tsconfigs/lint-tsconfigs.ts --fix",
48
+ "changelog:update": "../../scripts/update-changelog.sh @metamask/json-rpc-engine --tag-prefix-before-package-rename json-rpc-engine@ --version-before-package-rename 6.1.0",
49
+ "changelog:validate": "../../scripts/validate-changelog.sh @metamask/json-rpc-engine --tag-prefix-before-package-rename json-rpc-engine@ --version-before-package-rename 6.1.0",
50
+ "lint:tsconfigs": "node --import ../../scripts/resolver/register.ts --experimental-transform-types ../../scripts/lint-tsconfigs/lint-tsconfigs.ts",
51
+ "lint:tsconfigs:fix": "node --import ../../scripts/resolver/register.ts --experimental-transform-types ../../scripts/lint-tsconfigs/lint-tsconfigs.ts --fix",
53
52
  "since-latest-release": "../../scripts/since-latest-release.sh",
54
- "test": "vitest",
55
- "test:clean": "vitest --clearCache",
56
- "test:coverage": "vitest --coverage",
57
- "test:verbose": "vitest --reporter=verbose",
58
- "test:watch": "vitest --watch"
53
+ "test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
54
+ "test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
55
+ "test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
56
+ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
59
57
  },
60
58
  "dependencies": {
61
59
  "@metamask/messenger": "^3.0.0",
62
60
  "@metamask/rpc-errors": "^7.0.3",
63
61
  "@metamask/safe-event-emitter": "^3.1.3",
64
- "@metamask/utils": "^12.0.2",
62
+ "@metamask/utils": "^12.0.0",
65
63
  "@types/deep-freeze-strict": "^1.1.0",
66
64
  "deep-freeze-strict": "^1.1.1",
67
65
  "klona": "^2.0.6"
@@ -69,15 +67,18 @@
69
67
  "devDependencies": {
70
68
  "@lavamoat/allow-scripts": "^5.1.0",
71
69
  "@lavamoat/preinstall-always-fail": "^3.0.0",
72
- "@metamask/auto-changelog": "^7.1.0",
70
+ "@metamask/auto-changelog": "^6.2.1",
71
+ "@types/jest": "^30.0.0",
73
72
  "@typescript/native": "npm:typescript@^7.0.2",
73
+ "deepmerge": "^4.3.1",
74
+ "jest": "^30.5.2",
74
75
  "rimraf": "^6.1.3",
76
+ "ts-jest": "^29.4.14",
75
77
  "typedoc": "^0.28.20",
76
- "typescript": "npm:@typescript/typescript6@^6.0.2",
77
- "vitest": "5.0.3"
78
+ "typescript": "npm:@typescript/typescript6@^6.0.2"
78
79
  },
79
80
  "engines": {
80
- "node": "^22.14.0 || ^24 || ^26"
81
+ "node": "^22.14.0 || ^24"
81
82
  },
82
83
  "lavamoat": {
83
84
  "allowScripts": {