Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Correctly save transitive dependencies #18846

Merged
merged 1 commit into from
Oct 19, 2017
Merged

Conversation

iarna
Copy link
Contributor

@iarna iarna commented Oct 14, 2017

Direct deps get package.json and package-lock.json. Transitive deps get package-lock.json.

This is a first step to ditching the depth=0 on npm update. The other thing we need to do before we do that is fix a bug where asking to update a named transitive dependency can cause an infinite loop in outdated.

@iarna iarna requested a review from a team as a code owner October 14, 2017 20:53
Copy link
Contributor

@zkat zkat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -- just a small readability change that you can do if you want.

lib/install.js Outdated
this.rollback = npm.config.get('rollback')
this.link = npm.config.get('link')
this.global = this.where === path.resolve(npm.globalDir, '..')
this.dev = opts.dev != null ? opts.dev : npm.config.get('dev') || (!/^prod(uction)?$/.test(npm.config.get('only')) && !npm.config.get('production')) || /^dev(elopment)?$/.test(npm.config.get('only'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I ask that we parenthesize, and maybe split between lines, all these different conditionals? I can never tell how it's actually supposed to parse when you do ternary + or + and all in on line >_<

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change otherwise looks good

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

er wow, yeah, that looks awful…

Direct deps get `package.json` and `package-lock.json`.  Transitive deps get
`package-lock.json`.
@zkat zkat changed the base branch from latest to release-next October 19, 2017 01:31
@zkat zkat merged commit a93e0a5 into release-next Oct 19, 2017
@zkat zkat deleted the update-transitive-deps branch October 19, 2017 01:33
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.

2 participants