Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .changeset/adapter-interface-breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'astro': minor
---

Adds new optional properties to `setAdapter()` for adapter entrypoint handling in the Adapter API

**Changes:**
- New optional properties:
- `devEntrypoint?: string | URL` - specifies custom dev server entrypoint
- `entryType?: 'self' | 'legacy-dynamic'` - determines if the adapter provides its own entrypoint (`'self'`) or if Astro constructs one (`'legacy-dynamic'`, default)

**Migration:** Adapter authors can optionally add these properties to support custom dev entrypoints. If not specified, adapters will use the legacy behavior.
63 changes: 63 additions & 0 deletions .changeset/cloudflare-entrypoint-breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
'@astrojs/cloudflare': major
---

Changes the API for creating a custom `entrypoint`, replacing the `createExports()` function with a direct export pattern.

#### What should I do?

If you're using a custom `entryPoint` in your Cloudflare adapter config, update your existing worker file that uses `createExports()` to reflect the new, simplified pattern:


__my-entry.ts__

```ts
Copy link
Member

Choose a reason for hiding this comment

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

For clarity, can you add a title to this file (and the following)?

import type { SSRManifest } from 'astro';
import { App } from 'astro/app';
import { handle } from '@astrojs/cloudflare/handler'
import { DurableObject } from 'cloudflare:workers';

class MyDurableObject extends DurableObject<Env> {
constructor(ctx: DurableObjectState, env: Env) {
super(ctx, env)
}
}

export function createExports(manifest: SSRManifest) {
const app = new App(manifest);
return {
default: {
async fetch(request, env, ctx) {
await env.MY_QUEUE.send("log");
return handle(manifest, app, request, env, ctx);
},
async queue(batch, _env) {
let messages = JSON.stringify(batch.messages);
console.log(`consumed from our queue: ${messages}`);
}
} satisfies ExportedHandler<Env>,
MyDurableObject: MyDurableObject,
}
}
```

To create the same custom `entrypoint` using the updated API, export the following function instead:

__my-entry.ts__

```ts
Copy link
Member

Choose a reason for hiding this comment

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

Same file title here as the previous example

import { handle } from '@astrojs/cloudflare/utils/handler';

export default {
async fetch(request, env, ctx) {
await env.MY_QUEUE.send("log");
return handle(manifest, app, request, env, ctx);
},
async queue(batch, _env) {
let messages = JSON.stringify(batch.messages);
console.log(`consumed from our queue: ${messages}`);
}
} satisfies ExportedHandler<Env>,
```

The manifest is now created internally by the adapter.
5 changes: 5 additions & 0 deletions .changeset/encoding-static-builds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': major
---

Removes support for routes with percent-encoded percent signs (e.g. `%25`) - ([v6 upgrade guidance](https://deploy-preview-12322--astro-docs-2.netlify.app/en/guides/upgrade-to/v6/#removed-percent-encoding-in-routes))
7 changes: 7 additions & 0 deletions .changeset/flat-lions-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@astrojs/cloudflare': minor
---

Adds support for `astro preview` command
Copy link
Member

Choose a reason for hiding this comment

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

This one looks great!


Developers can now use `astro preview` to test their Cloudflare Workers application locally before deploying. The preview runs using Cloudflare's workerd runtime, giving you a staging environment that matches production exactly—including support for KV namespaces, environment variables, and other Cloudflare-specific features.
33 changes: 33 additions & 0 deletions .changeset/open-monkeys-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
'@astrojs/cloudflare': major
---

Development server now runs in workerd

`astro dev` now runs your Cloudflare application using Cloudflare's workerd runtime instead of Node.js. This means your development environment is now a near-exact replica of your production environment—the same JavaScript engine, the same APIs, the same behavior. You'll catch issues during development that would have only appeared in production, and features like Durable Objects, Workers Analytics Engine, and R2 bindings work exactly as they do on Cloudflare's platform.

To accommodate this major change to your development environment, this update includes breaking changes to `Astro.locals.runtime`, removing some of its properties.

#### What should I do?

Update occurrences of `Astro.locals.runtime` as shown below:

- `Astro.locals.runtime` no longer contains the `env` object. Instead, import it directly:
```js
import { env } from 'cloudflare:workers';
```

- `Astro.locals.runtime` no longer contains the `cf` object. Instead, access it directly from the request:
```js
Astro.request.cf
```

- `Astro.locals.runtime` no longer contains the `caches` object. Instead, use the global `caches` object directly:
```js
caches.default.put(request, response)
```

- `Astro.locals.runtime` object is replaced with `Astro.locals.cfContext` which contains the Cloudflare `ExecutionContext`:
```js
const cfContext = Astro.locals.cfContext;
```
5 changes: 5 additions & 0 deletions .changeset/route-data-breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': major
---

Removes `RouteData.generate` from the Integration API - ([v6 upgrade guidance](https://deploy-preview-12322--astro-docs-2.netlify.app/en/guides/upgrade-to/v6/#removed-routedatagenerate-adapter-api))
5 changes: 5 additions & 0 deletions .changeset/ssr-manifest-breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': major
---

Changes the shape of `SSRManifest` properties and adds several new required properties in the Adapter API - ([v6 upgrade guidance](https://deploy-preview-12322--astro-docs-2.netlify.app/en/guides/upgrade-to/v6/#changed-ssrmanifest-interface-structure-adapter-api))
5 changes: 5 additions & 0 deletions .changeset/vite-environments-breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': major
---

Changes integration hooks and HMR access patterns in the Integration API - ([v6 upgrade guidance](https://deploy-preview-12322--astro-docs-2.netlify.app/en/guides/upgrade-to/v6/#changed-integration-hooks-and-hmr-access-patterns-integration-api))
5 changes: 5 additions & 0 deletions .changeset/wet-lines-wear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': major
---

Removes the unused `astro:ssr-manifest` virtual module - ([v6 upgrade guidance](https://deploy-preview-12322--astro-docs-2.netlify.app/en/guides/upgrade-to/v6/#removed-astrossr-manifest-virtual-module-integration-api))
11 changes: 9 additions & 2 deletions benchmark/packages/adapter/src/server.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as fs from 'node:fs';
import type { SSRManifest } from 'astro';
import { App } from 'astro/app';
import { AppPipeline, BaseApp } from 'astro/app';

class MyApp extends App {
class MyApp extends BaseApp {
#manifest: SSRManifest | undefined;
constructor(manifest: SSRManifest, streaming = false) {
super(manifest, streaming);
Expand All @@ -19,6 +19,13 @@ class MyApp extends App {

return super.render(request);
}

createPipeline(streaming: boolean) {
return AppPipeline.create({
manifest: this.manifest,
streaming,
});
}
}

export function createExports(manifest: SSRManifest) {
Expand Down
2 changes: 1 addition & 1 deletion biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"assist": {
"actions": {
"source": {
"organizeImports": "on"
"organizeImports": "off"
}
}
},
Expand Down
9 changes: 8 additions & 1 deletion knip.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@ export default {
'test/types/**/*',
'e2e/**/*.test.js',
'test/units/teardown.js',
// Can't detect this file when using inside a vite plugin
'src/vite-plugin-app/createAstroServerApp.ts',
],
ignore: [
'**/e2e/**/{fixtures,_temp-fixtures}/**',
'performance/**/*',
// This export is resolved dynamically in packages/astro/src/vite-plugin-app/index.ts
'src/vite-plugin-app/createExports.ts',
],
ignore: ['**/e2e/**/{fixtures,_temp-fixtures}/**', 'performance/**/*'],
// Those deps are used in tests but only referenced as strings
ignoreDependencies: [
'rehype-autolink-headings',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"test:e2e:hosts": "turbo run test:hosted",
"benchmark": "astro-benchmark",
"lint": "biome lint && knip && eslint . --report-unused-disable-directives-severity=warn --concurrency=auto",
"lint:ci": "biome ci --formatter-enabled=false --reporter=github && eslint . --concurrency=auto --report-unused-disable-directives-severity=warn && knip",
"lint:ci": "biome ci --formatter-enabled=false --enforce-assist=false --reporter=github && eslint . --concurrency=auto --report-unused-disable-directives-severity=warn && knip",
"lint:fix": "biome lint --write --unsafe",
"publint": "pnpm -r --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --no-bail exec publint",
"version": "changeset version && node ./scripts/deps/update-example-versions.js && pnpm install --no-frozen-lockfile && pnpm run format",
Expand Down
62 changes: 62 additions & 0 deletions packages/astro/dev-only.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,65 @@ declare module 'virtual:astro:actions/options' {
declare module 'virtual:astro:actions/runtime' {
export * from './src/actions/runtime/client.js';
}

declare module 'virtual:astro:actions/entrypoint' {
import type { SSRActions } from './src/index.js';
export const server: SSRActions;
}

declare module 'virtual:astro:manifest' {
import type { SSRManifest } from './src/index.js';
export const manifest: SSRManifest;
}

declare module 'virtual:astro:routes' {
import type { RoutesList } from './src/types/astro.js';
export const routes: RoutesList[];
}

declare module 'virtual:astro:renderers' {
import type { AstroRenderer } from './src/index.js';
export const renderers: AstroRenderer[];
}

declare module 'virtual:astro:middleware' {
import type { AstroMiddlewareInstance } from './src/index.js';
const middleware: AstroMiddlewareInstance;
export default middleware;
}

declare module 'virtual:astro:session-driver' {
import type { Driver } from 'unstorage';
export const driver: Driver;
}

declare module 'virtual:astro:pages' {
export const pageMap: Map<string, () => Promise<any>>;
}

declare module 'virtual:astro:server-islands' {
export const serverIslandMap: Map<string, () => Promise<any>>;
}

declare module 'virtual:astro:adapter-entrypoint' {
export const createExports: ((manifest: any, args: any) => any) | undefined;
export const start: ((manifest: any, args: any) => void) | undefined;
export default any;
}

declare module 'virtual:astro:adapter-config' {
export const args: any;
export const exports: string[] | undefined;
export const adapterFeatures: any;
export const serverEntrypoint: string;
}

declare module 'virtual:astro:dev-css' {
import type { ImportedDevStyles } from './src/types/astro.js';
export const css: Set<ImportedDevStyles>;
}

declare module 'virtual:astro:dev-css-all' {
import type { ImportedDevStyles } from './src/types/astro.js';
export const devCSSMap: Map<string, () => Promise<{ css: Set<ImportedDevStyles> }>>;
}
2 changes: 1 addition & 1 deletion packages/astro/e2e/fixtures/client-only/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"solid-js": "^1.9.10",
"svelte": "^5.43.6",
"svelte": "^5.43.14",
"vue": "^3.5.24"
}
}
4 changes: 4 additions & 0 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
"./container": "./dist/container/index.js",
"./app": "./dist/core/app/index.js",
"./app/node": "./dist/core/app/node.js",
"./app/entrypoint": "./dist/core/app/entrypoint.js",
"./entrypoints/prerender": "./dist/entrypoints/prerender.js",
"./entrypoints/legacy": "./dist/entrypoints/legacy.js",
"./client/*": "./dist/runtime/client/*",
"./components": "./components/index.ts",
"./components/*": "./components/*",
Expand All @@ -59,6 +62,7 @@
"./assets": "./dist/assets/index.js",
"./assets/runtime": "./dist/assets/runtime.js",
"./assets/utils": "./dist/assets/utils/index.js",
"./assets/utils/node": "./dist/assets/utils/node.js",
"./assets/utils/inferRemoteSize.js": "./dist/assets/utils/remoteProbe.js",
"./assets/endpoint/*": "./dist/assets/endpoint/*.js",
"./assets/services/sharp": "./dist/assets/services/sharp.js",
Expand Down
5 changes: 3 additions & 2 deletions packages/astro/src/actions/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ export const RESOLVED_VIRTUAL_MODULE_ID = '\0' + VIRTUAL_MODULE_ID;
export const RUNTIME_VIRTUAL_MODULE_ID = 'virtual:astro:actions/runtime';
export const RESOLVED_RUNTIME_VIRTUAL_MODULE_ID = '\0' + RUNTIME_VIRTUAL_MODULE_ID;

export const ENTRYPOINT_VIRTUAL_MODULE_ID = 'virtual:astro:actions/entrypoint';
export const RESOLVED_ENTRYPOINT_VIRTUAL_MODULE_ID = '\0' + ENTRYPOINT_VIRTUAL_MODULE_ID;
export const ACTIONS_ENTRYPOINT_VIRTUAL_MODULE_ID = 'virtual:astro:actions/entrypoint';
export const ACTIONS_RESOLVED_ENTRYPOINT_VIRTUAL_MODULE_ID =
'\0' + ACTIONS_ENTRYPOINT_VIRTUAL_MODULE_ID;

/** Used to pass data from the config to the main virtual module */
export const OPTIONS_VIRTUAL_MODULE_ID = 'virtual:astro:actions/options';
Expand Down
18 changes: 0 additions & 18 deletions packages/astro/src/actions/loadActions.ts

This file was deleted.

17 changes: 8 additions & 9 deletions packages/astro/src/actions/vite-plugin-actions.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import type fsMod from 'node:fs';
import type { Plugin as VitePlugin } from 'vite';
import { addRollupInput } from '../core/build/add-rollup-input.js';
import type { BuildInternals } from '../core/build/internal.js';
import type { StaticBuildOptions } from '../core/build/types.js';
import { shouldAppendForwardSlash } from '../core/build/util.js';
import { getServerOutputDirectory } from '../prerender/utils.js';
import type { AstroSettings } from '../types/astro.js';
import {
ENTRYPOINT_VIRTUAL_MODULE_ID,
ACTIONS_ENTRYPOINT_VIRTUAL_MODULE_ID,
ACTIONS_RESOLVED_ENTRYPOINT_VIRTUAL_MODULE_ID,
OPTIONS_VIRTUAL_MODULE_ID,
RESOLVED_ENTRYPOINT_VIRTUAL_MODULE_ID,
RESOLVED_NOOP_ENTRYPOINT_VIRTUAL_MODULE_ID,
RESOLVED_OPTIONS_VIRTUAL_MODULE_ID,
RESOLVED_RUNTIME_VIRTUAL_MODULE_ID,
Expand All @@ -31,15 +30,15 @@ export function vitePluginActionsBuild(
return {
name: '@astro/plugin-actions-build',

options(options) {
return addRollupInput(options, [ENTRYPOINT_VIRTUAL_MODULE_ID]);
applyToEnvironment(environment) {
return environment.name === 'ssr';
},

writeBundle(_, bundle) {
for (const [chunkName, chunk] of Object.entries(bundle)) {
if (
chunk.type !== 'asset' &&
chunk.facadeModuleId === RESOLVED_ENTRYPOINT_VIRTUAL_MODULE_ID
chunk.facadeModuleId === ACTIONS_RESOLVED_ENTRYPOINT_VIRTUAL_MODULE_ID
) {
const outputDirectory = getServerOutputDirectory(opts.settings);
internals.astroActionsEntryPoint = new URL(chunkName, outputDirectory);
Expand Down Expand Up @@ -74,7 +73,7 @@ export function vitePluginActions({
return RESOLVED_OPTIONS_VIRTUAL_MODULE_ID;
}

if (id === ENTRYPOINT_VIRTUAL_MODULE_ID) {
if (id === ACTIONS_ENTRYPOINT_VIRTUAL_MODULE_ID) {
const resolvedModule = await this.resolve(
`${decodeURI(new URL('actions', settings.config.srcDir).pathname)}`,
);
Expand All @@ -84,7 +83,7 @@ export function vitePluginActions({
}

resolvedActionsId = resolvedModule.id;
return RESOLVED_ENTRYPOINT_VIRTUAL_MODULE_ID;
return ACTIONS_RESOLVED_ENTRYPOINT_VIRTUAL_MODULE_ID;
}
},
async configureServer(server) {
Expand All @@ -108,7 +107,7 @@ export function vitePluginActions({
return { code: 'export const server = {}' };
}

if (id === RESOLVED_ENTRYPOINT_VIRTUAL_MODULE_ID) {
if (id === ACTIONS_RESOLVED_ENTRYPOINT_VIRTUAL_MODULE_ID) {
return { code: `export { server } from ${JSON.stringify(resolvedActionsId)};` };
}

Expand Down
Loading