Upgrade to Astro v7 and widen dependabot astro group#57
Conversation
Astro and @astrojs/* packages share tight peer-dependency requirements (e.g. Starlight 0.41 requires Astro v7). Excluding major bumps from the astro group means a Starlight minor bump can land without the required Astro major bump, producing an incompatible dependency set that breaks the build (see run 29535495086: @astrojs/mdx 7 imports chunkToString which does not exist in astro v6). Include "major" in the astro group so the ecosystem upgrades together.
|
@copilot Upgrade this repo from Astro v6 to Astro v7 on this branch to unblock CI. Root cause: PR #54 bumped Please do:
Verify before pushing:
Do not modify anything under If Astro v7 introduces breaking changes that require content or component updates, list them in the PR description rather than silently rewriting docs. |
- Bump astro from ^6.4.8 to ^7.1.0 in package.json
- Downgrade js-yaml from ^5.x to ^4.1.0 to resolve runtime ESM default
import conflict (Starlight bundles js-yaml with a default import; at
prerender time Node.js was resolving to our v5 package which has no
default export — aligning both to v4 fixes this)
- Update src/utils/lsl-definitions.ts to use named import { load } from
'js-yaml' (cleaner regardless of version)
- Fix pnpm-workspace.yaml: remove placeholder allowBuilds stanza and
approve esbuild build scripts; add minimumReleaseAgeExclude for
astro@7.1.0 (added automatically by pnpm)
- Regenerate pnpm-lock.yaml
Verified:
pnpm install --frozen-lockfile ✓
pnpm astro check ✓ (0 errors)
pnpm build ✓ (3153 pages)
pnpm generate:docs ✓ (1050 function + 86 event + 2020 constant pages)
Done — Astro is now on v7.1.0. Commit: What was changed:
Non-obvious breaking change fixed: Verified locally:
|
Context
The most recent Dependabot PR (#54) bumped
@astrojs/starlightfrom 0.40.0 to 0.41.3. Starlight 0.41 dropped support for Astro v6 and requires v7. However,astrois still pinned to^6.4.8inpackage.json, so after that merge the transitive@astrojs/mdx@7.0.3fails to importchunkToStringfrom Astro's runtime and the build errors out:This PR
This PR contains only the Dependabot config change to prevent a recurrence: the
astrogroup now also acceptsmajorbumps, so Astro-ecosystem packages upgrade together in a single reviewable PR rather than fragmenting.The Astro v6 → v7 upgrade itself (and the required
pnpm-lock.yamlregeneration) will be added on top of this branch via the GitHub Copilot coding agent — see the follow-up comment on this PR.After merge
Once Astro is on v7 and CI is green, everything is unblocked and future Starlight / Astro moves will be grouped together.