Skip to content

Conversation

@kingston
Copy link
Collaborator

@kingston kingston commented Mar 21, 2025

Summary by CodeRabbit

  • Documentation

    • Added a changelog to record the latest dependency and environment updates.
  • Chores

    • Upgraded the required Node.js version to v22.14.0.
    • Updated version constraints for various dependencies to require Node.js version 22.0.0 or higher.
    • Adjusted runtime configurations to ensure compatibility with the newer Node.js environment.

@linear
Copy link

linear bot commented Mar 21, 2025

@changeset-bot
Copy link

changeset-bot bot commented Mar 21, 2025

🦋 Changeset detected

Latest commit: 2f5dcf8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@halfdomelabs/fastify-generators Minor
@halfdomelabs/react-generators Minor
@halfdomelabs/baseplate-plugin-storage Patch
@halfdomelabs/project-builder-common Patch
@halfdomelabs/project-builder-server Patch
@halfdomelabs/project-builder-test Patch
@halfdomelabs/project-builder-cli Patch
@halfdomelabs/project-builder-lib Patch
@halfdomelabs/project-builder-web Patch
@halfdomelabs/core-generators Patch
@halfdomelabs/create-project Patch
@halfdomelabs/ui-components Patch
@halfdomelabs/code-morph Patch
@halfdomelabs/tools Patch
@halfdomelabs/utils Patch
@halfdomelabs/sync Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Mar 21, 2025

Walkthrough

This pull request primarily upgrades the project's Node.js version from 20.18.1 to 22.14.0. A new changelog file is introduced to document dependency updates for several packages. Additionally, updates are made across various configuration files—including .node-version, .nvmrc, multiple package.json files in the root, packages, and tests—to reflect the new Node.js version and update associated dependency versions such as @types/node, as well as minor dependency version bumps.

Changes

File(s) Change Summary
.changeset/whole-clouds-happen.md Added new changelog documenting dependency updates (patch/minor) and Node.js upgrade to v22.14.0.
.node-version, .nvmrc Updated Node.js version from 20.18.1 to 22.14.0.
package.json (root) Updated Node.js requirement in the engines field (^20.0.0 → ^22.0.0) and Volta config (20.18.1 → 22.14.0).
packages/**/package.json (e.g., code-morph, core-generators, create-project, fastify-generators, project-builder*, react-generators, sync, tools, ui-components, utils, plugins/baseplate-plugin-storage) Updated Node.js engine version from ^20.0.0 to ^22.0.0 in engines sections; similar version changes in Volta configurations where applicable.
packages/core-generators/src/generators/node/node/index.ts Default nodeVersion property value updated from 20.18.1 to 22.14.0.
packages/fastify-generators/src/constants/fastify-packages.ts, packages/react-generators/src/constants/react-packages.ts Updated @types/node version from ^20.0.0 to ^22.0.0.
tests/simple/** (all package.json and .npmrc files under tests/simple; e.g., backend, e2e, web) Updated Node.js engine and Volta configurations from 20.18.1/^20.0.0 to 22.14.0/^22.0.0; additional dependency updates in web baseplate (e.g., react-icons and zustand).

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between 2f5dcf8 and 5a5dfd1.

📒 Files selected for processing (1)
  • packages/project-builder-server/src/plugins/plugin-discovery.unit.test.ts (1 hunks)
🔇 Additional comments (1)
packages/project-builder-server/src/plugins/plugin-discovery.unit.test.ts (1)

37-39:

Details

✅ Verification successful

Type definition updated to align with Node.js 22.x.

The type casting change from NodeRequire to NodeJS.Require is correct and necessary for compatibility with Node.js 22.14.0. In newer Node.js type definitions, the Require interface has been moved to the NodeJS namespace.


🏁 Script executed:

#!/bin/bash
# Verify the Require type definition in Node.js 22 vs Node.js 20
# Compare the type definition files to confirm the change is necessary

# First check the node version to confirm the upgrade
grep -r "\"node\":" package.json packages/*/package.json

# Check the TypeScript definition locations for Require
npm list @types/node --json | jq '.dependencies."@types/node".version'

Length of output: 1643


Update Approved: Type Casting Change Correct for Node.js 22.x

The verification confirms that our package versions enforce Node.js 22 (with one package explicitly at 22.14.0), and the update from NodeRequire to NodeJS.Require is necessary to align with the updated type definitions. Although the project doesn’t explicitly install @types/node, our package configuration ensures we are using the correct Node.js types. No further changes are required.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@socket-security
Copy link

