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

install/deps: Computed required package in legacy npm compatible way #17590

Merged
merged 1 commit into from Jul 4, 2017

Conversation

iarna
Copy link
Contributor

@iarna iarna commented Jul 3, 2017

Not having this meant that uninstalls of globals installed by npm@4 or
earlier would fail, due to _requested not having the fields we expected.

@iarna iarna force-pushed the iarna/fix-global-remove branch 3 times, most recently from e093e7a to b972c38 Compare July 3, 2017 23:22
Not having this meant that uninstalls of globals installed by npm@4 or
earlier would fail, due to _requested not having the fields we expected.
module.exports.computeVersionSpec = computeVersionSpec
function computeVersionSpec (tree, child) {
validate('OO', arguments)
var requested
if (child.package._requested) {
var childReq = child.package._requested
if (childReq && (isNotEmpty(childReq.saveSpec) || (isNotEmpty(childReq.rawSpec) && isNotEmpty(childReq.fetchSpec)))) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We insist that fetchSpec exist with rawSpec because it indicates modern metadata, where as rawSpec alone does not.

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.

Yay!

I'd literally forgotten that rawSpec existed in legacy and saveSpec didn't.

@zkat zkat merged commit 699138e into release-next Jul 4, 2017
@zkat zkat deleted the iarna/fix-global-remove branch July 4, 2017 01:19
zkat pushed a commit that referenced this pull request Jul 5, 2017
…17590)

Not having this meant that uninstalls of globals installed by npm@4 or
earlier would fail, due to _requested not having the fields we expected.

PR-URL: #17590
Credit: @iarna
Reviewed-By: @zkat
zkat pushed a commit that referenced this pull request Jul 5, 2017
…17590)

Not having this meant that uninstalls of globals installed by npm@4 or
earlier would fail, due to _requested not having the fields we expected.

PR-URL: #17590
Credit: @iarna
Reviewed-By: @zkat
@jschneier jschneier mentioned this pull request Jul 10, 2017
1 task
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

2 participants