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

feat(core): add npm dependencies to package.json for publishable libs #2879

Merged
merged 3 commits into from
May 8, 2020

Conversation

Cammisuli
Copy link
Member

Please make sure you have read the submission guidelines before posting an PR

Please make sure that your commit message follows our format.

Example: fix(nx): must begin with lowercase

Current Behavior (This is the behavior we have today, before the PR is merged)

When building libraries, users would have to manually update their library's package.json to include any node_module deps.

Expected Behavior (This is the new behavior we can expect after the PR is merged)

Libraries that have their own package.json will now automatically be updated to include node_module deps that are used within the lib source code. The version of these deps are taken from the root package.json in the workspace.

Issue

@Cammisuli Cammisuli marked this pull request as ready for review April 21, 2020 17:23
@Cammisuli Cammisuli force-pushed the update-packagejson-withdeps branch from 08ff7d4 to 5d92b31 Compare May 1, 2020 16:15
@FrozenPandaz FrozenPandaz merged commit 4095d21 into nrwl:master May 8, 2020
@Cammisuli Cammisuli deleted the update-packagejson-withdeps branch May 8, 2020 18:56
@vmcbaptista
Copy link

Hi. First of all I would like to encourage this idea of adding automatically the dependencies to package.json of publishable libraries.

Although I wonder why are you updating the dependencies section of package.json while the comment of the method says:

Updates the peerDependencies section...

Also, from what I read here https://github.com/ng-packagr/ng-packagr/blob/master/docs/dependencies.md, I believe that the default behavior should be to update the peerDependencies.

Thanks for the clarifications.

@bhuber2010
Copy link
Contributor

Submitted PR #3078 to change to peerDeps.

@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants