chore: make bundle fully self-contained, no external imports #270

Merged
xiaomo merged 1 commits from chore/no-external-bundle into main 2026-05-16 06:16:29 +00:00
Owner

What

Bundle build 不再使用 --external,所有 @uncaged/* runtime 依赖全部打包进 .esm.js

Why

Bundle 应该完全自包含,只要 Node/Bun 版本不变,行为就稳定。

Changes

  • workspace.ts — 删除 uncagedWorkflowExternals()external 参数
  • bundle-validator.ts — 收紧 import 校验,只允许 Node built-ins
  • skill.ts — 更新文档

Follow-up

ensure-uncaged-workflow-symlink.ts 现在是死代码,后续可清理。

## What Bundle build 不再使用 `--external`,所有 `@uncaged/*` runtime 依赖全部打包进 `.esm.js`。 ## Why Bundle 应该完全自包含,只要 Node/Bun 版本不变,行为就稳定。 ## Changes - `workspace.ts` — 删除 `uncagedWorkflowExternals()` 和 `external` 参数 - `bundle-validator.ts` — 收紧 import 校验,只允许 Node built-ins - `skill.ts` — 更新文档 ## Follow-up `ensure-uncaged-workflow-symlink.ts` 现在是死代码,后续可清理。
xiaoju added 1 commit 2026-05-16 05:13:19 +00:00
- Remove uncagedWorkflowExternals() from scaffold build script
- Remove --external from Bun.build config
- Tighten bundle validator: only Node built-ins allowed, all deps must be inlined
- Update skill.ts documentation

Bundles are now deterministic — same Node/Bun version = same behavior,
no dependency resolution at runtime.
xiaomo approved these changes 2026-05-16 06:16:27 +00:00
xiaomo left a comment
Owner

LGTM 干净的简化——bundle 完全自包含,validator 收紧到只允许 node:* built-ins,逻辑一致。

LGTM ✅ 干净的简化——bundle 完全自包含,validator 收紧到只允许 node:* built-ins,逻辑一致。
xiaomo merged commit 3a26eb28e5 into main 2026-05-16 06:16:29 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#270