Skip to content

Commit

Permalink
fix: avoid warning "time for version x already exists" (#4577)
Browse files Browse the repository at this point in the history
* fix: avoid warning "time for version x already exists"

* changeset
  • Loading branch information
mbtools committed Apr 11, 2024
1 parent d5d96f0 commit f967a69
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/quick-buses-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@verdaccio/store': patch
---

fix: avoid warning "time for version x already exists"
5 changes: 2 additions & 3 deletions packages/store/src/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand All @@ -1377,7 +1377,6 @@ class Storage {
time: {
created: currentTime,
modified: currentTime,
[latestVersion]: currentTime,
},
};

Expand Down

0 comments on commit f967a69

Please sign in to comment.