feat: Update default Node.js version to v24 (#25707)

This commit is contained in:
Declan Carroll 2026-02-13 10:56:01 +00:00 committed by GitHub
parent 7ab7911c2f
commit e3eafc7e87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 31 additions and 40 deletions

View file

@ -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

View file

@ -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

View file

@ -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'
```

View file

@ -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: |

View file

@ -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

View file

@ -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 }}

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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}}'

View file

@ -50,7 +50,7 @@
"workflow"
],
"engines": {
"node": ">=20.19 <= 24.x"
"node": ">=22.16"
},
"files": [
"bin",