Skip to content

chore: Upgrade PNPM to 10.6.5#468

Merged
kingston merged 1 commit into
mainfrom
kingston/eng-560-upgrade-pnpm-to-v10
Mar 21, 2025
Merged

chore: Upgrade PNPM to 10.6.5#468
kingston merged 1 commit into
mainfrom
kingston/eng-560-upgrade-pnpm-to-v10

Conversation

@kingston

@kingston kingston commented Mar 21, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Chores
    • Upgraded dependency management to PNPM v10.6.5 and adjusted engine version requirements across the project.
    • Enhanced dynamic resolution for formatting tool plugins, ensuring smoother integration.
    • Streamlined workspace settings and dependency build lists for improved project maintenance.
  • Documentation
    • Added documentation outlining the dependency upgrades and highlighting potential impacts from breaking changes.

@linear

linear Bot commented Mar 21, 2025

Copy link
Copy Markdown

@changeset-bot

changeset-bot Bot commented Mar 21, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 49bf94d

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

This PR includes changesets to release 10 packages
Name Type
@halfdomelabs/core-generators Patch
@halfdomelabs/create-project Patch
@halfdomelabs/tools Patch
@halfdomelabs/fastify-generators Patch
@halfdomelabs/project-builder-server Patch
@halfdomelabs/react-generators Patch
@halfdomelabs/baseplate-plugin-storage Patch
@halfdomelabs/project-builder-cli Patch
@halfdomelabs/project-builder-common Patch
@halfdomelabs/project-builder-test 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

coderabbitai Bot commented Mar 21, 2025

Copy link
Copy Markdown

Walkthrough

This update aligns various internal configurations with PNPM version 10.6.5. A new documentation file details the upgrade and its breaking changes affecting lifecycle scripts and plugin hoisting. Multiple package.json files across the project, including test configurations and core packages, have updated packageManager and engine version constraints. Prettier configuration files now dynamically resolve plugin paths using Node.js URL utilities to address integration issues. The workspace configuration has also been streamlined with simplified glob patterns and an added section for specific built dependencies.

Changes

File(s) Change Summary
.changeset/huge-drinks-switch.md Adds documentation describing the PNPM upgrade to v10.6.5, patch updates for internal packages, and details on breaking changes.
package.json, tests/simple/package.json Updates packageManager from pnpm@9.15.1 to pnpm@10.6.5 and engine pnpm version from ^9.15.0 to ^10.6.0.
packages/core-generators/src/generators/node/node/index.ts, packages/create-project/src/project-creator.ts Adjusts default and generated values for pnpmVersion/packageManager to reflect version 10.6.5 and updates engine constraints to ^10.6.0.
tests/simple/packages/backend/baseplate/.clean/package.json, tests/simple/packages/backend/package.json, tests/simple/packages/web/baseplate/.clean/package.json, tests/simple/packages/web/package.json Updates engine pnpm version constraints from ^9.15.0 to ^10.6.0 in subpackage configurations.
packages/tools/prettier.config.node.js, packages/tools/prettier.config.react.js Modifies Prettier configuration to dynamically resolve plugin paths using url.fileURLToPath(import.meta.resolve(...)) to work around a known VSCode bug.
pnpm-workspace.yaml Simplifies glob patterns by removing quotes, updates version formatting for @types/node, and introduces an onlyBuiltDependencies section listing specific dependencies.

📜 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 ff41c01 and 49bf94d.

📒 Files selected for processing (12)
  • .changeset/huge-drinks-switch.md (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)
  • packages/tools/prettier.config.node.js (1 hunks)
  • packages/tools/prettier.config.react.js (2 hunks)
  • pnpm-workspace.yaml (1 hunks)
  • tests/simple/package.json (1 hunks)
  • tests/simple/packages/backend/baseplate/.clean/package.json (1 hunks)
  • tests/simple/packages/backend/package.json (1 hunks)
  • tests/simple/packages/web/baseplate/.clean/package.json (1 hunks)
  • tests/simple/packages/web/package.json (1 hunks)
🔇 Additional comments (14)
tests/simple/packages/backend/baseplate/.clean/package.json (1)

