Skip to content

Commit dcf8df3

Browse files
authored
Merge pull request #4006 from Northeastern-Electric-Racing/test/node-25-compatibility
Switch backend to Node 25 with V8 pointer compression (node-caged)
2 parents a751f2e + 5b09c4d commit dcf8df3

12 files changed

Lines changed: 205 additions & 233 deletions

File tree

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage - compile TypeScript
2-
FROM node:20 AS builder
2+
FROM node:25 AS builder
33
WORKDIR /app
44

55
COPY package.json tsconfig.build.json ./
@@ -11,11 +11,11 @@ RUN cd src/backend && npx prisma generate
1111
RUN yarn build:shared
1212
RUN yarn build:backend
1313

14-
FROM node:20-slim
14+
FROM platformatic/node-caged:25-slim
1515
WORKDIR /app
1616

1717
# Install OpenSSL for Prisma (slim image needs this)
18-
RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
18+
RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/* && npm install -g yarn
1919

2020
COPY package.json ./
2121

devContainerization/Dockerfile.backend.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20
1+
FROM node:25
22

33
COPY package.json tsconfig.build.json ./
44
COPY ./src/backend/package.json ./src/backend/tsconfig.json src/backend/

devContainerization/Dockerfile.frontend.dev

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-alpine
1+
FROM node:25-alpine
22

33
COPY package.json tsconfig.build.json ./
44
COPY ./src/frontend/package.json ./src/frontend/tsconfig.json src/frontend/
@@ -11,4 +11,4 @@ COPY ./src/frontend src/frontend
1111
COPY ./src/shared src/shared
1212

1313
EXPOSE 3000
14-
CMD [ "yarn", "workspace", "frontend", "vite", "--force", "--host" ]
14+
CMD [ "yarn", "workspace", "frontend", "vite", "--force", "--host" ]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"@babel/preset-typescript": "^7.18.6",
8787
"@types/canvas-confetti": "^1.9.0",
8888
"@types/jest": "^29.5.14",
89-
"@types/node": "20.0.0",
89+
"@types/node": "^25.0.0",
9090
"@typescript-eslint/eslint-plugin": "8.20.0",
9191
"@typescript-eslint/parser": "8.20.0",
9292
"concurrently": "^9.1.0",

src/backend/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# TO BE RUN FROM DOCKER COMPOSE. DO NOT RUN MANUALLY AS CONTEXT IS NOT SET CORRECTLY
2-
FROM node:20
2+
FROM platformatic/node-caged:25-slim
3+
RUN npm install -g yarn
34

45
WORKDIR /base
56

src/backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"devDependencies": {
4040
"@types/express-jwt": "^6.0.4",
4141
"@types/jsonwebtoken": "^8.5.9",
42-
"@types/node": "^20.0.0",
42+
"@types/node": "^25.0.0",
4343
"@types/supertest": "^2.0.12",
4444
"nodemon": "^2.0.16",
4545
"supertest": "^6.2.4",

src/docs-site/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ If your changes aren't appearing:
246246

247247
Common issues:
248248

249-
- **Node version**: Ensure you're running Node.js 18 or higher
249+
- **Node version**: Ensure you're running Node.js 18 or higher (although you should be running node 25 for the main site development)
250250
- **Dependencies**: From the root directory, try `rm -rf docs-site/node_modules && yarn install`
251251
- **Port conflict**: Docs run on port 3002. If it's in use, Docusaurus will try another port or you can stop the conflicting process
252252

src/frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"@testing-library/react": "^16.2.0",
5959
"@testing-library/react-hooks": "^8.0.1",
6060
"@testing-library/user-event": "^14.6.0",
61-
"@types/node": "20.0.0",
61+
"@types/node": "^25.0.0",
6262
"@types/react": "^19.0.7",
6363
"@types/react-dom": "^19.0.3",
6464
"@types/react-helmet": "^6.1.6",

src/frontend/src/apis/finance.api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ export const downloadBlobsToPdf = async (blobData: Blob[], filename: string) =>
327327
break;
328328
}
329329
default: {
330-
console.log(blob.type + 'type not supported and will not be added to the PDF, name: ' + blob.name);
330+
console.log(blob.type + ' type not supported and will not be added to the PDF');
331331
// throw new Error(blob.type + ' type not supported');
332332
}
333333
}

src/frontend/src/pages/AdminToolsPage/EditGuestView/EditLogo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const EditLogo = () => {
6767
<EditLogoForm
6868
onSubmit={onSubmit}
6969
onHide={handleClose}
70-
orgLogo={imageData ? new File([imageData], imageData.name, { type: imageData.type }) : undefined}
70+
orgLogo={imageData ? new File([imageData], 'logo', { type: imageData.type }) : undefined}
7171
/>
7272
) : (
7373
<>

0 commit comments

Comments
 (0)