Mark the `typescript` peer dependency as optional
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- json, typescript
- 领域
- build-system
调研方向
检查 @tanstack/db 以及 issue 中列出的另外 14 个包的清单文件。先查看它们的 peerDependencies 和现有的 peerDependenciesMeta 条目。将 TypeScript peer 依赖标记为可选,同时保留其版本要求;当全部 15 个清单文件都包含可选元数据,且 JavaScript 使用者不再需要将 TypeScript 作为必需的 peer 依赖安装时,即完成。
由索引模型根据 Issue 内容生成。
描述
- 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.
- 主要语言
- TypeScript
- 星标
- 4k
- 派生
- 280
- 平均合并
- 1 天 10 小时
- 30 天内合并 PR
- 132
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/db 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
OfflineExecutor.dispose() never settles pendingTransactionPromises可能重新可做 @Claire-ovo 于 12 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
Two @tanstack/db tests time out under CPU load because a cold module import counts against the 5 s default timeout可能已有人在做 @jp-knj 于 10 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
相似的 Issue
-
desktop v3 windows
难度 2/5 1-3 小时 新手友好度 75/100
esengine/DeepSeek-Reasonix#15016 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
readest/readest#7413 · 1 条评论 ·
维护者通常 1 天内回复
-
enhancement good first issue priority: medium size: XS
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
content triage
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
eliasstravik/herdr-projects#788 ·