chore: internalize unused exports across all packages #283
Reference in New Issue
Block a user
Delete Branch "chore/audit-exports-cleanup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
从应用入口出发做可达性分析,收敛所有包的公共 API surface。只改
index.ts,不删源码。Why
大量内部实现细节暴露为公共 export,增加认知负担和 API 契约维护成本。
Method
按
package-api-auditskill 的方法论:从 Worker/CLI/Dashboard 应用入口出发,沿定制链做类型签名的可达性闭包,不可达的符号从index.ts移除。Changes (10 files, +32/-105)
Not Changed
workflow-protocol— downstream packages still import symbols via internal paths. Cleanup requires updatingworkflow-runtime/src/types.tsfirst (follow-up PR).Verification
bunx tsc --noEmitandbunx tsc --buildboth pass.Ref
Refs #273, #274, #275, #276, #277, #278, #279, #280, #281, #282
LGTM ✅ 9 个包的 export 收敛,只留公共 API,内部实现细节不再泄漏。runtime 改为直接从 protocol re-export 也为后续收窄 protocol 导出做好了准备。