Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .changeset/astro-seo-graph-2-0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@jdevalk/astro-seo-graph': major
---

**Breaking:** drop Astro 5 from peer deps; require Astro 6 and zod 4.

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

**What changed:**

- `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`).

**What didn't change:**

- The exported API surface (`<Seo>`, `createSchemaEndpoint`, `createSchemaMap`, `createApiCatalog`, `createMarkdownEndpoint`, `createIndexNowKeyRoute`, `seoSchema`, `imageSchema`, `buildAlternateLinks`, `breadcrumbsFromUrl`, `gitLastmod`, `aggregate`, `renderLlmsTxt`, `renderMarkdownAlternate`, all types) — all unchanged.
- Our zod usage is core surface only (`z.object`, `z.string`, `z.enum`, `.min`, `.max`, `.optional`, `.default`) — no zod 4-specific syntax.

**Migration:**

If you're already on Astro 6, install: `pnpm add @jdevalk/astro-seo-graph@2`. Your `seo` and `featureImage` collection fields will start composing without the silent type drift they had under 1.x.

If you're still on Astro 5, stay on `@jdevalk/astro-seo-graph@1.4.1`. The 1.x line gets bug fixes only — no new features ship to it.
4 changes: 2 additions & 2 deletions packages/astro-seo-graph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@
"test": "vitest run"
},
"peerDependencies": {
"astro": "^5.0.0 || ^6.0.0"
"astro": "^6.0.0"
},
"dependencies": {
"@jdevalk/seo-graph-core": "workspace:*",
"schema-dts": "^2.0.0",
"zod": "^3.24.0"
"zod": "^4.4.3"
},
"devDependencies": {
"@types/node": "^22.0.0",
Expand Down
17 changes: 6 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.