Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .agents/skills/triage/comment.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Generate a GitHub issue comment from triage findings.

**CRITICAL: You MUST always read `report.md` and produce a GitHub comment as your final output, regardless of what input files are available. Even if `report.md` is missing or empty, you must still produce a comment. In that case, produce a minimal comment stating that automated triage could not be completed.**

**SCOPE: Your job is comment generation only. Finish your work once you've completed this workflow. Do NOT go further than this. It is no longer time to attempt reproduction, diagnosis, or fixing of the issue.**
**SCOPE: Your job is comment generation only. Finish your work once you've completed this workflow. Do NOT go further than this. It is no longer time to attempt reproduction, diagnosis, or fixing of the issue. Do not spawn tasks/sub-agents.**

## Prerequisites

Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/triage/diagnose.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Find the root cause of a reproduced bug in the Astro source code.

**CRITICAL: You MUST always read `report.md` and append to `report.md` before finishing, regardless of outcome. Even if you cannot identify the root cause, hit errors, or the investigation is inconclusive — always update `report.md` with your findings. The orchestrator and downstream skills depend on this file to determine what happened.**

**SCOPE: Your job is diagnosis only. Finish your work once you've completed this workflow. Do NOT go further than this (no larger verification of the issue, no fixing of the issue, etc.).**
**SCOPE: Your job is diagnosis only. Finish your work once you've completed this workflow. Do NOT go further than this (no larger verification of the issue, no fixing of the issue, etc.). Do not spawn tasks/sub-agents.**

## Prerequisites

Expand Down
2 changes: 2 additions & 0 deletions .agents/skills/triage/fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Develop and verify a fix for a diagnosed Astro bug.

**CRITICAL: You MUST always read `report.md` and append to `report.md` before finishing, regardless of outcome. Even if the fix attempt fails, you encounter errors, or you cannot resolve the bug — always update `report.md` with your findings. The orchestrator and downstream skills depend on this file to determine what happened.**

**SCOPE: Do not spawn tasks/sub-agents.**

## Prerequisites

These variables are referenced throughout this skill. They may be passed as args by an orchestrator, or inferred from the conversation when run standalone.
Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/triage/reproduce.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Reproduce a GitHub issue to determine if a bug is valid and reproducible.

**CRITICAL: You MUST always read `report.md` and write `report.md` to the triage directory before finishing, regardless of outcome. Even if you encounter errors, cannot reproduce the bug, hit unexpected problems, or need to skip — always write `report.md`. The orchestrator and downstream skills depend on this file to determine what happened. If you finish without writing it, the entire pipeline fails silently.**

**SCOPE: Your job is reproduction only. Finish your work once you've completed this workflow. Do NOT go further than this (no larger diagnosis of the issue, no fixing of the issue, etc.).**
**SCOPE: Your job is reproduction only. Finish your work once you've completed this workflow. Do NOT go further than this (no larger diagnosis of the issue, no fixing of the issue, etc.). Do not spawn tasks/sub-agents.**

## Prerequisites

Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/triage/verify.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Verify whether a GitHub issue describes an actual bug or a misunderstanding of i

**CRITICAL: You MUST always read `report.md` and append to `report.md` before finishing, regardless of outcome. Even if you cannot reach a conclusion — always update `report.md` with your findings. The orchestrator and downstream skills depend on this file to determine what happened.**

**SCOPE: Your job is verification only. Finish your work once you've completed this workflow. Do NOT go further than this (no fixing of the issue, etc.).**
**SCOPE: Your job is verification only. Finish your work once you've completed this workflow. Do NOT go further than this (no fixing of the issue, etc.). Do not spawn tasks/sub-agents.**

## Prerequisites

Expand Down
41 changes: 41 additions & 0 deletions .changeset/thirty-experts-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
'@astrojs/node': major
---

Removes the `experimentalErrorPageHost` option

This option allowed fetching a prerendered error page from a different host than the server is currently running on.

However, there can be security implications with prefetching from other hosts, and often more customization was required to do this safely. This has now been removed as a built-in option so that you can implement your own secure solution as needed and appropriate for your project via middleware.

#### What should I do?

If you were previously using this feature, you must remove the option from your adapter configuration as it no longer exists:

```diff
// astro.config.mjs
import { defineConfig } from 'astro/config'
import node from '@astrojs/node'

export default defineConfig({
adapter: node({
mode: 'standalone',
- experimentalErrorPageHost: 'http://localhost:4321'
})
})
```

You can replicate the previous behavior by checking the response status in a middleware and fetching the prerendered page yourself:

```ts
// src/middleware.ts
import { defineMiddleware } from 'astro:middleware'

export const onRequest = defineMiddleware(async (ctx, next) => {
const response = await next()
if (response.status === 404 || response.status === 500) {
return fetch(`http://localhost:4321/${response.status}.html`);
}
return response
})
```
2 changes: 1 addition & 1 deletion .flue/sandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:24.13.1-bookworm-slim
FROM node:24.14.0-bookworm-slim

# Avoid interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ node_modules/
/triage/
/.compiler/
dist/
temp/
*.tsbuildinfo
.DS_Store
.vercel
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.13.1
24.14.0
2 changes: 1 addition & 1 deletion examples/basics/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/blog/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/container-with-vitest/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/framework-alpine/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/framework-multiple/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
4 changes: 2 additions & 2 deletions examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"solid-js": "^1.9.11",
"svelte": "^5.53.0",
"vue": "^3.5.28"
"svelte": "^5.53.5",
"vue": "^3.5.29"
}
}
2 changes: 1 addition & 1 deletion examples/framework-preact/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/framework-react/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/framework-solid/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/framework-svelte/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"dependencies": {
"@astrojs/svelte": "^8.0.0-beta.3",
"astro": "^6.0.0-beta.17",
"svelte": "^5.53.0"
"svelte": "^5.53.5"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"dependencies": {
"@astrojs/vue": "^6.0.0-beta.1",
"astro": "^6.0.0-beta.17",
"vue": "^3.5.28"
"vue": "^3.5.29"
}
}
2 changes: 1 addition & 1 deletion examples/hackernews/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/minimal/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/portfolio/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/ssr/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"@astrojs/node": "^10.0.0-beta.6",
"@astrojs/svelte": "^8.0.0-beta.3",
"astro": "^6.0.0-beta.17",
"svelte": "^5.53.0"
"svelte": "^5.53.5"
}
}
2 changes: 1 addition & 1 deletion examples/toolbar-app/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/with-markdoc/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/with-mdx/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/with-nanostores/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
2 changes: 1 addition & 1 deletion examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@astrojs/preact": "^5.0.0-beta.4",
"@nanostores/preact": "^1.0.0",
"astro": "^6.0.0-beta.17",
"nanostores": "^1.1.0",
"nanostores": "^1.1.1",
"preact": "^10.28.4"
}
}
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
4 changes: 2 additions & 2 deletions examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
},
"dependencies": {
"@astrojs/mdx": "^5.0.0-beta.9",
"@tailwindcss/vite": "^4.2.0",
"@tailwindcss/vite": "^4.2.1",
"@types/canvas-confetti": "^1.9.0",
"astro": "^6.0.0-beta.17",
"canvas-confetti": "^1.9.4",
"tailwindcss": "^4.2.0"
"tailwindcss": "^4.2.1"
}
}
2 changes: 1 addition & 1 deletion examples/with-vitest/.codesandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM node:24.13.1-bullseye
FROM node:24.14.0-bullseye
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"engines": {
"node": ">=22.12.0"
},
"packageManager": "pnpm@10.30.1",
"packageManager": "pnpm@10.30.3",
"dependencies": {
"astro-benchmark": "workspace:*"
},
Expand All @@ -64,22 +64,22 @@
"@biomejs/biome": "2.4.2",
"@changesets/changelog-github": "^0.5.2",
"@changesets/cli": "^2.29.8",
"@flue/cli": "^0.0.44",
"@flue/client": "^0.0.27",
"@flue/cli": "^0.0.47",
"@flue/client": "^0.0.29",
"@types/node": "^18.19.115",
"bgproc": "^0.2.0",
"esbuild": "0.25.5",
"eslint": "^9.39.2",
"eslint": "^9.39.3",
"eslint-plugin-regexp": "^3.0.0",
"knip": "5.82.1",
"only-allow": "^1.2.2",
"prettier": "^3.8.1",
"prettier-plugin-astro": "^0.14.1",
"publint": "^0.3.17",
"tinyglobby": "^0.2.15",
"turbo": "^2.8.10",
"turbo": "^2.8.11",
"typescript": "~5.9.3",
"typescript-eslint": "^8.56.0",
"typescript-eslint": "^8.56.1",
"valibot": "^1.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/astro-rss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"xml2js": "0.6.2"
},
"dependencies": {
"fast-xml-parser": "^5.3.7",
"fast-xml-parser": "^5.4.1",
"piccolore": "^0.1.3",
"zod": "^4.3.6"
}
Expand Down
13 changes: 0 additions & 13 deletions packages/integrations/node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,10 @@ export function getAdapter({ staticHeaders }: Pick<Options, 'staticHeaders'>): A
};
}

const protocols = ['http:', 'https:'];

export default function createIntegration(userOptions: UserOptions): AstroIntegration {
if (!userOptions?.mode) {
throw new AstroError(`Setting the 'mode' option is required.`);
}
const { experimentalErrorPageHost } = userOptions;
if (
experimentalErrorPageHost &&
(!URL.canParse(experimentalErrorPageHost) ||
!protocols.includes(new URL(experimentalErrorPageHost).protocol))
) {
throw new AstroError(
`Invalid experimentalErrorPageHost: ${experimentalErrorPageHost}. It should be a valid URL.`,
);
}

let _config: AstroConfig | undefined = undefined;
let _routeToHeaders: RouteToHeaders | undefined = undefined;
Expand Down Expand Up @@ -90,7 +78,6 @@ export default function createIntegration(userOptions: UserOptions): AstroIntegr
host: _config.server.host,
port: _config.server.port,
staticHeaders: userOptions.staticHeaders ?? false,
experimentalErrorPageHost,
}),
],
},
Expand Down
13 changes: 3 additions & 10 deletions packages/integrations/node/src/serve-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,15 @@ export function createAppHandler(app: BaseApp, options: Options): RequestHandler
// Read prerendered error pages directly from disk instead of fetching over HTTP.
// This avoids SSRF risks and is more efficient.
const prerenderedErrorPageFetch = async (url: string): Promise<Response> => {
if (url.includes('/404')) {
const { pathname } = new URL(url);
if (pathname.endsWith('/404.html') || pathname.endsWith('/404/index.html')) {
const response = await readErrorPageFromDisk(client, 404);
if (response) return response;
}
if (url.includes('/500')) {
if (pathname.endsWith('/500.html') || pathname.endsWith('/500/index.html')) {
const response = await readErrorPageFromDisk(client, 500);
if (response) return response;
}
// Fallback: if experimentalErrorPageHost is configured, fetch from there
if (options.experimentalErrorPageHost) {
const originUrl = new URL(options.experimentalErrorPageHost);
const errorPageUrl = new URL(url);
errorPageUrl.protocol = originUrl.protocol;
errorPageUrl.host = originUrl.host;
return fetch(errorPageUrl);
}
// No file found and no fallback configured - return empty response
return new Response(null, { status: 404 });
};
Expand Down
9 changes: 0 additions & 9 deletions packages/integrations/node/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@ export interface UserOptions {
* - The CSP header of the static pages is added when CSP support is enabled.
*/
staticHeaders?: boolean;

/**
* The host that should be used if the server needs to fetch the prerendered error page.
* If not provided, this will default to the host of the server. This should be set if the server
* should fetch prerendered error pages from a different host than the public URL of the server.
* This is useful for example if the server is behind a reverse proxy or a load balancer, or if
* static files are hosted on a different domain. Do not include a path in the URL: it will be ignored.
*/
experimentalErrorPageHost?: string | URL;
}

export interface Options extends UserOptions {
Expand Down
Loading