Repository navigation
Conversation
cf8a6ff to
b2e4dbe
Compare
|
Thanks for the contribution. We've just branched for 2.34.x, so merging this pull request now will come out in 2.35.x, please move the release notes updates to |
b2e4dbe to
8297e33
Compare
|
Moved the release note to 2.35.x. docs/notes/2.35.x.md didn't exist on main yet, so I created it from the release-notes template; happy to rebase onto the CI-generated file instead if you prefer (once it is available). |
2a13838 to
9e3e19d
Compare
|
Ah whoops! The 2.35.x release notes are now on main, if you could add your note to that. Thanks! I'm not really qualified to review, as I know precious little about the node ecosystem, but I'll try unless @tobni can jump in. |
benjyw
left a comment
There was a problem hiding this comment.
Looks good to me, modulo one nit (and the notes merge)
| package_name = target[NodePackageNameField].value | ||
| if ( | ||
| self.include_workspace_dependencies | ||
| and self.env.project.package_manager.name == "pnpm" |
There was a problem hiding this comment.
It looks like we encapsulate package manager-specific logic in PackageManager, so maybe this logic should live there too? Something like workspace_dependencies_suffix?
Fixes #23752.
Problem
In a pnpm workspace, installing the node package for a target only installed that package's own dependencies. When the package depends on another workspace package, that package's dependencies were left uninstalled, so code importing through it failed at runtime (e.g.
Cannot find package '@invented/leaf').Change
When Pants installs a pnpm workspace member, it now selects the member together with its dependencies, using pnpm's
<package>...filter, instead of the member alone.docs/notes/2.34.x.md.Tests
reader -> contract -> leaf. It installs through the real rules and runs Node. On current main without the fix it fails (Cannot find package '@invented/leaf'); with the fix Node prints42.install_node_package_test.pyandnodejs_project_environment_test.py, lint, MyPy,build-support/githooks/pre-pushandpants --changed-since=HEAD fmtall pass.AI disclosure
This PR was written primarily by Claude Code; I reviewed and tested it.