feat: peerDependencies and devDependencies auto whitelist.
See original GitHub issueType of Issue
[ ] Bug Report
[X] Feature Request
Description
At the moment If I have a package.json
like this;
"peerDependencies": {
"rxjs": "^5.5.2"
},
"devDependencies": {
"rxjs": "^5.5.2"
}
I’ll get an error Distributing npm packages with 'devDependencies' is not recommended. Please consider adding rxjs to 'peerDepenencies' or remove it from 'devDependencies'.
on/consumers/ng-cli)!_
For development you cannot use peerDependencies
as these don’t get installed. I’d expect that if the devDependencies
is listed in the peerDependencies
I don’t need to add it explicitly in the whitelist. It’s whitelisted automatically.
Expected Behaviour
No error.
Version Information
ng-packagr: 2.3.0
Please include all version numbers that might be relevant, e.g. third-party libraries
Issue Analytics
- State:
- Created 5 years ago
- Reactions:19
- Comments:33 (8 by maintainers)
Top Results From Across the Web
Difference between dependencies, devDependencies and ...
DevDependencies are the packages a developer needs during development. A peer dependency specifies that our package is compatible with a ...
Read more >dependencies, peerDependencies, devDependencies - Nil Seri
devDependencies are the dependencies which are needed for your project during development / release, such as testing libraries like Karma and ...
Read more >package.json - npm Docs
In npm versions 3 through 6, peerDependencies were not automatically installed, and would raise a warning if an invalid version of the peer...
Read more >10 Lessons I Learned From Architecting an Enterprise Application
Use an auto-complete in some specific columns to give the user the possibility to search for a value. Open a dialog showing a...
Read more >Understanding Peer Dependencies in JavaScript
That's really up to the developer, since an automatic decision here would not be possible. This however, is the current behavior of NPM...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@codegagan you can remove the warnings by adding the below to
ng-packagr.json
, right next tolib
property.Example if the error is related to
@angular/package
one shall do the the below;If you want to turn off this feature completely you can do the below;
That is pretty important documentation, maybe add it to the readme and/or changelog? Also add it to the package.schema.json?