Skip to content

Upgrade Astro to v7 to clear Dependabot alerts - #1

Merged
ashleylamont merged 1 commit into
mainfrom
chore/astro-7-security-upgrade
Jul 26, 2026
Merged

ashleylamont merged 1 commit into
mainfrom
chore/astro-7-security-upgrade

Conversation

@ashleylamont

Copy link
Copy Markdown
Owner

Bumps astro 5.3.0 → 7.1.3 and @astrojs/node 9.1.0 → 11.0.2, clearing all 27 open Dependabot advisories (SSRF, XSS, auth bypass, DoS, cache poisoning). Also bumps @astrojs/mdx 4.0.8 → 7.0.3 and @astrojs/check 0.9.4 → 0.9.9.

Target versions were taken from the first_patched_version field on each open alert rather than the advisory titles — the highest requirements were astro 7.1.0 and @astrojs/node 11.0.2.

Migration work required by the two major versions

  • Content Collections — the legacy API was removed in v6. src/content/config.ts moves to src/content.config.ts and all four collections (posts, nav, experience, links) now use glob() loaders. entry.render() → render(entry) and entry.slug → entry.id at the two call sites.
  • Zod 4 (bundled in Astro 7) dropped the z.oboolean() shorthand → z.boolean().
  • Sätteri is Astro 7's new default markdown processor, which would have silently dropped the custom inline-footnote remarkRehype handlers in astro.config.mjs. They now run through unified() from @astrojs/markdown-remark.

Verification

  • astro check — 0 errors, 0 warnings
  • astro build — clean
  • Local server smoke test — /, /posts, /posts/astrid, /experience, /about-me all 200, clean log
  • Inline-footnote markup confirmed present in rendered output
  • Same 4 prerendered routes as before, including /posts/astrid/ (the glob loader still honours the slug: frontmatter override)
  • bun install --frozen-lockfile verified from scratch in a clean dir, so the Docker build path is intact

Notes

  • @yeskunall/astro-umami declares peer astro: ^3 || ^4 || ^5 || ^6 — no v7 support. It only installs cleanly because the integration is currently commented out in the config. Re-enabling Umami will need an upstream release or a replacement.
  • Astro 6 dropped Node 18/20, so Node >= 22.12 is now required. Local Node 24 and the oven/bun image are fine; worth checking anything else in the deploy path.

Bumps astro 5.3.0 -> 7.1.3 and @astrojs/node 9.1.0 -> 11.0.2, which
clears all open Dependabot advisories (SSRF, XSS, auth bypass, DoS,
cache poisoning). Also bumps @astrojs/mdx and @astrojs/check.

Migration work required by the two major versions:

- Content Collections: the legacy API was removed in v6, so
  src/content/config.ts moves to src/content.config.ts and all four
  collections now use glob() loaders. entry.render() -> render(entry)
  and entry.slug -> entry.id at the two call sites.
- Zod 4 (bundled in Astro 7) dropped the z.oboolean() shorthand.
- Astro 7 defaults to the Satteri markdown processor, which would
  silently drop the custom inline-footnote remarkRehype handlers.
  They now run via unified() from @astrojs/markdown-remark.

Note: @yeskunall/astro-umami has no Astro 7 peer support. It still
installs because the integration is currently commented out, but
re-enabling it needs an upstream release. Astro 6 also dropped Node
18/20, so Node >= 22.12 is now required.
@ashleylamont
ashleylamont merged commit 9d500fa into main Jul 26, 2026
1 of 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.

1 participant