Verify latest release
pnpm version
No response
Which area(s) of pnpm are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
pnpm-workspace.yaml:
catalog:
lodash: ^4.17.21
overrides:
lodash: "catalog:"
package.json (no direct dependency on lodash):
Running pnpm install removes the lodash entry from the catalog, even though it's still used by the override.
Describe the Bug
removePackagesFromWorkspaceCatalog does not consider overrides when building the set of used catalog entries.
Expected Behavior
Catalog entries used in overrides remain when cleanupUnusedCatalogs is enabled
Which Node.js version are you using?
Various
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response
Verify latest release
pnpm version
No response
Which area(s) of pnpm are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
pnpm-workspace.yaml:package.json(no direct dependency on lodash):{ "dependencies": {} }Running
pnpm installremoves thelodashentry from the catalog, even though it's still used by the override.Describe the Bug
removePackagesFromWorkspaceCatalogdoes not consider overrides when building the set of used catalog entries.Expected Behavior
Catalog entries used in overrides remain when
cleanupUnusedCatalogsis enabledWhich Node.js version are you using?
Various
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response