Enhancement: resolve pnpm `catalog:` dependencies from `pnpm-workspace.yaml`

Aperta
#664 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@vibgrate-team ci sta già lavorando.

Dal 13/11/2026.

  • #681 di @vibgrate-team — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
68/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
node.js, typescript, yaml
Ambito
backend, cli, databases

Direzione di ricerca

Start with src/core-open/scanners/npm-cache.ts and src/core-open/scanners/node-scanner.ts, then trace how the scanner detects the root pnpm-workspace.yaml and looks up lockfile versions. Check the existing scanner tests and add cases for default, named, and missing catalog entries. Done means catalog ranges are used for drift and lockfile lookup, the written spec remains currentSpec, and missing entries still produce rows.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Context

pnpm catalogs let a monorepo keep shared versions in pnpm-workspace.yaml:

catalog:
  react: ^18.3.1
catalogs:
  legacy:
    react: ^17.0.2

and refer to them from each package.json as "react": "catalog:" or "react": "catalog:legacy".

isSemverSpec in src/core-open/scanners/npm-cache.ts (around line 281) rejects catalog: because it is not a semver range, and scanOnePackageJson in src/core-open/scanners/node-scanner.ts (around line 349) then skips the dependency. In a monorepo that has moved to catalogs, most dependencies vanish from vg scan.

What to do

  1. Read catalog and catalogs from the root pnpm-workspace.yaml once per scan (the scanner already checks that file exists for package-manager detection).
  2. When a spec is catalog: or catalog:default, use the default catalog entry; for catalog:<name>, use that named catalog.
  3. Use the resolved range for drift and lockfile lookup, and keep currentSpec as written.
  4. If the entry is missing, keep the row visible with an unknown version rather than dropping it.

Acceptance

  • "react": "catalog:" resolves through the default catalog
  • "react": "catalog:legacy" resolves through the named catalog
  • A missing catalog entry still produces a row
  • Tests cover both catalog forms and a missing entry
Lingua principale
TypeScript
Stelle
4
Fork
3
Merge medio
1g 22h
PR unite (30g)
76

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di vibgrate/cli

Tutte le issue di vibgrate/cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.