Compare commits

...

5 Commits

Author SHA1 Message Date
f6d3d0987b 1.0.35 2021-05-06 10:34:45 +00:00
60a1de38ce fix(core): update 2021-05-06 10:34:44 +00:00
0ef6d0ccb2 1.0.34 2021-05-06 10:22:15 +00:00
8e538fd84d 1.0.33 2021-05-06 10:05:50 +00:00
6745115db7 fix(core): update 2021-05-06 10:05:49 +00:00
4 changed files with 4 additions and 3 deletions

2
package-lock.json generated
View File

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

View File

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

View File

@ -182,5 +182,6 @@ export class NpmPackage {
if (!bestMatchingVersion) { if (!bestMatchingVersion) {
return null; return null;
} }
return bestMatchingVersion;
} }
} }

View File

@ -92,7 +92,7 @@ export class NpmRegistry {
}): Promise<plugins.smartfile.Smartfile[]> { }): Promise<plugins.smartfile.Smartfile[]> {
const npmPackage = await this.getPackageInfo(packageNameArg); const npmPackage = await this.getPackageInfo(packageNameArg);
if (!optionsArg?.version && !optionsArg?.distTag) { if (!optionsArg?.version && !optionsArg?.distTag) {
const latestAvailable = npmPackage.allDistTags.find(packageArg => packageArg.name === 'latest'); const latestAvailable = npmPackage.allDistTags.find(packageDistTagArg => packageDistTagArg.name === 'latest');
if (!latestAvailable) { if (!latestAvailable) {
optionsArg = { optionsArg = {
version: npmPackage.getBestMatchingVersion('*') version: npmPackage.getBestMatchingVersion('*')