Skip to content

v0.9.0 — Polish, error codes, Vitest tests

Choose a tag to compare

@Rosalina7515 Rosalina7515 released this 18 May 15:31
· 2 commits to main since this release

What's new

Added

  • UMD-NNN error code system. Every script that can fail now emits a structured error with code, title, one-paragraph remedy, and docs link. ~20 codes covering detection, config, backup, visual regression, AST,
    profiles, substitution.
  • New reference: references/error-codes.md — full catalog.
  • New helpers: scripts/_errors.mjs (registry + makeError + didYouMean), scripts/_response.mjs (unified envelope: { ok, command, version, timestamp, payload | errors, warnings }).
  • "Did you mean?" suggestions for typo'd profile / brand / component names.
  • Vitest test suite in tests/ with config + 3 initial test files (errors, load-config, ast-extract). New scripts: npm test, npm run test:watch. CI runs tests on every push/PR.

Changed

  • scripts/load-config.mjs — now emits UMD-010 / UMD-011 / UMD-012 with structured details.
  • SKILL.md — points at references/error-codes.md for error handling.
  • .github/workflows/ci.yml — adds npm install + npm test steps.

新增

  • UMD-NNN 错误码体系。每个可能失败的脚本现在都发出结构化错误,含 code、title、一段补救、文档链接。约 20 个码,覆盖检测、配置、备份、视觉回归、AST、profile、替换。
  • 新增参考文档:references/error-codes.md —— 完整目录。
  • 新增辅助模块:scripts/_errors.mjs(注册表 + makeError + didYouMean)、scripts/_response.mjs(统一信封:{ ok, command, version, timestamp, payload | errors, warnings })。
  • "Did you mean?" 提示 —— profile / brand / 组件名拼错时给出最近匹配建议。
  • Vitest 测试套件:tests/ 含配置 + 3 个初始测试文件(errors、load-config、ast-extract)。新增脚本:npm testnpm run test:watch。CI 每次 push/PR 都跑测试。

改动

  • scripts/load-config.mjs —— 输出带结构化详情的 UMD-010 / UMD-011 / UMD-012 错误码。
  • SKILL.md —— 失败模式指向 references/error-codes.md
  • .github/workflows/ci.yml —— 加 npm install + npm test 步骤。