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

feat: pnpm.overrides #2946

Merged
merged 1 commit into from
Oct 22, 2020
Merged

feat: pnpm.overrides #2946

merged 1 commit into from
Oct 22, 2020

Conversation

zkochan
Copy link
Member

@zkochan zkochan commented Oct 21, 2020

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.

@zkochan zkochan requested a review from a team October 21, 2020 19:42
@zkochan zkochan added this to the v5.10 milestone Oct 21, 2020
@juanpicado
Copy link
Member

juanpicado commented Oct 21, 2020

@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?

Copy link
Member

@juanpicado juanpicado left a 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' })
Copy link
Member

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.

Copy link
Member Author

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.

@zkochan
Copy link
Member Author

zkochan commented Oct 21, 2020

Yes, it only works on the root. No, there are no warnings at the moment.

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