Compare commits

...

2 Commits

Author SHA1 Message Date
2d34397b9b 1.0.25 2021-04-29 16:59:59 +00:00
2744e1a92b fix(core): update 2021-04-29 16:59:58 +00:00
3 changed files with 6 additions and 2 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartnpm",
"version": "1.0.24",
"version": "1.0.25",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartnpm",
"version": "1.0.24",
"version": "1.0.25",
"private": false,
"description": "interface with npm to retrieve package information",
"main": "dist_ts/index.js",

View File

@ -122,6 +122,9 @@ export class NpmPackage {
// lets find the best matching release
const versionStrings = this.allVersions.map((packageVersion) => packageVersion.version);
const bestMatchingVersion = targetVersion.getBestMatch(versionStrings);
if (!bestMatchingVersion) {
return null;
}
tarballUrl = this.allVersions.find(
(packageVersion) => packageVersion.version === bestMatchingVersion
).dist.tarball;
@ -142,6 +145,7 @@ export class NpmPackage {
console.log(err);
},
() => {
done.resolve(null);
subscription.unsubscribe();
}
);