Skip to content

fix(plugin-astro): migrate to Astro 5#1020

Open
strlrd-29 wants to merge 1 commit into
oramasearch:mainfrom
strlrd-29:strlrd-29/astro-5-migration
Open

fix(plugin-astro): migrate to Astro 5#1020
strlrd-29 wants to merge 1 commit into
oramasearch:mainfrom
strlrd-29:strlrd-29/astro-5-migration

Conversation

@strlrd-29

@strlrd-29 strlrd-29 commented Mar 9, 2026

Copy link
Copy Markdown

Summary

  • Bump astro dependency and peerDependency from ^2 to ^5
  • Replace deprecated routes param with assets map in astro:build:done hook (deprecated in v5, removed in v6)
  • Remove RouteData import (deleted in Astro 5)
  • Fix pathMatcher test — Astro 5 provides pages[].pathname without leading /
  • Handle assets map values being strings at runtime (despite typed as URL[])
  • Update test sandbox for Astro 5: content collections with glob() loader, post.id instead of post.slug, render() instead of post.body

Supersedes #885 which only bumped versions without updating source/tests.

Fixes #882

Test plan

  • pnpm build passes for plugin-astro
  • pnpm test passes for plugin-astro (both integration tests green)
  • Tested manually against an Astro 5.18 project with prerendered pages

- Bump astro dep/peerDep from ^2 to ^5
- Replace deprecated `routes` param with `assets` map in astro:build:done hook
- Remove RouteData import (deleted in Astro 5)
- Fix pathMatcher test for Astro 5 pathname format (no leading /)
- Handle assets values being strings instead of URL objects
- Update test sandbox: Astro 5 content collections, post.id, render()

Fixes oramasearch#882

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@spuxx-dev

Copy link
Copy Markdown

This is great! Can we expect a merge & release soon?

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.

plugin-astro peer dependency astro

2 participants