-
Notifications
You must be signed in to change notification settings - Fork 2.5k
"projectsAffectedByDependencyUpdates": "auto"
does not work with pnpm catalogs
#29986
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
Comments
#29923 Does this help? Let me know if i'm missing something |
@ryanbas21 In this case I think we'd need to update the affected logic to check for changes to catalog versions in |
I looked into this a bit more and see there's an open issue in pnpm for updating |
I am facing the same issue with |
…jects were changed from pnpm lock file diff Closes nrwl#29986
…jects were changed from pnpm lock file diff Closes nrwl#29986
…jects were changed from pnpm lock file diff Closes nrwl#29986
…jects were changed from pnpm lock file diff Closes nrwl#29986
…jects were changed from pnpm lock file diff Closes nrwl#29986
…jects were changed from pnpm lock file diff Closes nrwl#29986
…jects were changed from pnpm lock file diff (#31091) …jects were changed from pnpm lock file diff Closes #29986 ## Current Behavior Nx projects that use pnpm catalogs cannot take advantage of the `projectsAffectedByDependencyUpdates` `“auto”` setting because updating catalog versions does not touch project files. ## Expected Behavior When `projectsAffectedByDependencyUpdates` is set to `“auto”`, updating a catalog dependency version should result in all projects that use it getting marked as affected. A catalog version update and the affected projects can be detected from a changed pnpm lock file. This PR updates the `getTouchedProjectsFromLockFile` logic to check the lock file for pnpm monorepos. Example pnpm lock file diff after catalog dependency update: ```diff # pnpm-lock.yaml # ... catalogs: default: '@aws-sdk/client-s3': - specifier: ^3.535.0 - version: 3.535.0 + specifier: ^3.797.0 + version: 3.797.0 importers: apps/app1: dependencies: '@aws-sdk/client-s3': specifier: 'catalog:' - version: 3.535.0 + version: 3.797.0 # ... ``` ## Related Issue(s) #29986 Fixes #29986 --------- Co-authored-by: Jack Hsu <[email protected]>
Current Behavior
To help enforce a single version policy within our monorepo, we use pnpm catalogs for all dependencies that are used in multiple projects. When
"projectsAffectedByDependencyUpdates"
is set to"auto"
, updates topnpm-workspace.yaml
catalog versions result in 0 projects being marked as affected.Expected Behavior
When a default or named catalog version is updated in
pnpm-workspace.yaml
, all projects that reference that catalog as a dependency in theirpackage.json
should be marked as affected.GitHub Repo
No response
Steps to Reproduce
In any Nx workspace project that uses catalogs,
"projectsAffectedByDependencyUpdates"
to"auto"
& commit changepnpm i
nx show projects --affected --uncommitted
Nx Report
Failure Logs
Package Manager Version
9.11.0
Operating System
Additional Information
Related to the following issues that stem from lack of support for pnpm catalogs
The text was updated successfully, but these errors were encountered: