feat(astro-seo-graph)!: drop Astro 5, require Astro 6 + zod 4#42
Merged
feat(astro-seo-graph)!: drop Astro 5, require Astro 6 + zod 4#42
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
peerDependencies.astro→^6.0.0(was^5.0.0 || ^6.0.0)dependencies.zod→^4.4.3(was^3.24.0)@jdevalk/astro-seo-graphto 2.0.0Closes 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 theirz.object({...})fromastro:content(zod 4). zod brands schemas with version-specific symbols → TS type errors, runtime working only by accident.After this PR,
pnpm why zod -rshows a single version across the workspace.Replaces #39 (which couldn't fix this without also dropping Astro 5).
Validation
.astrocomponents — onlycontent-helpers.ts, which uses core surface (z.object,z.string,z.enum,.min/.max/.optional/.default)Migration
pnpm add @jdevalk/astro-seo-graph@2— composition stops drifting@jdevalk/astro-seo-graph@1.4.1(bug fixes only, no new features)Test plan
🤖 Generated with Claude Code