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
7 changes: 7 additions & 0 deletions .changeset/csp-shiki-warning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'astro': patch
---

Reverts the support of Shiki with CSP. Unfortunately, after exhaustive tests, the highlighter can't be supported to cover all cases.

Adds a warning when both Content Security Policy (CSP) and Shiki syntax highlighting are enabled, as they are incompatible due to Shiki's use of inline styles
5 changes: 5 additions & 0 deletions .changeset/fix-ssr-prerendered-image-deletion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": patch
---

Fixes an issue where original (unoptimized) images from prerendered pages could be kept in the build output during SSR builds.
7 changes: 0 additions & 7 deletions .changeset/happy-frogs-glow.md

This file was deleted.

63 changes: 63 additions & 0 deletions .changeset/hot-eyes-sink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
'astro': minor
---

Adds a new experimental flag `queuedRendering` to enable a queue-based rendering engine

The new engine is based on a two-pass process, where the first pass
traverses the tree of components, emits an ordered queue, and then the queue is rendered.

The new engine does not use recursion, and comes with two customizable options.

Early benchmarks showed significant speed improvements and memory efficiency in big projects.

#### Queue-rendered based

The new engine can be enabled in your Astro config with `experimental.queuedRendering.enabled` set to `true`, and can be further customized with additional sub-features.

```js
// astro.config.mjs
export default defineConfig({
experimental: {
queuedRendering: {
enabled: true
}
}
})
```

#### Pooling

With the new engine enabled, you now have the option to have a pool of nodes that can be saved and reused across page rendering. Node pooling has no effect when rendering pages on demand (SSR) because these rendering requests don't share memory. However, it can be very useful for performance when building static pages.

```js
// astro.config.mjs
export default defineConfig({
experimental: {
queuedRendering: {
enabled: true,
poolSize: 2000 // store up to 2k nodes to be reused across renderers
}
}
});
```

#### Content caching

The new engine additionally unlocks a new `contentCache` option. This allows you to cache values of nodes during the rendering phase. This is currently a boolean feature with no further customization (e.g. size of cache) that uses sensible defaults for most large content collections:

When disabled, the pool engine won't cache strings, but only types.

```js
// astro.config.mjs
export default defineConfig({
experimental: {
queuedRendering: {
enabled: true,
contentCache: true // enable re-use of node values
}
}
});
```