socket-security bot commented Mar 21, 2025

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher

🚮 Removed packages: npm/@types/[email protected], npm/[email protected]

View full report↗︎

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
tests/simple/packages/web/baseplate/.clean/package.json (2)

44-45: Update Dependency Version for react-icons.
The version of "react-icons" is updated to "5.5.0", which likely includes improvements or fixes. Verify that this update is compatible with the rest of the web package.


48-49: Update Dependency Version for zustand.
The version for "zustand" has been updated to "5.0.3", aligning with recent releases. Ensure to test that state management behaviors remain as expected after this upgrade.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between d49b802 and 2f5dcf8.

⛔ Files ignored due to path filters (2)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • tests/simple/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (35)
  • .changeset/whole-clouds-happen.md (1 hunks)
  • .node-version (1 hunks)
  • .nvmrc (1 hunks)
  • package.json (1 hunks)
  • packages/code-morph/package.json (1 hunks)
  • packages/core-generators/package.json (1 hunks)
  • packages/core-generators/src/generators/node/node/index.ts (1 hunks)
  • packages/create-project/package.json (1 hunks)
  • packages/create-project/src/project-creator.ts (1 hunks)
  • packages/fastify-generators/package.json (1 hunks)
  • packages/fastify-generators/src/constants/fastify-packages.ts (1 hunks)
  • packages/project-builder-cli/package.json (1 hunks)
  • packages/project-builder-common/package.json (1 hunks)
  • packages/project-builder-lib/package.json (1 hunks)
  • packages/project-builder-server/package.json (1 hunks)
  • packages/project-builder-test/package.json (1 hunks)
  • packages/project-builder-web/package.json (1 hunks)
  • packages/react-generators/package.json (1 hunks)
  • packages/react-generators/src/constants/react-packages.ts (1 hunks)
  • packages/sync/package.json (1 hunks)
  • packages/tools/package.json (1 hunks)
  • packages/ui-components/package.json (1 hunks)
  • packages/utils/package.json (1 hunks)
  • plugins/baseplate-plugin-storage/package.json (1 hunks)
  • pnpm-workspace.yaml (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 (2 hunks)
  • tests/simple/packages/backend/package.json (2 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 (3 hunks)
  • tests/simple/packages/web/package.json (3 hunks)
🔇 Additional comments (48)
.node-version (1)

1-1: Node.js version successfully updated to 22.14.0.

The update from 20.18.1 to 22.14.0 aligns with the PR objective. This file is correctly updated to reflect the new Node.js version requirement.

.nvmrc (1)

1-1: Node.js version properly updated to 22.14.0.

The update from 20.18.1 to 22.14.0 in the .nvmrc file aligns with both the PR objective and the corresponding change in the .node-version file, ensuring consistency across different Node.js version managers.

packages/core-generators/src/generators/node/node/index.ts (1)

26-26: Default Node.js version correctly updated to 22.14.0.

The update of the default Node.js version in the descriptor schema ensures that newly generated projects will use Node.js 22.14.0. This change maintains consistency with the updated version specifications in the root configuration files.

packages/code-morph/package.json (1)

50-50: Node.js engine requirement properly updated to v22.

The package now correctly requires Node.js v22.0.0 or higher with the updated engine specification. This aligns with the project-wide upgrade to Node.js 22.14.0.

pnpm-workspace.yaml (1)

7-7: Updated @types/node Version

This change upgrades the Node.js type definitions to ^22.0.0, aligning with the project’s Node.js upgrade. Ensure that all workspace packages using these type definitions have been tested against the new version.

package.json (1)

47-52: Revamped Engine and Volta Node Versions

The engines.node field has been updated to ^22.0.0 and the volta.node field to 22.14.0, ensuring that the runtime and tooling reflect the Node.js upgrade. Please verify that these changes are compatible with all dependent packages and development environments.

tests/simple/packages/backend/baseplate/.clean/.npmrc (1)

1-1: Synchronized Node Version in .npmrc

The Node.js version is now set to 22.14.0 in this configuration file, maintaining consistency with the overall upgrade effort.

tests/simple/packages/web/baseplate/.clean/.npmrc (1)

1-1: Aligned Node Version in .npmrc

The update to use-node-version=22.14.0 ensures that the project's web package adopts the new Node.js version, keeping the environment consistent.

tests/simple/packages/backend/.npmrc (1)

1-1: Updated .npmrc for Node Version Consistency

Setting use-node-version=22.14.0 here ensures that the backend package uses the same Node.js version as specified project-wide.

tests/simple/packages/web/.npmrc (1)

1-1: Node Version Update in .npmrc
The .npmrc file now specifies use-node-version=22.14.0, which aligns with the overall upgrade goal. This update ensures that tooling using this file will use the correct Node.js version.

packages/project-builder-common/package.json (1)

37-39: Updated Node Engine Requirement
The "engines" field now requires "node": "^22.0.0", moving away from the previous version constraint. This change brings consistency with the project's new Node.js version requirements.

packages/utils/package.json (1)

52-54: Consistent Node Engine Update in Utils Package
The "engines" field has been updated to "node": "^22.0.0" in this package, ensuring that the utilities are run on the intended Node.js version. This update is in line with the overall project upgrade.

packages/project-builder-lib/package.json (1)

70-71: Aligned Node Engine Version in Project Builder Lib
The "engines" field now specifies "node": "^22.0.0". This update ensures that consumers of the library will use a compatible Node.js version, matching the project's new requirements.

plugins/baseplate-plugin-storage/package.json (1)

72-73: Updated Node Engine Requirement in Plugin Storage
The "engines" field in this package has been updated to "node": "^22.0.0", ensuring compatibility with Node.js v22.14.0. This change improves consistency across the repository.

packages/ui-components/package.json (1)

118-120: Node.js Engine Version Update
The engine requirement has been updated to "node": "^22.0.0", which aligns with the new Node.js upgrade objectives. Please ensure that all related config files (e.g., .nvmrc, .node-version) accurately reflect the target version (v22.14.0) for consistency across the project.

packages/sync/package.json (1)

62-64: Node.js Engine Constraint Update
The update to "node": "^22.0.0" meets the PR objective and is consistent with updates in other packages. Confirm that this change does not unintentionally disrupt any workspace dependencies that might have been tuned for the previous Node.js version.

packages/tools/package.json (1)

80-82: Updated Node Engine Requirement
The engines field now requires "node": "^22.0.0", which is in line with the project's upgrade to Node.js v22.14.0. Verify that any Node-specific tooling/configurations in this package are compatible with the new version.

packages/fastify-generators/package.json (1)

57-59: Consistent Node Version Upgrade
The engine requirement has been updated to "node": "^22.0.0", aligning this package with the overall project upgrade. Please double-check that none of the package consumers rely on behaviors specific to earlier Node.js versions.

packages/project-builder-web/package.json (1)

95-97: Node.js Engine Field Revision
The engines field now specifies "node": "^22.0.0", which is consistent with the upgrade objective. Ensure that both development and production environments (including CI/CD setups) are configured to use Node.js v22.14.0 for full compatibility.

tests/simple/packages/e2e/package.json (1)

18-20: Node version update in Volta configuration

The "volta" section now specifies Node version "22.14.0", which is consistent with the overall upgrade goal for the project.

packages/project-builder-test/package.json (1)

52-54: Updated Node engine version

The "engines" field now requires Node version "^22.0.0", which aligns perfectly with the project’s migration to Node 22. This change ensures that the package only runs in environments that meet the new Node requirements.

packages/project-builder-cli/package.json (1)

59-61: Engine version update to Node ^22.0.0

The "engines" field is updated correctly, ensuring that the CLI package now requires Node version "^22.0.0". This aligns the package with the upgraded Node environment.

packages/core-generators/package.json (1)

66-68: Consistent Node engine update

The updated "engines" block now reflects "node": "^22.0.0", ensuring compatibility across the project as the Node upgrade proceeds. This update is consistent with the overall PR objective.

packages/react-generators/package.json (1)

56-58: Engine version bump in React Generators

The "engines" field now requires Node version "^22.0.0", which is in line with the upgrade to Node 22. This update will help ensure that the package runs in a compatible runtime environment.

packages/project-builder-server/package.json (1)

72-72: Node.js engine requirement updated successfully

The update from ^20.0.0 to ^22.0.0 aligns with the PR objective to upgrade Node.js to version 22.14.0.

packages/react-generators/src/constants/react-packages.ts (1)

6-6: TypeScript definitions properly updated

Updating the @types/node package version from ^20.0.0 to ^22.0.0 ensures correct type definitions for the upgraded Node.js version.

packages/create-project/src/project-creator.ts (2)

68-69: Node.js engine requirement updated for new projects

The engine requirement for new projects has been properly updated to match the new minimum Node.js version.


71-73: Volta configuration updated with exact Node.js version

The Volta configuration is correctly set to use Node.js version 22.14.0, matching the exact version mentioned in the PR title.

packages/fastify-generators/src/constants/fastify-packages.ts (1)

60-60: TypeScript definitions properly updated

Updating the @types/node package version from ^20.0.0 to ^22.0.0 ensures correct type definitions for the upgraded Node.js version.

packages/create-project/package.json (1)

46-46: Update Node Engine Version Constraint.
The "engines" field now specifies "node": "^22.0.0", which aligns with the new Node.js requirement across the project. Ensure that all related tooling and CI configurations support this change.

tests/simple/package.json (2)

21-24: Update Node Engine Version in Test Project.
The "engines" field now requires "node": "^22.0.0", updating the minimum supported version for the test project. This is consistent with the overall Node upgrade strategy.


25-27: Update Volta Configuration for Node Version.
The "volta" section now specifies "node": "22.14.0", ensuring that the local development environment uses the correct version of Node.js. This change maintains consistency across the project configurations.

tests/simple/packages/backend/baseplate/.clean/package.json (3)

62-62: Upgrade @types/node in DevDependencies.
The version for "@types/node" is updated to "^22.0.0", which aligns the type definitions with the new Node.js version.


85-87: Update Node Engine Version in Package.
The "engines" field now requires "node": "^22.14.0", ensuring that the backend package targets the correct Node.js version.


89-91: Synchronize Volta Node Version.
The "volta" section has been updated to "node": "22.14.0", ensuring consistency in environment configuration across the repository.

tests/simple/packages/backend/package.json (3)

62-62: Upgrade @types/node in DevDependencies.
Updating "@types/node" to "^22.0.0" ensures that type definitions are in line with the latest Node.js version.


85-87: Update Node Engine Version.
The "engines" field now requires "node": "^22.14.0", matching the upgrade requirements. This helps enforce the use of the updated Node.js version across environments.


89-91: Synchronize Volta Configuration.
The "volta" section has been updated to "node": "22.14.0", ensuring that development tooling uses the correct Node.js version.

tests/simple/packages/web/baseplate/.clean/package.json (3)

57-57: Upgrade @types/node in DevDependencies.
The new version "@types/node": "^22.0.0" better reflects the updated Node.js environment. This is a necessary upgrade to maintain type safety.


81-83: Update Node Engine Version in Web Package.
The "engines" field now requires "node": "^22.14.0" and "pnpm": "^9.15.0". This upgrade ensures that the web package uses the proper Node.js version throughout development and production.


85-87: Synchronize Volta Node Version.
The "volta" section has been updated to "node": "22.14.0". This change ensures consistency in the Node.js version used by Volta, maintaining development environment stability.

tests/simple/packages/web/package.json (5)

44-44: Dependency Version Update: react-icons bumped to 5.5.0
The update from version 5.0.1 to 5.5.0 is noted here. It’s important to verify that any breaking API changes in the new version do not affect the current codebase usage.


48-48: Dependency Version Update: zustand bumped to 5.0.3
The version update for zustand aligns with the overall upgrade. Please ensure the new version is fully compatible with the existing state-management patterns in the application.


57-57: Dev Dependency Update: @types/node bumped to ^22.0.0
The updated type definitions reflect the Node.js upgrade. Confirm that this change does not introduce type conflicts in other parts of the project that might assume older Node APIs.


81-81: Engine Specification Update: Node version now set to ^22.14.0
This change in the "engines" field ensures that the project enforces the required Node version. It is consistent with the PR objective.


85-85: Volta Configuration Update: Node version now set to 22.14.0
Updating the Volta configuration reinforces consistency across tooling, which helps maintain environment parity.

.changeset/whole-clouds-happen.md (2)

1-18: Changelog Entry: Dependency Update Mapping
The changelog clearly lists the updated dependency versions with their corresponding change types (minor/patch). This documentation is useful for tracking and auditing version changes. Ensure that these updates have been verified against the respective package release notes for any breaking changes.


20-21: Changelog Entry: Node Version Upgrade
The entry "Upgrade Node version to v22.14.0" at the end of the file accurately documents the Node.js upgrade, in line with the PR objectives. This provides clear context for future reference.

@kingston kingston merged commit ff41c01 into main Mar 21, 2025
7 checks passed
@kingston kingston deleted the kingston/eng-582-upgrade-node-to-v22 branch March 21, 2025 13:32
@github-actions github-actions bot mentioned this pull request Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants