fix: astro() marks all pipeline features as used#16899
Merged
Merged
Conversation
AstroHandler is the batteries-included handler that wires up every pipeline feature internally. Mark all PipelineFeatures bits at the top of handle() so the one-shot warnMissingFeatures check in BaseApp never fires a false positive when the first request short-circuits (e.g. a redirect route skips middleware).
🦋 Changeset detectedLatest commit: 4cece59 The changes in this PR will be included in the next version bump. This PR includes changesets to release 401 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
e18e dependency analysisNo dependency warnings found. |
ocavue
reviewed
May 28, 2026
Comment on lines
+73
to
+87
| /** | ||
| * All pipeline features — ORed together so `AstroHandler` can mark | ||
| * every feature as "used" in a single write. This prevents the | ||
| * one-shot `#warnMissingFeatures` check from emitting false positives | ||
| * when the first request short-circuits (e.g. a redirect) before | ||
| * every individual handler has had a chance to set its own bit. | ||
| */ | ||
| static #allFeatures = | ||
| PipelineFeatures.redirects | | ||
| PipelineFeatures.sessions | | ||
| PipelineFeatures.actions | | ||
| PipelineFeatures.middleware | | ||
| PipelineFeatures.i18n | | ||
| PipelineFeatures.cache; | ||
|
|
Contributor
There was a problem hiding this comment.
If in the future we add a new mask under PipelineFeatures, it seems that it's easy to forget to update this #allFeatures. Perhaps we can export this variable right next to the const PipelineFeatures definition in base-pipeline.ts?
// base-pipeline.ts
export const PipelineFeatures = {
redirects: 1 << 0,
sessions: 1 << 1,
actions: 1 << 2,
middleware: 1 << 3,
i18n: 1 << 4,
cache: 1 << 5,
} as const;
export const ALL_PIPELINE_FEATURES =
PipelineFeatures.redirects |
PipelineFeatures.sessions |
PipelineFeatures.actions |
PipelineFeatures.middleware |
PipelineFeatures.i18n |
PipelineFeatures.cache;
ematipico
approved these changes
May 29, 2026
Merged
ematipico
added a commit
that referenced
this pull request
Jun 2, 2026
* chore(deps): resolve peer dependency issues (#16894) * chore(deps): update eslint to v10 (#16896) * test(vercel): add per-test timeout and raise suite timeout (#16898) * chore: eliminate duplicate pnpm configurations (#16906) * Fix i18n redirectToDefaultLocale not working with prefixDefaultLocale (#16887) * fix(i18n): preserve ROUTE_TYPE_HEADER for i18n post-processing (#16800) * chore: move fix somewhere else * chore: update changeset --------- Co-authored-by: ematipico <estoppa@cloudflare.com> * feat(fonts): better bold fallbacks (#16908) * [ci] format * fix(docs): replace last occurrences of `withastro/adapters` (#16693) * fix: astro() marks all pipeline features as used (#16899) * fix: astro() marks all pipeline features as used AstroHandler is the batteries-included handler that wires up every pipeline feature internally. Mark all PipelineFeatures bits at the top of handle() so the one-shot warnMissingFeatures check in BaseApp never fires a false positive when the first request short-circuits (e.g. a redirect route skips middleware). * add changeset * move allFeatures mask to base-pipeline.ts per review * docs: fix typos in astro:i18n middleware JSDoc (#16574) * docs: fix outdated Partytown link (#16865) * chore(deps): update devalue (#16900) * Pre-bundle astro/fetch and astro/hono in Cloudflare optimizeDeps (#16914) ## Goal Eliminate the 'new dependencies optimized: astro/fetch' warning during dev in the Cloudflare adapter. The advanced routing feature (d69f858, #16366) introduced astro/fetch and astro/hono exports, and the Cloudflare handler entry points (01aa164, #16729) import from them — but neither commit added these to the optimizeDeps.include list. Vite discovers them at runtime and triggers a late re-optimization. ## Decisions - Added both astro/fetch and astro/hono: the Cloudflare adapter imports from both (hono.ts imports FetchState from astro/fetch, and astro/hono is used similarly). Pre-bundling both prevents the same issue for either entry point. ## Changes - packages/integrations/cloudflare/src/index.ts: added astro/fetch and astro/hono to the server environment optimizeDeps.include array, alongside the existing astro/app and astro/app/fetch/default-handler entries. * fix(node): serve prerendered pages with build.format 'file' and 'preserve' by passing extensions option to send (#16922) * [ci] format * chore(deps): update `pnpm/action-setup` to v6 (#16904) * chore(deps): update pnpm to v11.5.0 (#16903) * Fix 404 route resolution for experimental.advancedRouting with astro/hono handlers (#16911) Co-authored-by: Emanuele Stoppa <estoppa@cloudflare.com> Co-authored-by: Matthew Phillips <matthew@matthewphillips.info> * dedupe --------- Co-authored-by: ocavue <ocavue@users.noreply.github.com> Co-authored-by: btea <2356281422@qq.com> Co-authored-by: Houston (Bot) <108291165+astrobot-houston@users.noreply.github.com> Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev> Co-authored-by: Florian Lefebvre <florian-lefebvre@users.noreply.github.com> Co-authored-by: Armand Philippot <git@armand.philippot.eu> Co-authored-by: Matthew Phillips <matthewphillips@cloudflare.com> Co-authored-by: dfedoryshchev <64079946+dfedoryshchev@users.noreply.github.com> Co-authored-by: Andreas Deininger <andreas@deininger.net> Co-authored-by: Houston (Bot) <matthewp@users.noreply.github.com> Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
Merged
dadezzz
pushed a commit
to dadezzz/university_notes
that referenced
this pull request
Jun 6, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`6.4.2` → `6.4.3`](https://renovatebot.com/diffs/npm/astro/6.4.2/6.4.3) |  |  | --- ### Release Notes <details> <summary>withastro/astro (astro)</summary> ### [`v6.4.3`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#643) [Compare Source](https://github.com/withastro/astro/compare/astro@6.4.2...astro@6.4.3) ##### Patch Changes - [#​16900](withastro/astro#16900) [`17a0fbd`](withastro/astro@17a0fbd) Thanks [@​ocavue](https://github.com/ocavue)! - Bumps `devalue` dependency to v5.8.1 - [#​16016](withastro/astro#16016) [`0d85e1b`](withastro/astro@0d85e1b) Thanks [@​felmonon](https://github.com/felmonon)! - Fix a false positive in the dev toolbar accessibility audit for anchors with text inside closed `<details>` elements. - [#​16911](withastro/astro#16911) [`79c6c46`](withastro/astro@79c6c46) Thanks [@​astrobot-houston](https://github.com/astrobot-houston)! - Fixes a bug where `experimental.advancedRouting` with `astro/hono` handlers threw `TypeError: Cannot read properties of undefined (reading 'route')` for unmatched routes instead of rendering the custom 404 page. - [#​16899](withastro/astro#16899) [`239c469`](withastro/astro@239c469) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes a false "does not call the middleware() handler" warning when using `astro()` in a custom `src/app.ts` and the first request is a redirect route. - [#​16887](withastro/astro#16887) [`493acdb`](withastro/astro@493acdb) Thanks [@​astrobot-houston](https://github.com/astrobot-houston)! - Fixes `redirectToDefaultLocale` not working after the Advanced Routing refactoring. - [#​16908](withastro/astro#16908) [`ef53ab9`](withastro/astro@ef53ab9) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - Improves optimized fallbacks generation when using the Fonts API by using better metrics for bold variants </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMDUuMyIsInVwZGF0ZWRJblZlciI6IjQzLjIwNS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
AstroHandler.handle()now eagerly sets allPipelineFeaturesbits so the one-shotwarnMissingFeaturescheck never fires a false positive.astro()in a customsrc/app.tsand the first request is a redirect.Testing
astro()with middleware configured and asserts all feature bits are set.usedFeatures= 3, only redirects|sessions) and passes with it (63, all features).Docs