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 17, 2023
1 parent 94a80fd commit ad80469
Show file tree
Hide file tree
Showing 105 changed files with 626 additions and 609 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.21.0#./.yarn/patches/@babel-core-npm-7.21.0-fb3817b0e5.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 @@ -33,7 +33,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": "CEPckkMZAo0d/lvHEPX5Uw1aYRj9Kaw9duNW3zDaVuc=",
"shasum": "JZe63wIs8ZlRwAR5YEY8YFRk/GdCQJJ8TWrXjAbjVI8=",
"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 @@ -33,7 +33,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": "c9LX+tjKiOir+9k/LEZUMNV+G4/qnjx0sGPSl5funKY=",
"shasum": "2ApeS0cIQTLoxOMdnWon7p3y+qTRGCgntXkDFEngVRo=",
"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 @@ -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": "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 @@ -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/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 @@ -32,7 +32,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 @@ -32,7 +32,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": "ZaxFyQpL73Ed7hsI6fKTSX2aQUPPDYSfzj+ms97xyy0=",
"shasum": "DHSxxDgZ0V3hzZM5EtF0zlZrH91b9LPAlU88D+fFvMw=",
"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 @@ -32,7 +32,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 @@ -32,7 +32,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 @@ -32,7 +32,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": "Ab7GPjvgSL8rEFmw5Qpx9zmVntLHlCZ02wFoi34W324=",
"shasum": "UNLNxUo0i/LMv2VuTMg2yV3KjkeIcrA4R3PmNCz3l1A=",
"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 @@ -32,7 +32,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": "GKEAFoYbr3FiHdv+2XTHq6FwrxrXW3ZbnGU3A9A6CMM=",
"shasum": "78MgIzNhcO96zvhXWCy1mAY8S2ryU9Dng5hYEeGNgPM=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,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 @@ -33,7 +33,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": "tAQm9VEoN5SOpfS0olV6oSqsc0+t1Suml6wXWh7Vhi4=",
"shasum": "2b4yM+JEdKBDC8H+eRz6Yup754w10ITzD86eKW+86qE=",
"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 @@ -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/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 @@ -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/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": "2VjJRkNJLNtWJxUqM95KXVRY7g+HDE4RDFSBfz0jlGw=",
"shasum": "mJTuzIpFkCZ7SAvhSOhHEffOaai1NOnzew4sJm6zq3s=",
"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 @@ -32,7 +32,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 @@ -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
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": "ZR6eoyZBNtFeGLwQ7xNeSgmnjBTR4rgbYhDGQTH0KrM=",
"shasum": "tXC1q8WRA0hqu8BraMo42JEdmBnNDha20p6Yf/ZFeV0=",
"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 @@ -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
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": "w3BC89KyurXyhY0x+vTcIrFtvFJjUOMecu+1PxnbTHM=",
"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 @@ -33,7 +33,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 @@ -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
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 ad80469

Please sign in to comment.