Skip to content

feat(astro-seo-graph): support Astro 7#61

Merged
jdevalk merged 2 commits into
jdevalk:mainfrom
chuckreynolds:feat/astro-7-peer-support
Jul 8, 2026
Merged

feat(astro-seo-graph): support Astro 7#61
jdevalk merged 2 commits into
jdevalk:mainfrom
chuckreynolds:feat/astro-7-peer-support

Conversation

@chuckreynolds

Copy link
Copy Markdown
Contributor

Fixes #58.

What

Widen the astro peer dependency of @jdevalk/astro-seo-graph from ^6.0.0 to ^6.0.0 || ^7.0.0 so the package installs without a peer-dependency warning under Astro 7.

Why it's safe (no runtime changes)

The integration is deliberately decoupled from Astro's type surface. It uses only:

  • the astro:config:setup and astro:build:done integration hooks (via narrow, self-defined interfaces rather than imported Astro types), and
  • import type { APIRoute } from 'astro' in the route factories.

None of those changed in Astro 7, so widening the range is all that's needed — nothing in the source touches an Astro 7 breaking change.

Verifying both majors

Rather than assert "should work," CI now runs the build, typecheck, and tests against both Astro 6 and 7 via a matrix. Because a pnpm workspace lockfile can only pin one astro version, the leg that isn't the lockfile baseline re-resolves astro and therefore installs with --no-frozen-lockfile; the devDependency is bumped to astro@^7 so the committed lockfile stays on the newest supported major.

Verified locally on both legs:

Astro build typecheck tests
6.4.8 493 passed
7.0.6 493 passed

Notes for the maintainer (easy to drop/adjust)

  • CI matrix + --no-frozen-lockfile. Testing two majors trades away the --frozen-lockfile integrity check on the alt leg — that's inherent to pinning one version in a workspace lockfile. If you'd rather keep the frozen check on the primary path, I'm happy to split it into a frozen baseline job (Astro 7) plus a separate --no-frozen Astro-6 compat job instead of a matrix.
  • Changeset is minor (adds support for a new Astro major). Flip it to patch if you'd prefer.
  • The matrix pins the latest of each major, not every minor.

Thanks for the library! Glad to adjust any of the above to match your preferences.

Widen the `astro` peer dependency to `^6.0.0 || ^7.0.0` so the
integration installs without a peer-dependency warning under Astro 7.
No runtime changes: only the stable `astro:config:setup` and
`astro:build:done` hooks and the `APIRoute` type are used, none of
which changed in Astro 7.

CI now runs build, typecheck, and tests against both Astro 6 and 7 via
a matrix. Bumps the devDependency to `astro@^7` as the lockfile baseline
and adds a changeset (minor).

Refs jdevalk#58
… leg

The matrix ran both Astro majors with --no-frozen-lockfile, which dropped
the committed lockfile's integrity check on every leg. Restore it on the
primary `check` job (frozen, Astro 7 = the committed lockfile) and move the
older major to a dedicated `astro6-compat` job that re-resolves astro@^6
with --no-frozen-lockfile.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@chuckreynolds

Copy link
Copy Markdown
Contributor Author

Yeah, keeping --frozen-lockfile on the primary gate is probably the better option... I went with the simpler single-job matrix but this is cleaner. Your call and all good either way. Still fixes #58 regardless. Thanks for jumping on it!

@jdevalk
jdevalk merged commit b7ac250 into jdevalk:main Jul 8, 2026
2 checks passed
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.

Astro 7 compatibility

2 participants