From a3a369936d1fb9c7cf3831c308b6e382484322e3 Mon Sep 17 00:00:00 2001 From: milanmajchrak Date: Tue, 27 Oct 2026 14:44:13 +0100 Subject: [PATCH] Run the UI on Node 22 instead of end-of-life Node 18 Node 18 is end of life since April 2025 and gets no security fixes, including CVE-2026-111497 in the Brotli decoder bundled with Node. DSpace 7.6.7 also ships on Node 22. CI now tests on Node 20 and 22. Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 35d18f39864660348ff9230a9d1cc54d5ceeb1a9) --- .github/workflows/build.yml | 4 ++-- Dockerfile | 2 +- Dockerfile.dist | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3be3940c684..3656b14b7a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,7 +49,7 @@ jobs: strategy: # Create a matrix of Node versions to test against (in parallel) matrix: - node-version: [18.x, 20.x] + node-version: [20.x, 22.x] # Do NOT exit immediately if one matrix job fails fail-fast: false # These are the actual CI steps to perform per job @@ -97,7 +97,7 @@ jobs: # NOTE: Angular CLI only supports code coverage for specs. See https://github.com/angular/angular-cli/issues/6286 - name: Upload code coverage report to Artifact uses: actions/upload-artifact@v4 - if: matrix.node-version == '18.x' + if: matrix.node-version == '22.x' with: name: coverage-report-${{ matrix.node-version }} path: 'coverage/dspace-angular/lcov.info' diff --git a/Dockerfile b/Dockerfile index e1e72cbf43f..563bcffbc92 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # This image will be published as dspace/dspace-angular # See https://github.com/DSpace/dspace-angular/tree/main/docker for usage details -FROM docker.io/node:18-alpine +FROM docker.io/node:22-alpine # Ensure Python and other build tools are available # These are needed to install some node modules, especially on linux/arm64 diff --git a/Dockerfile.dist b/Dockerfile.dist index 4c1fc659f4d..f9ccaf5e874 100644 --- a/Dockerfile.dist +++ b/Dockerfile.dist @@ -4,7 +4,7 @@ # Test build: # docker build -f Dockerfile.dist -t dspace/dspace-angular:dspace-7_x-dist . -FROM docker.io/node:18-alpine AS build +FROM docker.io/node:22-alpine AS build # Ensure Python and other build tools are available # These are needed to install some node modules, especially on linux/arm64 @@ -20,7 +20,7 @@ ADD . /app/ ENV NODE_OPTIONS="--max_old_space_size=4096" RUN yarn build:prod -FROM node:18-alpine +FROM node:22-alpine RUN npm install --global pm2 COPY --chown=node:node --from=build /app/dist /app/dist