angular-cli-lib-example icon indicating copy to clipboard operation
angular-cli-lib-example copied to clipboard

Validate peerDependencies of the library

Open lwouis opened this issue 7 years ago • 0 comments

Hi,

It may be more a question that an issue, maybe I missed something. It seems to me that the library and the "demo" app (i.e. the app listing the lib in its own package.json) shouldn't be sharing all the dependencies in node_modules.

Currently it seems to me that there is no validation of the library's peerDependencies. A build can work for this repo, but then if the lib gets published, and another project add it to its dependencies, it will only get notified of some peerDependencies like @angular/common/@angular/core in your case.

If the lib itself has external dependencies, nothing makes sure to add those to the delivered package.json. You have to manually check what's needed and add it to the library's peerDependencies.

Am I missing something or is this process currently manual/unsafe?

Thank you!

lwouis avatar Apr 27 '18 18:04 lwouis