mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-27 22:59:51 -05: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:
parent
d5d96f0868
commit
f967a69ad3
2 changed files with 7 additions and 3 deletions
5
.changeset/quick-buses-scream.md
Normal file
5
.changeset/quick-buses-scream.md
Normal file
|
@ -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);
|
const hasPackageInStorage = await this.hasPackage(name);
|
||||||
if (!hasPackageInStorage) {
|
if (!hasPackageInStorage) {
|
||||||
await this.createNewLocalCachePackage(name, versionToPublish);
|
await this.createNewLocalCachePackage(name);
|
||||||
successResponseMessage = API_MESSAGE.PKG_CREATED;
|
successResponseMessage = API_MESSAGE.PKG_CREATED;
|
||||||
} else {
|
} else {
|
||||||
successResponseMessage = API_MESSAGE.PKG_CHANGED;
|
successResponseMessage = API_MESSAGE.PKG_CHANGED;
|
||||||
|
@ -1363,7 +1363,7 @@ class Storage {
|
||||||
* @param name name of the package
|
* @param name name of the package
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
private async createNewLocalCachePackage(name: string, latestVersion: string): Promise<void> {
|
private async createNewLocalCachePackage(name: string): Promise<void> {
|
||||||
const storage: pluginUtils.StorageHandler = this.getPrivatePackageStorage(name);
|
const storage: pluginUtils.StorageHandler = this.getPrivatePackageStorage(name);
|
||||||
|
|
||||||
if (!storage) {
|
if (!storage) {
|
||||||
|
@ -1377,7 +1377,6 @@ class Storage {
|
||||||
time: {
|
time: {
|
||||||
created: currentTime,
|
created: currentTime,
|
||||||
modified: currentTime,
|
modified: currentTime,
|
||||||
[latestVersion]: currentTime,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue