Skip to content
Open
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
17 changes: 15 additions & 2 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,39 @@
"@astrojs/yaml2ts": "0.2.2"
},
"changesets": [
"adapter-interface-breaking",
"beige-clowns-read",
"busy-olives-chew",
"cloudflare-entrypoint-breaking",
"cuddly-worlds-beam",
"cyan-crews-cross",
"dark-chicken-sleep",
"deep-states-talk",
"dull-mangos-travel",
"encoding-static-builds",
"fast-bushes-fall",
"flat-lions-care",
"fresh-rocks-sing",
"giant-areas-press",
"good-camels-pull",
"green-garlics-heal",
"honest-deer-add",
"kind-pears-behave",
"open-monkeys-boil",
"pretty-forks-smash",
"puny-poems-create",
"rich-horses-begin",
"rich-tips-kick",
"route-data-breaking",
"sad-lines-hear",
"shy-cats-grin",
"six-women-visit",
"smooth-kids-tease",
"social-maps-shine",
"ssr-manifest-breaking",
"stale-ads-see",
"thin-hands-find",
"tricky-donkeys-camp",
"vite-environments-breaking",
"wet-lines-wear",
"wet-suits-help",
"whole-geckos-think",
"young-banks-camp"
Expand Down
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^6.0.0-alpha.0"
"astro": "^6.0.0-alpha.1"
}
}
4 changes: 2 additions & 2 deletions examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
},
"dependencies": {
"@astrojs/mdx": "^5.0.0-alpha.0",
"@astrojs/rss": "^4.0.13",
"@astrojs/rss": "^4.0.14",
"@astrojs/sitemap": "^3.6.0",
"astro": "^6.0.0-alpha.0",
"astro": "^6.0.0-alpha.1",
"sharp": "^0.34.3"
}
}
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^6.0.0-alpha.0"
"astro": "^6.0.0-alpha.1"
},
"peerDependencies": {
"astro": "^5.0.0 || ^6.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/container-with-vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/react": "^5.0.0-alpha.0",
"astro": "^6.0.0-alpha.0",
"astro": "^6.0.0-alpha.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"vitest": "^3.2.4"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"@astrojs/alpinejs": "^0.5.0-alpha.0",
"@types/alpinejs": "^3.13.11",
"alpinejs": "^3.15.0",
"astro": "^6.0.0-alpha.0"
"astro": "^6.0.0-alpha.1"
}
}
2 changes: 1 addition & 1 deletion examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@astrojs/vue": "^6.0.0-alpha.0",
"@types/react": "^18.3.26",
"@types/react-dom": "^18.3.7",
"astro": "^6.0.0-alpha.0",
"astro": "^6.0.0-alpha.1",
"preact": "^10.27.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@astrojs/preact": "^5.0.0-alpha.0",
"@preact/signals": "^2.3.2",
"astro": "^6.0.0-alpha.0",
"astro": "^6.0.0-alpha.1",
"preact": "^10.27.2"
}
}
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@astrojs/react": "^5.0.0-alpha.0",
"@types/react": "^18.3.26",
"@types/react-dom": "^18.3.7",
"astro": "^6.0.0-alpha.0",
"astro": "^6.0.0-alpha.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^6.0.0-alpha.0",
"astro": "^6.0.0-alpha.0",
"astro": "^6.0.0-alpha.1",
"solid-js": "^1.9.9"
}
}
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@astrojs/svelte": "^8.0.0-alpha.0",
"astro": "^6.0.0-alpha.0",
"astro": "^6.0.0-alpha.1",
"svelte": "^5.41.3"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@astrojs/vue": "^6.0.0-alpha.0",
"astro": "^6.0.0-alpha.0",
"astro": "^6.0.0-alpha.1",
"vue": "^3.5.22"
}
}
4 changes: 2 additions & 2 deletions examples/hackernews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/node": "^10.0.0-alpha.0",
"astro": "^6.0.0-alpha.0"
"@astrojs/node": "^10.0.0-alpha.1",
"astro": "^6.0.0-alpha.1"
}
}
2 changes: 1 addition & 1 deletion examples/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^6.0.0-alpha.0"
"astro": "^6.0.0-alpha.1"
},
"peerDependencies": {
"astro": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^6.0.0-alpha.0"
"astro": "^6.0.0-alpha.1"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^6.0.0-alpha.0"
"astro": "^6.0.0-alpha.1"
}
}
4 changes: 2 additions & 2 deletions examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"server": "node dist/server/entry.mjs"
},
"dependencies": {
"@astrojs/node": "^10.0.0-alpha.0",
"@astrojs/node": "^10.0.0-alpha.1",
"@astrojs/svelte": "^8.0.0-alpha.0",
"astro": "^6.0.0-alpha.0",
"astro": "^6.0.0-alpha.1",
"svelte": "^5.41.3"
}
}
2 changes: 1 addition & 1 deletion examples/starlog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^6.0.0-alpha.0",
"astro": "^6.0.0-alpha.1",
"sass": "^1.93.2",
"sharp": "^0.34.3"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/toolbar-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
},
"devDependencies": {
"@types/node": "^18.17.8",
"astro": "^6.0.0-alpha.0"
"astro": "^6.0.0-alpha.1"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^1.0.0-alpha.0",
"astro": "^6.0.0-alpha.0"
"astro": "^6.0.0-alpha.1"
}
}
2 changes: 1 addition & 1 deletion examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@astrojs/mdx": "^5.0.0-alpha.0",
"@astrojs/preact": "^5.0.0-alpha.0",
"astro": "^6.0.0-alpha.0",
"astro": "^6.0.0-alpha.1",
"preact": "^10.27.2"
}
}
2 changes: 1 addition & 1 deletion examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@astrojs/preact": "^5.0.0-alpha.0",
"@nanostores/preact": "^0.5.2",
"astro": "^6.0.0-alpha.0",
"astro": "^6.0.0-alpha.1",
"nanostores": "^0.11.4",
"preact": "^10.27.2"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@astrojs/mdx": "^5.0.0-alpha.0",
"@tailwindcss/vite": "^4.1.16",
"@types/canvas-confetti": "^1.9.0",
"astro": "^6.0.0-alpha.0",
"astro": "^6.0.0-alpha.1",
"canvas-confetti": "^1.9.3",
"tailwindcss": "^4.1.16"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^6.0.0-alpha.0",
"astro": "^6.0.0-alpha.1",
"vitest": "^3.2.4"
}
}
52 changes: 52 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,57 @@
# astro

