vite:monorepo template declares catalog entries that no workspace package uses
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- build-system
Hướng nghiên cứu
Bắt đầu với packages/cli/templates/monorepo/pnpm-workspace.yaml và so sánh các mục trong catalog của nó với các manifest gói được tạo, đặc biệt là packages/utils/package.json và apps/website/package.json. Kiểm tra các bài kiểm thử tạo hoặc xác thực của template monorepo và chạy bài kiểm thử phù hợp sau khi quyết định template nên dùng các tham chiếu catalog: hay xóa các mục không được dùng. Công việc hoàn tất khi các mục catalog được tạo ra được sử dụng và phiên bản của chúng khớp nhau, hoặc không còn mục nào không được dùng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 6.6k
- Fork
- 303
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 224
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của voidzero-dev/vite-plus
-
migration pending triage triage: failed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
voidzero-dev/vite-plus#3375 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`vp env pin`: says "Created .node-version" when overwriting an existing fileCó thể đã có người làm @CheHyeonYeong đã nhận hôm nay. Đang mởcontribution welcome documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
voidzero-dev/vite-plus#3370 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
triage: not actionable
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
voidzero-dev/vite-plus#3296 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pending triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
voidzero-dev/vite-plus#3235 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docker guide: the runtime stage needs libatomic1 for Node.js 25 and laterCó thể đã có người làm @kshanxs đã nhận 14 ngày trước. Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
voidzero-dev/vite-plus#3219 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của voidzero-dev/vite-plus
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
langchain-ai/langchainjs#12157 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
activescott/home-infra-k8s-flux#511 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
lingdojo/kana-dojo#33753 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
android:player
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
follow-up needs-triage S3: minor
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
manaflow-ai/cmux#38032 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày