Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
cb3f394
refactor: use environments to load modules (#14191)
ematipico Aug 7, 2025
c6a8ac8
refactor: make `App` more extensible using `BaseApp` (#14197)
ematipico Aug 11, 2025
c970fc4
refactor: App to extends the new BaseApp (#14213)
ematipico Aug 22, 2025
a9b4871
refactor: manifest as virtual module (#14298)
ematipico Sep 2, 2025
5df82a0
chore: resolve merging conflicts
ematipico Sep 3, 2025
c701fe4
chore: resolve merging conflicts
ematipico Sep 3, 2025
019336e
refactor: create generate when needed (#14303)
ematipico Sep 3, 2025
9ed7a3c
refactor: routes as virtual module (#14313)
ematipico Sep 8, 2025
ed90bcb
Merge branch 'main' into feat/environment-api
ascorbic Sep 8, 2025
2b17868
Lock
ascorbic Sep 8, 2025
5c41688
Use separate env to load content config (#14324)
ascorbic Sep 8, 2025
4a80ecf
fix: creation of routes list in build (#14325)
ematipico Sep 9, 2025
43b3ed5
refactor(dev): use entry point to bootstrap the app (#14333)
ematipico Sep 9, 2025
de4e76d
refactor(dev): expose dev app and entrypoint (#14337)
ematipico Sep 9, 2025
e168464
Add Cloudflare Vite plugin (#14309)
ascorbic Sep 9, 2025
a2e2965
refactor: dedicated `App` for astro server and for external servers (…
ematipico Sep 15, 2025
1e50d7d
Add support for content layer in env API (#14357)
ascorbic Sep 15, 2025
d5979c2
Add support for Cloudflare images binding in environment API (#14358)
ascorbic Sep 15, 2025
48197bb
Use imported Cloudflare handler in env API (#14360)
ascorbic Sep 15, 2025
b8ba777
Merge branch 'main' into feat/environment-api
ascorbic Sep 15, 2025
22b9c33
Dedupe
ascorbic Sep 15, 2025
77fdf98
Support framework components (#14382)
matthewp Sep 15, 2025
56718e0
Update vite plugin
ascorbic Sep 16, 2025
1a184bc
feat: add support for server islands in Environment API (#14390)
ascorbic Sep 16, 2025
f55775e
Merge branch 'main' into feat/environment-api
ascorbic Sep 16, 2025
dc345ca
Support HMR in Environment API (#14393)
ascorbic Sep 16, 2025
aa355a0
Fix unit tests for environment API (#14394)
ascorbic Sep 17, 2025
28b2f42
refactor: clean up dead code for env API (#14395)
ascorbic Sep 18, 2025
14dd565
Merge branch 'next' into feat/environment-api
ascorbic Sep 18, 2025
62051d5
Add draft changesets
ascorbic Sep 18, 2025
a545ca7
Merge branch 'next' into feat/environment-api
ascorbic Sep 24, 2025
ea1543a
lock
ascorbic Sep 24, 2025
d6caec8
feat: support for astro actions (#14478)
ematipico Oct 2, 2025
a2a07aa
feat: support i18n (#14486)
ematipico Oct 3, 2025
015e4e2
chore: add `astro:env` examples to cloudflare (#14534)
ematipico Oct 14, 2025
f91503f
chore: upgrade vite to v7 (#14535)
ematipico Oct 14, 2025
9d2b501
chore: handle invalidation of manifest (#14537)
ematipico Oct 14, 2025
492cc59
refactor: support devtoolbar (#14549)
ematipico Oct 16, 2025
74ddeaa
chore: fix regression in tests
ematipico Oct 16, 2025
974fdea
chore: add view transitions example (#14561)
ematipico Oct 17, 2025
082d47d
Merge remote-tracking branch 'origin/next' into feat/environment-api
ematipico Oct 20, 2025
5303c50
chore: fix rebase with next
ematipico Oct 20, 2025
f6b0a73
refactor: entrypoint DX (#14563)
ematipico Oct 20, 2025
1fcab24
environments: get images to build in fixture (#14599)
matthewp Oct 22, 2025
783daf6
refactor: support middleware in entrypoint (#14616)
ematipico Oct 28, 2025
714f755
refactor(sessions): import driver via vite plugin (#14632)
ematipico Oct 29, 2025
6c066d5
Get demo app deploying to Cloudflare (#14634)
matthewp Oct 29, 2025
05b8ff9
refactor(core): clean up of apps (#14637)
ematipico Oct 30, 2025
1f1e669
refactor: fonts (#14694)
ematipico Oct 31, 2025
7fcd225
feat: full sessions support w/ environment api (#14696)
matthewp Oct 31, 2025
21d819d
refactor: remove `getRunnableDevEnvironment` (#14705)
ematipico Oct 31, 2025
0834318
refactor: properly load and compute server island (#14742)
ematipico Nov 13, 2025
e58896e
Unify client/ssr builds using Vite environments (#14763)
matthewp Nov 14, 2025
e39f6a0
Only build client output if there are client scripts
matthewp Nov 15, 2025
20a3e6e
refactor: make styles working in dev (#14753)
ematipico Nov 17, 2025
3f217bc
fix: resolve environment-api build issues for client & CSS (#14770)
matthewp Nov 17, 2025
ce85e9c
Fixes CSS when both static/client styles exist (#14790)
matthewp Nov 17, 2025
326b568
remove unused getStylesForURL tests
matthewp Nov 17, 2025
536d4ba
fix: flag `serverLike` incorrectly computed (#14792)
ematipico Nov 17, 2025
36cae83
Merge branch 'next' into feat/environment-api
matthewp Nov 17, 2025
2c6bdd1
Merge branch 'feat/environment-api' of github.com:withastro/astro int…
matthewp Nov 17, 2025
96972be
Remove logger not used in next
matthewp Nov 17, 2025
dc2d9c3
Fix breaking unit tests
matthewp Nov 17, 2025
72d8329
Fix linting in vite-plugin-astro-server tests
matthewp Nov 17, 2025
c91fbc3
Use routeCache from the pipeline (#14794)
matthewp Nov 18, 2025
4ccf8e9
fix: redirects and i18n routing (#14797)
ematipico Nov 18, 2025
f3401fa
Always include the routeData in the prerender manifest for generation…
matthewp Nov 18, 2025
771832e
fix: logger level and static paths params (#14799)
ematipico Nov 18, 2025
e0f1ba3
Filter out SSR routes from prerender (#14802)
matthewp Nov 18, 2025
8a43add
Fix image tests crashing (#14803)
matthewp Nov 19, 2025
0ee8474
Environment api: use proper logger (#14805)
Princesseuh Nov 19, 2025
05070a2
Prevent duplication of client CSS (#14812)
matthewp Nov 19, 2025
ada0ece
fix(environment): Error overlay not working (#14816)
Princesseuh Nov 19, 2025
78cb18d
Move assets before generating pages (#14817)
matthewp Nov 19, 2025
8eee00d
fix: hashing of chunks (#14811)
ematipico Nov 20, 2025
23812d8
refactor: build and error handling (#14823)
ematipico Nov 20, 2025
5c7a32b
Fix before-hydration script emission for environment-api (#14818)
matthewp Nov 20, 2025
2e8fc0e
Merge branch 'next' into feat/environment-api
ematipico Nov 20, 2025
a51b0ce
fix rebase
ematipico Nov 20, 2025
44667ff
fix rebase v2
ematipico Nov 20, 2025
ce3313b
Merge remote-tracking branch 'refs/remotes/origin/feat/environment-ap…
ematipico Nov 20, 2025
00c1322
fix: node leak into content collections (#14820)
Princesseuh Nov 20, 2025
7df8925
fix: avoid `node:path` (#14827)
ematipico Nov 20, 2025
b91e282
Restore propagated styles injection for content collections (#14814)
matthewp Nov 20, 2025
85041e4
Fix API route tests (#14825)
matthewp Nov 20, 2025
e6477e6
test(css): ensure CSS modules are not duplicated in build output (#14…
hasegawa-101 Nov 20, 2025
c9b2e7a
Fix unit tests (#14832)
matthewp Nov 20, 2025
4ca3c28
Merge branch 'next' into feat/environment-api
matthewp Nov 20, 2025
93a77e0
Fix outdated lockfile
matthewp Nov 20, 2025
cebe38e
chore: don't enforce assist in PRs (#14849)
ematipico Nov 21, 2025
7ff6a8f
Remove non-sensical routing tests for format: file (#14835)
matthewp Nov 21, 2025
360a485
fix: server islands build (#14830)
ematipico Nov 21, 2025
921b10a
Fix astro-component-bundling tests (#14840)
matthewp Nov 21, 2025
b5165f8
Fix astro-component-bundling tests (#14837)
matthewp Nov 21, 2025
4d82cd4
Don't generate default routes (#14841)
matthewp Nov 21, 2025
96fdb52
Fix config alias by using resolve.alias config (#14828)
matthewp Nov 21, 2025
66dfdcd
fix: container and routing tests (#14852)
ematipico Nov 21, 2025
733ba46
fix: respect user vite config on sourcemaps (#14847)
Princesseuh Nov 21, 2025
4bd6145
fix: remove useless tests (#14854)
ematipico Nov 21, 2025
a947086
Fixes assetQueryParams and public folder tests (#14853)
matthewp Nov 21, 2025
1527b36
fix: renderError fallback (#14855)
ematipico Nov 21, 2025
dff3310
Fix server-islands data being used across tests (#14857)
matthewp Nov 21, 2025
2481df5
Prevent loading plugin-pages in build/pipeline (#14859)
matthewp Nov 21, 2025
30c610b
Remove prerender-chunks tests (#14860)
matthewp Nov 21, 2025
36e0bed
fix: incorrect configuration in tests (#14858)
ematipico Nov 21, 2025
86ad8e1
Fixes for tests in environment branch (#14865)
matthewp Nov 24, 2025
eef7bff
Fixes for e2e tests in environment branch (#14870)
matthewp Nov 24, 2025
4d3e8ff
fix(test): svelte async rendering (#14886)
Princesseuh Nov 24, 2025
e8aba4b
Remove virtual page module from importing renderers (#14885)
matthewp Nov 25, 2025
c0553c1
fix(cloudflare/vercel/netlify): some tests pass and excluded others (…
ematipico Nov 25, 2025
eb0fc87
Fixes for node integrations tests (#14900)
matthewp Nov 25, 2025
22518ac
Fix @astrojs/db tests (#14899)
matthewp Nov 26, 2025
dbb3e9f
feat(cloudflare): preview server (#14906)
ematipico Nov 26, 2025
3c86364
docs: add changesets for environment API refactor (#14915)
matthewp Nov 28, 2025
93095c4
fix(environment): Prevent Vite from interpreting injected sourcemap c…
Princesseuh Nov 28, 2025
3e172ef
Fix remaining cloudflare tests (#14912)
matthewp Nov 28, 2025
cf56296
Remove usage of augmentChunkHash (#14926)
matthewp Dec 1, 2025
82d9f37
fix(sourcemap): Avoid Vite's regex picking up generated sourceMappingURL
Princesseuh Dec 1, 2025
f6f3bf8
fix(vite): import mergeConfig from direct file to avoid dynamic impor…
Princesseuh Dec 1, 2025
922daf0
Fix astro:env tests in Cloudflare (#14925)
matthewp Dec 1, 2025
2d35ddb
Update .changeset/encoding-static-builds.md
matthewp Dec 3, 2025
a5eb3db
Update .changeset/route-data-breaking.md
matthewp Dec 3, 2025
1e75fb0
Update .changeset/ssr-manifest-breaking.md
matthewp Dec 3, 2025
0b0ddfd
Update .changeset/vite-environments-breaking.md
matthewp Dec 3, 2025
ba0db9c
Update .changeset/adapter-interface-breaking.md
matthewp Dec 3, 2025
58d51c3
Update .changeset/cloudflare-entrypoint-breaking.md
matthewp Dec 3, 2025
152e785
Update .changeset/cloudflare-entrypoint-breaking.md
matthewp Dec 3, 2025
0228984
Update .changeset/open-monkeys-boil.md
matthewp Dec 3, 2025
76e803d
Update .changeset/wet-lines-wear.md
matthewp Dec 3, 2025
592fbeb
Update .changeset/open-monkeys-boil.md
matthewp Dec 3, 2025
f188ba5
add titles to code samples
matthewp Dec 3, 2025
76210c6
Merge branch 'feat/environment-api' of github.com:withastro/astro int…
matthewp Dec 3, 2025
71d2382
Update .changeset/route-data-breaking.md
matthewp Dec 3, 2025
98144fb
refactor: optimise dependencies (#14951)
ematipico Dec 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: resolve merging conflicts
  • Loading branch information
ematipico committed Sep 3, 2025
commit 5df82a00f80c1053399d7589550712db340e9654
12 changes: 11 additions & 1 deletion packages/astro/src/core/render-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,16 @@ export type CreateRenderContext = Pick<
'pathname' | 'pipeline' | 'request' | 'routeData' | 'clientAddress'
> &
Partial<
Pick<RenderContext, 'locals' | 'middleware' | 'status' | 'props' | 'partial' | 'actions'>
Pick<
RenderContext,
| 'locals'
| 'middleware'
| 'status'
| 'props'
| 'partial'
| 'actions'
| 'shouldInjectCspMetaTags'
>
>;

export class RenderContext {
Expand Down Expand Up @@ -102,6 +111,7 @@ export class RenderContext {
props,
partial = undefined,
actions,
shouldInjectCspMetaTags,
}: CreateRenderContext): Promise<RenderContext> {
const pipelineMiddleware = await pipeline.getMiddleware();
const pipelineActions = actions ?? (await pipeline.getActions());
Expand Down
7 changes: 5 additions & 2 deletions packages/astro/src/vite-plugin-astro-server/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class DevApp extends BaseApp<DevPipeline> {
url.pathname = url.pathname.slice(0, -1);
}

let body: ArrayBuffer | undefined = undefined;
let body: BodyInit | undefined = undefined;
if (!(incomingRequest.method === 'GET' || incomingRequest.method === 'HEAD')) {
let bytes: Uint8Array[] = [];
await new Promise((resolve) => {
Expand Down Expand Up @@ -209,6 +209,7 @@ export class DevApp extends BaseApp<DevPipeline> {
routeData: route,
clientAddress: incomingRequest.socket.remoteAddress,
actions,
shouldInjectCspMetaTags: false,
});

let response;
Expand Down Expand Up @@ -275,6 +276,7 @@ export class DevApp extends BaseApp<DevPipeline> {
routeData: fourOhFourRoute.route,
clientAddress: incomingRequest.socket.remoteAddress,
status: 404,
shouldInjectCspMetaTags: false,
});
const component = await this.pipeline.preload(
fourOhFourRoute.route,
Expand Down Expand Up @@ -396,6 +398,7 @@ export class DevApp extends BaseApp<DevPipeline> {
clientAddress,
actions: await this.pipeline.getActions(),
status,
shouldInjectCspMetaTags: false,
});
renderContext.props.error = error;
const response = await renderContext.render(preloaded500Component);
Expand Down Expand Up @@ -449,7 +452,7 @@ type HandleRoute = {
matchedRoute: AsyncReturnType<typeof matchRoute>;
url: URL;
pathname: string;
body: ArrayBuffer | undefined;
body: BodyInit | undefined;
incomingRequest: http.IncomingMessage;
incomingResponse: http.ServerResponse;
};
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/vite-plugin-astro-server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export async function createSerializedManifest(
styleHashes: getStyleHashes(settings.config.experimental.csp),
styleResources: getStyleResources(settings.config.experimental.csp),
algorithm: getAlgorithm(settings.config.experimental.csp),
directives: getDirectives(settings.config.experimental.csp),
directives: getDirectives(settings),
isStrictDynamic: getStrictDynamic(settings.config.experimental.csp),
};
}
Expand Down