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
@types packages should be peerDependencies #3108
Comments
I think long term rollup should not depend on types that define globals, e.g. @types/node, which forces consumers to include types they don't intend to include during compilation. |
The problem is that making it a peerDependency would force EVERYONE to either install them manually or have warnings during install, which is also undesired. I fear the only reasonable way to handle this that I can think of is try to get rid of this dependency altogether, not sure if this is possible in any way. |
We could drop that into |
Why is that package needed? As a non-TS user I've never understood its inclusion. |
An alternative is make a |
#3131 solved my problem, but rollup regressed on |
Sorry, fix is upcoming |
Rollup@2 will finally fix this for good: #3395 |
Solved in rollup@2.0.0 |
Expected Behavior / Situation
@types packages should be peerDependencies.
I'd like to enforce Node 8 support in my project, but rollup includes @types/node@12 which introduce globals/types that are only available in newer Node versions, e.g.
Promise.prototype.finally
.Actual Behavior / Situation
@types packages are the direct dependency of rollup introducing undesirable global types from
@types/node
.Modification Proposal
The issue is similar to #2580
You mentioned that making @types packages devDeps is not an option because rollup reexport some of those types, but you can make them peerDependencies, so the consumer has control over the version of @types packages.
If the proposal sounds reasonable to you, I will create a PR for it.
The text was updated successfully, but these errors were encountered: