Skip to content
This repository was archived by the owner on Jun 11, 2020. It is now read-only.

Change dependent types to be included as peerDependencies #371

Closed
wants to merge 1 commit into from

Conversation

glentakahashi
Copy link

Add all of the typesDependencies to be added as peerDependencies instead of dependencies to fix transitive dependency issues such as in #366

Tested locally and got expected results

Add all of the typesDependencies to be added as peerDependencies instead of dependencies to fix transitive dependency issues such as in microsoft#366
@msftclas
Copy link

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@henryptung
Copy link

Paging @glentakahashi

@RyanCavanaugh
Copy link
Member

We can't do this. Editors (VS, VS Code, maybe others) run e.g. npm install @types/leftpad and expect that they will get a "working" version of the leftpad types package as a result. NPM no longer installs peer dependencies automatically, so this would break editors (as well as user expectation that you can npm install some types package without further intervention).

@glentakahashi
Copy link
Author

glentakahashi commented Aug 22, 2017

Hm okay I took a second reading of peerDependencies and now better understand what they're trying to accomplish and why it won't work. Will close out for now.

@RyanCavanaugh as a sidenote though, do you have any opinions/ideas on how to solve yarnpkg/yarn#3951 and #366 then?

The recommendation in the yarn issue says to use peerDependencies which conflicts the advice above.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants