From e3eafc7e87bdf13708a9d4b5c7c5f53c94d04ead Mon Sep 17 00:00:00 2001 From: Declan Carroll Date: Fri, 13 Feb 2026 10:56:01 +0000 Subject: [PATCH] feat: Update default Node.js version to v24 (#25707) --- .devcontainer/Dockerfile | 2 +- .github/ISSUE_TEMPLATE/01-bug.yml | 2 +- .github/WORKFLOWS.md | 6 +++--- .github/actions/setup-nodejs/action.yml | 8 ++------ .github/workflows/build-base-image.yml | 3 ++- .github/workflows/ci-master.yml | 11 ++++++++--- .github/workflows/docker-build-push.yml | 2 +- .github/workflows/release-create-pr.yml | 2 +- .github/workflows/release-push-to-channel.yml | 2 +- .github/workflows/test-linting-reusable.yml | 2 +- .github/workflows/test-unit-reusable.yml | 2 +- CONTRIBUTING.md | 2 +- docker/images/n8n-base/Dockerfile | 12 +----------- docker/images/n8n/Dockerfile | 3 +-- docker/images/runners/Dockerfile | 4 ++-- docker/images/runners/Dockerfile.distroless | 2 +- packages/@n8n/benchmark/Dockerfile | 2 +- .../shared/default/.github/workflows/ci.yml | 2 +- packages/cli/package.json | 2 +- 19 files changed, 31 insertions(+), 40 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d9a9e49c700..b527a56c43a 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM n8nio/base:22 +FROM n8nio/base:24 RUN apk add --no-cache --update openssh sudo shadow bash RUN echo node ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/node && chmod 0440 /etc/sudoers.d/node diff --git a/.github/ISSUE_TEMPLATE/01-bug.yml b/.github/ISSUE_TEMPLATE/01-bug.yml index 4036e79a54c..5458f326aaf 100644 --- a/.github/ISSUE_TEMPLATE/01-bug.yml +++ b/.github/ISSUE_TEMPLATE/01-bug.yml @@ -66,7 +66,7 @@ body: id: nodejs-version attributes: label: Node.js Version - placeholder: ex. 22.16.0 + placeholder: ex. 24.0.0 validations: required: true - type: dropdown diff --git a/.github/WORKFLOWS.md b/.github/WORKFLOWS.md index f9353bc8876..11cf1737e09 100644 --- a/.github/WORKFLOWS.md +++ b/.github/WORKFLOWS.md @@ -354,8 +354,8 @@ Runs on push to `master` or `1.x`: ``` Push to master/1.x ├─ build-github (populate cache) -├─ unit-test (matrix: Node 20.x, 22.x, 24.3.x) -│ └─ Coverage only on 22.x +├─ unit-test (matrix: Node 22.x, 24.13.1, 25.x) +│ └─ Coverage only on 24.13.1 ├─ lint └─ notify-on-failure (Slack #alerts-build) ``` @@ -394,7 +394,7 @@ Composite actions in `.github/actions/`: ```yaml inputs: - node-version: # default: '22.x' + node-version: # default: '24.13.1' enable-docker-cache: # default: 'false' (Blacksmith Buildx) build-command: # default: 'pnpm build' ``` diff --git a/.github/actions/setup-nodejs/action.yml b/.github/actions/setup-nodejs/action.yml index e91162958af..5e4b7093dc9 100644 --- a/.github/actions/setup-nodejs/action.yml +++ b/.github/actions/setup-nodejs/action.yml @@ -7,9 +7,9 @@ description: 'Configures Node.js with pnpm, installs Aikido SafeChain for supply inputs: node-version: - description: 'Node.js version to use. Uses latest 22.x by default.' + description: 'Node.js version to use. Pinned to 24.13.1 by default for reproducible builds.' required: false - default: '22.x' + default: '24.13.1' enable-docker-cache: description: 'Whether to set up Blacksmith Buildx for Docker layer caching (Blacksmith runners only).' required: false @@ -31,10 +31,6 @@ runs: node-version: ${{ inputs.node-version }} cache: 'pnpm' - - name: Upgrade npm (keep Node 22) # We need npm 11.5.1 for OIDC - run: npm i -g npm@11.5.1 - shell: bash - - name: Install Aikido SafeChain if: runner.os != 'Windows' run: | diff --git a/.github/workflows/build-base-image.yml b/.github/workflows/build-base-image.yml index f29bcd093ea..416043f9766 100644 --- a/.github/workflows/build-base-image.yml +++ b/.github/workflows/build-base-image.yml @@ -23,8 +23,9 @@ jobs: build: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: - node_version: ['20', '22.22.0', '24'] + node_version: ['22', '24.13.1', '25'] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 141579b436a..0a025264a00 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -12,9 +12,13 @@ jobs: build-github: name: Build for Github Cache runs-on: ubuntu-latest + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + BUILD_STATS_WEBHOOK_URL: ${{ secrets.BUILD_STATS_WEBHOOK_URL }} + BUILD_STATS_WEBHOOK_USER: ${{ secrets.BUILD_STATS_WEBHOOK_USER }} + BUILD_STATS_WEBHOOK_PASSWORD: ${{ secrets.BUILD_STATS_WEBHOOK_PASSWORD }} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Setup and Build uses: ./.github/actions/setup-nodejs @@ -22,12 +26,13 @@ jobs: name: Unit tests uses: ./.github/workflows/test-unit-reusable.yml strategy: + fail-fast: false matrix: - node-version: [20.x, 22.x, 24.3.x] + node-version: [22.x, 24.13.1, 25.x] with: ref: ${{ github.sha }} nodeVersion: ${{ matrix.node-version }} - collectCoverage: ${{ matrix.node-version == '22.x' }} + collectCoverage: ${{ matrix.node-version == '24.13.1' }} secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} BUILD_STATS_WEBHOOK_URL: ${{ secrets.BUILD_STATS_WEBHOOK_URL }} diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index 1844cbc1766..ba4cb5c0d8c 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -7,7 +7,7 @@ name: 'Docker: Build and Push' env: NODE_OPTIONS: '--max-old-space-size=7168' - NODE_VERSION: '22.22.0' + NODE_VERSION: '24.13.1' on: schedule: diff --git a/.github/workflows/release-create-pr.yml b/.github/workflows/release-create-pr.yml index 3b64b5ce4d5..5af07452ada 100644 --- a/.github/workflows/release-create-pr.yml +++ b/.github/workflows/release-create-pr.yml @@ -47,7 +47,7 @@ jobs: - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: - node-version: 22.x + node-version: 24.13.1 - run: npm install --prefix=.github/scripts --no-package-lock diff --git a/.github/workflows/release-push-to-channel.yml b/.github/workflows/release-push-to-channel.yml index e93a1e4779d..65aa25c5f55 100644 --- a/.github/workflows/release-push-to-channel.yml +++ b/.github/workflows/release-push-to-channel.yml @@ -62,7 +62,7 @@ jobs: steps: - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: - node-version: 22.x + node-version: 24.13.1 # Remove after https://github.com/npm/cli/issues/8547 gets resolved - run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc diff --git a/.github/workflows/test-linting-reusable.yml b/.github/workflows/test-linting-reusable.yml index 926b22ec3d4..f98bc3e9226 100644 --- a/.github/workflows/test-linting-reusable.yml +++ b/.github/workflows/test-linting-reusable.yml @@ -12,7 +12,7 @@ on: description: Version of node to use. required: false type: string - default: 22.x + default: 24.13.1 env: NODE_OPTIONS: --max-old-space-size=7168 diff --git a/.github/workflows/test-unit-reusable.yml b/.github/workflows/test-unit-reusable.yml index 989026bef08..1525b455a7c 100644 --- a/.github/workflows/test-unit-reusable.yml +++ b/.github/workflows/test-unit-reusable.yml @@ -12,7 +12,7 @@ on: description: Version of node to use. required: false type: string - default: 22.x + default: 24.13.1 collectCoverage: required: false default: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 30ba585ac2c..ac11abf2d5f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -74,7 +74,7 @@ If you already have VS Code and Docker installed, you can click [here](https://v #### Node.js -[Node.js](https://nodejs.org/en/) version 22.16 or newer is required for development purposes. +[Node.js](https://nodejs.org/en/) version 24 or newer is required for development purposes. #### pnpm diff --git a/docker/images/n8n-base/Dockerfile b/docker/images/n8n-base/Dockerfile index 35a1221bd3b..393b27a46e4 100644 --- a/docker/images/n8n-base/Dockerfile +++ b/docker/images/n8n-base/Dockerfile @@ -1,4 +1,4 @@ -ARG NODE_VERSION=22.22.0 +ARG NODE_VERSION=24.13.1 FROM dhi.io/node:${NODE_VERSION}-alpine3.22-dev @@ -24,21 +24,11 @@ RUN apk add --no-cache busybox-binsh && \ tzdata \ ca-certificates \ libc6-compat && \ - # Install full-icu - npm install -g full-icu@1.5.0 && \ - # Update npm bundled deps: diff@8.0.3, tar@7.5.4 - # TODO: Remove when fixed upstream in npm - cd $(npm root -g)/npm/node_modules && \ - rm -rf diff && \ - wget -qO- https://registry.npmjs.org/diff/-/diff-8.0.3.tgz | tar -xz && mv package diff && \ - rm -rf tar && \ - wget -qO- https://registry.npmjs.org/tar/-/tar-7.5.4.tgz | tar -xz && mv package tar && \ # Cleanup rm -rf /tmp/* /root/.npm /root/.cache/node /opt/yarn* && \ apk del apk-tools WORKDIR /home/node -ENV NODE_ICU_DATA=/usr/local/lib/node_modules/full-icu # DHI images use a non-standard global npm path, so we need to set NODE_PATH # to allow externally installed npm packages to be found by require() ENV NODE_PATH=/opt/nodejs/node-v${NODE_VERSION}/lib/node_modules diff --git a/docker/images/n8n/Dockerfile b/docker/images/n8n/Dockerfile index f1ca688fbca..a1caea8f368 100644 --- a/docker/images/n8n/Dockerfile +++ b/docker/images/n8n/Dockerfile @@ -1,4 +1,4 @@ -ARG NODE_VERSION=22.22.0 +ARG NODE_VERSION=24.13.1 ARG N8N_VERSION=snapshot FROM n8nio/base:${NODE_VERSION} @@ -7,7 +7,6 @@ ARG N8N_VERSION ARG N8N_RELEASE_TYPE=dev ENV NODE_ENV=production ENV N8N_RELEASE_TYPE=${N8N_RELEASE_TYPE} -ENV NODE_ICU_DATA=/usr/local/lib/node_modules/full-icu ENV SHELL=/bin/sh WORKDIR /home/node diff --git a/docker/images/runners/Dockerfile b/docker/images/runners/Dockerfile index f26a48c7bee..5fc7be72880 100644 --- a/docker/images/runners/Dockerfile +++ b/docker/images/runners/Dockerfile @@ -1,4 +1,4 @@ -ARG NODE_VERSION=22.22.0 +ARG NODE_VERSION=24.13.1 ARG PYTHON_VERSION=3.13 # ============================================================================== @@ -80,7 +80,7 @@ RUN uv pip install . && rm -rf /app/task-runner-python/src # ============================================================================== # STAGE 3: Task Runner Launcher download # ============================================================================== -FROM alpine:3.22.1 AS launcher-downloader +FROM alpine:3.22 AS launcher-downloader ARG TARGETPLATFORM ARG LAUNCHER_VERSION=1.4.2 diff --git a/docker/images/runners/Dockerfile.distroless b/docker/images/runners/Dockerfile.distroless index d04359fda3b..7d81ebb8336 100644 --- a/docker/images/runners/Dockerfile.distroless +++ b/docker/images/runners/Dockerfile.distroless @@ -12,7 +12,7 @@ # - Uses distroless nonroot user (UID 65532) # ============================================================================== -ARG NODE_VERSION=22.22.0 +ARG NODE_VERSION=24.13.1 ARG PYTHON_VERSION=3.13 diff --git a/packages/@n8n/benchmark/Dockerfile b/packages/@n8n/benchmark/Dockerfile index a4e8d56774a..f345e318911 100644 --- a/packages/@n8n/benchmark/Dockerfile +++ b/packages/@n8n/benchmark/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1 -FROM node:22.22.0 AS base +FROM node:24.13.1 AS base # Install required dependencies RUN apt-get update && apt-get install -y gnupg2 curl diff --git a/packages/@n8n/node-cli/src/template/templates/shared/default/.github/workflows/ci.yml b/packages/@n8n/node-cli/src/template/templates/shared/default/.github/workflows/ci.yml index a86f7443623..6858d94e35d 100644 --- a/packages/@n8n/node-cli/src/template/templates/shared/default/.github/workflows/ci.yml +++ b/packages/@n8n/node-cli/src/template/templates/shared/default/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - node-version: '22' + node-version: '24' - name: Install dependencies run: '{{packageManager.name}} {{packageManager.installCommand}}' diff --git a/packages/cli/package.json b/packages/cli/package.json index f6eba43cbca..73b893928ff 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -50,7 +50,7 @@ "workflow" ], "engines": { - "node": ">=20.19 <= 24.x" + "node": ">=22.16" }, "files": [ "bin",