87-87: PNPM version updated correctly

This update to the pnpm version requirement from ^9.15.0 to ^10.6.0 is consistent with the PR objective to upgrade PNPM to 10.6.5. The version constraint is correctly specified with a minor version constraint, allowing compatible patch updates.

pnpm-workspace.yaml (3)

2-3: Quote format updated for package paths

The removal of quotes around glob patterns is consistent with PNPM 10.6.x yaml format preferences. This syntax is more concise and works correctly with PNPM 10.6.5.


5-5: Quote format updated for type declaration

The removal of quotes around the version specification follows the pattern of the other entries in the catalog section and maintains consistency.


26-30: New section added for built dependencies

The addition of the onlyBuiltDependencies section is an important configuration for PNPM 10.6.5. This section specifies packages that should always be built from source rather than installed from the registry, which helps with specific native modules and packages that need compilation.

This is particularly relevant for packages like @prisma/engines, cpu-features, esbuild, and ssh2 which often have native code components.

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

27-27: Default PNPM version updated correctly

This update changes the default PNPM version from 9.15.1 to 10.6.5 in the generator template, which ensures that all newly generated projects will use the updated version.

The change aligns with the PR objective and ensures consistency across the project. Note that line 202-206 correctly generate the engine constraint with the major and minor version (^10.6.0), which matches the pattern seen in the package.json files.

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

82-82: PNPM version updated correctly

This update to the pnpm version requirement from ^9.15.0 to ^10.6.0 is consistent with the PR objective to upgrade PNPM to 10.6.5. The version constraint is correctly specified with a minor version constraint, allowing compatible patch updates.

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

87-87: PNPM version requirement updated correctly.

The PNPM version constraint has been updated from ^9.15.0 to ^10.6.0 to align with the upgraded PNPM 10.6.5 mentioned in the PR title.

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

82-82: PNPM version requirement updated correctly.

The PNPM version constraint has been properly updated from ^9.15.0 to ^10.6.0 as part of the PNPM upgrade mentioned in the PR title.

packages/tools/prettier.config.react.js (1)

2-2: Added dynamic plugin path resolution to fix Prettier VSCode issue.

The changes implement a workaround for a known bug in the Prettier VSCode extension by dynamically resolving the path to the Tailwind CSS plugin using Node.js URL utilities instead of using a static string.

The implementation correctly uses url.fileURLToPath() with import.meta.resolve() to ensure the plugin can be properly located regardless of the package manager's hoisting behavior, which is important when upgrading PNPM versions.

Also applies to: 12-13

tests/simple/package.json (1)

20-20: Updated PNPM version specifications correctly.

Both the packageManager field and the engines.pnpm requirement have been properly updated to reflect the upgrade to PNPM 10.6.5:

  1. packageManager field now correctly specifies pnpm@10.6.5
  2. The engines constraint appropriately requires ^10.6.0

These changes ensure consistent versioning across the project.

Also applies to: 23-23

.changeset/huge-drinks-switch.md (1)

1-14: Well-documented changeset for PNPM upgrade

The changeset clearly documents the PNPM upgrade to version 10.6.5, lists the affected packages, and provides important warnings about breaking changes. The explicit mention of potential issues with lifecycle scripts and plugin hoisting aligns with the changes we'll see in other files.

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

66-66: Correctly updated PNPM version in project template

The changes ensure that newly created projects will use PNPM 10.6.5 with the appropriate engine requirements. This is consistent with the upgrade mentioned in the changeset file.

Also applies to: 69-69

packages/tools/prettier.config.node.js (1)

2-2: Proper workaround for Prettier plugin resolution

The implementation now uses Node.js URL utilities to dynamically resolve the plugin path, which addresses potential issues with how PNPM 10.x handles plugin hoisting. This change directly addresses one of the breaking changes mentioned in the changeset file.

Also applies to: 10-13

package.json (1)

45-45: Root package.json correctly updated to PNPM 10.6.5

The package manager specification and engine requirements have been properly updated to reflect the PNPM upgrade, which is the primary objective of this PR.

Also applies to: 48-48


🪧 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.

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.

1 participant