Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
deps: Now that from is in the lockfile, tighten git matching
  • Loading branch information
iarna committed May 24, 2018
1 parent 171f318 commit 0e1726c0350a02d5a60f5fddb1e69c247538625e
Showing with 3 additions and 7 deletions.
  1. +3 −7 lib/install/deps.js
@@ -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]) {

0 comments on commit 0e1726c

Please sign in to comment.