Skip to content

Commit 69335c2

Browse files
authored
Merge pull request #38 from PMS61/main
chore: upgrade Node.js version from 20 to 22 across project files
2 parents d026095 + d88d8fe commit 69335c2

File tree

12 files changed

+84
-153
lines changed

12 files changed

+84
-153
lines changed

.github/workflows/branch-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: Setup Node.js
4343
uses: actions/setup-node@v4
4444
with:
45-
node-version: '18'
45+
node-version: '22'
4646

4747
- name: Install commitlint
4848
run: |

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup Node.js
1717
uses: actions/setup-node@v4
1818
with:
19-
node-version: '20'
19+
node-version: '22'
2020
cache: 'npm'
2121

2222
- name: Install dependencies

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
- uses: actions/setup-node@v4
1919
with:
20-
node-version: "lts/*"
20+
node-version: "22"
2121
cache: 'npm'
2222

2323
- name: Install dependencies

.github/workflows/test.yml

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,65 @@
1-
name: Test Workflow
2-
3-
on:
4-
# Allows manual trigger from Actions tab
5-
workflow_dispatch:
6-
# For testing on pull requests to develop branch
7-
pull_request:
8-
branches: [ develop ]
9-
types: [opened, synchronize]
10-
11-
jobs:
12-
test:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@v3
16-
17-
- name: Setup Node.js
18-
uses: actions/setup-node@v3
19-
with:
20-
node-version: '18'
21-
cache: 'npm'
22-
23-
- name: Install dependencies
24-
run: npm ci
25-
26-
# - name: Run tests
27-
# run: |
28-
# echo "Running tests..."
29-
# npm run test
30-
31-
- name: Check build
32-
run: |
33-
echo "Checking build..."
34-
npm run build
35-
36-
# Test changelog generation
37-
- name: Test changelog
38-
run: |
39-
echo "Testing changelog generation..."
40-
npm run changelog
41-
42-
# - name: Test commit lint
43-
# run: |
44-
# echo "Testing last commit message..."
45-
# echo "$(git log -1 --pretty=%B)" | npx commitlint
46-
47-
- name: Status Check
48-
run: |
49-
echo "All tests completed successfully!"
50-
51-
- name: Debug
52-
if: ${{ failure() }}
53-
run: |
54-
echo "Debug information:"
55-
env
56-
ls -la
57-
58-
- name: Check Status
59-
run: |
60-
if [ $? -eq 0 ]; then
61-
echo "::set-output name=status::success"
62-
else
63-
echo "::set-output name=status::failure"
64-
exit 1
1+
name: Test Workflow
2+
3+
on:
4+
# Allows manual trigger from Actions tab
5+
workflow_dispatch:
6+
# For testing on pull requests to develop branch
7+
pull_request:
8+
branches: [ develop ]
9+
types: [opened, synchronize]
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: '22'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
# - name: Run tests
27+
# run: |
28+
# echo "Running tests..."
29+
# npm run test
30+
31+
- name: Check build
32+
run: |
33+
echo "Checking build..."
34+
npm run build
35+
36+
# Test changelog generation
37+
- name: Test changelog
38+
run: |
39+
echo "Testing changelog generation..."
40+
npm run changelog
41+
42+
# - name: Test commit lint
43+
# run: |
44+
# echo "Testing last commit message..."
45+
# echo "$(git log -1 --pretty=%B)" | npx commitlint
46+
47+
- name: Status Check
48+
run: |
49+
echo "All tests completed successfully!"
50+
51+
- name: Debug
52+
if: ${{ failure() }}
53+
run: |
54+
echo "Debug information:"
55+
env
56+
ls -la
57+
58+
- name: Check Status
59+
run: |
60+
if [ $? -eq 0 ]; then
61+
echo "::set-output name=status::success"
62+
else
63+
echo "::set-output name=status::failure"
64+
exit 1
6565
fi

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20
1+
22

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20
1+
22

CLOUDFLARE_SETUP.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This guide covers deploying the COC Website to Cloudflare Pages using `@cloudfla
44

55
## Prerequisites
66

7-
- Node.js >= 20.0.0 (check with `node -v`)
7+
- Node.js >= 22.0.0 (check with `node -v`)
88
- Cloudflare account
99
- Wrangler CLI installed (`npm install -g wrangler`)
1010

@@ -91,17 +91,17 @@ For non-secret variables, add them in the Cloudflare Pages dashboard:
9191
2. Navigate to **Environment variables**
9292
3. Add:
9393
- `NEXT_OUTPUT_STANDALONE` = `false`
94-
- `NODE_VERSION` = `20`
94+
- `NODE_VERSION` = `22`
9595

9696
## Troubleshooting
9797

9898
### Build Fails with "Unsupported engine"
9999

100-
Ensure you're using Node.js >= 20.0.0:
100+
Ensure you're using Node.js >= 22.0.0:
101101

102102
```bash
103-
node -v # Should show v20.x.x or higher
104-
nvm use 20 # If using nvm
103+
node -v # Should show v22.x.x or higher
104+
nvm use 22 # If using nvm
105105
```
106106

107107
### Missing Secrets
@@ -152,7 +152,7 @@ compatibility_date = "2025-01-01"
152152
command = "npx @cloudflare/next-on-pages@1"
153153

154154
[vars]
155-
NODE_VERSION = "20"
155+
NODE_VERSION = "22"
156156
NEXT_OUTPUT_STANDALONE = "false"
157157
```
158158

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Stage 1: Dependencies
2-
FROM node:20-alpine AS deps
2+
FROM node:22-alpine AS deps
33
WORKDIR /app
44

55
# Install dependencies needed for build
@@ -12,7 +12,7 @@ COPY package*.json ./
1212
RUN npm ci --ignore-scripts
1313

1414
# Stage 2: Builder
15-
FROM node:20-alpine AS builder
15+
FROM node:22-alpine AS builder
1616
WORKDIR /app
1717

1818
# Copy dependencies from deps stage
@@ -38,7 +38,7 @@ ENV JWT_SECRET=placeholder_for_build
3838
RUN npm run build
3939

4040
# Stage 3: Production image
41-
FROM node:20-alpine AS runner
41+
FROM node:22-alpine AS runner
4242
WORKDIR /app
4343

4444
# Set environment variables

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Open [http://localhost:3000](http://localhost:3000) to view the project.
2727
## 🛠️ Development Setup
2828

2929
### Prerequisites
30-
- Node.js (v18 or higher)
31-
- npm (v9 or higher)
30+
- Node.js (v22 or higher)
31+
- npm (v10 or higher)
3232
- Docker (optional)
3333

3434
### Environment Setup

0 commit comments

Comments
 (0)