Make just-bash and acorn optional peer dependencies, pulled in only by the backend that needs them
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- backend, build-system
調査の方向性
Start with the dependencies block in package.json, then grep for just-bash imports under backends/worker-shell and the acorn import in backends/worker-javascript/module-graph.ts. Move both packages to peerDependencies with optional set in peerDependenciesMeta, and add a constructor check in each backend that throws an error naming the missing package. Update the README sections and Installation. Done when a consumer installs without either package, the filesystem, git and container backends still work, and constructing a backend without its peer throws the named error. Settle the capnweb question separately.
索引モデルが issue の本文から書いたものです。
説明
@cloudflare/computer lists acorn and just-bash in dependencies. Every consumer installs them, including ones that only use the filesystem, git, or the container backend:
just-bashis imported only by the worker-shell backend (backends/worker-shell/*).acornis imported only by the worker-javascript backend (backends/worker-javascript/module-graph.ts).
Those backends ship as separate subpath entries, so a bundler drops the code when it isn't imported. The packages still get installed and resolved, and they land in the lockfile. That matters for packages that build on Computer. We want @cloudflare/think in cloudflare/agents to default to a Computer Workspace, and Think users shouldn't pull in a shell interpreter or a JS parser they never run.
Proposal
- Move
just-bashandacorntopeerDependenciesand mark themoptionalinpeerDependenciesMeta, the same patternai,zod, and@platformatic/vfsalready follow. - Document in each backend's README section and in Installation that
backends/worker-shellneedsjust-bashandbackends/worker-javascriptneedsacorn. - If a backend is constructed and its peer is missing, throw an error naming the package to install.
- While at it, check whether
capnwebcan go the same way for consumers that never use the container backend or the remote client.
- 主要言語
- TypeScript
- スター
- 9.5k
- フォーク
- 552
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 47
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudflare/computer のほかの issue
-
Sync planning scans the full pending change set before yielding; repeated Durable Object CPU-limit failures対応中かも @aron-cf が 1 日前に担当しました。 オープンbug
cloudflare/computer#225 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
cloudflare/computer#224 · コメント 5 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Always run the "next" computerd workflow on push to the `release` branch対応中かも @aron-cf が 2 日前に担当しました。 オープンbug
cloudflare/computer#222 · コメント 2 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Workspace namespaces: more than one Workspace per Durable Object storage対応中かも @aron-cf が 2 日前に担当しました。 オープンenhancement
cloudflare/computer#219 · コメント 1 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
git: host-held credentials for model-driven clone, fetch, pull and push対応中かも @aron-cf が 2 日前に担当しました。 オープンenhancement
cloudflare/computer#218 · コメント 3 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
cloudflare/computer の issue をすべて見る
似ている issue
-
Table: Space fires onActivate in single-selection mode — the reference doc and the JSDoc disagreeオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
sidorares/react-x11-components#764 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
backnotprop/plannotator#1840 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
JoviDeCroock/pracht#432 ·
メンテナーはふだん 1 日以内に返信
-
approved check:passed streams:add
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Hardware attribute name "app Connection Support" has inconsistent casing対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
walletbeat/walletbeat#1628 ·
メンテナーはふだん 1 日以内に返信