Skip to content

feat(astro): Add Astro 6 support#19745

Merged
Lms24 merged 7 commits intodevelopfrom
lms/chore-astro-6
Mar 11, 2026
Merged

feat(astro): Add Astro 6 support#19745
Lms24 merged 7 commits intodevelopfrom
lms/chore-astro-6

Conversation

@Lms24
Copy link
Member

@Lms24 Lms24 commented Mar 10, 2026

This PR adjusts our Astro middleware to be compatible with Astro 6. It also adds an e2e test app for Astro 6 on the node adapter.

Changes:

  • Cleaned up peer dependency range in package.json
  • The middleware context object's properties changed. We need to access route manifest now via ctx.[Symbol.for('astro.pipeline')] instead of ctx.[Symbol.for('context.routes')]
  • For now, I skipped our server island tests because there's still a bug in Astro 6.0.2 which causes server islands not to work correctly. Once this is fixed (I subscribed to the issue), we should be able to re-enable the test without any fails 🤞

ref #19753

@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 2026

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.64 kB - -
@sentry/browser - with treeshaking flags 24.14 kB - -
@sentry/browser (incl. Tracing) 42.62 kB - -
@sentry/browser (incl. Tracing, Profiling) 47.28 kB - -
@sentry/browser (incl. Tracing, Replay) 81.42 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 71 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 86.12 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 98.37 kB - -
@sentry/browser (incl. Feedback) 42.45 kB - -
@sentry/browser (incl. sendFeedback) 30.31 kB - -
@sentry/browser (incl. FeedbackAsync) 35.36 kB - -
@sentry/browser (incl. Metrics) 26.92 kB - -
@sentry/browser (incl. Logs) 27.07 kB - -
@sentry/browser (incl. Metrics & Logs) 27.74 kB - -
@sentry/react 27.39 kB - -
@sentry/react (incl. Tracing) 44.95 kB - -
@sentry/vue 30.08 kB - -
@sentry/vue (incl. Tracing) 44.48 kB - -
@sentry/svelte 25.66 kB - -
CDN Bundle 28.27 kB - -
CDN Bundle (incl. Tracing) 43.5 kB - -
CDN Bundle (incl. Logs, Metrics) 29.13 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 44.34 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 68.2 kB - -
CDN Bundle (incl. Tracing, Replay) 80.32 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 81.22 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 85.86 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 86.76 kB - -
CDN Bundle - uncompressed 82.56 kB - -
CDN Bundle (incl. Tracing) - uncompressed 128.5 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 85.43 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 131.37 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 209.06 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 245.35 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 248.21 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 258.26 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 261.11 kB - -
@sentry/nextjs (client) 47.37 kB - -
@sentry/sveltekit (client) 43.07 kB - -
@sentry/node-core 52.27 kB +0.02% +6 B 🔺
@sentry/node 174.76 kB +0.01% +4 B 🔺
@sentry/node - without tracing 97.43 kB +0.02% +12 B 🔺
@sentry/aws-serverless 113.23 kB +0.01% +7 B 🔺

View base workflow run

@Lms24 Lms24 force-pushed the lms/chore-astro-6 branch from 6aa1cfe to 5ef38d1 Compare March 11, 2026 08:58
@Lms24 Lms24 mentioned this pull request Mar 11, 2026
@Lms24 Lms24 marked this pull request as ready for review March 11, 2026 11:07
@Lms24 Lms24 self-assigned this Mar 11, 2026
@Lms24 Lms24 requested review from a team, JPeer264, mydea and s1gr1d and removed request for a team and mydea March 11, 2026 11:16
@Lms24 Lms24 force-pushed the lms/chore-astro-6 branch from 46c4887 to 2ef1f2a Compare March 11, 2026 11:17
Copy link
Member

@JPeer264 JPeer264 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work thank you. Got 2 comments and there is 1 failing lint CI job

@Lms24 Lms24 changed the title fix(astro): Adjust Sentry middleware for Astro 6 feat(astro): Add Astro 6 support Mar 11, 2026
Co-authored-by: Jan Peer Stöcklmair <jan.peer@sentry.io>
// This handles the case where a previous handler disposed the client
// but the scope still holds a reference to it (e.g., alarm handlers in Durable Objects)
if (!currentClient || !currentClient.getTransport()) {
if (!currentClient?.getTransport()) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 failing lint CI job

This failed linting, unrelated to the actual PR. Gonna just add this to the PR to quickly fix this on develop.

@Lms24 Lms24 enabled auto-merge (squash) March 11, 2026 14:00
@Lms24 Lms24 merged commit cf44abc into develop Mar 11, 2026
57 checks passed
@Lms24 Lms24 deleted the lms/chore-astro-6 branch March 11, 2026 14:13
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.

2 participants