vite:monorepo template declares catalog entries that no workspace package uses
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 76/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- typescript
- 領域
- build-system
研究方向
從 packages/cli/templates/monorepo/pnpm-workspace.yaml 著手,將其中的 catalog 項目與產生的套件清單進行比較,特別是 packages/utils/package.json 和 apps/website/package.json。檢查 monorepo 範本的產生或驗證測試,並在決定範本應使用 catalog: 參照還是移除未使用的項目後,執行相關測試。完成標準是產生的 catalog 項目有被使用且版本一致,或不存在未使用的項目。
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- TypeScript
- 星號
- 6.6k
- 分支
- 303
- 平均合併
- 1 天 4 小時
- 30 天內合併 PR
- 224
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
voidzero-dev/vite-plus 的其他 Issue
-
migration pending triage triage: failed
難度 2/5 1-3 小時 新手友好度 76/100
voidzero-dev/vite-plus#3375 · 2 則留言 ·
維護者通常 1 天內回覆
-
`vp env pin`: says "Created .node-version" when overwriting an existing file可能已有人在做 @CheHyeonYeong 於 1 天前認領。 未關閉contribution welcome documentation
難度 2/5 1-3 小時 新手友好度 76/100
voidzero-dev/vite-plus#3370 · 3 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
triage: not actionable
難度 2/5 1-3 小時 新手友好度 85/100
voidzero-dev/vite-plus#3296 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
pending triage
難度 2/5 1-3 小時 新手友好度 63/100
voidzero-dev/vite-plus#3235 ·
維護者通常 1 天內回覆
-
Docker guide: the runtime stage needs libatomic1 for Node.js 25 and later可能已有人在做 @kshanxs 於 14 天前認領。 未關閉documentation
難度 2/5 1-3 小時 新手友好度 84/100
voidzero-dev/vite-plus#3219 · 2 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
查看 voidzero-dev/vite-plus 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 74/100
earendil-works/pi-claude-code#36 ·
維護者通常 6 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 1 天內回覆
-
Resources: New work of jabodetabek可能已有人在做 @rmt-svc 今天認領。 未關閉resources
難度 2/5 1-3 小時 新手友好度 62/100
railmapgen/rmp-gallery#4167 ·
維護者通常 2 天內回覆
-
documentation p1
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 83/100
microsoft/monaco-editor#5577 ·
維護者通常 1 天內回覆