Mark the `typescript` peer dependency as optional
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- json, typescript
- 領域
- build-system
調査の方向性
@tanstack/db と、issue に記載されている他の 14 個のパッケージのパッケージマニフェストを調べてください。まず、それぞれの peerDependencies と、既存の peerDependenciesMeta エントリーを確認してください。TypeScript の peer dependency を optional にし、バージョン要件は維持してください。15 個すべてのマニフェストに optional のメタデータがあり、JavaScript の利用者が TypeScript を必須の peer dependency としてインストールしなくてよくなれば完了です。
索引モデルが 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時間
- マージ済み PR(30日)
- 132
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
難易度 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 ·