A RetroSearch Logo

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

Search Query:

Showing content from https://github.com/npm/npm/commit/3fc6477a89773786e6c43ef43a23e5cdc662ff8e below:

Check for name and version (#17592) · npm/npm@3fc6477 · GitHub

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

File tree Expand file treeCollapse file tree 1 file changed

+11

-0

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+11

-0

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

@@ -14,12 +14,23 @@ module.exports = function (idealTree, args, next) {

14 14 15 15

asyncMap(args, function (pkg, done) {

16 16

chain([

17 +

[hasMinimumFields, pkg],

17 18

[checkSelf, idealTree, pkg, force],

18 19

[isInstallable, pkg]

19 20

], done)

20 21

}, next)

21 22

}

22 23 24 +

function hasMinimumFields (pkg, cb) {

25 +

if (pkg.name === '' || pkg.name == null) {

26 +

return cb(new Error(`Can't install ${pkg._resolved}: Missing package name`))

27 +

} else if (pkg.version === '' || pkg.version == null) {

28 +

return cb(new Error(`Can't install ${pkg._resolved}: Missing package version`))

29 +

} else {

30 +

return cb()

31 +

}

32 +

}

33 + 23 34

function getWarnings (pkg) {

24 35

while (pkg.parent) pkg = pkg.parent

25 36

if (!pkg.warnings) pkg.warnings = []

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