Skip to content

feat(astro-seo-graph)!: drop Astro 5, require Astro 6 + zod 4#42

Merged
jdevalk merged 1 commit intomainfrom
chore/astro-seo-graph-2.0
May 6, 2026
Merged

feat(astro-seo-graph)!: drop Astro 5, require Astro 6 + zod 4#42
jdevalk merged 1 commit intomainfrom
chore/astro-seo-graph-2.0

Conversation

@jdevalk
Copy link
Copy Markdown
Owner

@jdevalk jdevalk commented May 6, 2026

Summary

  • peerDependencies.astro^6.0.0 (was ^5.0.0 || ^6.0.0)
  • dependencies.zod^4.4.3 (was ^3.24.0)
  • Bumps @jdevalk/astro-seo-graph to 2.0.0

Closes the silent dual-zod compatibility issue: Astro 5.x ships zod 3, Astro 6.x ships zod 4. We were shipping zod 3 as a runtime dep, so Astro 6 users had two zod versions in their tree and seoSchema(image)/imageSchema(image) produced zod 3 schemas that didn't compose cleanly with their z.object({...}) from astro:content (zod 4). zod brands schemas with version-specific symbols → TS type errors, runtime working only by accident.

After this PR, pnpm why zod -r shows a single version across the workspace.

Replaces #39 (which couldn't fix this without also dropping Astro 5).

Validation

  • ✅ Build clean across all 3 packages
  • ✅ Typecheck clean across all 3 packages
  • ✅ 473 tests pass (58 core + 153 scanner + 262 astro)
  • ✅ Prettier clean
  • ✅ Single zod version (4.4.3) post-install
  • ✅ No zod usage in .astro components — only content-helpers.ts, which uses core surface (z.object, z.string, z.enum, .min/.max/.optional/.default)

Migration

You're on Action
Astro 6 pnpm add @jdevalk/astro-seo-graph@2 — composition stops drifting
Astro 5 Stay on @jdevalk/astro-seo-graph@1.4.1 (bug fixes only, no new features)

Test plan

  • CI green on this branch
  • Visual review of the changeset wording before merge

🤖 Generated with Claude Code

BREAKING CHANGE: peerDependencies.astro is now ^6.0.0 (was ^5.0.0 ||
^6.0.0); dependencies.zod is now ^4.4.3 (was ^3.24.0).

Why: Astro 5.x ships zod 3 and Astro 6.x ships zod 4. Supporting both
meant shipping zod 3 as a runtime dep while Astro 6 users had zod 4
from astro:content. zod brands schemas with version-specific symbols,
so seoSchema(image)/imageSchema(image) returned zod 3 schemas that
couldn't compose cleanly into the user's z.object({...}) from
astro:content (zod 4) — composition produced TS type errors and only
worked at runtime by accident.

Validation:
- pnpm why zod -r now shows a single resolved version (4.4.3) across
  the workspace; the dual-zod-in-tree state is gone.
- Build, typecheck, tests (473 across 3 packages), and Prettier all
  green.
- Our zod usage is core surface only (z.object, z.string, z.enum,
  .min, .max, .optional, .default in content-helpers.ts; no zod 4-
  specific syntax). Verified no zod usage in .astro components.

Astro 5 users stay on 1.4.1 (bug fixes only, no new features).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jdevalk jdevalk merged commit a32a1d4 into main May 6, 2026
1 check passed
@jdevalk jdevalk deleted the chore/astro-seo-graph-2.0 branch May 6, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant