Skip to content

Commit

Permalink
Bump WebdriverIO (#1702)
Browse files Browse the repository at this point in the history
* Bump WDIO

* Dedupe puppeteer

* Update LavaMoat policies

* Update Chromedriver and Chrome

* Patch some incompatibilities

* Try reverting back to Node 18 types

* Pin types/node

* Update example snaps

* Dedupe geckodriver

* Upgrade wdio-geckodriver-service

* Update LavaMoat policies

* Try resolution for got

* Trigger CI

---------

Co-authored-by: MetaMask Bot <[email protected]>
  • Loading branch information
FrederikBolding and metamaskbot authored Aug 30, 2023
1 parent 1d14bcb commit 4dfcc60
Show file tree
Hide file tree
Showing 39 changed files with 1,479 additions and 1,679 deletions.
26 changes: 26 additions & 0 deletions .yarn/patches/@wdio-browser-runner-npm-8.15.9-c3dd0d4a69.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/build/vite/utils.js b/build/vite/utils.js
index 3373a06d6b81f85c828bc9b4fa2fdd09e5a3b0ad..7098662a8cb9e72c6c24023b1988fa56d2190aa7 100644
--- a/build/vite/utils.js
+++ b/build/vite/utils.js
@@ -46,6 +46,11 @@ export async function getTemplate(options, env, spec, p = process) {
catch (err) {
log.error(`Failed to setup source-map-support: ${err.message}`);
}
+
+ const mochaPath = await resolve('mocha', `${rootFileUrl}/node_modules`);
+ const mochaCSSHref = path.join(url.fileURLToPath(path.dirname(mochaPath)), 'mocha.css');
+ const mochaJSSrc = path.join(url.fileURLToPath(path.dirname(mochaPath)), 'mocha.js');
+
return /* html */ `
<!doctype html>
<html>
@@ -78,7 +83,8 @@ export async function getTemplate(options, env, spec, p = process) {
return mod
}
</script>
- <script type="module" src="/node_modules/mocha/mocha.js"></script>
+ <link rel="stylesheet" href="${mochaCSSHref}">
+ <script type="module" src="${mochaJSSrc}"></script>
${sourceMapScript}
<script type="module">
${sourceMapSetupCommand}
11 changes: 11 additions & 0 deletions .yarn/patches/jest-util-npm-29.6.3-6ffdea2c1c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff --git a/build/isInteractive.js b/build/isInteractive.js
index b4588ba0514d72b9248802700a15c2fe5e754932..e6e878cf46f0a6fae0f61300742def9a39aa22c4 100644
--- a/build/isInteractive.js
+++ b/build/isInteractive.js
@@ -18,5 +18,5 @@ function _ciInfo() {
* LICENSE file in the root directory of this source tree.
*/
var _default =
- !!process.stdout.isTTY && process.env.TERM !== 'dumb' && !_ciInfo().isCI;
+ !process.browser && !!process.stdout.isTTY && process.env.TERM !== 'dumb' && !_ciInfo().isCI;
exports.default = _default;
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@
"@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",
"@types/mocha@^10.0.1": "patch:@types/mocha@npm:10.0.1#.yarn/patches/@types-mocha-npm-10.0.1-7c94e9e170.patch",
"@wdio/browser-runner@^8.15.9": "patch:@wdio/browser-runner@npm%3A8.15.9#./.yarn/patches/@wdio-browser-runner-npm-8.15.9-c3dd0d4a69.patch",
"find-babel-config": "^2.0.0",
"got": "^13.0.0",
"inline-source-map@~0.6.0": "patch:inline-source-map@npm%3A0.6.2#./.yarn/patches/inline-source-map-npm-0.6.2-96902459a0.patch",
"jest-fetch-mock@^3.0.3": "patch:jest-fetch-mock@npm:3.0.3#.yarn/patches/jest-fetch-mock-npm-3.0.3-ac072ca8af.patch",
"jest-util@^29.5.0": "patch:jest-util@npm%3A29.6.3#./.yarn/patches/jest-util-npm-29.6.3-6ffdea2c1c.patch",
"jest-util@^29.6.3": "patch:jest-util@npm%3A29.6.3#./.yarn/patches/jest-util-npm-29.6.3-6ffdea2c1c.patch",
"lavamoat-browserify@^15.7.1": "patch:lavamoat-browserify@npm%3A15.7.1#./.yarn/patches/lavamoat-browserify-npm-15.7.1-c443b6ace1.patch",
"luxon@^3.2.1": "patch:luxon@npm%3A3.3.0#./.yarn/patches/luxon-npm-3.3.0-bdbae9bfd5.patch"
},
Expand All @@ -72,10 +76,10 @@
"@swc/cli": "^0.1.62",
"@swc/core": "1.3.78",
"@types/jest": "^27.5.1",
"@types/node": "^20.3.1",
"@types/node": "18.14.2",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
"chromedriver": "^114.0.1",
"chromedriver": "^116.0.0",
"depcheck": "^1.4.5",
"eslint": "^8.27.0",
"eslint-config-prettier": "^8.5.0",
Expand All @@ -87,7 +91,7 @@
"eslint-plugin-promise": "^6.1.1",
"execa": "^5.1.1",
"favicons": "^7.1.2",
"geckodriver": "^3.2.0",
"geckodriver": "^4.2.0",
"jest": "^29.0.2",
"lint-staged": "^12.4.1",
"minimatch": "^7.4.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-snap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@swc/core": "1.3.78",
"@swc/jest": "^0.2.26",
"@types/jest": "^27.5.1",
"@types/node": "^20.3.1",
"@types/node": "18.14.2",
"@types/rimraf": "^3.0.0",
"@types/yargs": "^17.0.24",
"@typescript-eslint/eslint-plugin": "^5.42.1",
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": "CBWVUSVd3jCB0EJVT+zEvdZYh9HAMo6q2lpFHH1KzZo=",
"shasum": "m77hc11RCuij1HByEtWIUYQx8GKmmUfLb4OL1UfrXdQ=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "rTJTHmiYsOwliKNca00OuEHuHRCxTlsHTvC3EudqgCc=",
"shasum": "QWyksoWhazupKReQW6PsaDKG4H1X2TCEjer6Rfo8TF4=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "ZgiXnGDvL4FXnwTlJ1hrj1UK2GS8xTR8/t1BeQ5t90o=",
"shasum": "xOODhSd8tm/DlFsi71Rg+zBBvna09C+4q5bGuQWcNC8=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "lEnQ4LSn3Vs/i+0yewRLF3fDeKNHKF/UX1VmMVXBqsE=",
"shasum": "IhWWzU9xOVvn1C5t3VKdR2bdvuysJGTjdFlbRaGC8Bo=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "C/QwxQj0jR3WygTXwxC+m5od/921Xrzc4Z6a746A1u4=",
"shasum": "LIZCyYi0LQEH8Jst53VjWrtw2MhZibL7ylElWg9GZgs=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "dFWRMu7w+Rd/1x948MCLZGzObceaGCr6cnNcVSQlaRc=",
"shasum": "IqvWoXypOYaQZ9mVLTjI7nPC/dh6XhHNy5RNV04NEhA=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "85IedakoAqF5xtpM+QRspqCEX37RgcHhoKqnFfDYiYU=",
"shasum": "+HithSxrUefv7cwjdRAWTXYxfdwJtJAst6ATM10U4nM=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "TXzy3P45M3T/95fQOIYDFi7yjOBPauFyNV6+N55GIJ8=",
"shasum": "gMIv4xVbq6HVM/WU6QpJHU0ayTHnUSzS/M6QT28PS0M=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "CAIwurOAdN9pHbXDeqwIu+E9mXnAS8yylrpxouPFsYM=",
"shasum": "+SB5dTh3M4raHJ5C/5zZwezRFasAgFoBOtmMZtTFMRQ=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "HtM0+OHD7vORlHQt8Hla0It5oaMgJ0ooqpgl8nqZLtE=",
"shasum": "2xxJIVBgF3i0x+/CP4kxAaWaHH1DNO/z6lgnBv0UmZI=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "GhWyQn8NAG7L5E3+6YS3ZIL72SRbYwC4rPn59m+m3ys=",
"shasum": "cLpmUzninDwenYauHNHBdWWhgARwkWGQAxUXHNVMGsQ=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "K0o35gKOu8KDJb4urwuGzhoPkE9OPjwA6Sb08seRdDY=",
"shasum": "eLC0h2fl+3ZB55WQu+o+nA3T/b6qp9yXnN5kUMcuSAw=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "Vjp8paYaHuaEZzNA1KmLTSEHNvO5BxO5g8m58+92gDY=",
"shasum": "+vsF1ik/wdawqBPTJHUSH18JWmQVkGSDQnGtQogppEg=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "JUHuXTTDPsolO9UF5noDH2Ut8qe64Lk5IVVNO2DfzeY=",
"shasum": "cUMbR8Yu+PdkgNnCdpEd+On4X7cu5XlWH7vPWsKMohc=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "V1BSJvvuh6beVZ0rgmLrmtwPJe+hBPIJ4xZbPcA0/G8=",
"shasum": "Bv3hrlo9drMd+ROGooNXCSDeP8jPFeka+g/GNFZt8lg=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "YXxtxjP6SbPiDHzskryvh0QA6Hvv/FurI+GwNN8WF0U=",
"shasum": "wqf+7SaMQgrortuPpJIA9v/J0MIlpOePg0at8CWsRzU=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "VLMIjtmKNMvf5oCRX56KKu0P1t/TWBsEyeHbulP6bww=",
"shasum": "lhYQye/v9vWcNBHCoP98IaDEzpOMwB+oM3Kk5AZfgwQ=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "vTO4u+r50vs1S/mZ50QPrpTL/WSjtMEEG7GI0tMMnHU=",
"shasum": "UBl0J94gItbq0EOjahq4lrOCNJ1tq3zM6ldoC3sRpnI=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "mYgoreKol2M0vXCADK74P5y76F2ik5+/6WNiuYUmTug=",
"shasum": "V7EPb/CWQjyOYgrHAYpabJByzSg9mpxuGFvzZnVMhaE=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
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": "S2CsOBMneFGlsYQuUUhTVe09AUVq7d7ddwBfRBTT/hk=",
"shasum": "oj2ar7mKAfePJIJm3h0lm0dQ2JqX47I1K4SO1neLRk4=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/rpc-methods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@swc/cli": "^0.1.62",
"@swc/core": "1.3.78",
"@swc/jest": "^0.2.26",
"@types/node": "^20.3.1",
"@types/node": "18.14.2",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
"deepmerge": "^4.2.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/snaps-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"@swc/jest": "^0.2.26",
"@types/browserify": "^12.0.37",
"@types/jest": "^27.5.1",
"@types/node": "^20.3.1",
"@types/node": "18.14.2",
"@types/rimraf": "^3.0.0",
"@types/serve-handler": "^6.1.0",
"@types/yargs": "^17.0.24",
Expand Down
20 changes: 10 additions & 10 deletions packages/snaps-controllers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,21 @@
"@types/gunzip-maybe": "^1.4.0",
"@types/jest": "^27.5.1",
"@types/mocha": "^10.0.1",
"@types/node": "^20.3.1",
"@types/node": "18.14.2",
"@types/pump": "^1.1.1",
"@types/readable-stream": "^2.3.15",
"@types/tar-stream": "^2.2.2",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
"@wdio/browser-runner": "^8.5.2",
"@wdio/cli": "^8.5.2",
"@wdio/globals": "^8.5.2",
"@wdio/mocha-framework": "^8.5.2",
"@wdio/spec-reporter": "^8.5.2",
"@wdio/static-server-service": "^8.5.2",
"@wdio/browser-runner": "^8.15.9",
"@wdio/cli": "^8.15.9",
"@wdio/globals": "^8.15.9",
"@wdio/mocha-framework": "^8.15.9",
"@wdio/spec-reporter": "^8.15.7",
"@wdio/static-server-service": "^8.15.7",
"deepmerge": "^4.2.2",
"depcheck": "^1.4.5",
"esbuild": "^0.17.15",
"esbuild": "^0.18.10",
"eslint": "^8.27.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
Expand All @@ -121,8 +121,8 @@
"vite": "^4.3.9",
"vite-tsconfig-paths": "^4.0.5",
"wdio-chromedriver-service": "^8.1.1",
"wdio-geckodriver-service": "^4.1.0",
"webdriverio": "^8.5.2"
"wdio-geckodriver-service": "^5.0.2",
"webdriverio": "^8.15.9"
},
"engines": {
"node": ">=16.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
},
"@metamask/object-multiplex>readable-stream": {
"packages": {
"@metamask/object-multiplex>readable-stream>process-nextick-args": true,
"@metamask/object-multiplex>readable-stream>safe-buffer": true,
"@metamask/object-multiplex>readable-stream>string_decoder": true,
"browserify>browser-resolve": true,
Expand All @@ -32,15 +31,11 @@
"browserify>process": true,
"browserify>readable-stream>core-util-is": true,
"browserify>readable-stream>isarray": true,
"browserify>readable-stream>process-nextick-args": true,
"browserify>readable-stream>util-deprecate": true,
"browserify>timers-browserify": true
}
},
"@metamask/object-multiplex>readable-stream>process-nextick-args": {
"packages": {
"browserify>process": true
}
},
"@metamask/object-multiplex>readable-stream>safe-buffer": {
"packages": {
"browserify>buffer": true
Expand Down Expand Up @@ -171,7 +166,6 @@
},
"@metamask/providers>json-rpc-middleware-stream>readable-stream": {
"packages": {
"@metamask/providers>json-rpc-middleware-stream>readable-stream>process-nextick-args": true,
"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer": true,
"@metamask/providers>json-rpc-middleware-stream>readable-stream>string_decoder": true,
"browserify>browser-resolve": true,
Expand All @@ -180,15 +174,11 @@
"browserify>process": true,
"browserify>readable-stream>core-util-is": true,
"browserify>readable-stream>isarray": true,
"browserify>readable-stream>process-nextick-args": true,
"browserify>readable-stream>util-deprecate": true,
"browserify>timers-browserify": true
}
},
"@metamask/providers>json-rpc-middleware-stream>readable-stream>process-nextick-args": {
"packages": {
"browserify>process": true
}
},
"@metamask/providers>json-rpc-middleware-stream>readable-stream>safe-buffer": {
"packages": {
"browserify>buffer": true
Expand Down Expand Up @@ -257,6 +247,11 @@
"browserify>insert-module-globals>is-buffer": true
}
},
"browserify>readable-stream>process-nextick-args": {
"packages": {
"browserify>process": true
}
},
"browserify>readable-stream>util-deprecate": {
"globals": {
"console.trace": true,
Expand Down
Loading

0 comments on commit 4dfcc60

Please sign in to comment.