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+7
-2
lines changedFilter options
+7
-2
lines changed Original file line number Diff line number Diff line change
@@ -254,11 +254,16 @@ exports.loadRequestedDeps = function (args, tree, saveToDependencies, log, next)
254
254
}, andForEachChild(loadDeps, andFinishTracker(log, next)))
255
255
}
256
256
257
+
function isNotEmpty (value) {
258
+
return value != null && value !== ''
259
+
}
260
+
257
261
module.exports.computeVersionSpec = computeVersionSpec
258
262
function computeVersionSpec (tree, child) {
259
263
validate('OO', arguments)
260
264
var requested
261
-
if (child.package._requested) {
265
+
var childReq = child.package._requested
266
+
if (childReq && (isNotEmpty(childReq.saveSpec) || (isNotEmpty(childReq.rawSpec) && isNotEmpty(childReq.fetchSpec)))) {
262
267
requested = child.package._requested
263
268
} else if (child.package._from) {
264
269
requested = npa(child.package._from)
@@ -277,7 +282,7 @@ function computeVersionSpec (tree, child) {
277
282
} else if (requested.type === 'directory' || requested.type === 'file') {
278
283
return 'file:' + path.relative(tree.path, requested.fetchSpec)
279
284
} else {
280
-
return requested.saveSpec
285
+
return requested.saveSpec || requested.rawSpec
281
286
}
282
287
}
283
288
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