Skip to content

Commit

Permalink
Bump MetaMask core packages (#1818)
Browse files Browse the repository at this point in the history
Rebased and updated version of
#1728

- Updates and uses `@metamask/rpc-errors` everywhere
- Updates and uses `@metamask/json-rpc-engine` everywhere
- Updates the following packages to latest:
`@metamask/permission-controller`, `@metamask/approval-controller`,
`@metamask/providers`, `@metamask/eth-json-rpc-middleware`

Huge thank you to @legobeat for all of the help landing this ❤️

Blocked by #1823

---------

Co-authored-by: legobt <[email protected]>
Co-authored-by: Maarten Zuidhoorn <[email protected]>
  • Loading branch information
3 people committed Oct 20, 2023
1 parent 495bdd4 commit 36fd33b
Show file tree
Hide file tree
Showing 108 changed files with 655 additions and 624 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/dist/polyfills.js b/dist/polyfills.js
index 4f4f95302a6da4643b822262921f668abc8c3db1..78202915fa5c952222aa1751442f7a9410d73dc4 100644
--- a/dist/polyfills.js
+++ b/dist/polyfills.js
@@ -10,7 +10,7 @@ function builtinsPolyfills() {
libs.set('util', require.resolve('rollup-plugin-node-polyfills/polyfills/util'));
libs.set('sys', libs.get('util'));
libs.set('events', require.resolve('rollup-plugin-node-polyfills/polyfills/events'));
- libs.set('stream', require.resolve('rollup-plugin-node-polyfills/polyfills/stream'));
+ libs.set('stream', require.resolve('stream-browserify'));
libs.set('path', require.resolve('rollup-plugin-node-polyfills/polyfills/path'));
libs.set('querystring', require.resolve('rollup-plugin-node-polyfills/polyfills/qs'));
libs.set('punycode', require.resolve('rollup-plugin-node-polyfills/polyfills/punycode'));
diff --git a/esm/polyfills.js b/esm/polyfills.js
index 28b0ea77e1f7bc5766737caaa8cb5c5db25a279e..ae71645a1d24c46fc7987135aff0332e89017ec1 100644
--- a/esm/polyfills.js
+++ b/esm/polyfills.js
@@ -7,7 +7,7 @@ export function builtinsPolyfills() {
libs.set('util', require.resolve('rollup-plugin-node-polyfills/polyfills/util'));
libs.set('sys', libs.get('util'));
libs.set('events', require.resolve('rollup-plugin-node-polyfills/polyfills/events'));
- libs.set('stream', require.resolve('rollup-plugin-node-polyfills/polyfills/stream'));
+ libs.set('stream', require.resolve('stream-browserify'));
libs.set('path', require.resolve('rollup-plugin-node-polyfills/polyfills/path'));
libs.set('querystring', require.resolve('rollup-plugin-node-polyfills/polyfills/qs'));
libs.set('punycode', require.resolve('rollup-plugin-node-polyfills/polyfills/punycode'));
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
},
"resolutions": {
"@babel/core": "patch:@babel/core@npm%3A7.23.2#./.yarn/patches/@babel-core-npm-7.23.2-b93f586907.patch",
"@esbuild-plugins/node-modules-polyfill@^0.2.2": "patch:@esbuild-plugins/node-modules-polyfill@npm%3A0.2.2#./.yarn/patches/@esbuild-plugins-node-modules-polyfill-npm-0.2.2-f612681798.patch",
"@lavamoat/lavapack@^5.4.1": "patch:@lavamoat/lavapack@npm%3A5.4.1#./.yarn/patches/@lavamoat-lavapack-npm-5.4.1-2548b3e225.patch",
"@types/glob@*": "patch:@types/glob@npm%3A7.1.4#./.yarn/patches/@types-glob-npm-7.1.4-d45247eaa2.patch",
"@types/glob@^7.1.1": "patch:@types/glob@npm%3A7.1.4#./.yarn/patches/@types-glob-npm-7.1.4-d45247eaa2.patch",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/bip32/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"dependencies": {
"@metamask/key-tree": "^9.0.0",
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^",
"@metamask/snaps-ui": "workspace:^",
"@metamask/utils": "^8.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/bip32/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.git"
},
"source": {
"shasum": "k9a+qc7tJNdko1Kb1m9GsjwODLwJipQaW4OZt9KHFsY=",
"shasum": "O0Ncs/BuMYDj6nUxHCvIn1rO5BkQi5o7bFSs9Yw3lH8=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/bip44/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"dependencies": {
"@metamask/key-tree": "^9.0.0",
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^",
"@metamask/snaps-ui": "workspace:^",
"@metamask/utils": "^8.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/bip44/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.git"
},
"source": {
"shasum": "x/St7jjXmPv5SXyAWe44u8aFB8TRfKx4B7oRBrWNv4k=",
"shasum": "MgSpx86WLoY6ebo+Ta3qcCO9yiuIdp5mY8FlooDZJZg=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/browserify-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"lint:dependencies": "depcheck"
},
"dependencies": {
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "uAC3J0T7DOshJ+th+YB9RxUNTx/5I1XLgcJqHkTB6Ek=",
"shasum": "UmRhDLrx9n3NZ/qrj0O8kdRLXgb3rLKd4hMeSWaK61o=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/browserify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint:dependencies": "depcheck"
},
"dependencies": {
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/browserify/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.git"
},
"source": {
"shasum": "vdovVqAuPpZUhBv7sp9jeWcbswewQ+b1/DmLtqMzCo4=",
"shasum": "ARCsvmYbTNhSuYkKrCGu7Js9UKIy1x0+tMconKGJ5/U=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/cronjobs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint:dependencies": "depcheck"
},
"dependencies": {
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^",
"@metamask/snaps-ui": "workspace:^"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/cronjobs/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.git"
},
"source": {
"shasum": "IdCbn1U58HdyfhTTSg2i6cYEmxe10PFyaq9b/h2vJF4=",
"shasum": "cak4KyQA/ZFVTwJjOAmWw3df6z4XJnD+KTd1yZVZQdo=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/dialogs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint:dependencies": "depcheck"
},
"dependencies": {
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^",
"@metamask/snaps-ui": "workspace:^"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/dialogs/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.git"
},
"source": {
"shasum": "ESPW+UbPbHYlyKxEc4UHB/GviiwDyzAkf+HdJsHieG0=",
"shasum": "49Ki82EdQq7D43dfQc6FSZ9BOs0gDniYJC6n5KxvoVo=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/ethereum-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint:dependencies": "depcheck"
},
"dependencies": {
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^",
"@metamask/utils": "^8.1.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "Oyxv5Zjx6cNafk2unlOO0QvIaMhrvFGldQAarIYhEvc=",
"shasum": "SxE+1qPN5yMQft8XQ2fzE8zVytVNwBOUbysNM0Xzro8=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/ethers-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint:dependencies": "depcheck"
},
"dependencies": {
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^",
"@metamask/snaps-ui": "workspace:^",
"ethers": "^6.3.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/ethers-js/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.git"
},
"source": {
"shasum": "ZL0wwUmwZ8edoJXU/IS2nQdEEguzTHDB7+BGZOZFh+c=",
"shasum": "dgCNzP9t4aozrGzU4T42NENKgKTBa+H6GOynvc0NVd0=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/get-entropy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint:dependencies": "depcheck"
},
"dependencies": {
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^",
"@metamask/snaps-ui": "workspace:^",
"@metamask/utils": "^8.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/get-entropy/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.git"
},
"source": {
"shasum": "b8RW5eakG1s2QVux4dCWZ3onMb+YfphwqwWoGsdxr6k=",
"shasum": "/vHSKNUGmy1NiS/YgXRopAXAhh5ziQuN4/G+tu8kNfQ=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/get-file/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.git"
},
"source": {
"shasum": "KeR2SaLL7hPmuTOW4n1Tz0VhgMEYqUTmjIMJHjdxBC8=",
"shasum": "AC9lKxpF32Lg5eUx+cl46l9hWzB940tYCWkxsCZNcIs=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/get-locale/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint:dependencies": "depcheck"
},
"dependencies": {
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^",
"@metamask/snaps-ui": "workspace:^",
"@metamask/utils": "^8.1.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/get-locale/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.git"
},
"source": {
"shasum": "ijyKIyKjBqGaHpflKJ3YwRbIv1cqgB7Y0Dt5aq5KFcs=",
"shasum": "VDLdN2iWLu1ishmLKq0ylxJbSTaVgpMVawinDjgDNOo=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"dependencies": {
"@metamask/key-tree": "^9.0.0",
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^",
"@metamask/utils": "^8.1.0",
"@noble/hashes": "^1.3.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "2Vv7GrTwARIvdLtIBvL3gI67HvqWqqWgebf7MsHxO58=",
"shasum": "b+JT7CvletGtdV7YQ7N3MQA+vMLKsLODVKCbMdJbNgs=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},
"dependencies": {
"@metamask/key-tree": "^9.0.0",
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^",
"@metamask/snaps-ui": "workspace:^",
"@metamask/utils": "^8.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "nfmXCbGaOoKZRnBDB6QXT8NwKwRqjd4EPX6e4oKWjC8=",
"shasum": "7eoQVjy43iBLByj9iYPD6VWPybret4NQeIQXjomeZC8=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/json-rpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint:dependencies": "depcheck"
},
"dependencies": {
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/json-rpc/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.git"
},
"source": {
"shasum": "GrWPU9PgPe8FBLSjP25Afh0zlgpt9KFUJbNAxmyEcUI=",
"shasum": "kOLxHm0PDeimorD5665ajVClMbCgq4dcR47P4sYg57c=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/manage-state/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint:dependencies": "depcheck"
},
"dependencies": {
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/manage-state/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.git"
},
"source": {
"shasum": "+A4Ojlwr+u3QRGbXEW7tNtKyI/NFODGofdcaqH5a304=",
"shasum": "OGmcoozWOgIrP/NOhtsXhD17TQfrXii7M7DNFbBDHhA=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/network-access/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint:dependencies": "depcheck"
},
"dependencies": {
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^",
"@metamask/utils": "^8.1.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "XkHPB72SdS3CYg4H0k3Xwab7tX/UOw76tazPRaeKfR4=",
"shasum": "DKPHWa48xahHeEDbVo/RM0SRpYVoVdUj93PkQVxTF/4=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/notifications/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint:dependencies": "depcheck"
},
"dependencies": {
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "qS5I021eGSLim3V5i79oANEIqhtT3L6R825Rtb6OxJ8=",
"shasum": "TZW+CtPEHAya0jED3VY90IvX8vCMIba1kd/zGVm/KBs=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/rollup-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint:dependencies": "depcheck"
},
"dependencies": {
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "O2axJTUpSWByXOxPFDp5ygiCVcbARq378JkTyceUB6c=",
"shasum": "zJNV080XJ2XRMTMdBtfHJrkiL+i1f/EE8X9sK7xGJdk=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"lint:dependencies": "depcheck"
},
"dependencies": {
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/wasm/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.git"
},
"source": {
"shasum": "Z1nuI6uEx0AkzaWRA8MbxP4KA93SOmlXsUZE2KZWcFA=",
"shasum": "G6jLmVw81D5Y2tzvcbwBgxkOrcYn/hFMoruaZavY6P4=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/webpack-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint:dependencies": "depcheck"
},
"dependencies": {
"@metamask/rpc-errors": "^5.1.1",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/snaps-types": "workspace:^"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "CHsW41YUXAecl+03+ViwwQmN1WmK3nVsXOaOjUxJ2QM=",
"shasum": "DEL7I08zjOgMEr3Ck4IFie2Ly0T9fSQL4TUKZArIhuU=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Loading

0 comments on commit 36fd33b

Please sign in to comment.