For more information on enabling and using this feature in your project, see the [experimental queued rendering docs](https://v6.docs.astro.build/en/reference/experimental-flags/queued-rendering/) for more details.
26 changes: 25 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"better-redirect-error",
"big-cups-drive",
"big-forks-lead",
"big-jobs-make",
"big-laws-dig",
"bold-ghosts-sink",
"bright-parrots-hear",
Expand All @@ -63,19 +64,26 @@
"busy-actors-follow",
"busy-humans-smoke",
"busy-olives-chew",
"calm-bats-create",
"calm-birds-fly",
"chubby-tips-change",
"clean-planets-flow",
"clear-areas-cry",
"clear-route-cache-content",
"clever-clubs-listen",
"cloudflare-dev-styles",
"cloudflare-entrypoint-breaking",
"cloudflare-image-component",
"cloudflare-image-dev-fix",
"cloudflare-image-service-object",
"cloudflare-integration-wrangler",
"cloudflare-workerd-prerender",
"common-knives-rescue",
"common-signs-punch",
"csp-shiki-warning",
"cuddly-worlds-beam",
"custom-prerenderer-api",
"cute-suns-check",
"cyan-crews-cross",
"dance-ornate-keen",
"deep-states-talk",
Expand All @@ -95,20 +103,25 @@
"famous-trees-tan",
"fancy-bananas-sing",
"fast-bushes-fall",
"fast-wolves-render",
"fifty-dingos-study",
"fix-content-hmr",
"fix-create-astro-registry-hang",
"fix-font-head-swap",
"fix-forwarded-proto-allowed-domains",
"fix-large-static-routes-stack-overflow",
"fix-markdoc-table-attributes",
"fix-mdx-slot-hydration",
"fix-preact-cloudflare-hooks",
"fix-rewrite-non-ascii-paths",
"fix-serve-files-outside-srcdir",
"fix-ssr-prerendered-image-deletion",
"fix-store-race-condition",
"fix-vite-runner-closed",
"flat-lions-care",
"flat-symbols-arrive",
"floppy-bottles-notice",
"floppy-cases-hug",
"fluffy-pets-greet",
"fluffy-shrimps-drop",
"four-insects-tan",
Expand All @@ -119,23 +132,28 @@
"full-poems-divide",
"funny-planes-lick",
"giant-areas-press",
"giant-bananas-sit",
"good-camels-pull",
"good-clubs-cover",
"great-nails-brake",
"green-garlics-heal",
"green-plants-act",
"green-zebras-lick",
"grumpy-tables-serve",
"happy-frogs-glow",
"heavy-beers-unite",
"heavy-cats-own",
"heavy-parts-throw",
"helpful-runtime-errors",
"hojze-jglnm-ggfbv",
"honest-deer-add",
"hot-eyes-sink",
"hungry-jars-pump",
"icy-pigs-smile",
"internal-helpers-normalize-pathname",
"itchy-ghosts-flow",
"jolly-dots-shop",
"khaki-bushes-stop",
"khaki-toys-think",
"kind-emus-relate",
"kind-pears-behave",
"large-ears-ask",
Expand Down Expand Up @@ -164,6 +182,7 @@
"open-days-watch",
"open-monkeys-boil",
"optional-wrangler-config",
"orange-boats-refuse",
"polite-terms-shop",
"pretty-forks-smash",
"proud-pans-change",
Expand All @@ -182,8 +201,10 @@
"rich-horses-begin",
"ripe-nights-feel",
"route-data-breaking",
"rust-compiler-experimental",
"sad-lines-hear",
"sad-teams-end",
"server-island-slot-scripts",
"short-pears-hammer",
"shy-cats-grin",
"silly-eels-remain",
Expand Down Expand Up @@ -213,9 +234,11 @@
"swift-planets-swim",
"tall-needles-cross",
"tall-worms-live",
"tame-lemons-probe",
"tangy-days-wink",
"tangy-tables-jog",
"tangy-years-grin",
"ten-numbers-rush",
"tender-bats-tan",
"tender-moose-help",
"thin-hands-find",
Expand All @@ -225,6 +248,7 @@
"tricky-donkeys-camp",
"true-bats-punch",
"true-dingos-attack",
"twenty-signs-brush",
"upset-dodos-rhyme",
"vite-environments-breaking",
"vite-plugin-react-v5",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/server-island-slot-scripts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes a case where `<script>` tags from components passed as slots to server islands were not included in the response
5 changes: 5 additions & 0 deletions .changeset/smart-mammals-stop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/cloudflare': patch
---

Restore and fix `<Code />` component functionality on Cloudflare Workers.
2 changes: 1 addition & 1 deletion .github/workflows/continuous_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
shard: [ "1/4","2/4", "3/4", "4/4" ]
shard: [ "1/4", "2/4", "3/4", "4/4" ]
permissions:
contents: read
pull-requests: write
Expand Down
2 changes: 1 addition & 1 deletion benchmark/packages/adapter/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function createIntegration(): AstroIntegration {
setAdapter({
name: '@benchmark/adapter',
serverEntrypoint: '@benchmark/adapter/server.js',
exports: ['manifest', 'createApp'],
exports: ['manifest', 'createApp', 'App'],
supportedAstroFeatures: {
serverOutput: 'stable',
envGetSecret: 'experimental',
Expand Down
2 changes: 2 additions & 0 deletions benchmark/packages/adapter/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,7 @@ export function createExports(manifest: SSRManifest) {
return {
manifest,
createApp: (streaming: boolean) => new MyApp(manifest, streaming),
// Export App class directly for benchmarks that need to pass custom manifests
App: MyApp,
};
}
2 changes: 1 addition & 1 deletion benchmark/static-projects/build-hybrid/astro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import node from '@astrojs/node';
export default defineConfig({
adapter: node({
mode: 'standalone',
}),
})
});
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^6.0.0-beta.14"
"astro": "^6.0.0-beta.15"
}
}
4 changes: 2 additions & 2 deletions examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
},
"dependencies": {
"@astrojs/mdx": "^5.0.0-beta.8",
"@astrojs/rss": "^4.0.15-beta.3",
"@astrojs/rss": "^4.0.15-beta.4",
"@astrojs/sitemap": "^3.6.1-beta.3",
"astro": "^6.0.0-beta.14",
"astro": "^6.0.0-beta.15",
"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 @@ -18,7 +18,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^6.0.0-beta.14"
"astro": "^6.0.0-beta.15"
},
"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 @@ -15,7 +15,7 @@
},
"dependencies": {
"@astrojs/react": "^5.0.0-beta.3",
"astro": "^6.0.0-beta.14",
"astro": "^6.0.0-beta.15",
"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 @@ -16,6 +16,6 @@
"@astrojs/alpinejs": "^0.5.0-beta.1",
"@types/alpinejs": "^3.13.11",
"alpinejs": "^3.15.8",
"astro": "^6.0.0-beta.14"
"astro": "^6.0.0-beta.15"
}
}
6 changes: 3 additions & 3 deletions examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/preact": "^5.0.0-beta.3",
"@astrojs/preact": "^5.0.0-beta.4",
"@astrojs/react": "^5.0.0-beta.3",
"@astrojs/solid-js": "^6.0.0-beta.2",
"@astrojs/svelte": "^8.0.0-beta.2",
"@astrojs/svelte": "^8.0.0-beta.3",
"@astrojs/vue": "^6.0.0-beta.1",
"@types/react": "^18.3.28",
"@types/react-dom": "^18.3.7",
"astro": "^6.0.0-beta.14",
"astro": "^6.0.0-beta.15",
"preact": "^10.28.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
4 changes: 2 additions & 2 deletions examples/framework-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/preact": "^5.0.0-beta.3",
"@astrojs/preact": "^5.0.0-beta.4",
"@preact/signals": "^2.8.1",
"astro": "^6.0.0-beta.14",
"astro": "^6.0.0-beta.15",
"preact": "^10.28.4"
}
}
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@astrojs/react": "^5.0.0-beta.3",
"@types/react": "^18.3.28",
"@types/react-dom": "^18.3.7",
"astro": "^6.0.0-beta.14",
"astro": "^6.0.0-beta.15",
"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 @@ -14,7 +14,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^6.0.0-beta.2",
"astro": "^6.0.0-beta.14",
"astro": "^6.0.0-beta.15",
"solid-js": "^1.9.11"
}
}
4 changes: 2 additions & 2 deletions examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/svelte": "^8.0.0-beta.2",
"astro": "^6.0.0-beta.14",
"@astrojs/svelte": "^8.0.0-beta.3",
"astro": "^6.0.0-beta.15",
"svelte": "^5.53.0"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@astrojs/vue": "^6.0.0-beta.1",
"astro": "^6.0.0-beta.14",
"astro": "^6.0.0-beta.15",
"vue": "^3.5.28"
}
}
4 changes: 2 additions & 2 deletions examples/hackernews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/node": "^10.0.0-beta.4",
"astro": "^6.0.0-beta.14"
"@astrojs/node": "^10.0.0-beta.5",
"astro": "^6.0.0-beta.15"
}
}
2 changes: 1 addition & 1 deletion examples/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^6.0.0-beta.14"
"astro": "^6.0.0-beta.15"
},
"peerDependencies": {
"astro": "^4.0.0"
Expand Down
Loading
Loading