Skip to content

Commit bb39cf9

Browse files
committed
docs(spec): restore docblock ordering around the composeStacks warn helpers
The warn-helper insertion left `warnUncomposedStackKey`'s docblock attached to `warnedMalformedCollectionKeys`. Comment-only; no behaviour change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ehu85kbvMcrNTUJjwxvLJ9
1 parent 6a6713e commit bb39cf9

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

packages/spec/src/stack.zod.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,21 +1544,6 @@ function composeFunctions(
15441544
return { declared: true, value: merged };
15451545
}
15461546

1547-
const warnedUncomposedStackKeys = new Set<string>();
1548-
1549-
/**
1550-
* Report a top-level key that reached composition with no declared rule (#5005).
1551-
*
1552-
* The invariant this restores: composition is never silent about a key it did
1553-
* not know what to do with. It still composes the key by the default rule
1554-
* (arrays concatenate, everything else follows the single-value rule) so
1555-
* nothing is lost — but the NEXT top-level key someone adds without teaching
1556-
* `composeStacks` about it announces itself here, instead of being discovered
1557-
* by accident during unrelated work the way `server:` was.
1558-
*
1559-
* Warn-once per key, like the other authoring-time notices in this module.
1560-
* @internal
1561-
*/
15621547
const warnedMalformedCollectionKeys = new Set<string>();
15631548

15641549
/**
@@ -1581,6 +1566,21 @@ function warnMalformedCollectionKey(key: string): void {
15811566
);
15821567
}
15831568

1569+
const warnedUncomposedStackKeys = new Set<string>();
1570+
1571+
/**
1572+
* Report a top-level key that reached composition with no declared rule (#5005).
1573+
*
1574+
* The invariant this restores: composition is never silent about a key it did
1575+
* not know what to do with. It still composes the key by the default rule
1576+
* (arrays concatenate, everything else follows the single-value rule) so
1577+
* nothing is lost — but the NEXT top-level key someone adds without teaching
1578+
* `composeStacks` about it announces itself here, instead of being discovered
1579+
* by accident during unrelated work the way `server:` was.
1580+
*
1581+
* Warn-once per key, like the other authoring-time notices in this module.
1582+
* @internal
1583+
*/
15841584
function warnUncomposedStackKey(key: string, rule: ComposeDisposition): void {
15851585
if (warnedUncomposedStackKeys.has(key)) return;
15861586
warnedUncomposedStackKeys.add(key);

0 commit comments

Comments
 (0)