Commit 3cfc850
committed
Pin zod to v3 to unbreak docs build
@astrojs/sitemap@3.7.2 declared zod@^4.3.6 as a direct dep, and
zod-to-json-schema@3.25.2 (an astro transitive) accepts v3 or v4,
so npm hoisted zod@4 at the root. Vite's SSR bundler then resolved
"zod" to v4 during the docs build, which crashes Starlight's
HeadConfigSchema (written for zod v3's z.record() single-arg form)
with "Cannot read properties of undefined (reading '_zod')" while
rendering the 404 route.
- Pin @astrojs/sitemap to 3.7.0 (last zod-v3-compatible release);
later versions use v4-only syntax internally so we can't just
override zod for them.
- Add an "overrides" block to force zod@3.25.76 across the tree
so zod-to-json-schema stops hoisting v4.
- Sync regenerated docs changelog (incidental, produced by the
sync-changelog.mjs step in npm run build).
Note: dependabot PR #57 would bump sitemap to 3.7.1 and re-break
this. Close or ignore that PR.1 parent 2b5cc46 commit 3cfc850
3 files changed
Lines changed: 38 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
50 | 61 | | |
51 | 62 | | |
52 | 63 | | |
| |||
84 | 95 | | |
85 | 96 | | |
86 | 97 | | |
| 98 | + | |
87 | 99 | | |
88 | 100 | | |
89 | 101 | | |
| |||
0 commit comments