Skip to content

Commit 0810656

Browse files
committed
docs(changeset): 更正 formatZodError 的实际到达面 (#4971 / #5341)
os validate / os build 的 schema 报错走 CLI 自己的格式化器;本包这份的 到达面是 defineStack 的抛错。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FTszibd6C8sUCCZnM4VcrL
1 parent 25a14a8 commit 0810656

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎.changeset/format-zod-error-union-branches.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ Action ref (1 issue):
1717

1818
while the same class of mistake on a plain `strictObject` rendered its full
1919
prescription. The prose was never lost — the REST error body and
20-
`ZodError.message` carry the payload through — but `formatZodError` is documented
21-
for, and used on, the CLI path (`os validate` / `os compile`), which is exactly
22-
where an author reads it. Every `strictObject` that sits inside a union was
23-
affected; `ActionRef` / `GuardRef` in `automation/state-machine.zod.ts` are the
24-
measured specimens, and the surface grows with each #4001 strictness batch.
20+
`ZodError.message` carry the payload through. What dropped it is every consumer
21+
that flattens to one line, and `formatZodError` is one: it is this package's
22+
documented CLI formatter and what `defineStack` throws through, so an author
23+
whose stack config has a union mistake reads it on every command that loads the
24+
stack. Every `strictObject` that sits inside a union was affected; `ActionRef` /
25+
`GuardRef` in `automation/state-machine.zod.ts` are the measured specimens, and
26+
the surface grows with each #4001 strictness batch.
2527

2628
The formatter now expands a failed union one level deeper:
2729

0 commit comments

Comments
 (0)