vite:monorepo template declares catalog entries that no workspace package uses
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 76/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- build-system
Rechercherichtung
Beginne mit packages/cli/templates/monorepo/pnpm-workspace.yaml und vergleiche dessen Katalogeinträge mit den generierten Paketmanifesten, insbesondere packages/utils/package.json und apps/website/package.json. Prüfe die Generierungs- oder Validierungstests der Monorepo-Vorlage und führe den passenden Test aus, nachdem du entschieden hast, ob die Vorlage catalog:-Referenzen verwenden oder ungenutzte Einträge entfernen sollte. Fertig ist die Arbeit, wenn die generierten Katalogeinträge verwendet werden und ihre Versionen übereinstimmen oder ungenutzte Einträge fehlen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Describe the bug
A project created with vp create vite:monorepo declares two pnpm catalog entries that no workspace package uses, and one of them does not match the version the packages actually pin.
The template's pnpm-workspace.yaml (packages/cli/templates/monorepo/pnpm-workspace.yaml) sets catalogMode: prefer and declares:
catalog:
"@types/node": ^24
typescript: ^7.0.0
The generated workspace packages do not reference these entries with catalog:. They pin direct ranges instead:
packages/utils/package.json "@types/node": "^26.6.5", "typescript": "^7.0.2"
apps/website/package.json "typescript": "^7.0.2"
What I expect: the generated packages use "typescript": "catalog:" and "@types/node": "catalog:", so the catalog is the single source of the versions, or the template leaves out catalog entries that are not used. The @types/node range should also agree between the catalog (^24) and the package (^26.6.5).
What happens: the catalog entries are dead, and a dead-code checker such as Knip reports them on a new project. vp check passes, so nothing inside Vite+ points this out.
Related: #1835 is about vp add writing catalog: references. This report is about the manifests the template itself generates.
Reproduction
No separate repository: the bug reproduces with the single vp create command under "Steps to reproduce", on a clean directory.
Steps to reproduce
vp create vite:monorepo --directory repro --no-interactive --git --package-manager pnpm
cd repro
grep -n "catalog" pnpm-workspace.yaml
grep -rn '"typescript"\|"@types/node"' apps/*/package.json packages/*/package.json
pnpm dlx [email protected]
Knip prints:
Unused catalog entries (2)
@types/node default pnpm-workspace.yaml:9:4
typescript default pnpm-workspace.yaml:10:3
System Info
$ vp env current
Node.js:
Version 26.13.0
Source engines.node
Installed true
Mode managed
Package Manager:
Name pnpm
Version 12.18.0
Source devEngines.packageManager
Installed true
Mode managed
$ vp --version
vp v1.5.0
Local vite-plus:
vite-plus v1.5.0
Tools:
vite v8.3.5
rolldown v1.2.16
vitest v5.1.0
oxfmt v0.76.0
oxlint v1.91.0
oxlint-tsgolint v7.0.2005
tsdown v0.23.4
The vp --version output is from the project's local vp (1.5.0); vp env current ran through the global binary (1.2.0), because the local one refuses env. Binary paths are removed.
Used Package Manager
pnpm
Logs
Not needed; the steps above reproduce it without any error output.
Validations
- Read the Contributing Guidelines.
- Check that there isn't already an issue for the same bug.
- Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- The provided reproduction is a minimal reproducible example.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 6.6k
- Forks
- 303
- Ø Merge
- 1 T. 4 Std.
- Gemergte PRs (30 T.)
- 224
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus voidzero-dev/vite-plus
-
migration pending triage triage: failed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
voidzero-dev/vite-plus#3375 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
`vp env pin`: says "Created .node-version" when overwriting an existing fileEvtl. vergeben @CheHyeonYeong hat das heute übernommen. Offencontribution welcome documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
voidzero-dev/vite-plus#3370 · 3 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
triage: not actionable
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
voidzero-dev/vite-plus#3296 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
pending triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 63/100
voidzero-dev/vite-plus#3235 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Docker guide: the runtime stage needs libatomic1 for Node.js 25 and laterEvtl. vergeben @kshanxs hat das vor 14 Tagen übernommen. Offendocumentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
voidzero-dev/vite-plus#3219 · 2 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in voidzero-dev/vite-plus
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
langchain-ai/langchainjs#12157 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
activescott/home-infra-k8s-flux#511 ·
Maintainer antworten meist innerhalb von 1 Tag
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
lingdojo/kana-dojo#33753 · 1 Kommentar · 5 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
-
android:player
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
follow-up needs-triage S3: minor
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 85/100
manaflow-ai/cmux#38032 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag