@ultimat3/schema 17.0.0 → 19.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CLAUDE.md CHANGED
@@ -50,18 +50,28 @@ first already owns, can never be routed to — so it is wrong for every input, a
50
50
  of the authoring file is the earliest honest place to say so.
51
51
 
52
52
  `SCHEMA_ERROR_CODES` in `errors.ts` is data, not a `registerErrorCodes()` call — this package is
53
- tier 0 and cannot import `@ultimat3/core` to reach it. `@ultimat3/core`'s `schema-error-codes.ts`
54
- carries a duplicate of these titles and registers them unconditionally, so every process gets the
55
- real titles just by importing core. Add a code here **and** update that duplicate in the same
56
- change — `schema-error-codes-pin.test.ts` in `@ultimat3/cli` fails the build if they disagree.
53
+ tier 0 and cannot import `@ultimat3/core` to reach it, and never will. `@ultimat3/core`'s
54
+ `schema-error-codes.ts` READS this object over the declared `core -> schema` edge and registers it
55
+ unconditionally, so every process gets the real titles just by importing core. **Adding a code here
56
+ is the whole edit `As of 2026-08-27`** — the title and its `terminal` retry classification are both
57
+ derived from this set, where they used to be a hand-kept duplicate in core plus a hand-written
58
+ retry list a fifth code would have been silently missing from.
57
59
 
58
60
  `ERROR_DOCS_URL` in `errors.ts` is the third deliberate tier-0 duplicate, beside `singleLine` and
59
61
  `ULTIMATE_ERROR_BRAND` — one URL, spelled out, because `SchemaError` cannot import
60
62
  `@ultimat3/core`'s constant. There is no per-code URL anywhere in the framework: codes live in
61
63
  `wiki/Error-Codes.md` as table ROWS and a table row has no anchor, so
62
64
  `https://ultimate.dev/errors/<code>` was a 404 on every error and was deleted `As of 2026-08-23`. Change it
63
- here and in `packages/core/src/error-codes.ts` in the same edit. **There is no pin test yet** —
64
- one belongs in `@ultimat3/cli` beside `single-line-pin.test.ts`, which may legally import both.
65
+ here and in `packages/core/src/error-codes.ts` in the same edit. **It is pinned `As of 2026-08-27`**
66
+ — `packages/core/src/single-line-pin.test.ts` asserts a `SchemaError`'s `docs` equals an
67
+ `UltimateError`'s, which was the one copy with no mechanical check at all and the one that decides
68
+ where every schema refusal sends its reader.
69
+
70
+ **These three are the whole of the duplication that remains, and the edge does not reach them.**
71
+ `core -> schema` was declared 2026-08-27 and collapsed five copies on the CORE side; `singleLine`,
72
+ `ERROR_DOCS_URL` and `ULTIMATE_ERROR_BRAND` go the other way, and `schema -> core` stays forbidden
73
+ on its merits — `t` is in every bundle graph an app has, so a dependency here is a dependency
74
+ everywhere.
65
75
 
66
76
  `MoneyValue` in `money-value.ts` — its own file, because it is the only builtin whose *shape* other
67
77
  packages alias — is the framework's **one** declaration of a money value. Tier 0 is
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@ultimat3/schema",
3
- "version": "17.0.0",
3
+ "version": "19.0.0",
4
4
  "description": "Ultimate's validation seam: Standard Schema interface, the t namespace, JSON Schema output",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
+ "sideEffects": false,
7
8
  "repository": {
8
9
  "type": "git",
9
10
  "url": "git+https://github.com/developerz-ai/ultimate.git",
@@ -24,7 +25,7 @@
24
25
  "LICENSE"
25
26
  ],
26
27
  "engines": {
27
- "bun": ">=1.3.0"
28
+ "bun": ">=1.4.0"
28
29
  },
29
30
  "scripts": {
30
31
  "typecheck": "tsc --noEmit -p tsconfig.json",
package/src/index.ts CHANGED
@@ -91,6 +91,7 @@ export {
91
91
  } from './standard';
92
92
  export type { Infer } from './t';
93
93
  export { t } from './t';
94
+ export { isIanaZoneName } from './time-zone-name';
94
95
  export type {
95
96
  NumberSchema,
96
97
  ObjectSchema,
@@ -1,8 +1,12 @@
1
- // Single responsibility: is a string an IANA zone NAME? Tier 0's second statement of the one rule
1
+ // Single responsibility: is a string an IANA zone NAME? TIER 0'S ONE STATEMENT of the rule
2
2
  // `@ultimat3/time` enforces everywhere above it — a zone is `Area/Location`, and `UTC` is the one
3
- // exception. It is stated a third time because `schema` is tier 0 and may import neither
4
- // `@ultimat3/time` nor `@ultimat3/core`; `packages/time/src/zone-canonical.ts` is where the rule
5
- // and its reasoning are written down.
3
+ // exception. `@ultimat3/core` imported its own copy of this predicate until 2026-08-27 and now
4
+ // re-exports this one, over the declared `core -> schema` edge.
5
+ //
6
+ // `@ultimat3/time`'s `canonicalTimeZone` is NOT a fourth copy and is deliberately left alone: it
7
+ // answers a different question (the canonical SPELLING, memoised over ~445 listed zones plus a
8
+ // probe cache) and shares only the leading-sign rule below. Collapsing it into this predicate
9
+ // would trade a cache a request header can hit for one it cannot.
6
10
 
7
11
  /**
8
12
  * A LEADING sign is a fixed offset, which carries no DST rules. `Etc/GMT+2` keeps its `+`.
@@ -22,10 +26,9 @@ const NUMERIC_OFFSET = /^[+-]/;
22
26
  * file enforces is that same rule at the EDGE: an identifier is `Area/Location`, `UTC` is the one
23
27
  * legal exception, and a leading sign is an offset rather than a name.
24
28
  *
25
- * `@ultimat3/core`'s `isIanaZoneName` is the same predicate for `app.config.ts`. Nothing below
26
- * tier 5 can compare the two, so `timezone-validator-pin.test.ts` in `@ultimat3/cli` is the
27
- * mechanical half — the arrangement `schema-error-codes-pin.test.ts` already uses for tier 0's
28
- * other deliberate duplicate.
29
+ * `@ultimat3/core` re-exports THIS function for `app.config.ts`, so the edge validator and the
30
+ * config validator are one predicate. They were two, held equal by a 123-line pin test in
31
+ * `@ultimat3/cli` that no rule required to exist.
29
32
  *
30
33
  * Of the three copies this is the one that guards CALLER input: `t.timezone` is a request body
31
34
  * field and a query parameter through `coerceQuery`, so the bare `new Intl.DateTimeFormat(…)`