Make just-bash and acorn optional peer dependencies, pulled in only by the backend that needs them
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 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
- 平均合并
- 1 天 17 小时
- 30 天内合并 PR
- 50
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cloudflare/computer 的其他 Issue
-
enhancement
难度 4/5 3-5 天 新手友好度 30/100
cloudflare/computer#224 · 5 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
Always run the "next" computerd workflow on push to the `release` branch可能已有人在做 @aron-cf 于 4 天前认领。 未关闭bug
cloudflare/computer#222 · 2 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
Workspace namespaces: more than one Workspace per Durable Object storage可能已有人在做 @aron-cf 于 4 天前认领。 未关闭enhancement
cloudflare/computer#219 · 1 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
git: host-held credentials for model-driven clone, fetch, pull and push可能已有人在做 @aron-cf 于 4 天前认领。 未关闭enhancement
cloudflare/computer#218 · 3 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
Offload large files (4 MB+) to R2可能已有人在做 @aron-cf 于 4 天前认领。 未关闭enhancement
cloudflare/computer#217 · 4 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
查看 cloudflare/computer 的全部 Issue
相似的 Issue
-
A hung CI job runs for 6 hours before it is cancelled可能已有人在做 @Olanetsoft 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
Olanetsoft/agent-lookout#110 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
thedotmack/claude-mem#4757 ·
维护者通常 1 天内回复
-
🐛 bug 🗺️ MCP OAuth
难度 2/5 1-3 小时 新手友好度 62/100
LibreChat-AI/LibreChat#17077 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 75/100