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

Commit

Permalink
has-modern-meta: Correctly identify git changelings
Browse files Browse the repository at this point in the history
PR-URL: #20390
Credit: @iarna
Reviewed-By: @zkat
  • Loading branch information
iarna committed Apr 20, 2018
1 parent e4ed976 commit 2facb35
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/install/has-modern-meta.js
Expand Up @@ -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.