You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 11, 2020. It is now read-only.
and @types/angular-mocks package.json looks like this, as it's dependencies are automatically inferred:
"dependencies": {
"@types/angular": "*"
},
since @types/angular": "*" gets resolved to @types/angular version 1.6.23 (in Yarn 0.27.5), I end up with the types for angular 1.6. Obviously this is just an example and will happen with any type definitions that has breaking changes compared to previous type definitions.
You can see the discussion with yarn guys yarnpkg/yarn#3951, where they explain why '*' is being resolved to latest version and not simply to "any version". They suggest using peerDependencies instead, which does seem (to me at least) like the correct thing to do.
I do understand this has potential to pop up a 'missing peer dependency' error for lots and lots of people.
But if I understand this bug correctly, as time will pass and new type definitions will break previous versions, more yarn users will experience this issue. So I guess this is for your consideration...