Skip to content

Commit f8792c9

Browse files
committed
docs(changeset): declare the #19920 type narrowing as BREAKING minor, like #19919
The seat aligned this changeset with the #19919 precedent for the same defect class: level minor, `Clause-②: no (narrowing)`, the BREAKING banner for TypeScript code annotating the four aliases, and the ADR-0087 `not-required (no-migration-prescription)` disposition. The runtime accept set is unchanged; only TypeScript annotations narrow. Claude-Session: https://claude.ai/code/session_01Rjy9MeetSfq34PKn81CRiN Co-authored-by: Claude <noreply@anthropic.com>
1 parent cf12366 commit f8792c9

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
---
2-
'@objectstack/spec': patch
2+
'@objectstack/spec': minor
33
---
44

55
fix(spec): `InlineAction`, `ViewMetadataParsed`, `AssembledViewArtifact` and `AssembledViewArtifactParsed` name the shapes their TSDoc promises instead of being `unknown` (#19920)
66

7-
Clause-②: no
7+
Clause-②: no (narrowing)
88

9-
Types only. No schema, no parse and no export moves: every runtime accept set is unchanged, and so is the declared type of every schema. Four published type aliases were derived from a schema whose own static type erases to `unknown`, so any value type-checked against them. Each is now derived from the member schema the parse actually runs:
9+
**BREAKING for TypeScript code that annotates with `InlineAction`, `ViewMetadataParsed`, `AssembledViewArtifact` or `AssembledViewArtifactParsed`**: a narrowing of published TYPES, landing in the launch window as `minor` (the lockstep convention: the bump level is not the carrier, this banner and the disposition below are). The runtime accept set does not move at all: no schema, no parse and no export changes, and neither does the declared type of any schema.
10+
11+
Four published type aliases were derived from a schema whose own static type erases to `unknown`, so any value type-checked against them. Each is now derived from the member schema the parse actually runs:
1012

1113
- `InlineAction`: FROM `z.input<typeof InlineActionSchema>` (`unknown`, because the schema is a `z.preprocess` whose input is the preprocess function's `unknown` parameter) TO `z.input<(typeof InlineActionSchema)['out']>`, the input type of the picked action object.
1214
- `ViewMetadataParsed`: FROM `z.infer<typeof ViewMetadataSchema>` (`unknown`, because the union's members are cast to `z.ZodTypeAny` where it is built) TO the union of the OUTPUT types of `VIEW_METADATA_MEMBERS`, the same record `ViewMetadata` reads its input types from. `diagnoseViewMetadata` keeps returning the schema's own parse output as `data`; only that value's static type changes.
@@ -17,3 +19,5 @@ Types only. No schema, no parse and no export moves: every runtime accept set is
1719
The types are the members' declared shapes, not the schemas' verdicts. Each schema still accepts some bodies its type refuses (the preprocess folds and strips) and still refuses some bodies its type admits (refinements are not types), so the schema remains the only judge.
1820

1921
`JoinedReportBlock` is not changed by this change, and still resolves to `unknown`.
22+
23+
<!-- adr-0087: not-required (no-migration-prescription) Nothing an author writes moves — no spec key, no export and no stored row changes and every runtime accept set is unchanged, so `objectstack migrate meta` has nothing to reach — and only TypeScript annotations narrow, whose channel is the consumer's compiler. -->

0 commit comments

Comments
 (0)