cnpm / cnpmcore

Private NPM Registry for Enterprise
https://npmmirror.com
MIT License
622 stars 84 forks source link

fix: hooks triggers #641

Closed elrrrrrrr closed 10 months ago

elrrrrrrr commented 10 months ago

Since the eventBus#cork , version & tag events are triggered at same time, cause the abnormal triggers of different types of hooks.

  • 🐞 Fix triggerHook type targetName to be tagetName:changeId
  • 🤖 Only merge sync tasks (binary, package) which in waiting states

    由于 eventBus#cork 机制,版本事件同时触发,导致不同类型 hook 触发异常

  • 🐞 修改 triggerHook 类型 targetName 为 包名:changeId
  • 🤖 仅合并 waiting 状态下包同步任务
codecov[bot] commented 10 months ago

Codecov Report

Attention: 168 lines in your changes are missing coverage. Please review.

Comparison is base (6624a36) 97.45% compared to head (351d856) 96.84%. Report is 162 commits behind head on master.

Files Patch % Lines
config/config.default.ts 56.33% 31 Missing :warning:
.../port/controller/admin/PaddingVersionController.ts 48.83% 22 Missing :warning:
app/core/service/FixNoPaddingVersionService.ts 54.54% 15 Missing :warning:
app/core/service/PackageSearchService.ts 93.72% 15 Missing :warning:
app/core/service/PackageSyncerService.ts 85.84% 15 Missing :warning:
app/port/schedule/SyncBinaryWorker.ts 21.42% 11 Missing :warning:
app/repository/PackageVersionRepository.ts 87.95% 10 Missing :warning:
app/core/service/PackageVersionFileService.ts 92.59% 8 Missing :warning:
app/core/entity/PaddingSemVer.ts 88.00% 6 Missing :warning:
app/core/service/PackageVersionService.ts 94.91% 6 Missing :warning:
... and 11 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #641 +/- ## ========================================== - Coverage 97.45% 96.84% -0.61% ========================================== Files 168 180 +12 Lines 15691 17582 +1891 Branches 2018 2292 +274 ========================================== + Hits 15291 17027 +1736 - Misses 400 555 +155 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.