Mark the `typescript` peer dependency as optional
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
- 78/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ệ
- json, typescript
- Lĩnh vực
- build-system
Hướng nghiên cứu
Kiểm tra các tệp manifest của gói @tanstack/db và 14 gói khác được liệt kê trong issue. Trước tiên, hãy kiểm tra peerDependencies của chúng và mọi mục hiện có trong peerDependenciesMeta. Đánh dấu peer dependency của TypeScript là tùy chọn nhưng vẫn giữ nguyên yêu cầu về phiên bản; hoàn tất khi cả 15 tệp manifest đều có siêu dữ liệu tùy chọn và người dùng JavaScript không còn phải cài đặt TypeScript dưới dạng peer dependency bắt buộc.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- I've validated the bug against the latest version of DB packages
Describe the bug
@tanstack/db declares "typescript": ">=4.7" in peerDependencies without a peerDependenciesMeta entry, so the peer is required. Fourteen other packages in this repo declare the same peer: db-ivm, query-db-collection, convex-db-collection, rxdb-db-collection, trailbase-db-collection, db-sqlite-persistence-core and the browser, Capacitor, Cloudflare Durable Objects, Electron, Expo, Node, React Native and Tauri SQLite persistence packages.
None of these packages import typescript, so the peer only states the minimum TypeScript version for the published types. Because it is required, npm, pnpm (with its default auto-install-peers) and Bun install TypeScript for every consumer, including JavaScript projects and projects that type-check with a different compiler.
To Reproduce
mkdir repro && cd repro && npm init -y
npm install @tanstack/db
npm ls typescript
npm ls typescript lists [email protected], pulled in by @tanstack/db and @tanstack/db-ivm. On macOS arm64, TypeScript and its native binary take about 30 MB of the 43 MB node_modules.
Expected behavior
Only projects that use TypeScript install it. Marking the peer as optional keeps the version requirement for them:
"peerDependenciesMeta": {
"typescript": { "optional": true }
}
Additional context
The other TanStack libraries (@tanstack/query-core, @tanstack/router-core, @tanstack/form-core, @tanstack/store) declare no TypeScript peer. Happy to send a PR that adds peerDependenciesMeta to the 15 packages.
- Ngôn ngữ chính
- TypeScript
- Star
- 4k
- Fork
- 280
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 132
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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 TanStack/db
-
Độ 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
-
`Collection.currentStateAsChanges` JSDoc examples don’t match `CurrentStateAsChangesOptions`Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
OfflineExecutor.dispose() never settles pendingTransactionPromisesCó thể làm lại được @Claire-ovo đã nhận 12 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
TanStack/db#2254 · 1 bình luận ·
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 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Two @tanstack/db tests time out under CPU load because a cold module import counts against the 5 s default timeoutCó thể đã có người làm @jp-knj đã nhận 10 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
desktop v3 windows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
esengine/DeepSeek-Reasonix#15016 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
FR: Support CJK brackets, symbols and full-width markers in footnoteHeuristics (EBPAJ support)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
readest/readest#7413 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue priority: medium size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
content triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
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 75/100
eliasstravik/herdr-projects#788 ·