Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Commit 5bf58ad

Browse files
chore: migrate to @metamask/superstruct and update required dependencies (#355)
* chore(deps): bump @metamask/utils from 8.4.0 to 9.0.0 Bumps [@metamask/utils](https://github.com/MetaMask/utils) from 8.4.0 to 9.0.0. - [Release notes](https://github.com/MetaMask/utils/releases) - [Changelog](https://github.com/MetaMask/utils/blob/main/CHANGELOG.md) - [Commits](MetaMask/utils@v8.4.0...v9.0.0) --- updated-dependencies: - dependency-name: "@metamask/utils" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore: migrate to '@metamask/superstruct' * chore(deps): bump @metamask/rpc-errors from 6.3.0 to 6.3.1 (#350) Bumps [@metamask/rpc-errors](https://github.com/MetaMask/rpc-errors) from 6.3.0 to 6.3.1. - [Release notes](https://github.com/MetaMask/rpc-errors/releases) - [Changelog](https://github.com/MetaMask/rpc-errors/blob/main/CHANGELOG.md) - [Commits](MetaMask/rpc-errors@v6.3.0...v6.3.1) --- updated-dependencies: - dependency-name: "@metamask/rpc-errors" dependency-type: indirect update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: update `yarn.lock` * chore: update dependencies --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent bf23e8d commit 5bf58ad

27 files changed

+71
-51
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@
3939
},
4040
"dependencies": {
4141
"@metamask/snaps-sdk": "^6.0.0",
42-
"@metamask/utils": "^8.4.0",
42+
"@metamask/superstruct": "^3.1.0",
43+
"@metamask/utils": "^9.1.0",
4344
"@types/uuid": "^9.0.8",
4445
"bech32": "^2.0.0",
45-
"superstruct": "^1.0.3",
4646
"uuid": "^9.0.1"
4747
},
4848
"devDependencies": {
@@ -53,7 +53,7 @@
5353
"@metamask/eslint-config-jest": "^12.1.0",
5454
"@metamask/eslint-config-nodejs": "^12.1.0",
5555
"@metamask/eslint-config-typescript": "^12.1.0",
56-
"@metamask/providers": "^17.0.0",
56+
"@metamask/providers": "^17.1.1",
5757
"@types/jest": "^29.5.12",
5858
"@types/node": "^20.12.12",
5959
"@typescript-eslint/eslint-plugin": "^5.62.0",

src/JsonRpcRequest.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { is } from 'superstruct';
1+
import { is } from '@metamask/superstruct';
22

33
import { JsonRpcRequestStruct } from './JsonRpcRequest';
44

src/JsonRpcRequest.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
import {
2+
array,
3+
literal,
4+
number,
5+
record,
6+
string,
7+
union,
8+
} from '@metamask/superstruct';
9+
import type { Infer } from '@metamask/superstruct';
110
import { JsonStruct } from '@metamask/utils';
2-
import type { Infer } from 'superstruct';
3-
import { array, literal, number, record, string, union } from 'superstruct';
411

512
import { exactOptional, object } from './superstruct';
613

src/KeyringClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { assert } from '@metamask/superstruct';
12
import type { Json } from '@metamask/utils';
2-
import { assert } from 'superstruct';
33
import { v4 as uuid } from 'uuid';
44

55
import type {

src/api/account.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assert } from 'superstruct';
1+
import { assert } from '@metamask/superstruct';
22

33
import { KeyringAccountStruct } from './account';
44

src/api/account.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import type { Infer } from '@metamask/superstruct';
2+
import { array, enums, record, string } from '@metamask/superstruct';
13
import { JsonStruct } from '@metamask/utils';
2-
import type { Infer } from 'superstruct';
3-
import { array, enums, record, string } from 'superstruct';
44

55
import { object } from '../superstruct';
66
import { UuidStruct } from '../utils';

src/api/balance.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Infer } from 'superstruct';
2-
import { string } from 'superstruct';
1+
import type { Infer } from '@metamask/superstruct';
2+
import { string } from '@metamask/superstruct';
33

44
import { object } from '../superstruct';
55
import { StringNumberStruct } from '../utils';

src/api/caip.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { is, type Infer } from 'superstruct';
1+
import { is, type Infer } from '@metamask/superstruct';
22

33
import { definePattern } from '../superstruct';
44

src/api/export.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import type { Infer } from '@metamask/superstruct';
2+
import { record, string } from '@metamask/superstruct';
13
import { JsonStruct } from '@metamask/utils';
2-
import type { Infer } from 'superstruct';
3-
import { record, string } from 'superstruct';
44

55
export const KeyringAccountDataStruct = record(string(), JsonStruct);
66

src/api/request.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import type { Infer } from '@metamask/superstruct';
2+
import { array, record, string, union } from '@metamask/superstruct';
13
import { JsonStruct } from '@metamask/utils';
2-
import type { Infer } from 'superstruct';
3-
import { array, record, string, union } from 'superstruct';
44

55
import { exactOptional, object } from '../superstruct';
66
import { UuidStruct } from '../utils';

0 commit comments

Comments
 (0)