Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions modules/utils/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,11 @@ export async function getPackageConfig(packageName, version, log) {
* Returns a stream of the tarball'd contents of the given package.
*/
export async function getPackage(packageName, version, log) {
const tarballName = isScopedPackageName(packageName)
? packageName.split('/')[1]
: packageName;
const tarballURL = `${npmRegistryURL}/${packageName}/-/${tarballName}-${version}.tgz`;
const packageConfig = getPackageConfig(packageName, version, log);
if (!packageConfig && !packageConfig.dist && !packageConfig.dist.tarball) {
return null;
}
const tarballURL = packageConfig.dist.tarball;

log.debug('Fetching package for %s from %s', packageName, tarballURL);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@
"supertest": "^3.0.0"
},
"engines": {
"node": "10.x.x"
"node": "12.x.x"
}
}