-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Upgrade Node to 20.18.1 and PNPM to 9.15.1 #407
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
feat: Upgrade Node to 20.18.1 and PNPM to 9.15.1 #407
Conversation
WalkthroughThis pull request introduces version updates across multiple files and dependencies. The primary changes include upgrading Node.js from version 20.15.1 to 20.18.1 and updating the PNPM package manager from version 9.10.0 to 9.15.1. These updates are consistently applied across various project configuration files, including Changes
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant Config as Project Configuration
participant Node as Node.js
participant PNPM as PNPM Package Manager
Dev->>Config: Update Node.js version
Config->>Node: Specify version 20.18.1
Dev->>Config: Update PNPM version
Config->>PNPM: Specify version 9.15.1
Dev->>Config: Propagate changes across project files
Config->>Node: Consistent version updates
Config->>PNPM: Consistent version updates
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (2)
tests/simple/packages/backend/src/utils/zod.ts (1)
18-27: Potential improvement: Ensure logging or additional context for non-Zod errors.
Currently, non-Zod errors are re-thrown without capturing or logging additional context. Depending on your application’s requirements, consider logging or augmenting the error message to help with debugging.packages/core-generators/src/generators/node/node/index.ts (1)
26-27: Defaulting to newer Node and pnpm versions
The updated versions (nodeVersion: '20.18.1'andpnpmVersion: '9.15.1') help ensure new generator instances reflect the latest environment. Make sure all references to older Node versions are removed from your docs.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Lite
📒 Files selected for processing (24)
.changeset/serious-rabbits-battle.md(1 hunks).changeset/tall-coats-lick.md(1 hunks).node-version(1 hunks).nvmrc(1 hunks)package.json(1 hunks)packages/core-generators/src/generators/node/node/index.ts(1 hunks)packages/create-project/src/project-creator.ts(1 hunks)tests/simple/baseplate/project-definition.json(1 hunks)tests/simple/package.json(1 hunks)tests/simple/packages/backend/.npmrc(1 hunks)tests/simple/packages/backend/baseplate/.clean/.npmrc(1 hunks)tests/simple/packages/backend/baseplate/.clean/package.json(1 hunks)tests/simple/packages/backend/baseplate/.clean/src/index.ts(1 hunks)tests/simple/packages/backend/baseplate/.clean/src/utils/http-errors.ts(0 hunks)tests/simple/packages/backend/baseplate/.clean/src/utils/zod.ts(1 hunks)tests/simple/packages/backend/package.json(1 hunks)tests/simple/packages/backend/src/index.ts(1 hunks)tests/simple/packages/backend/src/utils/http-errors.ts(0 hunks)tests/simple/packages/backend/src/utils/zod.ts(1 hunks)tests/simple/packages/e2e/package.json(1 hunks)tests/simple/packages/web/.npmrc(1 hunks)tests/simple/packages/web/baseplate/.clean/.npmrc(1 hunks)tests/simple/packages/web/baseplate/.clean/package.json(1 hunks)tests/simple/packages/web/package.json(1 hunks)
💤 Files with no reviewable changes (2)
- tests/simple/packages/backend/src/utils/http-errors.ts
- tests/simple/packages/backend/baseplate/.clean/src/utils/http-errors.ts
✅ Files skipped from review due to trivial changes (14)
- .nvmrc
- .node-version
- tests/simple/packages/backend/src/index.ts
- tests/simple/packages/backend/.npmrc
- tests/simple/packages/backend/baseplate/.clean/src/index.ts
- tests/simple/packages/backend/baseplate/.clean/.npmrc
- tests/simple/packages/web/baseplate/.clean/.npmrc
- tests/simple/packages/web/.npmrc
- tests/simple/baseplate/project-definition.json
- tests/simple/packages/e2e/package.json
- .changeset/serious-rabbits-battle.md
- .changeset/tall-coats-lick.md
- tests/simple/packages/backend/baseplate/.clean/package.json
- tests/simple/packages/web/package.json
🔇 Additional comments (10)
tests/simple/packages/backend/src/utils/zod.ts (2)
1-2: Imports look good and are clearly scoped.
These imports correctly reference the necessary error classes and third-party dependencies needed for Zod error handling. No issues spotted here.
4-17: Well-documented function purpose and usage.
The docstring comprehensively describes how this function interacts with Zod errors, clarifying the function’s intent and throw conditions. This improves maintainability and readability.
tests/simple/packages/backend/baseplate/.clean/src/utils/zod.ts (2)
1-2: Imports look correct and consistent.
These imports (ZodError and BadRequestError) clearly communicate the purpose of handling validation errors.
18-27: Solid error handling logic for Zod validations.
The function properly distinguishes between ZodError and non-Zod errors and throws a BadRequestError with helpful details when needed. Documentation is thorough, and the never return type clarifies that it will always throw.
packages/create-project/src/project-creator.ts (3)
69-69: Explicitly specifying packageManager
Adding "[email protected]" clarifies the exact package manager version used. This is a good practice to ensure reproducible installs.
71-72: Updated engines for Node and pnpm
Using "node": "^20.18.1" and "pnpm": "^9.15.1" is consistent with the project-wide upgrade. Verify downstream scripts are compatible with PNPM 9.15.1.
75-75: Volta Node version alignment
Ensuring the Volta-managed Node version is set to 20.18.1 maintains consistency across local development environments.
tests/simple/package.json (2)
20-21: Engine versions upgraded
Switching "node" to ^20.18.1 and "pnpm" to ^9.15.0 aligns with the updated environment. Confirm that all team members have these versions installed or managed via Volta.
24-24: Volta Node version synchronization
The volta.node version now matches the engine requirement (20.18.1). This helps keep all contributors on the same Node version.
tests/simple/packages/backend/package.json (1)
81-81: Fix PNPM version inconsistency and verify server-side compatibility.
- The PNPM version (
^9.15.0) differs from the root package.json (^9.15.1). Consider updating for consistency. - Given the Node.js upgrade, it's worth verifying compatibility with key server-side dependencies, especially:
- Fastify and plugins
- GraphQL tooling (Yoga, Pothos)
- Prisma
Let's check the compatibility matrix:
Also applies to: 82-82, 85-85
✅ Verification successful
Let me verify the Fastify version requirements since the previous query returned null.
PNPM version mismatch needs attention, but dependencies are compatible
The version check reveals:
- GraphQL Yoga requires Node.js >=18.0.0
- Prisma Client requires Node.js >=16.13
- Fastify v5.1.0 doesn't explicitly specify Node.js requirements, but it's known to be compatible with Node.js 20
Your server-side dependencies are compatible with Node.js 20.18.1. However:
- Update the PNPM version from
^9.15.0to^9.15.1to match the root package.json for consistency
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check compatibility of key server-side dependencies with Node.js 20.18.1
echo "Checking package compatibility..."
# Check Fastify compatibility
curl -s "https://registry.npmjs.org/fastify/5.1.0" | jq -r '.engines.node'
# Check GraphQL Yoga compatibility
curl -s "https://registry.npmjs.org/graphql-yoga/5.6.1" | jq -r '.engines.node'
# Check Prisma compatibility
curl -s "https://registry.npmjs.org/@prisma/client/5.19.1" | jq -r '.engines.node'
Length of output: 330
Script:
#!/bin/bash
# Check Fastify's package.json directly from their repository
curl -s "https://raw.githubusercontent.com/fastify/fastify/v5.1.0/package.json" | jq -r '.engines.node'
# Also let's check actual dependency versions in use
rg '"fastify":|"@prisma/client":|"graphql-yoga":' tests/simple/packages/backend/package.json
Length of output: 286
| "typescript": "catalog:" | ||
| }, | ||
| "packageManager": "pnpm@9.12.0", | ||
| "packageManager": "pnpm@9.15.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
The verification revealed several inconsistencies in version specifications across the monorepo:
- Node.js version:
- Most packages specify
^20.0.0 - Some packages (
simple-web,simple-backend,@halfdomelabs/test-simple) specify^20.18.1
- Most packages specify
- PNPM version:
- Root specifies
^9.15.1 - Some packages specify
^9.15.0 - Many packages don't specify PNPM version at all
- Root specifies
- Volta Node.js version:
- Only some packages have it set to
20.18.1 - Most packages don't have it specified
- Only some packages have it set to
Consider:
- Aligning Node.js version to
^20.18.1across all packages - Setting consistent PNPM version (
^9.15.1) where applicable - Adding Volta configuration where missing
🔗 Analysis chain
LGTM! Verify version consistency across the monorepo.
The version updates in the root package.json align with the PR objectives:
- Node.js: 20.18.1
- PNPM: 9.15.1
Let's verify version consistency across all package.json files:
Also applies to: 38-38, 41-41
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for version consistency across all package.json files
echo "Checking Node.js and PNPM versions across all package.json files..."
fd --type f "package.json" --exec jq -r '. | select(.engines != null) | "\(.name // "root"):\n node: \(.engines.node)\n pnpm: \(.engines.pnpm)\n volta.node: \(.volta.node // "not set")"'
Length of output: 1943
| "engines": { | ||
| "node": "^20.15.1", | ||
| "pnpm": "^9.10.0" | ||
| "node": "^20.18.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Update PNPM version to ^9.15.1 for consistency and all dependencies are compatible
-
The PNPM version inconsistency is confirmed - the root package.json uses
^9.15.1while all packages in thetests/simpledirectory use^9.15.0. This should be updated for consistency. -
Regarding dependency compatibility with Node.js 20.18.1:
- React (>=0.10.0): ✓ Compatible
- Vite (^18.0.0 || >=20.0.0): ✓ Compatible
- TypeScript (>=14.17): ✓ Compatible
All key dependencies are compatible with Node.js 20.18.1, so no compatibility issues are expected.
🔗 Analysis chain
Fix PNPM version inconsistency and verify dependency compatibility.
- The PNPM version (
^9.15.0) differs from the root package.json (^9.15.1). Consider updating for consistency. - Given the Node.js upgrade, it's worth verifying compatibility with key dependencies, especially:
- React and related packages
- Build tools (Vite, TypeScript)
- GraphQL tooling
Let's check the compatibility matrix:
Also applies to: 82-82, 85-85
Let me verify the PNPM version inconsistency first.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check compatibility of key dependencies with Node.js 20.18.1
echo "Checking package compatibility..."
# Check React compatibility
curl -s "https://registry.npmjs.org/react/18.3.1" | jq -r '.engines.node'
# Check Vite compatibility
curl -s "https://registry.npmjs.org/vite/5.4.7" | jq -r '.engines.node'
# Check TypeScript compatibility
curl -s "https://registry.npmjs.org/typescript/5.5.4" | jq -r '.engines.node'
Length of output: 331
Script:
#!/bin/bash
# Check PNPM versions across package.json files
echo "Root package.json PNPM version:"
rg '"pnpm":\s*".*"' package.json
echo -e "\nAll PNPM version requirements in the repo:"
rg '"pnpm":\s*".*"' -g 'package.json'
Length of output: 477
Summary by CodeRabbit
Dependency Updates
@halfdomelabs/core-generatorsand@halfdomelabs/create-projectProject Configuration
.npmrc,.node-version, and.nvmrcfiles to reflect new Node.js version