Unflag advanced routing by matthewp · Pull Request #16877 · withastro/astro · GitHub
Skip to content

Unflag advanced routing#16877

Merged
matthewp merged 9 commits into
nextfrom
unflag-advanced-routing
Jun 9, 2026
Merged

Unflag advanced routing#16877
matthewp merged 9 commits into
nextfrom
unflag-advanced-routing

Conversation

@matthewp

@matthewp matthewp commented May 27, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Removes the experimental.advancedRouting flag and enables the feature by default.
  • fetchFile is now a top-level config option (string | null, default 'fetch') instead of being nested under experimental.advancedRouting.
  • The vite plugin always resolves src/fetch.ts if present — no flag needed.
  • fetchFile: null disables the entrypoint.

RFC: withastro/roadmap#1344

Testing

  • No new tests. Existing tests continue to pass with the flag removed.

Docs

## Goal
Remove the experimental.advancedRouting flag and enable the feature by
default. Move fetchFile to a top-level config option.

RFC: withastro/roadmap#1344

## Decisions
- fetchFile becomes a top-level config option (string | null, default 'app')
  instead of being nested under experimental.advancedRouting. The boolean
  gate is gone — the vite plugin always resolves src/app.ts if it exists.
- Users who had experimental.advancedRouting: true can simply delete it.
- Users who had experimental.advancedRouting: { fetchFile: 'fetch.ts' }
  move to the top-level: fetchFile: 'fetch.ts'.

## Changes
- base.ts: Moved default and zod schema from experimental to top-level.
- config.ts: Moved type from experimental to top-level with JSDoc.
- vite-plugin.ts: Reads settings.config.fetchFile directly, removed
  advancedRoutingEnabled gate.
- Example config: Removed experimental block.
- reference/handlers.md: Removed experimental mention.
@changeset-bot

changeset-bot Bot commented May 27, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot added pkg: example Related to an example package (scope) pkg: astro Related to the core `astro` package (scope) docs pr labels May 27, 2026
The fixture has a src/app.ts that is a Vue app entrypoint, not an Astro
fetch handler. With advanced routing always enabled, it was being loaded
as the fetch handler, breaking the SSR test.
@github-actions github-actions Bot added pkg: vue Related to Vue (scope) pkg: integration Related to any renderer integration (scope) labels May 27, 2026
@github-actions github-actions Bot removed pkg: vue Related to Vue (scope) pkg: integration Related to any renderer integration (scope) labels May 27, 2026
@matthewp matthewp changed the title feat: unflag advanced routing Unflag advanced routing Jun 8, 2026
@matthewp matthewp marked this pull request as ready for review June 8, 2026 21:20
Comment thread packages/astro/src/types/public/config.ts Outdated
@github-actions github-actions Bot added the semver: major Change triggers a `major` release label Jun 8, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This PR is blocked because it contains a major changeset. A reviewer will merge this at the next release if approved.

@matthewp

matthewp commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Forgot to push the changeset, it's in 680835e

Co-authored-by: Armand Philippot <git@armand.philippot.eu>

@ArmandPhilippot ArmandPhilippot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A few nits regarding the configuration reference, and a suggestion to update the changeset.

Currently people on v6 are still using src/app.ts as entrypoint, so we might want to be more explicit and tell them they might need to rename the file or configure fetchFile.

Comment thread .changeset/seven-pots-begin.md Outdated
Comment thread packages/astro/src/types/public/config.ts Outdated
Comment thread packages/astro/src/types/public/config.ts
matthewp and others added 3 commits June 9, 2026 08:27
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

⚠️ Dependency Count

This PR adds 38 new dependencies (2157 → 2195), which exceeds the threshold of 10.

⚠️ Package Trust Level Decreased

Caution

Decreased trust levels may indicate a higher risk of supply chain attacks. Please review these changes carefully.

📦 Package 🔒 Before 🔓 After
@smithy/core trusted-with-provenance none
@smithy/fetch-http-handler trusted-with-provenance none
@smithy/signature-v4 trusted-with-provenance none
@smithy/credential-provider-imds trusted-with-provenance none

@ArmandPhilippot ArmandPhilippot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@matthewp matthewp merged commit 3b7d76e into next Jun 9, 2026
25 checks passed
@matthewp matthewp deleted the unflag-advanced-routing branch June 9, 2026 12:56
@astrobot-houston astrobot-houston mentioned this pull request Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs pr pkg: astro Related to the core `astro` package (scope) pkg: example Related to an example package (scope) semver: major Change triggers a `major` release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants