Make just-bash and acorn optional peer dependencies, pulled in only by the backend that needs them
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- backend, build-system
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
@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.
- Ngôn ngữ chính
- TypeScript
- Star
- 9.5k
- Fork
- 552
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 49
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 cloudflare/computer
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
cloudflare/computer#224 · 5 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Always run the "next" computerd workflow on push to the `release` branchCó thể đã có người làm @aron-cf đã nhận 1 ngày trước. Đang mởbug
cloudflare/computer#222 · 2 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Workspace namespaces: more than one Workspace per Durable Object storageCó thể đã có người làm @aron-cf đã nhận 2 ngày trước. Đang mởenhancement
cloudflare/computer#219 · 1 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
git: host-held credentials for model-driven clone, fetch, pull and pushCó thể đã có người làm @aron-cf đã nhận 2 ngày trước. Đang mởenhancement
cloudflare/computer#218 · 3 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Offload large files (4 MB+) to R2Có thể đã có người làm @aron-cf đã nhận 2 ngày trước. Đang mởenhancement
cloudflare/computer#217 · 4 bình luận · 1 reaction · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của cloudflare/computer
Issue tương tự
-
area: desktop area: website priority: P2 type: feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
appandflow/stim#3411 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
rjsf-team/react-jsonschema-form#5485 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
lingdojo/kana-dojo#32090 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Friction: Org home and org switcher copy still say repositories and connected agents live in the personal accountCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởfriction
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
kentcdodds/kody#3265 ·
Maintainer thường phản hồi trong vòng 1 ngày