Skip to content

Commit 7aea626

Browse files
os-zhuangclaude
andauthored
fix(cli): include readonly flow-write warnings in os validate --json (#3465 follow-up) (#3480)
`validateReadonlyFlowWrites` warnings (the `readonlyWhen` advisory added in #3465) were printed in human mode but left out of the `--json` summary's `warnings` array, where every other advisory category is aggregated. So `os validate --json` consumers (CI, editors) silently missed them. Add `...readonlyWriteWarnings` to the summary array so JSON and human output agree. Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent a41ba5c commit 7aea626

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@objectstack/cli": patch
3+
---
4+
5+
fix(cli): include readonly flow-write warnings in `os validate --json` output
6+
7+
The `readonlyWhen` flow-write advisory (`validateReadonlyFlowWrites`, #3465) was
8+
printed in human mode but omitted from the `--json` summary's `warnings` array,
9+
where every other advisory category is aggregated. `os validate --json`
10+
consumers (CI, editors) therefore never saw those warnings. Added
11+
`...readonlyWriteWarnings` to the summary array so JSON and human output agree.

packages/cli/src/commands/validate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ export default class Validate extends Command {
562562
valid: true,
563563
manifest: config.manifest,
564564
stats,
565-
warnings: [...exprWarnings, ...widgetWarnings, ...actionRefWarnings, ...styleWarnings, ...jsxWarnings, ...capWarnings, ...flowReadinessWarnings, ...flowTemplateWarnings, ...securityAdvisories, ...capProviderWarnings],
565+
warnings: [...exprWarnings, ...widgetWarnings, ...actionRefWarnings, ...styleWarnings, ...jsxWarnings, ...capWarnings, ...flowReadinessWarnings, ...flowTemplateWarnings, ...readonlyWriteWarnings, ...securityAdvisories, ...capProviderWarnings],
566566
conversions: conversionNotices,
567567
specVersionGap: specGap,
568568
duration: timer.elapsed(),

0 commit comments

Comments
 (0)