Skip to content

Commit d61a157

Browse files
authored
Merge pull request #4 from starichkov/wider-nodejs-version-range-support
Expand Node.js support to include version 24.x
2 parents 33ca931 + c473f5d commit d61a157

9 files changed

Lines changed: 41 additions & 36 deletions

File tree

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Setup Node.js
2020
uses: actions/setup-node@v4
2121
with:
22-
node-version: '22'
22+
node-version: '24'
2323
cache: 'npm'
2424

2525
- name: Install dependencies
@@ -46,7 +46,7 @@ jobs:
4646
- name: Setup Node.js
4747
uses: actions/setup-node@v4
4848
with:
49-
node-version: '22'
49+
node-version: '24'
5050
cache: 'npm'
5151

5252
- name: Install dependencies

.github/workflows/node.js.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [22.x, 24.x]
19+
node-version: [20.x, 22.x, 24.x]
2020
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2121

2222
steps:
@@ -36,11 +36,11 @@ jobs:
3636
run: npm run build --if-present
3737

3838
- name: Run unit tests with coverage
39-
if: matrix.node-version == '22.x'
39+
if: matrix.node-version == '24.x'
4040
run: npm run test:coverage
4141

4242
- name: Upload coverage to Codecov
43-
if: matrix.node-version == '22.x'
43+
if: matrix.node-version == '24.x'
4444
uses: codecov/codecov-action@v5
4545
with:
4646
token: ${{ secrets.CODECOV_TOKEN }}

.junie/guidelines.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
These guidelines help Junie make minimal, correct changes to this repository and understand how to validate them.
44

55
## Project Overview
6-
A RESTful Notes API built with Node.js (ES Modules) and Express, featuring a database‑agnostic architecture with interchangeable NoSQL backends. The app currently supports CouchDB and MongoDB via repository implementations, includes a lightweight web UI, and provides JSDoc-based documentation and Jest tests. Target runtime is Node.js 22.
6+
A RESTful Notes API built with Node.js (ES Modules) and Express, featuring a database‑agnostic architecture with interchangeable NoSQL backends. The app currently supports CouchDB and MongoDB via repository implementations, includes a lightweight web UI, and provides JSDoc-based documentation and Jest tests. Target runtime includes Node.js 20, 22, and 24 (LTS versions).
77

88
Key characteristics:
99
- Layered design: Model → Repository (vendor-specific) → API (Express routes)
@@ -25,7 +25,7 @@ Key characteristics:
2525
- DOCUMENTATION.md — documentation workflow and tips
2626

2727
## Prerequisites
28-
- Node.js: 22.x (as enforced by package.json engines)
28+
- Node.js: 20.x, 22.x, or 24.x (as enforced by package.json engines)
2929
- npm: 10+
3030
- One database backend available locally (CouchDB ≥3.5.1 or MongoDB ≥7.0.28), or use Docker Compose
3131

@@ -54,7 +54,7 @@ Ensure .env contains the required credentials before starting.
5454
- Run with coverage: npm run test:coverage
5555
- Open coverage report: npm run test:coverage:open (Linux requires xdg-open)
5656
Notes:
57-
- Jest runs under Node 22 with experimental VM modules flag set by the script
57+
- Jest runs under Node 24 with experimental VM modules flag set by the script
5858

5959
## Documentation
6060
- Generate docs: npm run docs
@@ -64,7 +64,7 @@ Notes:
6464
See DOCUMENTATION.md for details.
6565

6666
## Code Style and Conventions
67-
- ESM only ("type": "module"); prefer async/await and modern Node 22 APIs
67+
- ESM only ("type": "module"); prefer async/await and modern Node 24 APIs
6868
- Keep repository interface boundaries clean when touching data access code
6969
- Add or update Jest tests when changing behavior
7070
- JSDoc for public methods and API routes is encouraged
@@ -78,7 +78,7 @@ See DOCUMENTATION.md for details.
7878
- Make the minimal change required to satisfy the issue
7979
- When renaming code entities, use the dedicated rename tool so all references update safely
8080
- Prefer adding tests or adjusting existing ones to validate new behavior when applicable
81-
- Respect Node 22 engine; avoid adding dependencies unnecessarily
81+
- Respect the supported Node.js versions (20, 22, 24); avoid adding dependencies unnecessarily
8282
- If environment-sensitive features are involved, document .env expectations succinctly
8383

8484
## Helpful References

