Skip to content

Commit b78c666

Browse files
committed
chore(changeset): word the caller-facing change as before -> after, as the sibling value narrowings do
Claude-Session: https://claude.ai/code/session_01N8TPEsoJxPsdSdNKGnNGEN Co-authored-by: Claude <noreply@anthropic.com>
1 parent 03580e7 commit b78c666

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

‎.changeset/20309-number-arm-numeric-string-grammar.md‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,20 @@ narrowing: a string that `Number()` reads as a finite number but the platform's
1313
numeric grammar does not is now refused with `400 VALIDATION_FAILED` /
1414
`invalid_number`. It used to be accepted.
1515

16-
**FROM → TO, and the one-line fix.** These strings, written to one of those
17-
fields, were accepted and are now refused, with nothing written:
16+
**What a caller sees, before → after.** One of these strings written to one of
17+
those fields: `201`, stored as sent (memory kept the string; SQLite kept
18+
`'0x10'` as TEXT and the others as numbers by column affinity) → `400
19+
VALIDATION_FAILED` with the field code `invalid_number`, nothing stored. The
20+
REST create, batch, update and updateMany routes all answer it, and `validate`
21+
(the dry run) predicts it. The forms:
1822

1923
- a radix literal: `'0x10'`, `'0X1A'`, `'0o17'`, `'0b101'`;
2024
- a whitespace-padded number: `' 12 '`, `'12\n'`, `'\t-3'`;
2125
- a spelling that is not a JSON number: `'+5'`, `'.5'`, `'5.'`, `'007'`.
2226

23-
Fix: send a JS number, or the number's plain JSON spelling — `'16'`, `'12'`,
24-
`'-3'`, `'5'`, `'0.5'`, `'7'`. `String(n)` of any finite number always
25-
qualifies, exponent forms included (`'1e-7'`, `'1e+21'`).
27+
The fix, when a write is refused: send a JS number, or the number's plain JSON
28+
spelling — `'16'`, `'12'`, `'-3'`, `'5'`, `'0.5'`, `'7'`. `String(n)` of any
29+
finite number always qualifies, exponent forms included (`'1e-7'`, `'1e+21'`).
2630

2731
## What was wrong
2832

0 commit comments

Comments
 (0)