diff --git a/.changeset/readonly-flow-write-json-warning.md b/.changeset/readonly-flow-write-json-warning.md new file mode 100644 index 000000000..da016cade --- /dev/null +++ b/.changeset/readonly-flow-write-json-warning.md @@ -0,0 +1,11 @@ +--- +"@objectstack/cli": patch +--- + +fix(cli): include readonly flow-write warnings in `os validate --json` output + +The `readonlyWhen` flow-write advisory (`validateReadonlyFlowWrites`, #3465) was +printed in human mode but omitted from the `--json` summary's `warnings` array, +where every other advisory category is aggregated. `os validate --json` +consumers (CI, editors) therefore never saw those warnings. Added +`...readonlyWriteWarnings` to the summary array so JSON and human output agree. diff --git a/packages/cli/src/commands/validate.ts b/packages/cli/src/commands/validate.ts index 75a5a608b..bead03cf1 100644 --- a/packages/cli/src/commands/validate.ts +++ b/packages/cli/src/commands/validate.ts @@ -562,7 +562,7 @@ export default class Validate extends Command { valid: true, manifest: config.manifest, stats, - warnings: [...exprWarnings, ...widgetWarnings, ...actionRefWarnings, ...styleWarnings, ...jsxWarnings, ...capWarnings, ...flowReadinessWarnings, ...flowTemplateWarnings, ...securityAdvisories, ...capProviderWarnings], + warnings: [...exprWarnings, ...widgetWarnings, ...actionRefWarnings, ...styleWarnings, ...jsxWarnings, ...capWarnings, ...flowReadinessWarnings, ...flowTemplateWarnings, ...readonlyWriteWarnings, ...securityAdvisories, ...capProviderWarnings], conversions: conversionNotices, specVersionGap: specGap, duration: timer.elapsed(),