Skip to content
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

[rush-lib] Fix Set config.ignoreCompatibilityDb when rush installation #3578

Conversation

sherlockfeng
Copy link
Contributor

Background
When using different versions of pnpm to install in TTFE Monorepo. There are unwanted package changes in lockfile. The reason is that pnpm bundled @yarnpkg/package-extensions, which mysteriously installs unrelated packages.

Related issue:

pnpm/pnpm#5132

Zoltan, added a new "ignore-compatibility-db" settings to disable this behaviour 6.34.0 and 7.9.0-0

For Rush.js side, we do the following things:

"rush install/update" should always set "config.ignoreCompatibilityDb". Because Pnpm only support "ignore-compatibility-db" in .npmrc. It's unconditional because Rush's recommended way to use compatibility db would be to copy+paste the settings to "pnpm.packageExtensions" or "pnpmfile.cjs". (The rules must be stored in Git rather than installed via NPM).
Rush should print some kind of warning if the rush.json pnpmVersion specifies a version affected by this problem.
The affected versions are ">=6.32.12" and >= 7.0.1, and then < 6.34.0 and < 7.9.0-0 version

The message will be like: Warning: Your rush.json specifies a pnpmVersion with a known issue that may cause unintended version selections. It's recommended to upgrade to PNPM >=6.34.0 or >=7.9.0. For details see: https://rushjs.io/link/pnpm-issue-5132

@sherlockfeng sherlockfeng force-pushed the feng/set-ignore-compatibility-db-true-when-installation branch from 4f73ebc to bc2f607 Compare August 8, 2022 06:28
@octogonz
Copy link
Collaborator

octogonz commented Aug 8, 2022

Thanks for the quick fix! 🙂👍

@octogonz octogonz merged commit a4c3647 into microsoft:main Aug 8, 2022
@octogonz
Copy link
Collaborator

octogonz commented Aug 8, 2022

🚀 This fix was released with @microsoft/rush 5.76.1

@sherlockfeng sherlockfeng deleted the feng/set-ignore-compatibility-db-true-when-installation branch August 8, 2022 15:27
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.

None yet

2 participants