From 370c46e97902c6c9dce39ec2ac19c46c7c8dbdb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Such=C3=BD?= Date: Fri, 6 Dec 2024 08:54:21 +0100 Subject: [PATCH] chore(repo): upgrade to latest Node 22 LTS (#15749) * chore(repo): upgrade to latest Node 22 LTS * fix(connect-explorer): workaround for lottie ssr in new node --------- Co-authored-by: Tomas Martykan --- .nvmrc | 2 +- package.json | 6 +++--- packages/connect-explorer/package.json | 6 +++--- shell.nix | 2 +- suite-native/app/package.json | 2 +- yarn.lock | 22 +++++++++++----------- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.nvmrc b/.nvmrc index 5802c69cb8f..fdb2eaaff0c 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.12.2 \ No newline at end of file +22.11.0 \ No newline at end of file diff --git a/package.json b/package.json index 429538072c5..970f4a6f012 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "repository": "https://github.com/trezor/trezor-suite.git", "license": "SEE LICENSE IN LICENSE.md", "engines": { - "node": "18", + "node": "22", "yarn": ">=4" }, "workspaces": { @@ -94,7 +94,7 @@ "bcrypto": "5.4.0", "react": "18.2.0", "electron": "33.1.0", - "@types/node": "20.12.7", + "@types/node": "22.10.1", "@types/react": "18.2.55", "bn.js": "5.2.1", "node-gyp": "10.2.0", @@ -114,7 +114,7 @@ "@suite-common/wallet-types": "workspace:*", "@trezor/eslint": "workspace:*", "@types/jest": "29.5.12", - "@types/node": "20.12.7", + "@types/node": "22.10.1", "@types/prettier": "^3.0.0", "@types/semver": "^7.5.6", "@types/tar": "^6.1.11", diff --git a/packages/connect-explorer/package.json b/packages/connect-explorer/package.json index a1f3f39f3cd..d6ee18823a2 100644 --- a/packages/connect-explorer/package.json +++ b/packages/connect-explorer/package.json @@ -3,9 +3,9 @@ "version": "1.0.0", "private": true, "scripts": { - "dev": "concurrently \"next -p 8088\" \"PORT=8089 NO_HTTPS=true yarn workspace @trezor/connect-web dev\"", - "dev:explorer": "next -p 8088", - "build": "next build && rm -rf build && mv out build", + "dev": "concurrently \"yarn dev:explorer\" \"PORT=8089 NO_HTTPS=true yarn workspace @trezor/connect-web dev\"", + "dev:explorer": "NODE_OPTIONS=\"--no-experimental-global-navigator\" next -p 8088", + "build": "NODE_OPTIONS=\"--no-experimental-global-navigator\" next build && rm -rf build && mv out build", "build:webextension": "BUILD_TARGET=webextension yarn build && yarn g:rimraf build-webextension && TS_NODE_PROJECT=\"tsconfig.json\" yarn webpack --config ./webpack/webextension.webpack.config.ts && bash ./webpack/replace-next-filenames.sh", "lint:styles": "npx stylelint './src/**/*{.ts,.tsx}' --cache --config ../../.stylelintrc", "type-check": "yarn g:tsc --build tsconfig.json" diff --git a/shell.nix b/shell.nix index fb20ed23bdb..4749a6b372b 100644 --- a/shell.nix +++ b/shell.nix @@ -14,7 +14,7 @@ let # ATTENTION: this does not match the actual required version defined in packages/suite-desktop/package.json # (the required version is not yet in NixOS repository) electron = electron_31; - nodejs = nodejs_20; + nodejs = nodejs_22; # use older gcc. 10.2.0 with glibc 2.32 for node_modules bindings. # electron-builder is packing the app with glibc 2.32, bindings should not be compiled with newer version. gccPkgs = import (builtins.fetchTarball { diff --git a/suite-native/app/package.json b/suite-native/app/package.json index 5a148ac8d2a..37a7c0a644d 100644 --- a/suite-native/app/package.json +++ b/suite-native/app/package.json @@ -131,7 +131,7 @@ "@suite-common/test-utils": "workspace:^", "@trezor/connect-mobile": "workspace:^", "@types/jest": "^29.5.12", - "@types/node": "^20.11.24", + "@types/node": "22.10.1", "babel-plugin-transform-inline-environment-variables": "^0.4.4", "babel-plugin-transform-remove-console": "^6.9.4", "detox": "^20.25.6", diff --git a/yarn.lock b/yarn.lock index 98927600de5..14aa929c21b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9910,7 +9910,7 @@ __metadata: "@trezor/theme": "workspace:*" "@trezor/trezor-user-env-link": "workspace:*" "@types/jest": "npm:^29.5.12" - "@types/node": "npm:^20.11.24" + "@types/node": "npm:22.10.1" "@whatwg-node/events": "npm:0.1.2" abortcontroller-polyfill: "npm:1.7.6" babel-plugin-transform-inline-environment-variables: "npm:^0.4.4" @@ -13810,12 +13810,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:20.12.7": - version: 20.12.7 - resolution: "@types/node@npm:20.12.7" +"@types/node@npm:22.10.1": + version: 22.10.1 + resolution: "@types/node@npm:22.10.1" dependencies: - undici-types: "npm:~5.26.4" - checksum: 10/b4a28a3b593a9bdca5650880b6a9acef46911d58cf7cfa57268f048e9a7157a7c3196421b96cea576850ddb732e3b54bc982c8eb5e1e5ef0635d4424c2fce801 + undici-types: "npm:~6.20.0" + checksum: 10/c802a526da2f3fa3ccefd00a71244e7cb825329951719e79e8fec62b1dbc2855388c830489770611584665ce10be23c05ed585982038b24924e1ba2c2cce03fd languageName: node linkType: hard @@ -40254,7 +40254,7 @@ __metadata: "@suite-common/wallet-types": "workspace:*" "@trezor/eslint": "workspace:*" "@types/jest": "npm:29.5.12" - "@types/node": "npm:20.12.7" + "@types/node": "npm:22.10.1" "@types/prettier": "npm:^3.0.0" "@types/semver": "npm:^7.5.6" "@types/tar": "npm:^6.1.11" @@ -40870,10 +40870,10 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~5.26.4": - version: 5.26.5 - resolution: "undici-types@npm:5.26.5" - checksum: 10/0097779d94bc0fd26f0418b3a05472410408877279141ded2bd449167be1aed7ea5b76f756562cb3586a07f251b90799bab22d9019ceba49c037c76445f7cddd +"undici-types@npm:~6.20.0": + version: 6.20.0 + resolution: "undici-types@npm:6.20.0" + checksum: 10/583ac7bbf4ff69931d3985f4762cde2690bb607844c16a5e2fbb92ed312fe4fa1b365e953032d469fa28ba8b224e88a595f0b10a449332f83fa77c695e567dbe languageName: node linkType: hard