Compare commits

..

4 Commits

Author SHA1 Message Date
7737014464 1.0.39 2021-06-07 13:59:57 +02:00
349360cdc6 fix(core): update 2021-06-07 13:59:56 +02:00
983a860e2f 1.0.38 2021-05-10 23:27:11 +00:00
c375d9ba10 fix(core): update 2021-05-10 23:27:11 +00:00
6 changed files with 17129 additions and 3124 deletions

View File

@ -36,6 +36,7 @@ auditProductionDependencies:
- npmci command npm audit --audit-level=high --only=prod --production
tags:
- docker
allow_failure: true
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci

20236
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -53,4 +53,12 @@ tap.test('should get a specific file from a package', async () => {
}
});
tap.test('should not get a nonexisting file from a package', async () => {
const wantedFileNotThere = await verdaccioRegistry.getFileFromPackage(
'@pushrocks/websetup',
'ts/notthere'
);
expect(wantedFileNotThere).to.be.null
});
tap.start();

View File

@ -165,7 +165,7 @@ export class NpmPackage {
}
): Promise<plugins.smartfile.Smartfile> {
const result = await this.getFilesFromPackage(filePath, optionsArg, true);
return result[0];
return result[0] || null;
}
/**

View File

@ -90,7 +90,9 @@ export class NpmRegistry {
}
}
const fileResult = await npmPackage.getFileFromPackage(filePathArg, optionsArg);
this.registryCache.cacheSmartFile(cacheDescriptor, fileResult);
if (fileResult) {
this.registryCache.cacheSmartFile(cacheDescriptor, fileResult);
}
return fileResult;
} else {
return cachedFile;