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(update): define constraints which only apply when updating #244

Open
jvliwanag opened this issue Sep 9, 2024 · 5 comments
Open

feat(update): define constraints which only apply when updating #244

jvliwanag opened this issue Sep 9, 2024 · 5 comments

Comments

@jvliwanag
Copy link

Description

Using exact version on dependencies in package.json makes it simpler to figure out what version is being used without needing to dig onto lockfiles. This is configured on syncpack as a semverGroup with range: ""

When setting up version groups however, while it is possible to lock onto a version by setting a pinVersion; it is not currently possible to specify some semver range specifier to some allowed version range.

For example:

I want storybook deps to be any of ^7.0.0 version. But when updating or linting, it should save it as an exact version -- 7.6.20 for instance.

Suggested Solution

Perhaps introduce a new field called checkVersion on version groups to check against. Once checkVersion is there though, for groups of dependencies, it is not enough that they pass through that semver check. It should further be assumed that all dependencies under that version group should all point to the same version.

@jvliwanag jvliwanag changed the title Support semver range as pin version while using exact version specifier Support semver range on version group while using exact version specifier Sep 9, 2024
@guillempuche
Copy link

Interested

@JamieMason
Copy link
Owner

Closing as a duplicate of #204 until/unless I hear otherwise.

@JamieMason
Copy link
Owner

#204 is pre-released in 14.0.0-alpha.3

@jvliwanag
Copy link
Author

Hi @JamieMason thanks for getting onto this.

While dependency groups are quite useful, I'm not sure I follow how this would solve this issue.

In particular, how would I use semverGroup with range: "", but at the same time configure syncpack on update deps to fetch only version matching ^7.0.0? The only way I've been able to so far is by specifying a pinned version.

@JamieMason JamieMason reopened this Feb 6, 2025
@JamieMason JamieMason changed the title Support semver range on version group while using exact version specifier feat(update): define constraints which only apply when updating Feb 6, 2025
@JamieMason
Copy link
Owner

Thanks @jvliwanag I think I understand what you mean now, I was getting a few other issues confused with this. The update command doesn't exist yet in the new Rust implementation though unfortunately so this one will take a little time.

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