Skip to content

fix(be): upgrade node to v22 to use esmodule in nestjs #2681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:20-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:22-bullseye

# Install sandbox
RUN mkdir -p /app/sandbox/policy /app/sandbox/results \
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-pnpm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ runs:
- name: Setup Node.js and pnpm
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'pnpm'

- name: Install dependencies
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,18 @@ jobs:
if: steps.filter.outputs.iris == 'true'
run: go test ./...
working-directory: ./apps/iris

# TODO: write smoke test for backend
# e.g) start backend server and check if it responds to requests
#
# ```
# pnpm --filter="@codedang/backend" start &
#
# for i in {1..10}
# do
# curl -s http://localhost:3000/health && exit 0
# sleep 2
# done
# echo "Server did not respond to health check."
# exit 1
# ```
3 changes: 3 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM gitpod/workspace-full:latest

# Install Node.js
RUN nvm install v22.14.0

# Install sandbox
# FIXME: we don't need 777 permission
RUN sudo mkdir -p /app/sandbox/policy /app/sandbox/results \
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.14.0
4 changes: 2 additions & 2 deletions apps/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
ARG target=client
ARG app_env=production

FROM node:20.18.0-alpine AS builder
FROM node:22.14.0-alpine AS builder
ARG target

# Install bash for swc-node
Expand All @@ -24,7 +24,7 @@ RUN npx prisma generate
RUN npm run build ${target}

### PRODUCTION ###
FROM node:20.18.0-alpine
FROM node:22.14.0-alpine
ARG target
ARG app_env

Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@
"typescript": "5.7.2",
"typescript-eslint": "^8.18.1"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"engines": {
"node": "^22.14.0"
}
}
Loading