## 6.0.0-alpha.1

### Major Changes

- [#14759](https://github.com/withastro/astro/pull/14759) [`d7889f7`](https://github.com/withastro/astro/commit/d7889f768a4d27e8c4ad3a0022099d19145a7d58) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Updates how schema types are inferred for content loaders with schemas (Loader API) - ([v6 upgrade guidance](https://deploy-preview-12322--astro-docs-2.netlify.app/en/guides/upgrade-to/v6/TODO:))

- [#14306](https://github.com/withastro/astro/pull/14306) [`141c4a2`](https://github.com/withastro/astro/commit/141c4a26419fe5bb4341953ea5a0a861d9b398c0) Thanks [@ematipico](https://github.com/ematipico)! - 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))

- [#14759](https://github.com/withastro/astro/pull/14759) [`d7889f7`](https://github.com/withastro/astro/commit/d7889f768a4d27e8c4ad3a0022099d19145a7d58) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Removes the option to define dynamic schemas in content loaders as functions and adds a new equivalent `createSchema()` property (Loader API) - ([v6 upgrade guidance](https://deploy-preview-12322--astro-docs-2.netlify.app/en/guides/upgrade-to/v6/TODO:))

- [#14306](https://github.com/withastro/astro/pull/14306) [`141c4a2`](https://github.com/withastro/astro/commit/141c4a26419fe5bb4341953ea5a0a861d9b398c0) Thanks [@ematipico](https://github.com/ematipico)! - 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))

- [#14758](https://github.com/withastro/astro/pull/14758) [`010f773`](https://github.com/withastro/astro/commit/010f7731becbaaba347da21ef07b8a410e31442a) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Removes the `setManifestData` method from `App` and `NodeApp` (Adapter API) - ([v6 upgrade guidance](https://deploy-preview-12322--astro-docs-2.netlify.app/en/guides/upgrade-to/v6/#removed-appsetmanifestdata-adapter-api))

- [#14826](https://github.com/withastro/astro/pull/14826) [`170f64e`](https://github.com/withastro/astro/commit/170f64e977290b8f9d316b5f283bd03bae33ddde) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Removes the `experimental.failOnPrerenderConflict` flag and replaces it with a new configuration option `prerenderConflictBehavior` - ([v6 upgrade guidance](https://deploy-preview-12322--astro-docs-2.netlify.app/en/guides/upgrade-to/v6/#experimental-flags))

- [#14923](https://github.com/withastro/astro/pull/14923) [`95a1969`](https://github.com/withastro/astro/commit/95a1969a05cc9c15f16dcf2177532882bb392581) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Deprecates `astro:schema` and `z` from `astro:content` in favor of `astro/zod` - ([v6 upgrade guidance](https://deploy-preview-12322--astro-docs-2.netlify.app/en/guides/upgrade-to/v6/#deprecated-astroschema-and-z-from-astrocontent))

- [#14306](https://github.com/withastro/astro/pull/14306) [`141c4a2`](https://github.com/withastro/astro/commit/141c4a26419fe5bb4341953ea5a0a861d9b398c0) Thanks [@ematipico](https://github.com/ematipico)! - 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))

- [#14306](https://github.com/withastro/astro/pull/14306) [`141c4a2`](https://github.com/withastro/astro/commit/141c4a26419fe5bb4341953ea5a0a861d9b398c0) Thanks [@ematipico](https://github.com/ematipico)! - 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))

- [#14306](https://github.com/withastro/astro/pull/14306) [`141c4a2`](https://github.com/withastro/astro/commit/141c4a26419fe5bb4341953ea5a0a861d9b398c0) Thanks [@ematipico](https://github.com/ematipico)! - 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))

### Minor Changes

- [#14306](https://github.com/withastro/astro/pull/14306) [`141c4a2`](https://github.com/withastro/astro/commit/141c4a26419fe5bb4341953ea5a0a861d9b398c0) Thanks [@ematipico](https://github.com/ematipico)! - 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.

- [#14826](https://github.com/withastro/astro/pull/14826) [`170f64e`](https://github.com/withastro/astro/commit/170f64e977290b8f9d316b5f283bd03bae33ddde) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Adds an option `prerenderConflictBehavior` to configure the behavior of conflicting prerendered routes

By default, Astro warns you during the build about any conflicts between multiple dynamic routes that can result in the same output path. For example `/blog/[slug]` and `/blog/[...all]` both could try to prerender the `/blog/post-1` path. In such cases, Astro renders only the [highest priority route](https://docs.astro.build/en/guides/routing/#route-priority-order) for the conflicting path. This allows your site to build successfully, although you may discover that some pages are rendered by unexpected routes.

With the new `prerenderConflictBehavior` configuration option, you can now configure this further:
- `prerenderConflictBehavior: 'error'` fails the build
- `prerenderConflictBehavior: 'warn'` (default) logs a warning and the highest-priority route wins
- `prerenderConflictBehavior: 'ignore'` silently picks the highest-priority route when conflicts occur

```diff
import { defineConfig } from 'astro/config';

export default defineConfig({
+ prerenderConflictBehavior: 'error',
});
```

## 6.0.0-alpha.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "astro",
"version": "6.0.0-alpha.0",
"version": "6.0.0-alpha.1",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
Expand Down
9 changes: 6 additions & 3 deletions packages/astro/src/core/app/dev/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,14 @@ export class DevPipeline extends Pipeline {

const importer = devCSSMap.get(routeData.component);
let css = new Set<ImportedDevStyle>();
if(importer) {
if (importer) {
const cssModule = await importer();
css = cssModule.css;
css = cssModule.css;
} else {
this.logger.warn('assets', `Unable to find CSS for ${routeData.component}. This is likely a bug in Astro.`);
this.logger.warn(
'assets',
`Unable to find CSS for ${routeData.component}. This is likely a bug in Astro.`,
);
}

// Pass framework CSS in as style tags to be appended to the page.
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ export {
deserializeRouteInfo,
serializeRouteData,
serializeRouteInfo,
deserializeManifest
deserializeManifest,
} from './manifest.js';
export { AppPipeline } from './pipeline.js';
9 changes: 7 additions & 2 deletions packages/astro/src/core/app/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ import type { AstroConfig, RouteData } from '../../types/public/index.js';
import type { RoutesList } from '../../types/astro.js';
import { decodeKey } from '../encryption.js';
import { NOOP_MIDDLEWARE_FN } from '../middleware/noop-middleware.js';
import type { RouteInfo, SerializedSSRManifest, SSRManifest, SerializedRouteInfo } from './types.js';

import type {
RouteInfo,
SerializedSSRManifest,
SSRManifest,
SerializedRouteInfo,
} from './types.js';

export function deserializeManifest(
serializedManifest: SerializedSSRManifest,
routesList?: RoutesList,
Expand Down
4 changes: 1 addition & 3 deletions packages/astro/src/core/app/validate-forwarded-headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ export function validateForwardedHeaders(
// Validate protocol
if (forwardedProtocol) {
if (allowedDomains && allowedDomains.length > 0) {
const hasProtocolPatterns = allowedDomains.some(
(pattern) => pattern.protocol !== undefined,
);
const hasProtocolPatterns = allowedDomains.some((pattern) => pattern.protocol !== undefined);
if (hasProtocolPatterns) {
// Validate against allowedDomains patterns
try {
Expand Down
6 changes: 3 additions & 3 deletions packages/astro/src/core/build/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ export class BuildApp extends BaseApp<BuildPipeline> {

async renderError(request: Request, options: RenderErrorOptions): Promise<Response> {
if (options.status === 500) {
if(options.response) {
return options.response;
if (options.response) {
return options.response;
}
throw options.error;
} else {
return super.renderError(request, {
...options,
prerenderedErrorPageFetch: undefined
prerenderedErrorPageFetch: undefined,
});
}
}
Expand Down
Loading