1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-08 23:25:51 +01:00

fix: avoid warning "time for version x already exists" (#4577)

* fix: avoid warning "time for version x already exists"

* changeset
This commit is contained in:
Marc Bernard 2024-04-11 10:13:55 +02:00 committed by GitHub
parent d5d96f0868
commit f967a69ad3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

@ -0,0 +1,5 @@
---
'@verdaccio/store': patch
---
fix: avoid warning "time for version x already exists"

@ -1063,7 +1063,7 @@ class Storage {
const hasPackageInStorage = await this.hasPackage(name);
if (!hasPackageInStorage) {
await this.createNewLocalCachePackage(name, versionToPublish);
await this.createNewLocalCachePackage(name);
successResponseMessage = API_MESSAGE.PKG_CREATED;
} else {
successResponseMessage = API_MESSAGE.PKG_CHANGED;
@ -1363,7 +1363,7 @@ class Storage {
* @param name name of the package
* @returns
*/
private async createNewLocalCachePackage(name: string, latestVersion: string): Promise<void> {
private async createNewLocalCachePackage(name: string): Promise<void> {
const storage: pluginUtils.StorageHandler = this.getPrivatePackageStorage(name);
if (!storage) {
@ -1377,7 +1377,6 @@ class Storage {
time: {
created: currentTime,
modified: currentTime,
[latestVersion]: currentTime,
},
};