Avatar for the withastro user
withastro
astro
BlogDocsChangelog

Performance History

Latest Results

Fix SSR full reload failing to re-import astro:server-app with third-party Vite plugins (#17685) * fix: prefix astro:server-app with virtual: to prevent Vite URL normalization (#17684) Vite's ModuleGraph._resolveUrl() appends the resolved file extension to module URLs that don't start with `virtual:` or contain `\0`. This caused `astro:server-app` to become `astro:server-app.js` in the module graph, which then failed to resolve during SSR full reloads triggered by plugins like @tailwindcss/vite. Rename the virtual module ID from `astro:server-app` to `virtual:astro:server-app` to match the convention already used by `virtual:astro:app`. * Add changeset --------- Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
main
4 hours ago
[ci] release
changeset-release/main
9 hours ago
Add changeset
triagebot/fix-17684
9 hours ago
[ci] format
main
9 hours ago
Refactor internal request handling into a functional core (#17636) * 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
main
9 hours ago

Latest Branches

CodSpeed Performance Gauge
-17%
[ci] release#17691
1 year ago
71902b6
changeset-release/main
CodSpeed Performance Gauge
+20%
Fix SSR full reload failing to re-import astro:server-app with third-party Vite plugins#17685
9 hours ago
d8dd7c3
triagebot/fix-17684
CodSpeed Performance Gauge
0%
10 hours ago
bfce28c
NgoQuocViet2001:fix-pages-directory-boundary
© 2026 CodSpeed Technology
Home Terms Privacy Docs