Conversation
There was a problem hiding this comment.
Pull request overview
Updates the repo’s development/build/runtime environment to Node.js 24 (including local tooling, CI, and Docker) to standardize on the latest LTS.
Changes:
- Bumped Node version references across docs,
.nvmrc, GitHub Actions workflows, andpackage.jsonengines. - Updated backend Docker images and esbuild target to Node 24.
- Regenerated
package-lock.jsonafter reinstall.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates documented Node prerequisite to 24.14.1. |
| .nvmrc | Pins local Node version to 24.14.1. |
| package.json | Adds root engines.node constraint for Node 24. |
| package-lock.json | Reflects lockfile updates after reinstall + engines propagation. |
| packages/frontend/package.json | Adds frontend engines.node constraint for Node 24. |
| packages/backend/package.json | Adds backend engines.node constraint and updates esbuild target to node24. |
| packages/backend/Dockerfile | Moves build/release images to Node 24 variants. |
| .github/workflows/ci.yml | Runs CI on Node 24.14.1. |
| .github/workflows/deploy.yml | Runs backend deploy workflow on Node 24.14.1. |
| .github/workflows/deploy-frontend.yml | Runs frontend deploy workflow on Node 24.14.1. |
| .github/actions/setup/action.yml | Updates shared composite action to set up Node 24.14.1. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # PREVIOUS_RELEASE_SHA="$(git rev-parse HEAD^ 2>/dev/null || true)" \ | ||
| # node packages/backend/scripts/write-release-metadata.js packages/backend/release-metadata.json | ||
| FROM node:20-alpine AS build | ||
| FROM node:24.14.1-alpine3.23 AS build |
There was a problem hiding this comment.
The build stage uses an Alpine image but the release stage uses a Debian-based distroless image, and the Dockerfile copies node_modules from build to release. With native deps like sharp, this can install musl binaries in the build stage that won’t load on the Debian (glibc) runtime image. Align the build and runtime OS (e.g., use a Debian-based Node image for the build stage, or use a matching runtime base) so native modules are built/installed for the same libc.
| FROM node:24.14.1-alpine3.23 AS build | |
| FROM node:24.14.1-bookworm-slim AS build |
| "engines": { | ||
| "node": ">=24.14.1 <25" | ||
| }, |
There was a problem hiding this comment.
engines.node was bumped to Node 24, but @types/node is still pinned to a 20.x version in this package. This can cause type mismatches/missing Node 24 APIs in TS builds; update @types/node to a 24.x-compatible version (and regenerate the lockfile) to keep types aligned with the runtime target.
| ### Prerequisites | ||
|
|
||
| - **Node.js** 20+ (for backend and frontend development) | ||
| - **Node.js** 24.14.1 (current latest 24.x LTS at time of update, for backend and frontend development) |
There was a problem hiding this comment.
This prerequisite line hard-codes a specific patch version and also claims it is the “current latest” LTS, which will become incorrect over time. Consider wording this as “Node.js 24 LTS (>=24.14.1)” (or similar) so the README stays accurate without needing frequent updates.
| - **Node.js** 24.14.1 (current latest 24.x LTS at time of update, for backend and frontend development) | |
| - **Node.js** 24 LTS (>=24.14.1, for backend and frontend development) |
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| node-version: '24.14.1' |
There was a problem hiding this comment.
The Node version is now duplicated across several workflows, this composite action, .nvmrc, and package.json engines. To reduce drift, consider switching actions/setup-node to node-version-file: '.nvmrc' (or another single source of truth) and referencing that consistently across workflows/actions.
| node-version: '24.14.1' | |
| node-version-file: '.nvmrc' |
|
@copilot DO IT ALL |
…4.x, README wording, nvmrc-based setup-node Agent-Logs-Url: https://github.com/dev-chat/mocker/sessions/d01dda0a-a39f-4201-9930-a6470e0ec1d9
Done in commit 45afbd8. All 4 suggestions applied:
|
This pull request upgrades the project to require Node.js version 24.14.1 across all environments, replacing the previous Node.js 20.x requirement. The update touches CI/CD workflows, Dockerfiles, documentation, and package configurations to ensure consistency and compatibility with Node.js 24.14.1.
Node.js version upgrade
24.14.1in all GitHub Actions workflows, including CI, deploy, and setup steps (.github/workflows/ci.yml,.github/workflows/deploy.yml,.github/workflows/deploy-frontend.yml,.github/actions/setup/action.yml). [1] [2] [3] [4] [5].nvmrcfile to specify24.14.1as the required Node.js version.packages/backend/Dockerfileto use Node.js 24.14.1-based images. [1] [2]Configuration and documentation updates
enginesfields topackage.jsonfiles in the root, backend, and frontend to enforce Node.js>=24.14.1 <25. [1] [2] [3]mocker/README.mdto reflect the new Node.js version requirement.packages/backend/package.jsonto target Node.js 24.These changes ensure the project is fully aligned on Node.js 24.14.1, improving compatibility and leveraging the latest LTS features.