DOCUMENTATION.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -278,21 +278,21 @@ The JSDoc configuration is in `jsdoc.config.json`:
278278
```
279279

280280
### Node.js Version Requirements
281-
The documentation system is optimized for **Node.js 22 LTS**:
281+
The documentation system supports **Node.js 20, 22, and 24 LTS**:
282282

283283
```json
284-
// package.json
285-
"engines": {
286-
"node": ">=22.0.0 <23.0.0", // LTS 22.x only
287-
"npm": ">=10.0.0"
284+
{
285+
"engines": {
286+
"node": ">=20.0.0",
287+
"npm": ">=10.0.0"
288+
}
288289
}
289290
```
290291

291-
**Why LTS 22.x?**
292-
-**Stability**: Long-term support with 30+ months lifecycle
293-
-**Performance**: Latest optimizations and ES module support
294-
-**Compatibility**: All JSDoc and tooling dependencies supported
295-
-**CI/CD**: Consistent environment across local and GitHub Actions
292+
**Supported LTS Versions:**
293+
-**Node.js 24**: Primary development and CI version
294+
-**Node.js 22**: Supported LTS
295+
-**Node.js 20**: Supported LTS
296296

297297
## Integration with Development Workflow
298298

@@ -316,7 +316,7 @@ jobs:
316316
steps:
317317
# 1. Setup (once)
318318
- Checkout code
319-
- Setup Node.js 22 (LTS)
319+
- Setup Node.js 24 (LTS)
320320
- Install dependencies
321321

322322
# 2. Build
@@ -345,7 +345,7 @@ jobs:
345345
- **Single job design** eliminates redundant setups
346346
- **Conditional deployment** (main branch only)
347347
- **Artifact upload** only on failure or PRs (for debugging)
348-
- **Node.js 22 LTS** for stability and performance
348+
- **Node.js 24 LTS** for stability and performance
349349
350350
## Troubleshooting
351351

GITHUB_ACTIONS.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ docker-compose-tests (parallel: CouchDB + MongoDB)
5656

5757
**Execution Flow**:
5858
```
59-
Setup (checkout, Node.js 22, npm install)
59+
Setup (checkout, Node.js 24, npm install)
6060
6161
Generate (JSDoc documentation build)
6262
@@ -341,7 +341,7 @@ export COUCHDB_DATABASE="your_database"
341341
**Local development:**
342342
```bash
343343
# Node.js LTS version (required)
344-
node --version # Should be 22.x
344+
node --version # Should be 24.x
345345

346346
# Documentation generation
347347
npm run docs # Generate docs
@@ -357,12 +357,16 @@ node scripts/check-docs-coverage.js # Quality check
357357

358358
**Node.js Requirements:**
359359
```json
360-
"engines": {
361-
"node": ">=22.0.0 <23.0.0", // LTS 22.x only
362-
"npm": ">=10.0.0"
360+
{
361+
"engines": {
362+
"node": ">=20.0.0",
363+
"npm": ">=10.0.0"
364+
}
363365
}
364366
```
365367

368+
Support is maintained for Node.js 20, 22, and 24, with 24 being the primary version used for coverage and documentation.
369+
366370
## 🎯 Best Practices
367371

368372
### For Contributors

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,15 @@ The application follows a layered architecture with a clear separation of concer
3636

3737
This design allows for easy switching between database vendors by implementing a new repository that adheres to the repository interface.
3838

39-
## Prerequisites
39+
### Node.js Requirements:
4040

41-
These are the versions this sample app is coming with:
42-
43-
- Node.js (v22 or higher)
41+
- Node.js (v20, v22, or v24 LTS)
4442
- npm or pnpm
4543
- One of the following databases:
4644
- CouchDB (v3.5.1 or higher)
4745
- MongoDB (v7.0.28 or higher)
4846

49-
Stable work on lower versions is not guaranteed.
47+
Stable work on other versions is not guaranteed. Node.js v24 is the primary development and CI version.
5048

5149
## Installation
5250

notes.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# syntax=docker/dockerfile:1
22

33
# Build stage: install only production dependencies
4-
FROM node:22.21.1-alpine3.22 AS builder
4+
FROM node:24.12.0-alpine3.23 AS builder
55
WORKDIR /app
66
COPY package*.json ./
77
# Install reproducible, production-only deps and clean cache
88
RUN npm ci --only=production && npm cache clean --force
99

1010
# Runtime stage: minimal image, non-root user
11-
FROM node:22.21.1-alpine3.22 AS runner
11+
FROM node:24.12.0-alpine3.23 AS runner
1212
# Install wget for health checks
1313
RUN apk add --no-cache wget
1414
ENV NODE_ENV=production

package-lock.json

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"main": "src/notes-api-server.js",
55
"type": "module",
66
"engines": {
7-
"node": ">=22.0.0 <=24.0.0",
7+
"node": ">=20.0.0",
88
"npm": ">=10.0.0"
99
},
1010
"scripts": {

0 commit comments

Comments
 (0)