Skip to content

[pull] main from withastro:main - #682

Merged
pull[bot] merged 11 commits into
code:mainfrom
withastro:main
Aug 13, 2026
Merged

[pull] main from withastro:main#682
pull[bot] merged 11 commits into
code:mainfrom
withastro:main

Conversation

@pull

@pull pull Bot commented Aug 13, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

sapphi-red and others added 11 commits August 13, 2026 09:54
…hing (#17630)

* fix(build): avoid repeated content graph hashing

* chore: add incremental build changeset

* fix(build): hash incremental page graphs once

* test(build): cover shared graphs with integration tests

* test(build): update chunked content fixture path

---------

Co-authored-by: Matthew Phillips <matthewphillips@cloudflare.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Refactor request handling into a purely functional core

Replace the App/Pipeline god objects with pure functions drawing static
data from the manifest (the only permitted ambient source of truth):

- All internal handler classes (AstroHandler, PagesHandler, AstroMiddleware,
  CacheHandler, ActionHandler, I18n, Rewrites, TrailingSlashHandler, error
  handlers, session provider) are now module functions rooted in FetchState.
- FetchState constructs from (manifest, request, options?, hooks?); the
  public one-arg new FetchState(request) works from a bare Request by
  reaching the manifest module directly (ambient), with no app handle.
- Symbol.for('astro.app') and Symbol.for('astro.pipeline') are deleted;
  nothing static rides the request. Render options carry only render()
  inputs.
- Environment differences (prod SSR, dev runnable/non-runnable, build,
  container) are per-manifest RenderEnvironment records composed at
  entrypoint time; production is the zero-setup default.
- Process-lifetime derivations (route table, middleware, actions, session
  driver, cache provider, logger, renderers) are WeakMap memos keyed by
  the manifest in their owning modules.
- App and NodeApp remain public facades with unchanged signatures; every
  method delegates to the functional core. app.pipeline survives as a
  stateless compat shim. Pipeline base and all subclasses are deleted.
- Dev HMR route updates are now atomic (fixes stale-router split-brain).

No public API changes. All suites green: unit, full integration,
@astrojs/node, @astrojs/cloudflare (workerd), dev/HMR.

* Remove stray compiled artifacts of components/index.ts

* Make error-strategy switch exhaustive for lint

* Address review: user-facing changesets, standalone comments

Rewrites the three changesets to describe user-facing behavior instead of
internals, removes all references to internal planning documents from code
comments, and rewrites comments that described pre-refactor behavior to
describe how the code currently works.

* Add regression test for FetchState in a custom Cloudflare worker

Covers the documented advanced pattern from #17591: a custom wrangler
entryfile that builds its own state with `new FetchState(request)` from a
bare workerd request, serves assets through `cf()`, and renders with
`astro(state)`.

* Remove unused DefaultFetchHandler.renderWithOptions

The method had no callers — BaseApp.render constructs the FetchState
itself and generated builds only use the fetch member. Also rewrites the
constructor comment to describe the current contract.

* Remove AppPipeline and the app.pipeline property

The last surviving Pipeline: app.pipeline was undocumented, so the
stateless compat shim is gone entirely. The node adapter uses the new
public app.getLogger() to wait for the configured log destination, and
BuildApp carries the routeCache/getComponentByRoute accessors StaticPaths
needs across the prerender bundle boundary. The internal PipelineFeatures
bit flags are renamed to FetchFeatures, and @astrojs/node now requires
the astro version that ships app.getLogger().

* Memoize the resolved logger with createAsyncManifestMemo

Replaces resolveLoggerDestination's hand-rolled WeakMap with a
getResolvedLogger accessor built on the shared async manifest memo. The
derivation never rejects: a custom log destination that fails to load is
reported through the console logger and the request proceeds, instead of
failing the first request.

* Remove AppPipeline from the benchmark adapter

* Address review-bot findings in the dev request path

Reject the dev body-buffering promise on stream error so an aborted or
malformed upload surfaces through runWithErrorHandling instead of hanging
the request, and make DevFacadeApp.devMatch's pathname optional to match
the BaseApp contract.

* Ship the ambient-manifest stub in the publish tarball

The #astro-internal/ambient-manifest types condition points at the src
stub, which was not in the files list — nothing consults the path in the
published package today, but shipping the file keeps the condition
resolvable if a future declaration ever references the specifier.

* Clarify the type-only FetchState import comment

* Rewrite the RenderEnvironment doc comment in plain language

* Make NoManifestAvailableError a documented error with an actionable hint

* Update the FetchState no-manifest test for the new error message
@pull pull Bot locked and limited conversation to collaborators Aug 13, 2026
@pull pull Bot added the ⤵️ pull label Aug 13, 2026
@pull
pull Bot merged commit 2066f39 into code:main Aug 13, 2026
11 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants