feat(astro-seo-graph): support Astro 7#61
Merged
Conversation
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
Closed
… 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>
Contributor
Author
|
Yeah, keeping |
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.
Fixes #58.
What
Widen the
astropeer dependency of@jdevalk/astro-seo-graphfrom^6.0.0to^6.0.0 || ^7.0.0so 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:
astro:config:setupandastro:build:doneintegration hooks (via narrow, self-defined interfaces rather than imported Astro types), andimport 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
astroversion, the leg that isn't the lockfile baseline re-resolvesastroand therefore installs with--no-frozen-lockfile; the devDependency is bumped toastro@^7so the committed lockfile stays on the newest supported major.Verified locally on both legs:
Notes for the maintainer (easy to drop/adjust)
--no-frozen-lockfile. Testing two majors trades away the--frozen-lockfileintegrity 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-frozenAstro-6 compat job instead of a matrix.minor(adds support for a new Astro major). Flip it topatchif you'd prefer.Thanks for the library! Glad to adjust any of the above to match your preferences.