🐳 chore: Upgrade Docker Builds To Node 24 (#13448)

* chore: upgrade docker builds to node 24

* test: avoid array at in telemetry spec
This commit is contained in:
Danny Avila 2026-06-01 10:03:18 -04:00 committed by GitHub
parent d5a2d3b26b
commit fb282a2afa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 123 additions and 70 deletions

View file

@ -1,4 +1,4 @@
FROM node:18-bullseye
FROM node:24.16.0-bullseye
RUN useradd -m -s /bin/bash vscode
RUN mkdir -p /workspaces && chown -R vscode:vscode /workspaces

View file

@ -5,7 +5,7 @@
# startup. A fresh index only requires rsync + container restart — no
# image rebuild on every push.
FROM node:24-slim
FROM node:24.16.0-slim
ARG GITNEXUS_VERSION=1.5.3

View file

@ -26,7 +26,7 @@ Project maintainers have the right and responsibility to remove, edit, or reject
## 1. Development Setup
1. Use Node.js v20.19.0+ or ^22.12.0 or >= 23.0.0.
1. Use Node.js v24.16.0.
2. Run `npm run smart-reinstall` to install dependencies (uses Turborepo). Use `npm run reinstall` for a clean install, or `npm ci` for a fresh lockfile-based install.
3. Build all compiled code: `npm run build`.
4. Setup and run unit tests:

View file

@ -20,10 +20,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.19
- name: Use Node.js 24.16.0
uses: actions/setup-node@v4
with:
node-version: '20.19'
node-version: '24.16.0'
- name: Restore node_modules cache
id: cache-node-modules
@ -35,7 +35,7 @@ jobs:
packages/api/node_modules
packages/data-provider/node_modules
packages/data-schemas/node_modules
key: node-modules-backend-${{ runner.os }}-20.19-${{ hashFiles('package-lock.json') }}
key: node-modules-backend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@ -103,10 +103,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.19
- name: Use Node.js 24.16.0
uses: actions/setup-node@v4
with:
node-version: '20.19'
node-version: '24.16.0'
- name: Restore node_modules cache
id: cache-node-modules
@ -118,7 +118,7 @@ jobs:
packages/api/node_modules
packages/data-provider/node_modules
packages/data-schemas/node_modules
key: node-modules-backend-${{ runner.os }}-20.19-${{ hashFiles('package-lock.json') }}
key: node-modules-backend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@ -162,10 +162,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.19
- name: Use Node.js 24.16.0
uses: actions/setup-node@v4
with:
node-version: '20.19'
node-version: '24.16.0'
- name: Restore node_modules cache
id: cache-node-modules
@ -177,7 +177,7 @@ jobs:
packages/api/node_modules
packages/data-provider/node_modules
packages/data-schemas/node_modules
key: node-modules-backend-${{ runner.os }}-20.19-${{ hashFiles('package-lock.json') }}
key: node-modules-backend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@ -231,10 +231,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.19
- name: Use Node.js 24.16.0
uses: actions/setup-node@v4
with:
node-version: '20.19'
node-version: '24.16.0'
- name: Restore node_modules cache
id: cache-node-modules
@ -246,7 +246,7 @@ jobs:
packages/api/node_modules
packages/data-provider/node_modules
packages/data-schemas/node_modules
key: node-modules-backend-${{ runner.os }}-20.19-${{ hashFiles('package-lock.json') }}
key: node-modules-backend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@ -289,10 +289,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.19
- name: Use Node.js 24.16.0
uses: actions/setup-node@v4
with:
node-version: '20.19'
node-version: '24.16.0'
- name: Restore node_modules cache
id: cache-node-modules
@ -304,7 +304,7 @@ jobs:
packages/api/node_modules
packages/data-provider/node_modules
packages/data-schemas/node_modules
key: node-modules-backend-${{ runner.os }}-20.19-${{ hashFiles('package-lock.json') }}
key: node-modules-backend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@ -327,10 +327,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.19
- name: Use Node.js 24.16.0
uses: actions/setup-node@v4
with:
node-version: '20.19'
node-version: '24.16.0'
- name: Restore node_modules cache
id: cache-node-modules
@ -342,7 +342,7 @@ jobs:
packages/api/node_modules
packages/data-provider/node_modules
packages/data-schemas/node_modules
key: node-modules-backend-${{ runner.os }}-20.19-${{ hashFiles('package-lock.json') }}
key: node-modules-backend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@ -375,10 +375,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.19
- name: Use Node.js 24.16.0
uses: actions/setup-node@v4
with:
node-version: '20.19'
node-version: '24.16.0'
- name: Restore node_modules cache
id: cache-node-modules
@ -390,7 +390,7 @@ jobs:
packages/api/node_modules
packages/data-provider/node_modules
packages/data-schemas/node_modules
key: node-modules-backend-${{ runner.os }}-20.19-${{ hashFiles('package-lock.json') }}
key: node-modules-backend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'

View file

@ -28,10 +28,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js 20.x
- name: Use Node.js 24.16.0
uses: actions/setup-node@v4
with:
node-version: 20
node-version: '24.16.0'
cache: 'npm'
- name: Install Redis tools

View file

@ -27,7 +27,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '24.16.0'
- name: Install client dependencies
run: cd packages/client && npm ci
@ -77,7 +77,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '24.16.0'
registry-url: 'https://registry.npmjs.org'
- name: Install npm with OIDC support

View file

@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: '24.16.0'
- run: cd packages/data-provider && npm ci
- run: cd packages/data-provider && npm run build
- name: Pack package
@ -50,7 +50,7 @@ jobs:
steps:
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: '24.16.0'
registry-url: 'https://registry.npmjs.org'
- name: Install npm with OIDC support

View file

@ -27,7 +27,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '24.16.0'
- name: Install dependencies
run: cd packages/data-schemas && npm ci
@ -77,7 +77,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '24.16.0'
registry-url: 'https://registry.npmjs.org'
- name: Install npm with OIDC support

View file

@ -27,10 +27,10 @@ jobs:
with:
fetch-depth: 0
- name: Set up Node.js 20.x
- name: Set up Node.js 24.16.0
uses: actions/setup-node@v4
with:
node-version: 20
node-version: '24.16.0'
cache: npm
- name: Install dependencies

View file

@ -20,10 +20,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.19
- name: Use Node.js 24.16.0
uses: actions/setup-node@v4
with:
node-version: '20.19'
node-version: '24.16.0'
- name: Restore node_modules cache
id: cache-node-modules
@ -34,7 +34,7 @@ jobs:
client/node_modules
packages/client/node_modules
packages/data-provider/node_modules
key: node-modules-frontend-${{ runner.os }}-20.19-${{ hashFiles('package-lock.json') }}
key: node-modules-frontend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@ -84,10 +84,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.19
- name: Use Node.js 24.16.0
uses: actions/setup-node@v4
with:
node-version: '20.19'
node-version: '24.16.0'
- name: Restore node_modules cache
id: cache-node-modules
@ -98,7 +98,7 @@ jobs:
client/node_modules
packages/client/node_modules
packages/data-provider/node_modules
key: node-modules-frontend-${{ runner.os }}-20.19-${{ hashFiles('package-lock.json') }}
key: node-modules-frontend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@ -128,10 +128,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.19
- name: Use Node.js 24.16.0
uses: actions/setup-node@v4
with:
node-version: '20.19'
node-version: '24.16.0'
- name: Restore node_modules cache
id: cache-node-modules
@ -142,7 +142,7 @@ jobs:
client/node_modules
packages/client/node_modules
packages/data-provider/node_modules
key: node-modules-frontend-${{ runner.os }}-20.19-${{ hashFiles('package-lock.json') }}
key: node-modules-frontend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
@ -172,10 +172,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.19
- name: Use Node.js 24.16.0
uses: actions/setup-node@v4
with:
node-version: '20.19'
node-version: '24.16.0'
- name: Restore node_modules cache
id: cache-node-modules
@ -186,7 +186,7 @@ jobs:
client/node_modules
packages/client/node_modules
packages/data-provider/node_modules
key: node-modules-frontend-${{ runner.os }}-20.19-${{ hashFiles('package-lock.json') }}
key: node-modules-frontend-${{ runner.os }}-24.16.0-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'

View file

@ -136,7 +136,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
node-version: '24.16.0'
- name: Install GitNexus CLI
working-directory: ${{ runner.temp }}

View file

@ -22,7 +22,7 @@ jobs:
- name: Set Up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: '24.16.0'
- name: Install locize CLI
run: npm install -g locize-cli

View file

@ -20,10 +20,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
- name: Use Node.js 24.16.0
uses: actions/setup-node@v4
with:
node-version: 20
node-version: '24.16.0'
cache: 'npm'
- name: Install depcheck

1
.nvmrc Normal file
View file

@ -0,0 +1 @@
24.16.0

View file

@ -143,7 +143,7 @@ Multi-line imports count total character length across all lines. Consolidate va
| `npm run frontend:dev` | Start frontend dev server with HMR (port 3090, requires backend running) |
| `npm run build:data-provider` | Rebuild `packages/data-provider` after changes |
- Node.js: v20.19.0+ or ^22.12.0 or >= 23.0.0
- Node.js: v24.16.0
- Database: MongoDB
- Backend runs on `http://localhost:3080/`; frontend dev server on `http://localhost:3090/`

View file

@ -1,7 +1,7 @@
# v0.8.6
# Base node image
FROM node:20-alpine AS node
FROM node:24.16.0-alpine AS node
RUN apk upgrade --no-cache
RUN apk add --no-cache jemalloc

View file

@ -10,7 +10,7 @@ ARG BUILD_BRANCH=
ARG BUILD_DATE=
# Base for all builds
FROM node:20-alpine AS base-min
FROM node:24.16.0-alpine AS base-min
ARG NPM_CI_TIMEOUT_SECONDS=1500
ARG NPM_CI_ATTEMPTS=2
RUN apk upgrade --no-cache

View file

@ -133,7 +133,7 @@
"@types/jest": "^29.5.14",
"@types/js-cookie": "^3.0.6",
"@types/lodash": "^4.17.15",
"@types/node": "^20.19.35",
"@types/node": "^24.12.4",
"@types/react": "^18.2.11",
"@types/react-dom": "^18.2.4",
"@vitejs/plugin-react": "^5.1.4",

73
package-lock.json generated
View file

@ -514,7 +514,7 @@
"@types/jest": "^29.5.14",
"@types/js-cookie": "^3.0.6",
"@types/lodash": "^4.17.15",
"@types/node": "^20.19.35",
"@types/node": "^24.12.4",
"@types/react": "^18.2.11",
"@types/react-dom": "^18.2.4",
"@vitejs/plugin-react": "^5.1.4",
@ -1228,13 +1228,13 @@
}
},
"client/node_modules/@types/node": {
"version": "20.19.35",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.35.tgz",
"integrity": "sha512-Uarfe6J91b9HAUXxjvSOdiO2UPOKLm07Q1oh0JHxoZ1y8HoqxDAu3gVrsrOHeiio0kSsoVBt4wFrKOm0dKxVPQ==",
"version": "24.12.4",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.4.tgz",
"integrity": "sha512-GUUEShf+PBCGW2KaXwcIt3Yk+e3pkKwWKb9GSyM9WQVE+ep2jzmHdGsHzu4wgcZy5fN9FBdVzjpBQsYlpfpgLA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~6.21.0"
"undici-types": "~7.16.0"
}
},
"client/node_modules/@vitejs/plugin-react": {
@ -1430,9 +1430,9 @@
}
},
"client/node_modules/undici-types": {
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
"integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
"dev": true,
"license": "MIT"
},
@ -44035,7 +44035,7 @@
"@types/jest": "^29.5.2",
"@types/jsonwebtoken": "^9.0.0",
"@types/multer": "^1.4.13",
"@types/node": "^20.3.0",
"@types/node": "^24.12.4",
"@types/node-fetch": "^2.6.13",
"@types/react": "^18.2.18",
"@types/sanitize-html": "^2.13.0",
@ -44135,6 +44135,16 @@
"keyv": "^5.3.4"
}
},
"packages/api/node_modules/@types/node": {
"version": "24.12.4",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.4.tgz",
"integrity": "sha512-GUUEShf+PBCGW2KaXwcIt3Yk+e3pkKwWKb9GSyM9WQVE+ep2jzmHdGsHzu4wgcZy5fN9FBdVzjpBQsYlpfpgLA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~7.16.0"
}
},
"packages/api/node_modules/rimraf": {
"version": "6.1.3",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.3.tgz",
@ -44155,6 +44165,13 @@
"url": "https://github.com/sponsors/isaacs"
}
},
"packages/api/node_modules/undici-types": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
"integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
"dev": true,
"license": "MIT"
},
"packages/client": {
"name": "@librechat/client",
"version": "0.4.60",
@ -44653,7 +44670,7 @@
"@rollup/plugin-terser": "^1.0.0",
"@types/jest": "^29.5.2",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.3.0",
"@types/node": "^24.12.4",
"@types/react": "^18.2.18",
"@types/winston": "^2.4.4",
"jest": "^30.2.0",
@ -44692,6 +44709,16 @@
}
}
},
"packages/data-provider/node_modules/@types/node": {
"version": "24.12.4",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.4.tgz",
"integrity": "sha512-GUUEShf+PBCGW2KaXwcIt3Yk+e3pkKwWKb9GSyM9WQVE+ep2jzmHdGsHzu4wgcZy5fN9FBdVzjpBQsYlpfpgLA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~7.16.0"
}
},
"packages/data-provider/node_modules/rimraf": {
"version": "6.1.3",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.3.tgz",
@ -44712,6 +44739,13 @@
"url": "https://github.com/sponsors/isaacs"
}
},
"packages/data-provider/node_modules/undici-types": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
"integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
"dev": true,
"license": "MIT"
},
"packages/data-schemas": {
"name": "@librechat/data-schemas",
"version": "0.0.52",
@ -44726,7 +44760,7 @@
"@rollup/plugin-typescript": "^12.1.2",
"@types/express": "^5.0.0",
"@types/jest": "^29.5.2",
"@types/node": "^20.3.0",
"@types/node": "^24.12.4",
"jest": "^30.2.0",
"jest-junit": "^16.0.0",
"mongodb-memory-server": "^11.0.1",
@ -44772,6 +44806,16 @@
}
}
},
"packages/data-schemas/node_modules/@types/node": {
"version": "24.12.4",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.4.tgz",
"integrity": "sha512-GUUEShf+PBCGW2KaXwcIt3Yk+e3pkKwWKb9GSyM9WQVE+ep2jzmHdGsHzu4wgcZy5fN9FBdVzjpBQsYlpfpgLA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~7.16.0"
}
},
"packages/data-schemas/node_modules/logform": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/logform/-/logform-2.7.0.tgz",
@ -44818,6 +44862,13 @@
"url": "https://github.com/sponsors/isaacs"
}
},
"packages/data-schemas/node_modules/undici-types": {
"version": "7.16.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz",
"integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==",
"dev": true,
"license": "MIT"
},
"packages/data-schemas/node_modules/winston": {
"version": "3.17.0",
"resolved": "https://registry.npmjs.org/winston/-/winston-3.17.0.tgz",

View file

@ -2,7 +2,7 @@
"name": "LibreChat",
"version": "v0.8.6",
"description": "",
"packageManager": "npm@11.10.0",
"packageManager": "npm@11.13.0",
"workspaces": [
"api",
"client",

View file

@ -65,7 +65,7 @@
"@types/jest": "^29.5.2",
"@types/jsonwebtoken": "^9.0.0",
"@types/multer": "^1.4.13",
"@types/node": "^20.3.0",
"@types/node": "^24.12.4",
"@types/node-fetch": "^2.6.13",
"@types/react": "^18.2.18",
"@types/sanitize-html": "^2.13.0",

View file

@ -506,7 +506,8 @@ describe('telemetry SDK lifecycle', () => {
mockShutdown.mockRejectedValueOnce(new Error('flush failed'));
initializeTelemetry({ OTEL_TRACING_ENABLED: 'true' });
const taskFn = (registerShutdownTask as jest.Mock).mock.calls.at(-1)?.[1] as
const shutdownTaskCalls = (registerShutdownTask as jest.Mock).mock.calls;
const taskFn = shutdownTaskCalls[shutdownTaskCalls.length - 1]?.[1] as
| (() => Promise<void>)
| undefined;
expect(taskFn).toBeDefined();

View file

@ -60,7 +60,7 @@
"@rollup/plugin-terser": "^1.0.0",
"@types/jest": "^29.5.2",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.3.0",
"@types/node": "^24.12.4",
"@types/react": "^18.2.18",
"@types/winston": "^2.4.4",
"jest": "^30.2.0",

View file

@ -52,7 +52,7 @@
"@rollup/plugin-typescript": "^12.1.2",
"@types/express": "^5.0.0",
"@types/jest": "^29.5.2",
"@types/node": "^20.3.0",
"@types/node": "^24.12.4",
"jest": "^30.2.0",
"jest-junit": "^16.0.0",
"mongodb-memory-server": "^11.0.1",