- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 58
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
question(config): how to depend on a local package with a semver range? #242
Comments
Could you create a reproduction please? Thanks |
Hey @Zamiell, I just got a chance to take a look. This looks correct as far as I can tell, we can learn a bit more about why if we take a closer look at the quote from the documentation:
What this is saying is that by default they must be identical. "^1.0.1" === "1.0.1"
// false
☝ and that it's possible to change this
Your project doesn't use exact versions everywhere, and you don't always want them to be identical, so you will need to define some configuration. Tune this of course to your real project, but what we are saying in this repo is that we want prod {
"semverGroups": [
{
"dependencies": ["foo"],
"range": "^"
}
]
}
There is a stack of work to do but I really would like to write some guides etc on these kinds of things. Hopefully this helps a little at least. |
Consider a monorepo like this:
If
bar
depends onfoo
, andfoo
is at "1.0.1", andbar
specifics foo as "^1.0.1", syncpack will throw a spurious error:The documentation says this:
However, in this case, I expect "^1.0.1" to be identical to "1.0.1". In other words, Synpack should respect the carot (or tilde).
The text was updated successfully, but these errors were encountered: