lib/papers/dependency_specification/npm_package.rb in papers-2.1.0 vs lib/papers/dependency_specification/npm_package.rb in papers-2.2.0

- old
+ new

@@ -7,10 +7,12 @@ end def self.full_introspected_entries packages = (package['dependencies'] || {}).merge((package['devDependencies'] || {})) packages.map do |name, version| + # FIXME: This version cleanup is inadequate for npm version specifiers, which may be git or + # tarball URLs. version.sub!(/^\D+/, '') { 'name' => name, 'version' => version } @@ -22,9 +24,13 @@ name: name_without_version, license: license, license_url: @license_url, project_url: @project_url } + end + + def self.asset_type_name + 'npm package' end def self.manifest_key "npm_packages" end