A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/npm/npm/commit/901bef0e1ea806fc08d8d58744a9f813b6c020ab below:

Only include requires when something was required · npm/npm@901bef0 · GitHub

This repository was archived by the owner on Aug 11, 2022. It is now read-only.

File tree Expand file treeCollapse file tree 2 files changed

+8

-6

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+8

-6

lines changed Original file line number Diff line number Diff line change

@@ -27,7 +27,7 @@ module.exports = function (tree, swdeps, opts, finishInflating) {

27 27

return finishInflating()

28 28

}

29 29

tree.loaded = false

30 -

tree.hasRequiresFromLock = Object.keys(swdeps).every((d) => swdeps[d].requires)

30 +

tree.hasRequiresFromLock = Object.keys(swdeps).some((d) => swdeps[d].requires)

31 31

return inflateShrinkwrap(tree.path, tree, swdeps, opts).then(

32 32

() => finishInflating(),

33 33

finishInflating

Original file line number Diff line number Diff line change

@@ -127,11 +127,13 @@ function shrinkwrapDeps (deps, top, tree, seen) {

127 127

}

128 128

if (childIsOnlyDev) pkginfo.dev = true

129 129

if (isOptional(child)) pkginfo.optional = true

130 -

pkginfo.requires = {}

131 -

child.requires.sort((a, b) => moduleName(a).localeCompare(moduleName(b))).forEach((required) => {

132 -

var requested = required.package._requested || getRequested(required) || {}

133 -

pkginfo.requires[moduleName(required)] = childVersion(top, required, requested)

134 -

})

130 +

if (child.requires.length) {

131 +

pkginfo.requires = {}

132 +

child.requires.sort((a, b) => moduleName(a).localeCompare(moduleName(b))).forEach((required) => {

133 +

var requested = required.package._requested || getRequested(required) || {}

134 +

pkginfo.requires[moduleName(required)] = childVersion(top, required, requested)

135 +

})

136 +

}

135 137

if (child.children.length) {

136 138

pkginfo.dependencies = {}

137 139

shrinkwrapDeps(pkginfo.dependencies, top, child, seen)

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4