Skip to content

Commit

Permalink
Bump @metamask/utils to 3.3.0 (#906)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrtenz committed Nov 3, 2022
1 parent 1d06db0 commit 554f3b4
Show file tree
Hide file tree
Showing 19 changed files with 45 additions and 155 deletions.
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@babel/preset-typescript": "^7.16.7",
"@metamask/snap-utils": "^0.22.3",
"@metamask/snaps-browserify-plugin": "^0.22.3",
"@metamask/utils": "^3.1.0",
"@metamask/utils": "^3.3.0",
"babelify": "^10.0.0",
"browserify": "^17.0.0",
"chokidar": "^3.5.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/controllers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@metamask/rpc-methods": "^0.22.3",
"@metamask/snap-types": "^0.22.3",
"@metamask/snap-utils": "^0.22.3",
"@metamask/utils": "^3.1.0",
"@metamask/utils": "^3.3.0",
"@xstate/fsm": "^2.0.0",
"concat-stream": "^2.0.0",
"cron-parser": "^4.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/examples/insights/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"dependencies": {
"@metamask/abi-utils": "^1.0.0",
"@metamask/utils": "^3.2.0"
"@metamask/utils": "^3.3.0"
},
"devDependencies": {
"@lavamoat/allow-scripts": "^2.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/examples/insights/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps-monorepo.git"
},
"source": {
"shasum": "l3QRoIUw1LSiuN1Y3bl88eqWDj3pc6AL5Wwp/j+ClhA=",
"shasum": "rWNQVlpSAlUXVByhpVyXxvNRTwEfabK4vS2MU6ANNwc=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/execution-environments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
"@metamask/providers": "^9.0.0",
"@metamask/snap-types": "^0.22.3",
"@metamask/snap-utils": "^0.22.3",
"@metamask/utils": "^3.1.0",
"@metamask/utils": "^3.3.0",
"eth-rpc-errors": "^4.0.3",
"pump": "^3.0.0",
"ses": "^0.15.15",
"stream-browserify": "^3.0.0",
"superstruct": "^0.16.5"
"superstruct": "^0.16.7"
},
"devDependencies": {
"@lavamoat/allow-scripts": "^2.0.3",
Expand Down
3 changes: 2 additions & 1 deletion packages/execution-environments/src/common/validation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertStruct, ChainIdStruct, HandlerType } from '@metamask/snap-utils';
import { ChainIdStruct, HandlerType } from '@metamask/snap-utils';
import { SnapKeyring } from '@metamask/snap-types';
import {
array,
Expand All @@ -17,6 +17,7 @@ import {
unknown,
} from 'superstruct';
import {
assertStruct,
Json,
JsonRpcIdStruct,
JsonRpcRequestStruct,
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"dependencies": {
"@metamask/snap-utils": "^0.22.3",
"@metamask/utils": "^3.2.0",
"@metamask/utils": "^3.3.0",
"webpack-sources": "^3.2.3"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dependencies": {
"@metamask/safe-event-emitter": "^2.0.0",
"@metamask/snap-types": "^0.22.3",
"@metamask/utils": "^3.1.0",
"@metamask/utils": "^3.3.0",
"nanoid": "^3.1.31"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/rpc-methods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
"@metamask/key-tree": "^5.0.2",
"@metamask/snap-utils": "^0.22.3",
"@metamask/types": "^1.1.0",
"@metamask/utils": "^3.1.0",
"@metamask/utils": "^3.3.0",
"eth-rpc-errors": "^4.0.2",
"nanoid": "^3.1.31",
"superstruct": "^0.16.5"
"superstruct": "^0.16.7"
},
"devDependencies": {
"@lavamoat/allow-scripts": "^2.0.3",
Expand Down
8 changes: 4 additions & 4 deletions packages/utils/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ module.exports = {
coverageReporters: ['clover', 'json', 'lcov', 'text', 'json-summary'],
coverageThreshold: {
global: {
branches: 88.47,
functions: 98.21,
lines: 97.8,
statements: 97.84,
branches: 88.1,
functions: 98.18,
lines: 97.75,
statements: 97.8,
},
},
moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'],
Expand Down
4 changes: 2 additions & 2 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@babel/core": "^7.18.6",
"@babel/types": "^7.18.7",
"@metamask/snap-types": "^0.22.3",
"@metamask/utils": "^3.1.0",
"@metamask/utils": "^3.3.0",
"@noble/hashes": "^1.1.3",
"@scure/base": "^1.1.1",
"cron-parser": "^4.5.0",
Expand All @@ -62,7 +62,7 @@
"rfdc": "^1.3.0",
"semver": "^7.3.7",
"ses": "^0.15.17",
"superstruct": "^0.16.5"
"superstruct": "^0.16.7"
},
"devDependencies": {
"@lavamoat/allow-scripts": "^2.0.3",
Expand Down
60 changes: 0 additions & 60 deletions packages/utils/src/assert.test.ts

This file was deleted.

50 changes: 0 additions & 50 deletions packages/utils/src/assert.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/utils/src/index.browser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './assert';
export * from './caveats';
export * from './deep-clone';
export * from './default-endowments';
Expand Down
1 change: 0 additions & 1 deletion packages/utils/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './assert';
export * from './caveats';
export * from './cronjob';
export * from './deep-clone';
Expand Down
7 changes: 5 additions & 2 deletions packages/utils/src/namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ import {
partial,
pick,
} from 'superstruct';
import { JsonRpcRequestStruct } from '@metamask/utils';
import { AssertionErrorConstructor, assertStruct } from './assert';
import {
JsonRpcRequestStruct,
AssertionErrorConstructor,
assertStruct,
} from '@metamask/utils';

export const CHAIN_ID_REGEX =
/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-a-zA-Z0-9]{1,32})$/u;
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/notification.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Infer, is, literal, object, string, unknown } from 'superstruct';
import { assertStruct } from '@metamask/utils';
import { ChainIdStruct } from './namespace';
import { assertStruct } from './assert';

export const EventStruct = object({
name: string(),
Expand Down
3 changes: 1 addition & 2 deletions packages/utils/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
SnapFunctionExports,
SnapKeyring as Keyring,
} from '@metamask/snap-types';
import { Json } from '@metamask/utils';
import { Json, assertStruct } from '@metamask/utils';
import {
any,
Infer,
Expand All @@ -19,7 +19,6 @@ import {
union,
} from 'superstruct';
import { valid as validSemver } from 'semver';
import { assertStruct } from './assert';

export enum NpmSnapFileNames {
PackageJson = 'package.json',
Expand Down
Loading

0 comments on commit 554f3b4

Please sign in to comment.