-
-
Notifications
You must be signed in to change notification settings - Fork 958
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
feat: pnpm.overrides #2946
feat: pnpm.overrides #2946
Conversation
@zkochan this can be used only on root right? in case of yes, does also display warnings if is being defined inside the workspace like yarn does? |
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.
LGTM
test('versions are replaced with versions specified through "resolutions" field (for Yarn compatibility)', async (t: tape.Test) => { | ||
const project = prepareEmpty(t) | ||
|
||
await addDistTag({ package: 'bar', version: '100.0.0', distTag: 'latest' }) |
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.
Both scenarios are almost identical (aside from the input to addDependenciesToPackage
), maybe you'd like to mix them, but that's just based on my own taste.
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.
I don't mind code duplication in tests.
Yes, it only works on the root. No, there are no warnings at the moment. |
pnpm's implementation of "resolutions" #1221 does not match Yarn's implementation, so to avoid confusion, I am renaming it to overrides. npm is also planning to have an overrides field but I don't think we'll use the same specs, so our option will be under a pnpm section of the package.json file.