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

Use workspace's dependencies versions as source of truth in fix-mismatches #57

Closed
bompus opened this issue Sep 11, 2021 · 3 comments
Closed

Comments

@bompus
Copy link

bompus commented Sep 11, 2021

Description

When running fix-mismatches in a folder containing a pnpm workspace, it always uses the highest version found in any of the packages, instead of the version specified in the workspace root, which I personally use as the source of truth for shared external dependencies.

Suggested Solution

I'd like a setting to prefer the dependencies versions listed in the workspace's root package.json, instead of the highest version found in any of the workspace projects. This allows quick dependencies / devDependencies / peerDependencies version downgrades across an entire workspace by simply updating the root package.json and then running fix-mismatches.

@JamieMason
Copy link
Owner

At first I didn't think this was already a feature, but while working on 6.0.0 I saw that this should already be the case:

const nextVersion =
getWorkspaceVersion(name, input.wrappers) ||
getHighestVersion(instances.map(({ version }) => version));

Please give 6.0.0 a try and reopen this issue if this does indeed need adding.

Thanks a lot.

@chbdetta
Copy link

How does this work again? I am using an npm workspace and it doesn't use my root package.json as the source of truth

@JamieMason
Copy link
Owner

JamieMason commented Jan 14, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants