Skip to content

Commit 22337e9

Browse files
committed
fix(catalog): preserve GitHub stars when merging local workspace entry over remote
scanLocal always sets stars: 0. When a local package also exists in the GitHub catalog, the ...item spread was overwriting prev.stars with 0. Now stars from the remote entry are explicitly preserved via stars: prev.stars ?? 0.
1 parent b1c463b commit 22337e9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

bin/lib/catalog.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ export async function loadCatalog(workspaceRoot, settings, options = {}) {
312312
byName.set(item.shortName, {
313313
...prev,
314314
...item,
315+
stars: prev.stars ?? 0, // preserve GitHub stars — scanLocal always sets 0
315316
localPath: item.localPath,
316317
remote: item.remote ?? prev.remote,
317318
updatedAt: item.updatedAt ?? prev.updatedAt,

0 commit comments

Comments
 (0)