-
Notifications
You must be signed in to change notification settings - Fork 602
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] Add warning when using globalIgnoredOptionalDependencies in < pnpm 9.0.0 #5001
base: main
Are you sure you want to change the base?
[rush] Add warning when using globalIgnoredOptionalDependencies in < pnpm 9.0.0 #5001
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be an error, not a warning. If someone configures something and that configuration isn't going to do anything, we usually error in that case.
@@ -71,6 +72,18 @@ export class InstallHelpers { | |||
} | |||
|
|||
if (pnpmOptions.globalIgnoredOptionalDependencies) { | |||
if (rushConfiguration.rushConfigurationJson.pnpmVersion !== undefined && semver.lt(rushConfiguration.rushConfigurationJson.pnpmVersion, '9.0.0')) { | |||
// eslint-disable-next-line no-console | |||
console.warn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use terminal
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing is that there's no terminal
accessible in this scope. Should I rework the code a bit so it's passed down and accessible here or create a new instance of it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that's easy enough to do, go for it, otherwise don't worry about it.
...es/@microsoft/rush/warn-about-ignored-optional-dependencies-pnpm-pre-9_2024-11-09-12-28.json
Outdated
Show resolved
Hide resolved
…endencies-pnpm-pre-9_2024-11-09-12-28.json Co-authored-by: Ian Clanton-Thuon <[email protected]>
Co-authored-by: Ian Clanton-Thuon <[email protected]>
Summary
"globalIgnoredOptionalDependencies" doesn't work if Rush monorepo is not configured with pnpm 9+.
Details
I've added mentions about it in the schema and a warning during rush install/update.
How it was tested
Impacted documentation
https://rushjs.io/pages/configs/pnpm-config_json/