From 3704b2ed5930d12633c992a13f7cf4fa9bcfebec Mon Sep 17 00:00:00 2001 From: Bruno Barbieri <1247834+brunobar79@users.noreply.github.com> Date: Fri, 29 Sep 2023 12:27:36 -0400 Subject: [PATCH] bump to node 18 (#1020) --- .github/actions/testsSetup/action.yml | 2 +- .github/workflows/build.yml | 10 ++-- .github/workflows/publish-internal.yml | 2 +- .github/workflows/publish-prod-chrome.yml | 2 +- .github/workflows/publish-prod-firefox.yml | 2 +- .nvmrc | 2 +- README.md | 2 +- lavamoat/build-webpack/policy-override.json | 13 ++++- lavamoat/build-webpack/policy.json | 50 ++++++++++++----- package.json | 4 +- scripts/unit-tests.sh | 2 +- yarn.lock | 60 +++++++++------------ 12 files changed, 90 insertions(+), 61 deletions(-) diff --git a/.github/actions/testsSetup/action.yml b/.github/actions/testsSetup/action.yml index 7f76af0302..9434b200ec 100644 --- a/.github/actions/testsSetup/action.yml +++ b/.github/actions/testsSetup/action.yml @@ -10,7 +10,7 @@ runs: steps: - uses: actions/setup-node@v3 with: - node-version: "16.20.0" + node-version: "18.18.0" - name: Download deps cache artifacts uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a305b29c15..08f79a9bec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: "16.20.0" + node-version: "18.18.0" cache: 'yarn' - name: Install deps via Yarn run: yarn setup @@ -41,7 +41,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: "16.20.0" + node-version: "18.18.0" - name: Download deps cache artifacts uses: actions/download-artifact@v3 with: @@ -343,7 +343,7 @@ jobs: # - uses: actions/checkout@v3 # - uses: actions/setup-node@v3 # with: - # node-version: "16.20.0" + # node-version: "18.18.0" # - name: Download deps cache artifacts # uses: actions/download-artifact@v3 # with: @@ -396,7 +396,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: "16.20.0" + node-version: "18.18.0" - name: Download deps cache artifacts uses: actions/download-artifact@v3 with: @@ -438,7 +438,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: "16.20.0" + node-version: "18.18.0" - name: Download deps cache artifacts uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/publish-internal.yml b/.github/workflows/publish-internal.yml index 502768d609..198f61f23a 100644 --- a/.github/workflows/publish-internal.yml +++ b/.github/workflows/publish-internal.yml @@ -19,7 +19,7 @@ jobs: token: ${{ secrets.REPO_TOKEN }} - uses: actions/setup-node@v2 with: - node-version: "16.20.0" + node-version: "18.18.0" cache: 'yarn' - name: Install deps via Yarn run: yarn setup diff --git a/.github/workflows/publish-prod-chrome.yml b/.github/workflows/publish-prod-chrome.yml index 82fb017123..21c716dafb 100644 --- a/.github/workflows/publish-prod-chrome.yml +++ b/.github/workflows/publish-prod-chrome.yml @@ -16,7 +16,7 @@ jobs: token: ${{ secrets.REPO_TOKEN }} - uses: actions/setup-node@v2 with: - node-version: "16.20.0" + node-version: "18.18.0" cache: 'yarn' - name: Install deps via Yarn run: yarn setup diff --git a/.github/workflows/publish-prod-firefox.yml b/.github/workflows/publish-prod-firefox.yml index d2afe7ff1f..82f046a868 100644 --- a/.github/workflows/publish-prod-firefox.yml +++ b/.github/workflows/publish-prod-firefox.yml @@ -16,7 +16,7 @@ jobs: token: ${{ secrets.REPO_TOKEN }} - uses: actions/setup-node@v2 with: - node-version: "16.20.0" + node-version: "18.18.0" cache: 'yarn' - name: Install deps via Yarn run: yarn setup diff --git a/.nvmrc b/.nvmrc index d09e7b555f..b714151ef9 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v16.20.0 \ No newline at end of file +v18.18.0 \ No newline at end of file diff --git a/README.md b/README.md index 8f47e3789b..bbccba14b8 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Additionally, we're using some well known tools engineered by the MetaMask team: ### 1. Set up Node -Use node v16 or if you use nvm follow the instructions below +Use node v18 or if you use nvm follow the instructions below ```bash nvm install diff --git a/lavamoat/build-webpack/policy-override.json b/lavamoat/build-webpack/policy-override.json index 5d36040d3f..56cb906ab9 100644 --- a/lavamoat/build-webpack/policy-override.json +++ b/lavamoat/build-webpack/policy-override.json @@ -11,10 +11,21 @@ }, "packages": { "@vanilla-extract/webpack-plugin>loader-utils": true, + "@vanilla-extract/webpack-plugin>chalk": true, "file-loader>loader-utils": true, "eslint>debug": true, "eslint>chalk": true, - "vitest>debug": true + "vitest>debug": true, + "chalk": true + } + }, + "@vanilla-extract/webpack-plugin>chalk": { + "builtin": { + "path": true + }, + "packages": { + "@vanilla-extract/webpack-plugin>chalk>ansi-styles": true, + "@vanilla-extract/webpack-plugin>chalk>supports-color": true } }, "@vanilla-extract/webpack-plugin>loader-utils": { diff --git a/lavamoat/build-webpack/policy.json b/lavamoat/build-webpack/policy.json index 5672b150fb..03967443c1 100644 --- a/lavamoat/build-webpack/policy.json +++ b/lavamoat/build-webpack/policy.json @@ -178,7 +178,9 @@ }, "packages": { "@vanilla-extract/vite-plugin>@vanilla-extract/integration": true, + "@vanilla-extract/webpack-plugin>chalk": true, "@vanilla-extract/webpack-plugin>loader-utils": true, + "chalk": true, "eslint>chalk": true, "eslint>debug": true, "file-loader>loader-utils": true, @@ -191,6 +193,17 @@ "$root$": true } }, + "@vanilla-extract/webpack-plugin>chalk": { + "builtin": { + "path": true + }, + "packages": { + "@vanilla-extract/webpack-plugin>chalk>ansi-styles": true, + "@vanilla-extract/webpack-plugin>chalk>supports-color": true, + "msw>chalk>ansi-styles": true, + "msw>chalk>supports-color": true + } + }, "@vanilla-extract/webpack-plugin>loader-utils": { "builtin": { "path": true @@ -634,12 +647,6 @@ "define": true } }, - "eslint>chalk": { - "packages": { - "msw>chalk>ansi-styles": true, - "msw>chalk>supports-color": true - } - }, "eslint>debug": { "builtin": { "tty.isatty": true, @@ -1193,11 +1200,6 @@ "mini-css-extract-plugin>schema-utils>ajv": true } }, - "msw>chalk>ansi-styles": { - "packages": { - "msw>chalk>ansi-styles>color-convert": true - } - }, "msw>chalk>ansi-styles>color-convert": { "packages": { "msw>chalk>ansi-styles>color-convert>color-name": true @@ -1282,13 +1284,24 @@ "process.stdout": true }, "packages": { - "eslint>chalk": true, "semver": true, + "ts-loader>chalk": true, "ts-loader>micromatch": true, "typescript": true, "webpack": true } }, + "ts-loader>chalk": { + "packages": { + "msw>chalk>supports-color": true, + "ts-loader>chalk>ansi-styles": true + } + }, + "ts-loader>chalk>ansi-styles": { + "packages": { + "msw>chalk>ansi-styles>color-convert": true + } + }, "ts-loader>micromatch": { "builtin": { "util.inspect": true @@ -1605,10 +1618,10 @@ "setImmediate": true }, "packages": { - "eslint>chalk": true, "lodash": true, "vitest>acorn-walk": true, "webpack-bundle-analyzer>acorn": true, + "webpack-bundle-analyzer>chalk": true, "webpack-bundle-analyzer>gzip-size": true, "webpack-bundle-analyzer>opener": true, "webpack-bundle-analyzer>sirv": true, @@ -1622,6 +1635,17 @@ "define": true } }, + "webpack-bundle-analyzer>chalk": { + "packages": { + "msw>chalk>supports-color": true, + "webpack-bundle-analyzer>chalk>ansi-styles": true + } + }, + "webpack-bundle-analyzer>chalk>ansi-styles": { + "packages": { + "msw>chalk>ansi-styles>color-convert": true + } + }, "webpack-bundle-analyzer>gzip-size": { "builtin": { "fs.createReadStream": true, diff --git a/package.json b/package.json index ea040734f8..aae751b820 100644 --- a/package.json +++ b/package.json @@ -171,8 +171,10 @@ "@typescript-eslint/parser": "6.4.1", "@vanilla-extract/vite-plugin": "3.6.1", "@vanilla-extract/webpack-plugin": "2.2.0", + "ansi-styles": "6.2.1", "audit-ci": "6.3.0", "browserify": "17.0.0", + "chalk": "5.3.0", "chromedriver": "116.0.0", "circular-dependency-plugin": "5.2.2", "copy-webpack-plugin": "11.0.0", @@ -198,7 +200,7 @@ "lavamoat-browserify": "15.9.1", "lint-staged": "13.0.3", "mini-css-extract-plugin": "2.6.1", - "msw": "1.2.3", + "msw": "1.3.1", "opentype.js": "1.3.4", "patch-package": "6.4.7", "prettier": "3.0.2", diff --git a/scripts/unit-tests.sh b/scripts/unit-tests.sh index 6e92540af4..f7d6fb5691 100755 --- a/scripts/unit-tests.sh +++ b/scripts/unit-tests.sh @@ -16,7 +16,7 @@ echo "Anvil Launched..." # Run the tests and store the result echo "Running Tests..." -vitest +NODE_OPTIONS='--no-experimental-fetch' vitest TEST_RESULT=$? # kill anvil diff --git a/yarn.lock b/yarn.lock index 017684ce45..1229b251df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2338,16 +2338,16 @@ "@types/set-cookie-parser" "^2.4.0" set-cookie-parser "^2.4.6" -"@mswjs/interceptors@^0.17.5": - version "0.17.6" - resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.17.6.tgz#7f7900f4cd26f70d9f698685e4485b2f4101d26a" - integrity sha512-201pBIWehTURb6q8Gheu4Zhvd3Ox1U4BJq5KiOQsYzkWyfiOG4pwcz5hPZIEryztgrf8/sdwABpvY757xMmfrQ== +"@mswjs/interceptors@^0.17.10": + version "0.17.10" + resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.17.10.tgz#857b41f30e2b92345ed9a4e2b1d0a08b8b6fcad4" + integrity sha512-N8x7eSLGcmUFNWZRxT1vsHvypzIRgQYdG0rJey/rZCy6zT/30qDt8Joj7FxzGNLSwXbeZqJOMqDurp7ra4hgbw== dependencies: "@open-draft/until" "^1.0.3" "@types/debug" "^4.1.7" "@xmldom/xmldom" "^0.8.3" debug "^4.3.3" - headers-polyfill "^3.1.0" + headers-polyfill "3.2.5" outvariant "^1.2.1" strict-event-emitter "^0.2.4" web-encoding "^1.1.5" @@ -5321,6 +5321,11 @@ ansi-regex@^6.0.1: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== +ansi-styles@6.2.1, ansi-styles@^6.1.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -5345,11 +5350,6 @@ ansi-styles@^6.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.1.1.tgz#63cd61c72283a71cb30bd881dbb60adada74bc70" integrity sha512-qDOv24WjnYuL+wbwHdlsYZFy+cgPtrYw0Tn7GLORicQp9BkQLzrgI3Pm4VyR9ERZ41YTn7KlMPuL1n05WdZvmg== -ansi-styles@^6.1.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" - integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== - any-base@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/any-base/-/any-base-1.1.0.tgz#ae101a62bc08a597b4c9ab5b7089d456630549fe" @@ -6262,14 +6262,6 @@ chainsaw@~0.1.0: dependencies: traverse ">=0.3.0 <0.4" -chalk@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" - integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chalk@4.1.2, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1, chalk@~4.1.0: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" @@ -6278,6 +6270,11 @@ chalk@4.1.2, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1, chalk@~4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@5.3.0, chalk@^5.0.1, chalk@^5.1.2, chalk@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + chalk@^2.0.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -6287,11 +6284,6 @@ chalk@^2.0.0, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^5.0.1, chalk@^5.1.2, chalk@^5.2.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" - integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== - char-regex@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" @@ -9560,10 +9552,10 @@ he@^1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -headers-polyfill@^3.1.0, headers-polyfill@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/headers-polyfill/-/headers-polyfill-3.1.2.tgz#9a4dcb545c5b95d9569592ef7ec0708aab763fbe" - integrity sha512-tWCK4biJ6hcLqTviLXVR9DTRfYGQMXEIUj3gwJ2rZ5wO/at3XtkI4g8mCvFdUF9l1KMBNCfmNAdnahm1cgavQA== +headers-polyfill@3.2.5: + version "3.2.5" + resolved "https://registry.yarnpkg.com/headers-polyfill/-/headers-polyfill-3.2.5.tgz#6e67d392c9d113d37448fe45014e0afdd168faed" + integrity sha512-tUCGvt191vNSQgttSyJoibR+VO+I6+iCHIUdhzEMJKE+EAL8BwCN7fUOZlY4ofOelNHsK+gEjxB/B+9N3EWtdA== hey-listen@^1.0.8: version "1.0.8" @@ -11961,21 +11953,21 @@ ms@^2.0.0, ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -msw@1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/msw/-/msw-1.2.3.tgz#750d6c53ac611732b243c82a87dad960ed832a37" - integrity sha512-Fqy/TaLKR32x4IkMwudJHJysBzVM/v/lSoMPS9f3QaHLOmb3xHN9YurSUnRt+2eEvNXLjVPij1wMBQtLmTbKsg== +msw@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/msw/-/msw-1.3.1.tgz#84a12bb17e76c25a7accaf921317044907ccd501" + integrity sha512-GhP5lHSTXNlZb9EaKgPRJ01YAnVXwzkvnTzRn4W8fxU2DXuJrRO+Nb6OHdYqB4fCkwSNpIJH9JkON5Y6rHqJMQ== dependencies: "@mswjs/cookies" "^0.2.2" - "@mswjs/interceptors" "^0.17.5" + "@mswjs/interceptors" "^0.17.10" "@open-draft/until" "^1.0.3" "@types/cookie" "^0.4.1" "@types/js-levenshtein" "^1.1.1" - chalk "4.1.1" + chalk "^4.1.1" chokidar "^3.4.2" cookie "^0.4.2" graphql "^15.0.0 || ^16.0.0" - headers-polyfill "^3.1.2" + headers-polyfill "3.2.5" inquirer "^8.2.0" is-node-process "^1.2.0" js-levenshtein "^1.1.6"