fix(core): update
This commit is contained in:
parent
983a860e2f
commit
349360cdc6
20234
package-lock.json
generated
20234
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -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();
|
tap.start();
|
||||||
|
@ -165,7 +165,7 @@ export class NpmPackage {
|
|||||||
}
|
}
|
||||||
): Promise<plugins.smartfile.Smartfile> {
|
): Promise<plugins.smartfile.Smartfile> {
|
||||||
const result = await this.getFilesFromPackage(filePath, optionsArg, true);
|
const result = await this.getFilesFromPackage(filePath, optionsArg, true);
|
||||||
return result[0];
|
return result[0] || null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -90,7 +90,9 @@ export class NpmRegistry {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const fileResult = await npmPackage.getFileFromPackage(filePathArg, optionsArg);
|
const fileResult = await npmPackage.getFileFromPackage(filePathArg, optionsArg);
|
||||||
this.registryCache.cacheSmartFile(cacheDescriptor, fileResult);
|
if (fileResult) {
|
||||||
|
this.registryCache.cacheSmartFile(cacheDescriptor, fileResult);
|
||||||
|
}
|
||||||
return fileResult;
|
return fileResult;
|
||||||
} else {
|
} else {
|
||||||
return cachedFile;
|
return cachedFile;
|
||||||
|
Loading…
Reference in New Issue
Block a user