Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
has-modern-meta: Correctly identify git changelings
PR-URL: #20390
Credit: @iarna
Reviewed-By: @zkat
  • Loading branch information
iarna committed Apr 20, 2018
1 parent e4ed976 commit 2facb35fbfbbc415e693d350b67413a66ff96204
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/install/has-modern-meta.js
@@ -11,7 +11,10 @@ function isLink (child) {
function hasModernMeta (child) {
if (!child) return false
const resolved = child.package._resolved && npa.resolve(moduleName(child), child.package._resolved)
return child.isTop || isLink(child) || child.fromBundle ||
child.package._inBundle || child.package._integrity ||
child.package._shasum || (resolved && resolved.type === 'git')
const version = npa.resolve(moduleName(child), child.package.version)
return child.isTop ||
isLink(child) ||
child.fromBundle || child.package._inBundle ||
child.package._integrity || child.package._shasum ||
(resolved && resolved.type === 'git') || (version && version.type === 'git')
}

0 comments on commit 2facb35

Please sign in to comment.