From 4d8dc221bff771a4791ff654de5d786e746b1a25 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Thu, 18 Sep 2025 23:08:55 +0200 Subject: [PATCH] chore: upgrade Node.js from 20.19.4 to 22.19.0 and update dependencies (#19870) # Update Node.js from 20.19.4 to 22.19.0 This PR updates Node.js from v20.19.4 to v22.19.0 across the codebase. The change includes: - Updated Node.js version in GitHub Actions setup-node workflow - Updated Node.js version in the dogfood Dockerfile - Changed from `pkgs.nodejs_20` to `unstablePkgs.nodejs_22` in the Nix flake - Updated the Node.js engine version constraints in package.json files to allow Node.js 22 - Updated Playwright from v1.47.0 to v1.50.1 - Updated tzdata dependency from v1.0.44 to v1.0.46 - Updated the flake.lock file with latest nixpkgs references The PR also improves the error message for Playwright version mismatches by showing the actual versions in the error. --- .github/actions/setup-node/action.yaml | 2 +- dogfood/coder/Dockerfile | 2 +- flake.lock | 12 ++++----- flake.nix | 7 ++--- offlinedocs/package.json | 2 +- site/package.json | 6 ++--- site/pnpm-lock.yaml | 36 +++++++++++++------------- 7 files changed, 34 insertions(+), 33 deletions(-) diff --git a/.github/actions/setup-node/action.yaml b/.github/actions/setup-node/action.yaml index 6ed9985185..4686cbd1f4 100644 --- a/.github/actions/setup-node/action.yaml +++ b/.github/actions/setup-node/action.yaml @@ -16,7 +16,7 @@ runs: - name: Setup Node uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 with: - node-version: 20.19.4 + node-version: 22.19.0 # See https://github.com/actions/setup-node#caching-global-packages-data cache: "pnpm" cache-dependency-path: ${{ inputs.directory }}/pnpm-lock.yaml diff --git a/dogfood/coder/Dockerfile b/dogfood/coder/Dockerfile index b0e0e4b3f0..90bdcb71aa 100644 --- a/dogfood/coder/Dockerfile +++ b/dogfood/coder/Dockerfile @@ -245,7 +245,7 @@ RUN DOCTL_VERSION=$(curl -s "https://api.github.com/repos/digitalocean/doctl/rel ARG NVM_INSTALL_SHA=bdea8c52186c4dd12657e77e7515509cda5bf9fa5a2f0046bce749e62645076d # Install frontend utilities ENV NVM_DIR=/usr/local/nvm -ENV NODE_VERSION=20.19.4 +ENV NODE_VERSION=22.19.0 RUN mkdir -p $NVM_DIR RUN curl -o nvm_install.sh https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh && \ echo "${NVM_INSTALL_SHA} nvm_install.sh" | sha256sum -c && \ diff --git a/flake.lock b/flake.lock index 92eafd9eae..edb080a06d 100644 --- a/flake.lock +++ b/flake.lock @@ -44,11 +44,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1741600792, - "narHash": "sha256-yfDy6chHcM7pXpMF4wycuuV+ILSTG486Z/vLx/Bdi6Y=", + "lastModified": 1751274312, + "narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ebe2788eafd539477f83775ef93c3c7e244421d3", + "rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674", "type": "github" }, "original": { @@ -76,11 +76,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1741513245, - "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=", + "lastModified": 1758035966, + "narHash": "sha256-qqIJ3yxPiB0ZQTT9//nFGQYn8X/PBoJbofA7hRKZnmE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", + "rev": "8d4ddb19d03c65a36ad8d189d001dc32ffb0306b", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index f934d1641b..c76c5bbba6 100644 --- a/flake.nix +++ b/flake.nix @@ -56,7 +56,7 @@ formatter = pkgs.nixfmt-rfc-style; - nodejs = pkgs.nodejs_20; + nodejs = unstablePkgs.nodejs_22; pnpm = pkgs.pnpm_10.override { inherit nodejs; # Ensure it points to the above nodejs version }; @@ -147,7 +147,6 @@ less mockgen moreutils - neovim nfpm nix-prefetch-git nodejs @@ -242,7 +241,9 @@ (pkgs.lib.importJSON ./site/package.json).devDependencies."@playwright/test" == pkgs.playwright-driver.version ) - "There is a mismatch between the playwright versions in the ./nix.flake and the ./site/package.json file. Please make sure that they use the exact same version."; + "There is a mismatch between the playwright versions in the ./nix.flake (${pkgs.playwright-driver.version}) and the ./site/package.json (${ + (pkgs.lib.importJSON ./site/package.json).devDependencies."@playwright/test" + }) file. Please make sure that they use the exact same version."; rec { inherit formatter; diff --git a/offlinedocs/package.json b/offlinedocs/package.json index d06b54a64c..cc9caeaec1 100644 --- a/offlinedocs/package.json +++ b/offlinedocs/package.json @@ -42,7 +42,7 @@ }, "engines": { "npm": ">=9.0.0 <10.0.0", - "node": ">=18.0.0 <21.0.0" + "node": ">=18.0.0 <23.0.0" }, "pnpm": { "overrides": { diff --git a/site/package.json b/site/package.json index bc442901d5..87192d852e 100644 --- a/site/package.json +++ b/site/package.json @@ -114,7 +114,7 @@ "semver": "7.6.2", "tailwind-merge": "2.6.0", "tailwindcss-animate": "1.0.7", - "tzdata": "1.0.44", + "tzdata": "1.0.46", "ua-parser-js": "1.0.40", "ufuzzy": "npm:@leeoniya/ufuzzy@1.0.10", "undici": "6.21.2", @@ -127,7 +127,7 @@ "@biomejs/biome": "2.2.0", "@chromatic-com/storybook": "4.1.0", "@octokit/types": "12.3.0", - "@playwright/test": "1.47.0", + "@playwright/test": "1.50.1", "@storybook/addon-docs": "9.1.2", "@storybook/addon-links": "9.1.2", "@storybook/addon-themes": "9.1.2", @@ -195,7 +195,7 @@ }, "engines": { "pnpm": ">=10.0.0 <11.0.0", - "node": ">=18.0.0 <21.0.0" + "node": ">=18.0.0 <23.0.0" }, "pnpm": { "overrides": { diff --git a/site/pnpm-lock.yaml b/site/pnpm-lock.yaml index 1b4603a43e..adc6b76b71 100644 --- a/site/pnpm-lock.yaml +++ b/site/pnpm-lock.yaml @@ -257,8 +257,8 @@ importers: specifier: 1.0.7 version: 1.0.7(tailwindcss@3.4.17(ts-node@10.9.2(@swc/core@1.3.38)(@types/node@20.17.16)(typescript@5.6.3))) tzdata: - specifier: 1.0.44 - version: 1.0.44 + specifier: 1.0.46 + version: 1.0.46 ua-parser-js: specifier: 1.0.40 version: 1.0.40 @@ -291,8 +291,8 @@ importers: specifier: 12.3.0 version: 12.3.0 '@playwright/test': - specifier: 1.47.0 - version: 1.47.0 + specifier: 1.50.1 + version: 1.50.1 '@storybook/addon-docs': specifier: 9.1.2 version: 9.1.2(@types/react@19.1.13)(storybook@9.1.2(@testing-library/dom@10.4.0)(msw@2.4.8(typescript@5.6.3))(prettier@3.4.1)(vite@7.1.4(@types/node@20.17.16)(jiti@2.4.2)(yaml@2.7.0))) @@ -1455,8 +1455,8 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==, tarball: https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz} engines: {node: '>=14'} - '@playwright/test@1.47.0': - resolution: {integrity: sha512-SgAdlSwYVpToI4e/IH19IHHWvoijAYH5hu2MWSXptRypLSnzj51PcGD+rsOXFayde4P9ZLi+loXVwArg6IUkCA==, tarball: https://registry.npmjs.org/@playwright/test/-/test-1.47.0.tgz} + '@playwright/test@1.50.1': + resolution: {integrity: sha512-Jii3aBg+CEDpgnuDxEp/h7BimHcUTDlpEtce89xEumlJ5ef2hqepZ+PWp1DDpYC/VO9fmWVI1IlEaoI5fK9FXQ==, tarball: https://registry.npmjs.org/@playwright/test/-/test-1.50.1.tgz} engines: {node: '>=18'} hasBin: true @@ -5051,13 +5051,13 @@ packages: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==, tarball: https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz} engines: {node: '>=8'} - playwright-core@1.47.0: - resolution: {integrity: sha512-1DyHT8OqkcfCkYUD9zzUTfg7EfTd+6a8MkD/NWOvjo0u/SCNd5YmY/lJwFvUZOxJbWNds+ei7ic2+R/cRz/PDg==, tarball: https://registry.npmjs.org/playwright-core/-/playwright-core-1.47.0.tgz} + playwright-core@1.50.1: + resolution: {integrity: sha512-ra9fsNWayuYumt+NiM069M6OkcRb1FZSK8bgi66AtpFoWkg2+y0bJSNmkFrWhMbEBbVKC/EruAHH3g0zmtwGmQ==, tarball: https://registry.npmjs.org/playwright-core/-/playwright-core-1.50.1.tgz} engines: {node: '>=18'} hasBin: true - playwright@1.47.0: - resolution: {integrity: sha512-jOWiRq2pdNAX/mwLiwFYnPHpEZ4rM+fRSQpRHwEwZlP2PUANvL3+aJOF/bvISMhFD30rqMxUB4RJx9aQbfh4Ww==, tarball: https://registry.npmjs.org/playwright/-/playwright-1.47.0.tgz} + playwright@1.50.1: + resolution: {integrity: sha512-G8rwsOQJ63XG6BbKj2w5rHeavFjy5zynBA9zsJMMtBoe/Uf757oG12NXz6e6OirF7RCrTVAKFXbLmn1RbL7Qaw==, tarball: https://registry.npmjs.org/playwright/-/playwright-1.50.1.tgz} engines: {node: '>=18'} hasBin: true @@ -5928,8 +5928,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - tzdata@1.0.44: - resolution: {integrity: sha512-xJ8xcdoFRwFpIQ90QV3WFXJNCO/feNn9vHVsZMJiKmtMYuo7nvF6CTpBc+SgegC1fb/3L+m32ytXT9XrBjrINg==, tarball: https://registry.npmjs.org/tzdata/-/tzdata-1.0.44.tgz} + tzdata@1.0.46: + resolution: {integrity: sha512-zJ4Jv3KCgN3dFeSADpIfHKt9bdIY7TjK3ELaij6oFvyyQBuIZ9LwMlR51vJvMQvRWQ9cS2v92xeZ0sQW4hXCWA==, tarball: https://registry.npmjs.org/tzdata/-/tzdata-1.0.46.tgz} ua-parser-js@1.0.40: resolution: {integrity: sha512-z6PJ8Lml+v3ichVojCiB8toQJBuwR42ySM4ezjXIqXK3M0HczmKQ3LF4rhU55PfD99KEEXQG6yb7iOMyvYuHew==, tarball: https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.40.tgz} @@ -7514,9 +7514,9 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@playwright/test@1.47.0': + '@playwright/test@1.50.1': dependencies: - playwright: 1.47.0 + playwright: 1.50.1 '@popperjs/core@2.11.8': {} @@ -11694,11 +11694,11 @@ snapshots: dependencies: find-up: 4.1.0 - playwright-core@1.47.0: {} + playwright-core@1.50.1: {} - playwright@1.47.0: + playwright@1.50.1: dependencies: - playwright-core: 1.47.0 + playwright-core: 1.50.1 optionalDependencies: fsevents: 2.3.2 @@ -12687,7 +12687,7 @@ snapshots: typescript@5.6.3: {} - tzdata@1.0.44: {} + tzdata@1.0.46: {} ua-parser-js@1.0.40: {}