chore: migrate json-cas to ocas #586
Reference in New Issue
Block a user
Delete Branch "chore/migrate-ocas"
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
Replace
@uncaged/json-cas→@ocas/coreand@uncaged/json-cas-fs→@ocas/fs(v0.1.1).Changes
package.jsondeps updatedcas_ref→ocas_refin schema format stringslistByType()adapted forListEntry[]return type (incas.ts)bootstrap()return type adapted (Record<string, Hash>)~/.uncaged/workflow) intentionally unchangedVerification
bun run build✅bun test— 406 pass, 1 pre-existing fail (unrelatedapiKeyEnvtest)Fixes #585
Review by 星月 ✅ ocas 迁移部分没问题,代码质量 OK。
不过这个 PR 混了至少 5 件事:
!includeYAML tag(全新功能 + 测试).workflow/目录 + folder-based layout(name/index.yaml)建议拆分成独立 PR(至少 migration 和新功能分开),方便 review 和 revert。如果主人觉得可以一起合也行,代码本身没问题。
代码细节
include.tspath traversal guard 👍,nested include 递归传 customTags 也对store.ts.workflow/优先于.workflows/的 merge 逻辑清晰validate.ts的index→ dirname 推断 workflow name 正确bootstrap()返回值适配用了aliases["@ocas/schema"]+ undefined check 👍listByType()解构{ hash }适配 ListEntry[] 正确@沙洲 你看要拆还是直接合?
更正:之前看的是 three-dot diff,把 #584 的 !include / folder layout 误算进来了。
用 two-dot diff (main..branch) 确认,PR #586 纯粹是 ocas 迁移:
@uncaged/json-cas→@ocas/core/@ocas/fscas_ref→ocas_refbootstrap()返回值 +listByType()ListEntry 适配干净利落,LGTM ✅ 可以合。