get-npm-tarball-url
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -7,5 +7,11 @@ "use strict"; | ||
const scopelessName = getScopelessName(pkgName); | ||
return `${registry}${pkgName}/-/${scopelessName}-${pkgVersion}.tgz`; | ||
return `${registry}${pkgName}/-/${scopelessName}-${removeBuildMetadataFromVersion(pkgVersion)}.tgz`; | ||
} | ||
exports.default = default_1; | ||
function removeBuildMetadataFromVersion(version) { | ||
const plusPos = version.indexOf('+'); | ||
if (plusPos === -1) | ||
return version; | ||
return version.substring(0, plusPos); | ||
} | ||
function getScopelessName(name) { | ||
@@ -12,0 +18,0 @@ if (name[0] !== '@') { |
{ | ||
"name": "get-npm-tarball-url", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Create the tarball URL of a npm package", | ||
@@ -40,5 +40,5 @@ "main": "lib/index.js", | ||
"package-preview": "^1.0.3", | ||
"tape": "^4.6.3", | ||
"ts-node": "^4.0.0", | ||
"typescript": "^2.4.2" | ||
"tape": "^5.0.0", | ||
"ts-node": "^7.0.0", | ||
"typescript": "^3.0.0" | ||
}, | ||
@@ -45,0 +45,0 @@ "dependencies": { |
@@ -10,3 +10,3 @@ # get-npm-tarball-url | ||
``` | ||
npm i -S get-npm-tarball-url | ||
pnpm add get-npm-tarball-url | ||
``` | ||
@@ -13,0 +13,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
4444
24