-
-
Notifications
You must be signed in to change notification settings - Fork 62
Bump @metamask/rpc-errors from 5.0.0 to 5.1.1 #147
Bump @metamask/rpc-errors from 5.0.0 to 5.1.1 #147
Conversation
legobeat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like types need some updates: https://github.com/MetaMask/json-rpc-engine/actions/runs/4751421966/jobs/8448051639#step:5:8
FAIL src/JsonRpcEngine.test.ts
● Test suite failed to run
src/JsonRpcEngine.test.ts:287:7 - error TS2322: Type 'JsonRpcError<DataWithOptionalCause>' is not assignable to type '{ code: number; message: string; data?: Json | undefined; stack?: string | undefined; }'.
Types of property 'data' are incompatible.
Type 'DataWithOptionalCause' is not assignable to type 'Json | undefined'.
Type '{ [key: string]: unknown; cause: unknown; }' is not assignable to type 'Json | undefined'.
Type '{ [key: string]: unknown; cause: unknown; }' is missing the following properties from type 'Json[]': length, pop, push, concat, and 29 more.
287 response.error = rpcErrors.internal({ message: 'foobar' });
~~~~~~~~~~~~~~
src/JsonRpcEngine.test.ts:308:7 - error TS2322: Type 'JsonRpcError<DataWithOptionalCause>' is not assignable to type '{ code: number; message: string; data?: Json | undefined; stack?: string | undefined; }'.
308 response.error = rpcErrors.internal({ message: 'foobar' });
~~~~~~~~~~~~~~
src/JsonRpcEngine.test.ts:370:9 - error TS2322: Type 'JsonRpcError<DataWithOptionalCause>' is not assignable to type '{ code: number; message: string; data?: Json | undefined; stack?: string | undefined; }'.
370 response.error = rpcErrors.internal({ message: 'foobar' });
~~~~~~~~~~~~~~
src/JsonRpcEngine.test.ts:405:9 - error TS2322: Type 'JsonRpcError<DataWithOptionalCause>' is not assignable to type '{ code: number; message: string; data?: Json | undefined; stack?: string | undefined; }'.
405 response.error = rpcErrors.internal({ message: 'foobar' });
~~~~~~~~~~~~~~
PASS src/asMiddleware.test.ts
PASS src/mergeMiddleware.test.ts
PASS src/createAsyncMiddleware.test.ts
PASS src/idRemapMiddleware.test.ts
FAIL src/createScaffoldMiddleware.test.ts
● Test suite failed to run
src/createScaffoldMiddleware.test.ts:25:9 - error TS2322: Type 'JsonRpcError<DataWithOptionalCause>' is not assignable to type '{ code: number; message: string; data?: Json | undefined; stack?: string | undefined; }'.
Types of property 'data' are incompatible.
Type 'DataWithOptionalCause' is not assignable to type 'Json | undefined'.
Type '{ [key: string]: unknown; cause: unknown; }' is not assignable to type 'Json | undefined'.
Type '{ [key: string]: unknown; cause: unknown; }' is missing the following properties from type 'Json[]': length, pop, push, concat, and 29 more.
25 response.error = rpcErrors.internal({ message: 'method3' });
~~~~~~~~~~~~~~
src/JsonRpcEngine.test.ts
Outdated
|
|
||
| engine.push(function (_request, response, next, _end) { | ||
| response.error = rpcErrors.internal({ message: 'foobar' }); | ||
| response.error = rpcErrors.internal({ message: 'foobar', data: [] }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mrtenz @FrederikBolding Does this look right to you? Had to add this to make the type pass.
It seems like it should be OK to keep passing unset data here? I don't get exactly how data gets required to fit into Json[], or if the change should be done in @metamask/utils or @metamask/rpc-errors, since I take this as mismatch between the two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d0f1c25 to
0dc46a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8bb635b to
1102f86
Compare
|
@dependabot recreate |
Dependabot couldn't find the original pull request head commit, f15f2cd.
1102f86 to
0a0b43d
Compare
|
@dependabot close and reopen for https://github.com/MetaMask/rpc-errors/releases/tag/v6.0.0 |
Bumps @metamask/rpc-errors from 5.0.0 to 5.1.1.
Release notes
Sourced from
@metamask/rpc-errors's releases.Changelog
Sourced from
@metamask/rpc-errors's changelog.Commits
af3ef435.1.1 (#92)e06f8d8Allow passing unknown values as cause (#91)1d1852d5.1.0 (#90)a388854Bump@metamask/utilsfrom 5.0.0 to 5.0.1 (#85)a324a7aBump ESLint configs and dependencies to latest version (#89)23c4857Bump@metamask/eslint-config-jestfrom 10.0.0 to 11.1.0 (#88)90024f9Standardise workflows per the module template as of April 2023 (#82)e6a9162Allow passing a cause to predefined error functions (#83)You can trigger a rebase of this PR by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)