@cosmicdrift/kumiko-renderer-web 0.173.1 → 0.174.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-renderer-web",
3
- "version": "0.173.1",
3
+ "version": "0.174.0",
4
4
  "description": "Web-platform bindings for @cosmicdrift/kumiko-renderer. HTML default-primitives, browser history-based navigation, EventSource-backed live events, and a one-call createKumikoApp that mounts the whole stack via react-dom.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -16,9 +16,9 @@
16
16
  "./styles.css": "./src/styles.css"
17
17
  },
18
18
  "dependencies": {
19
- "@cosmicdrift/kumiko-dispatcher-live": "0.173.1",
20
- "@cosmicdrift/kumiko-headless": "0.173.1",
21
- "@cosmicdrift/kumiko-renderer": "0.173.1",
19
+ "@cosmicdrift/kumiko-dispatcher-live": "0.174.0",
20
+ "@cosmicdrift/kumiko-headless": "0.174.0",
21
+ "@cosmicdrift/kumiko-renderer": "0.174.0",
22
22
  "@radix-ui/react-dialog": "^1.1.15",
23
23
  "@radix-ui/react-dropdown-menu": "^2.1.16",
24
24
  "@radix-ui/react-label": "^2.1.8",
@@ -36,6 +36,17 @@ describe("parseIso", () => {
36
36
  expect(parseIso("0026-04-25")).toBeUndefined();
37
37
  expect(parseIso("26-04-25")).toBeUndefined();
38
38
  });
39
+
40
+ test("year above 9999 → undefined (Temporal.toString() would switch to signed extended ISO)", () => {
41
+ expect(parseIso("10000-04-25")).toBeUndefined();
42
+ expect(parseIso("999999-04-25")).toBeUndefined();
43
+ });
44
+
45
+ test("year 9999 is still accepted (upper boundary)", () => {
46
+ const d = parseIso("9999-04-25");
47
+ expect(d).toBeDefined();
48
+ expect(toIso(d as Temporal.PlainDate)).toBe("9999-04-25");
49
+ });
39
50
  });
40
51
 
41
52
  describe("toIso", () => {
@@ -80,6 +91,10 @@ describe("parseTypedDate", () => {
80
91
  if (d !== undefined) expect(toIso(d)).toBe("2026-04-25");
81
92
  });
82
93
 
94
+ test("six-digit year → undefined, not a signed extended-ISO wire value", () => {
95
+ expect(parseTypedDate("25.04.999999", "de-DE")).toBeUndefined();
96
+ });
97
+
83
98
  test("partial/invalid input → undefined", () => {
84
99
  expect(parseTypedDate("", "de-DE")).toBeUndefined();
85
100
  expect(parseTypedDate("25.04", "de-DE")).toBeUndefined();
@@ -37,7 +37,11 @@ export function parseIso(v: string): Temporal.PlainDate | undefined {
37
37
  Number.isNaN(d) ||
38
38
  // Reject 2-digit years — matches the pre-PlainDate behavior where
39
39
  // `new Date`'s 1900+y quirk made a round-trip check fail on them.
40
- y < 100
40
+ y < 100 ||
41
+ // Reject years outside 0000-9999 — Temporal.toString() switches to the
42
+ // signed extended ISO format above that range (e.g. "+010000-04-25"),
43
+ // breaking the "unchanged ISO string" wire contract (toIso below).
44
+ y > 9999
41
45
  ) {
42
46
  return undefined;
43
47
  }
@@ -106,6 +110,7 @@ export function parseTypedDate(input: string, locale: string): Temporal.PlainDat
106
110
  else d = val;
107
111
  });
108
112
  if (y < 100) y += 2000;
113
+ if (y > 9999) return undefined;
109
114
 
110
115
  return makePlainDate(y, m, d);
111
116
  }