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

Commit

Permalink
deps: Now that from is in the lockfile, tighten git matching
Browse files Browse the repository at this point in the history
  • Loading branch information
iarna committed May 24, 2018
1 parent 171f318 commit 0e1726c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/install/deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,9 @@ function doesChildVersionMatch (child, requested, requestor) {
}

if (requested.type === 'git' && child.fromShrinkwrap) {
const fromSw = child.fromShrinkwrap

if (fromSw.rawSpec === requested.rawSpec) return true

if (!fromSw.hosted || !requested.hosted) return false

return fromSw.hosted.toString() === requested.hosted.toString()
const fromSw = child.package._from ? npa(child.package._from) : child.fromShrinkwrap
fromSw.name = requested.name // we're only checking specifiers here
if (fromSw.toString() === requested.toString()) return true
}

if (!registryTypes[requested.type]) {
Expand Down

0 comments on commit 0e1726c

Please sign in to comment.