-
-
Notifications
You must be signed in to change notification settings - Fork 521
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 semver versioning #189
Comments
Can you clarify which version change happened in |
I think the exact version change of |
Multiple versions of the same type definitions are a tricky beast, I believe that the Semantic Versioning of a type package has to be from the perspective of those who uses it, not that it always stays compatible with other versions of itself. From a strict Semantic Versioning perspective though: When the major version is The way I approached your problem myself in a larger ecosystem at my previous employer was to build All in all, I don't think this really is a The only thing from a Semantic Versioning perspective that |
Sorry for the confusion, my ticket was not intended to be a concern about the specific change from It might have been avoided in this very specific case because we'd use I agree knowing "what's a major bump" can be extremely difficult for a project like this. Based on the diff, I would probably have expected a My theory is that the real culprit in the example above is TypeScript not warning us about using a type that depends on type-fest. If I'm able to make a reproducible case, I'll create an issue for TypeScript and mention this issue. |
Yeah. We can do a major release for the next release. |
I am very curious for a minimal repro because I've experienced some oddities with types in the past that I believe might be related to what happened here. I want to learn this :) |
Summary
In a large enterprise project, if dependencies of dependencies use
type-fest
, TypeScript errorTS2742
can occur when mixing versions oftype-fest
. This seems to be rare, as this was the first time this has happened for us in many upgrades oftype-fest
.If
type-fest
was using semver, we'd feel comfortable using^major
, for example to keep the versions in sync.Details
So we have a dependency called
@company/ui-package
that has:"type-fest": "0.21.2"
Our project got a
Renovate
PR to upgrade our copy oftype-fest
:Which resulted in this error:
Workaround
We are using
yarn
, so we usedresolutions
to specify the version we want across all dependencies.The text was updated successfully, but these errors were encountered: