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

dependencies on other @types packages are specified as "*" #38

Open
1000hz opened this issue Oct 1, 2019 · 1 comment
Open

dependencies on other @types packages are specified as "*" #38

1000hz opened this issue Oct 1, 2019 · 1 comment

Comments

@1000hz
Copy link

1000hz commented Oct 1, 2019

See DefinitelyTyped/DefinitelyTyped#38624 (comment)

Given some @types package P that depends on another @types package Q,
P's dependencies are implicitly published as

"dependencies": {
  "@types/q": "*"
}

Assume there is an update Q' and an update P' that depends on Q'.

Consumers of P who update to P' do not get Q' installed, because the old version of Q in the consumer's lockfile satisfies the dependency of "*". This leaves consumers of P to either manually edit their lockfile or explicitly depend on Q' in their application, both of which are not ideal solutions.

Definitely Typed should implicitly add the newest version of other DT packages to the published package.json.

Related: microsoft/types-publisher#11 microsoft/types-publisher#12 microsoft/types-publisher#360

@JulianG
Copy link

JulianG commented Oct 1, 2019

Thank you for adding this issue, @1000hz. I think you described the problem correctly. However I'm not convinced the solution proposed would be ideal.

Please correct me if I'm wrong. I'm trying to understand:

Taking your example above where a @types/p depends on @types/q, imagine there's an update to P and an unrelated update to Q. In this case I'm not sure it would be necessary to add the latest version of Q as a dependency in the generated package.json for P.

The problem I came across when manually creating a package.json was this error:

Error: In package.json: Don't use a 'package.json' for @types dependencies unless this package relies on
an old version of types that have since been moved to the source repo.

I think this restriction should be lifted, so that @types/p can express its dependency on @types/q in the most accurate way needed.

But again, I'm happy to be told why this would not be desirable.

Thanks again!

@andrewbranch andrewbranch transferred this issue from microsoft/types-publisher Jun 4, 2020
sandersn pushed a commit that referenced this issue Nov 29, 2021
Use "tslint:recommended" instead of "tslint:latest"
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