-
Notifications
You must be signed in to change notification settings - Fork 604
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] Enable support for PNPM "--resolution-strategy fewer-dependencies" #1180
Comments
Awesome! If I remember right this option was introduced only for PNPM 3, which has changed the filename for shrinkwrap.yaml - did you encounter that issue? |
I didn't hit any issues running both |
For a quick fix, I think you pretty much just need to edit RushConstants.ts /**
* The filename ("shrinkwrap.yaml") used to store state for pnpm
*/
export const pnpmShrinkwrapFilename: string = 'shrinkwrap.yaml'; The complete fix is tracked by #1145 and probably would select the name based on the PNPM version. |
Cheers for the pointer in the right direction, much appreciated. I've modified that constant as below: /**
* The filename ("pnpm-lock.yaml") used to store state for pnpm
*/
export const pnpmShrinkwrapFilename: string = 'pnpm-lock.yaml'; I'll update the fork, but as you say it'll need further work so as not to break backwards compatibility. |
Any early feedback you could provide would be appreciated - does it work, were there any other issues, etc. |
Of course, so using I've subsequently tested with the second change in place, by overwriting The only thing that I haven't had a chance to fully test yet, is to add the I am more than happy to help out further with this issue wherever I can, so please do feel free to let me know if you could do with additional feedback etc. |
One thing to keep in mind is the file copying performed by A. common/config/rush/shrinkwrap.yaml - the "official" version that is tracked by Git
|
Thanks for the heads up, it's very much appreciated! I've just been running |
Is this completed by #1210? |
Yup :-) |
PNPM 3.1 introduces a new command-line option
--resolution-strategy fewer-dependencies
that changes the version solver to be more like the NPM behavior. Among other things, this option eliminates a problem where sometimes@types
dependencies get the wrong version installed. (Fundamentally, we believe DefinitelyTyped is relying too much on NPM idiosyncrasies, and needs to improve their approach. But until then, it's very helpful for PNPM to use a more NPM-compatible algorithm.) The full story can be found in the pnpm/pnpm#1187 discussion.Proposal:
--resolution-strategy
option for PNPM.fewer-dependencies
the default setting.The text was updated successfully, but these errors were encountered: