[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Releases: MetaMask/json-rpc-engine

7.2.0

19 Oct 11:20
ea412ad
Compare
Choose a tag to compare

Added

  • Applied eslint rules from core monorepo (#172)

7.1.1

01 Sep 21:34
add4adb
Compare
Choose a tag to compare

Changed

  • Bumped @metamask/utils from ^5.0.2 to ^8.1.0 #158 (#162)
  • Bumped @metamask/rpc-errors from ^5.0.0 to ^6.0.0 (#162)

7.1.0

25 Jul 17:50
465455d
Compare
Choose a tag to compare

Changed

  • Bumped @metamask/safe-event-emitter from ^2.0.0 to ^3.0.0 (#148)
  • Bumped @metamask/utils from ^5.0.1 to ^5.0.2 (#151)

Fixed

  • Fixed handling of empty batch array in requests (#153)

7.0.0

13 Apr 16:33
78edafb
Compare
Choose a tag to compare

Added

  • Added JSON-RPC notification handling (#104)
  • Added destroy method (#106)

Changed

  • BREAKING: Require a minimum Node version of 16 (#139)
  • BREAKING: Use @metamask/utils types (#105)
    • The JSON-RPC engine and all middleware now use @metamask/utils JSON-RPC types
  • (BREAKING) Return a null instead of undefined response id for malformed request objects (#91)
    • This is very unlikely to be breaking in practice, but the behavior could have been relied on.
  • Change package name to @metamask/json-rpc-engine (#139)
  • Use @metamask/rpc-errors (#138)

6.1.0

20 Nov 17:16
ec2e829
Compare
Choose a tag to compare

Added

  • Add PendingJsonRpcResponse interface for use in middleware (#75)

Changed

  • Use async/await and try/catch instead of Promise methods everywhere (#74)
    • Consumers may notice improved stack traces on certain platforms.

6.0.0

19 Nov 19:11
c3a774c
Compare
Choose a tag to compare

Added

  • Add docstrings for public JsonRpcEngine methods (#70)

Changed

  • (BREAKING) Refactor exports (#69)
    • All exports are now named, and available via the package entry point.
    • All default exports have been removed.
  • (BREAKING) Convert asMiddleware to instance method (#69)
    • The asMiddleware export has been removed.
  • (BREAKING) Add runtime typechecks to JsonRpcEngine.handle(), and error responses if they fail (#70)
    • Requests will now error if:
      • The request is not a plain object, or if the method property is not a string. Empty strings are allowed.
      • A next middleware callback is called with a truthy, non-function parameter.
  • Migrate to TypeScript (#69)
  • Hopefully improve stack traces by removing uses of Promise.then and .catch internally (#70)
  • Make some internal JsonRpcEngine methods static (#71)

5.4.0

19 Nov 19:12
cd832ce
Compare
Choose a tag to compare

Changed

  • Make the TypeScript types not terrible (#66, #67)

5.3.0

19 Nov 19:12
06b8bc8
Compare
Choose a tag to compare

Changed

  • Response object errors no longer include a stack property

5.2.0

19 Nov 19:13
65f60d9
Compare
Choose a tag to compare

Added

  • Promise signatures for engine.handle (#55)
    • So, in addition to engine.handle(request, callback), you can do e.g. await engine.handle(request).

Changed

  • Remove async and promise-to-callback dependencies
    • These dependencies were used internally for middleware flow control.
      They have been replaced with Promises and native async/await, which means that some operations are no longer eagerly executed.
      This change may affect consumers that depend on the eager execution of middleware during request processing, outside of middleware functions and request handlers.
      • In general, it is a bad practice to work with state that depends on middleware execution, while the middleware are executing.