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 今天认领。 未关闭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
langchain-ai/langchainjs#12157 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
activescott/home-infra-k8s-flux#511 ·
维护者通常 1 天内回复
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 72/100
lingdojo/kana-dojo#33753 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
android:player
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
follow-up needs-triage S3: minor
难度 1/5 1-3 小时 新手友好度 85/100
manaflow-ai/cmux#38032 · 1 条评论 ·
维护者通常 1 天内回复