read-components
Advanced tools
Comparing version 0.5.3 to 0.5.4
26
index.js
@@ -101,12 +101,5 @@ var sysPath = require('path'); | ||
}); | ||
var oldDeps = pkg.dependencies || {}; | ||
var dependencies = {}; | ||
Object.keys(oldDeps).forEach(function(dep) { | ||
dependencies[dep.toLowerCase()] = oldDeps[dep]; | ||
}); | ||
callback(null, { | ||
name: pkg.name.toLowerCase(), version: pkg.version, | ||
files: files, dependencies: dependencies | ||
name: pkg.name, version: pkg.version, files: files, | ||
dependencies: pkg.dependencies || {} | ||
}); | ||
@@ -176,6 +169,13 @@ }); | ||
pkg.sortingLevel = level; | ||
deps.forEach(function(dep) { | ||
setLevel(initial + 1, find(packages, function(_) { | ||
return _.name === dep; | ||
})); | ||
deps.forEach(function(depName) { | ||
var dep = find(packages, function(_) { | ||
return _.name === depName; | ||
}); | ||
if (!dep) { | ||
var names = Object.keys(packages).map(function(_) { | ||
return packages[_].name; | ||
}).join(', '); | ||
throw new Error('Dependency "' + depName + '" is not present in the list of deps [' + names + ']. Specify correct dependency in bower.json or contact package author.'); | ||
} | ||
setLevel(initial + 1, dep); | ||
}); | ||
@@ -182,0 +182,0 @@ }; |
{ | ||
"name": "read-components", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"description": "Read bower and component(1) components", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10438
4
197