@metamask/json-rpc-engine
Advanced tools
Comparing version 7.1.1 to 7.2.0
@@ -9,2 +9,6 @@ # Changelog | ||
## [7.2.0] | ||
### Added | ||
- Applied eslint rules from core monorepo ([#172](https://github.com/MetaMask/json-rpc-engine/pull/172)) | ||
## [7.1.1] | ||
@@ -83,3 +87,4 @@ ### Changed | ||
[Unreleased]: https://github.com/MetaMask/json-rpc-engine/compare/v7.1.1...HEAD | ||
[Unreleased]: https://github.com/MetaMask/json-rpc-engine/compare/v7.2.0...HEAD | ||
[7.2.0]: https://github.com/MetaMask/json-rpc-engine/compare/v7.1.1...v7.2.0 | ||
[7.1.1]: https://github.com/MetaMask/json-rpc-engine/compare/v7.1.0...v7.1.1 | ||
@@ -86,0 +91,0 @@ [7.1.0]: https://github.com/MetaMask/json-rpc-engine/compare/v7.0.0...v7.1.0 |
@@ -1,3 +0,3 @@ | ||
import { Json, JsonRpcParams, JsonRpcRequest, PendingJsonRpcResponse } from '@metamask/utils'; | ||
import { JsonRpcMiddleware } from './JsonRpcEngine'; | ||
import type { Json, JsonRpcParams, JsonRpcRequest, PendingJsonRpcResponse } from '@metamask/utils'; | ||
import type { JsonRpcMiddleware } from './JsonRpcEngine'; | ||
export declare type AsyncJsonRpcEngineNextCallback = () => Promise<void>; | ||
@@ -4,0 +4,0 @@ export declare type AsyncJsonrpcMiddleware<Params extends JsonRpcParams, Result extends Json> = (request: JsonRpcRequest<Params>, response: PendingJsonRpcResponse<Result>, next: AsyncJsonRpcEngineNextCallback) => Promise<void>; |
@@ -42,3 +42,2 @@ "use strict"; | ||
// the consumer's async middleware will resume executing. | ||
// eslint-disable-next-line node/callback-return | ||
next((runReturnHandlersCallback) => { | ||
@@ -49,3 +48,3 @@ // This callback comes from JsonRpcEngine._runReturnHandlers | ||
}); | ||
await nextPromise; | ||
return nextPromise; | ||
}; | ||
@@ -52,0 +51,0 @@ try { |
@@ -1,3 +0,3 @@ | ||
import { Json, JsonRpcParams } from '@metamask/utils'; | ||
import { JsonRpcMiddleware } from './JsonRpcEngine'; | ||
import type { Json, JsonRpcParams } from '@metamask/utils'; | ||
import type { JsonRpcMiddleware } from './JsonRpcEngine'; | ||
declare type ScaffoldMiddlewareHandler<Params extends JsonRpcParams, Result extends Json> = JsonRpcMiddleware<Params, Result> | Json; | ||
@@ -4,0 +4,0 @@ /** |
@@ -1,3 +0,3 @@ | ||
import { Json, JsonRpcParams } from '@metamask/utils'; | ||
import { JsonRpcMiddleware } from './JsonRpcEngine'; | ||
import type { Json, JsonRpcParams } from '@metamask/utils'; | ||
import type { JsonRpcMiddleware } from './JsonRpcEngine'; | ||
/** | ||
@@ -4,0 +4,0 @@ * Returns a middleware function that overwrites the `id` property of each |
import SafeEventEmitter from '@metamask/safe-event-emitter'; | ||
import { JsonRpcError as SerializedJsonRpcError, JsonRpcRequest, JsonRpcResponse, JsonRpcNotification, Json, JsonRpcParams, PendingJsonRpcResponse } from '@metamask/utils'; | ||
import type { JsonRpcError as SerializedJsonRpcError, JsonRpcRequest, JsonRpcResponse, JsonRpcNotification, Json, JsonRpcParams, PendingJsonRpcResponse } from '@metamask/utils'; | ||
export declare type JsonRpcEngineCallbackError = Error | SerializedJsonRpcError | null; | ||
@@ -4,0 +4,0 @@ export declare type JsonRpcEngineReturnHandler = (done: (error?: JsonRpcEngineCallbackError) => void) => void; |
@@ -144,5 +144,7 @@ "use strict"; | ||
} | ||
// Excepting notifications, there will always be a response, and it will | ||
// always have any error that is caught and propagated. | ||
resolve(res); | ||
else { | ||
// Excepting notifications, there will always be a response, and it will | ||
// always have any error that is caught and propagated. | ||
resolve(res); | ||
} | ||
}).catch(reject); | ||
@@ -149,0 +151,0 @@ }); |
@@ -1,3 +0,3 @@ | ||
import { Json, JsonRpcParams } from '@metamask/utils'; | ||
import { JsonRpcMiddleware } from './JsonRpcEngine'; | ||
import type { Json, JsonRpcParams } from '@metamask/utils'; | ||
import type { JsonRpcMiddleware } from './JsonRpcEngine'; | ||
/** | ||
@@ -4,0 +4,0 @@ * Takes a stack of middleware and joins them into a single middleware function. |
{ | ||
"name": "@metamask/json-rpc-engine", | ||
"version": "7.1.1", | ||
"version": "7.2.0", | ||
"description": "A tool for processing JSON-RPC messages.", | ||
@@ -44,6 +44,6 @@ "homepage": "https://github.com/MetaMask/json-rpc-engine#readme", | ||
"@metamask/auto-changelog": "^3.1.0", | ||
"@metamask/eslint-config": "^11.0.1", | ||
"@metamask/eslint-config-jest": "^11.0.0", | ||
"@metamask/eslint-config-nodejs": "^11.0.1", | ||
"@metamask/eslint-config-typescript": "^11.0.0", | ||
"@metamask/eslint-config": "^12.2.0", | ||
"@metamask/eslint-config-jest": "^12.1.0", | ||
"@metamask/eslint-config-nodejs": "^12.1.0", | ||
"@metamask/eslint-config-typescript": "^12.1.0", | ||
"@types/jest": "^29.5.0", | ||
@@ -56,7 +56,9 @@ "@types/node": "^18.15.11", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-import-resolver-typescript": "^2.5.0", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-jest": "^27.1.5", | ||
"eslint-plugin-jsdoc": "^39.6.2", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-n": "^15.7.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-promise": "^6.1.1", | ||
"jest": "^29.5.0", | ||
@@ -63,0 +65,0 @@ "jest-it-up": "^2.2.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
86726
726
29