Skip to content

Commit c44d028

Browse files
authored
chore: upgrade to node v24 (#3854) (#3856)
- Update .nvmrc - Update engines in root package.json - Update @types/node package - Update all Dockerfiles to use node:24-alpine3.23 - Update workflows/rafiki/env-setup/action.yml to use Node 24 - Fix Invalid URL error (new URL("")) by filtering empty env string arrays
1 parent e4d4c7e commit c44d028

24 files changed

Lines changed: 167 additions & 332 deletions

File tree

.github/workflows/rafiki/env-setup/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ runs:
77
- uses: pnpm/action-setup@v3
88
- uses: actions/setup-node@v4
99
with:
10-
node-version: '20'
10+
node-version: '24'
1111
cache: 'pnpm'
1212
- name: Install dependencies
1313
shell: bash

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lts/iron
1+
v24

localenv/mock-account-servicing-entity/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-alpine3.23 AS base
1+
FROM node:24-alpine3.23 AS base
22

33
WORKDIR /home/rafiki
44

@@ -42,7 +42,7 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
4242
--frozen-lockfile
4343
RUN pnpm --filter mock-account-servicing-entity build
4444

45-
FROM node:20-alpine3.23 AS runner
45+
FROM node:24-alpine3.23 AS runner
4646

4747
WORKDIR /home/rafiki
4848

localenv/mock-account-servicing-entity/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@remix-run/node": "^2.16.4",
1616
"@remix-run/react": "^2.16.4",
1717
"@remix-run/serve": "^2.16.4",
18-
"@types/node": "^18.7.12",
18+
"@types/node": "^24.0.0",
1919
"@types/uuid": "^9.0.8",
2020
"axios": "^1.12.0",
2121
"class-variance-authority": "^0.7.1",
@@ -38,6 +38,6 @@
3838
"tailwindcss": "^3.4.17"
3939
},
4040
"engines": {
41-
"node": "20"
41+
"node": "24"
4242
}
4343
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"repository": "https://github.com/interledger/rafiki",
66
"engines": {
77
"pnpm": "^8.15.9",
8-
"node": "20"
8+
"node": "24"
99
},
1010
"packageManager": "pnpm@8.15.9",
1111
"scripts": {

packages/auth/Dockerfile.dev

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

33
RUN adduser -D rafiki
44
WORKDIR /home/rafiki

packages/auth/Dockerfile.prod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-alpine3.23 AS base
1+
FROM node:24-alpine3.23 AS base
22

33
WORKDIR /home/rafiki
44

@@ -44,7 +44,7 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
4444
--frozen-lockfile
4545
RUN pnpm --filter auth build
4646

47-
FROM node:20-alpine3.23 AS runner
47+
FROM node:24-alpine3.23 AS runner
4848

4949
RUN adduser -D rafiki
5050

packages/backend/Dockerfile.dev

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

33
RUN adduser -D rafiki
44
WORKDIR /home/rafiki

packages/backend/Dockerfile.prod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-alpine3.23 AS base
1+
FROM node:24-alpine3.23 AS base
22

33
WORKDIR /home/rafiki
44

@@ -44,7 +44,7 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
4444
--frozen-lockfile
4545
RUN pnpm --filter backend build
4646

47-
FROM node:20-alpine3.23 AS runner
47+
FROM node:24-alpine3.23 AS runner
4848

4949
# Since this is from a fresh image, we need to first create the Rafiki user
5050
RUN adduser -D rafiki

packages/backend/src/config/app.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ function envString(name: string, defaultValue?: string): string {
1414

1515
function envStringArray(name: string, value: string[]): string[] {
1616
const envValue = process.env[name]
17-
return envValue == null ? value : envValue.split(',').map((s) => s.trim())
17+
return envValue == null
18+
? value
19+
: envValue
20+
.split(',')
21+
.map((s) => s.trim())
22+
.filter((s) => s.length > 0)
1823
}
1924

2025
function envInt(name: string, value: number): number {

0 commit comments

Comments
 (0)