lib/licensed/sources/npm.rb in licensed-3.1.0 vs lib/licensed/sources/npm.rb in licensed-3.2.0
- old
+ new
@@ -31,14 +31,15 @@
Licensed::Shell.tool_available?("npm") && File.exist?(config.pwd.join("package.json"))
end
def enumerate_dependencies
packages.map do |name, package|
- path = package["path"]
+ errors = package["problems"] unless package["path"]
Dependency.new(
name: name,
- version: package["version"],
- path: path,
+ version: package["version"] || package["required"],
+ path: package["path"],
+ errors: Array(errors),
metadata: {
"type" => NPM.type,
"name" => package["name"],
"summary" => package["description"],
"homepage" => package["homepage"]