Support pnpm catalog
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 42/100
Direzione di ricerca
Inizia individuando il comando vp add e la sua gestione di package.json e pnpm-workspace.yaml. Traccia come vengono rilevate, selezionate e aggiornate le voci del catalogo, quindi verifica i riferimenti catalog: richiesti e il comportamento dell'installazione sia per le dipendenze esistenti sia per quelle nuove.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
In current Vite+, when running vp add vue with pnpm catalogs configured in pnpm-workspace.yaml, it totally ignores the catalog and add the package with it version directly in package.json.
Since pnpm catalogs feature provide a lot of benefit for packages management (Anthony Fu wrote a blog about it), it will be great if VIte+ does support it.
Suggested solution
-
This feature can be toggle by a config in
vite.config.ts:pnpm.catalog: booleanor an env var likeVP_CATALOG=boolean. -
When running
vp addand Vite+ detects a workspace that use pnpm catalog: instead of adding packages with pinned versions, it writescatalog:references intopackage.jsonand updates the workspace catalog:
# Given pnpm-workspace.yaml with:
# catalogs:
# prod:
# react: ^18.3.0
vp add react
# → detects react in "prod" catalog
# → writes "react": "catalog:prod" to package.json
# → runs vp install
vp add lodash
# → lodash not in any catalog
# → prompts to select a catalog (or skip)
# → fetches latest version, updates pnpm-workspace.yaml
# → writes "lodash": "catalog:prod" to package.json
# → runs vp install
Alternative
No response
Additional context
This feature is inspired by ni
Validations
- Read the Contributing Guidelines.
- Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
- Check that there isn't already an issue requesting the same feature.
- Lingua principale
- Rust
- Stelle
- 5.8k
- Fork
- 263
- Merge medio
- 1g 3h
- PR unite (30g)
- 147
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di voidzero-dev/vite-plus
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
voidzero-dev/vite-plus#2804 · 1 reazione ·
-
pending triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
voidzero-dev/vite-plus#2801 · 1 reazione ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
voidzero-dev/vite-plus#2097 · 10 commenti · 2 reazioni ·
-
documentation
voidzero-dev/vite-plus#2800 · 1 assegnatario ·
-
pending triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
voidzero-dev/vite-plus#2796 · 1 commento ·
Tutte le issue di voidzero-dev/vite-plus
Issue simili
-
bug github_actions
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
registrystack/registry-stack#1393 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
rocky-data/rocky#2181 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Apertabot:ai-assisted component:indexer QA-roadmap status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
midnightntwrk/midnight-indexer#1557 ·