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
5 changes: 0 additions & 5 deletions .changeset/cuddly-trains-pay.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/dirty-eggs-repeat.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/green-dingos-care.md

This file was deleted.

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"
"astro": "^6.0.2"
}
}
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",
"@astrojs/rss": "^4.0.16",
"@astrojs/rss": "^4.0.17",
"@astrojs/sitemap": "^3.7.1",
"astro": "^6.0.0",
"astro": "^6.0.2",
"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"
"astro": "^6.0.2"
},
"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",
"astro": "^6.0.0",
"astro": "^6.0.2",
"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",
"@types/alpinejs": "^3.13.11",
"alpinejs": "^3.15.8",
"astro": "^6.0.0"
"astro": "^6.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@astrojs/vue": "^6.0.0",
"@types/react": "^18.3.28",
"@types/react-dom": "^18.3.7",
"astro": "^6.0.0",
"astro": "^6.0.2",
"preact": "^10.28.4",
"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 @@ -15,7 +15,7 @@
"dependencies": {
"@astrojs/preact": "^5.0.0",
"@preact/signals": "^2.8.1",
"astro": "^6.0.0",
"astro": "^6.0.2",
"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",
"@types/react": "^18.3.28",
"@types/react-dom": "^18.3.7",
"astro": "^6.0.0",
"astro": "^6.0.2",
"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",
"astro": "^6.0.0",
"astro": "^6.0.2",
"solid-js": "^1.9.11"
}
}
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@astrojs/svelte": "^8.0.0",
"astro": "^6.0.0",
"astro": "^6.0.2",
"svelte": "^5.53.5"
}
}
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",
"astro": "^6.0.0",
"astro": "^6.0.2",
"vue": "^3.5.29"
}
}
2 changes: 1 addition & 1 deletion examples/hackernews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
},
"dependencies": {
"@astrojs/node": "^10.0.0",
"astro": "^6.0.0"
"astro": "^6.0.2"
}
}
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"
"astro": "^6.0.2"
},
"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 @@ -13,6 +13,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^6.0.0"
"astro": "^6.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/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"
"astro": "^6.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@astrojs/node": "^10.0.0",
"@astrojs/svelte": "^8.0.0",
"astro": "^6.0.0",
"astro": "^6.0.2",
"svelte": "^5.53.5"
}
}
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",
"astro": "^6.0.2",
"sass": "^1.97.3",
"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,7 +16,7 @@
},
"devDependencies": {
"@types/node": "^18.17.8",
"astro": "^6.0.0"
"astro": "^6.0.2"
},
"engines": {
"node": ">=22.12.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/with-markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^1.0.0",
"astro": "^6.0.0"
"astro": "^6.0.2"
}
}
2 changes: 1 addition & 1 deletion examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dependencies": {
"@astrojs/mdx": "^5.0.0",
"@astrojs/preact": "^5.0.0",
"astro": "^6.0.0",
"astro": "^6.0.2",
"preact": "^10.28.4"
}
}
2 changes: 1 addition & 1 deletion examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dependencies": {
"@astrojs/preact": "^5.0.0",
"@nanostores/preact": "^1.0.0",
"astro": "^6.0.0",
"astro": "^6.0.2",
"nanostores": "^1.1.1",
"preact": "^10.28.4"
}
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 @@ -16,7 +16,7 @@
"@astrojs/mdx": "^5.0.0",
"@tailwindcss/vite": "^4.2.1",
"@types/canvas-confetti": "^1.9.0",
"astro": "^6.0.0",
"astro": "^6.0.2",
"canvas-confetti": "^1.9.4",
"tailwindcss": "^4.2.1"
}
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 @@ -14,7 +14,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^6.0.0",
"astro": "^6.0.2",
"vitest": "^3.2.4"
}
}
6 changes: 6 additions & 0 deletions packages/astro-rss/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @astrojs/rss

## 4.0.17

### Patch Changes

- [#15830](https://github.com/withastro/astro/pull/15830) [`8d3f3aa`](https://github.com/withastro/astro/commit/8d3f3aa1fdefebc22bb45de26591d3ec3d6da580) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Pin `fast-xml-parser` to 5.4.1 in order to fix an upstream bug

## 4.0.16

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/astro-rss/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@astrojs/rss",
"description": "Add RSS feeds to your Astro projects",
"version": "4.0.16",
"version": "4.0.17",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
Expand Down
12 changes: 12 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# astro

## 6.0.2

### Patch Changes

- [#15832](https://github.com/withastro/astro/pull/15832) [`95e12a2`](https://github.com/withastro/astro/commit/95e12a250ece206f55f8c0c07c9c05489f3df93f) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fixes `return;` syntax not working in the frontmatter correctly in certain contexts

## 6.0.1

### Patch Changes

- [#15827](https://github.com/withastro/astro/pull/15827) [`a4c0d0b`](https://github.com/withastro/astro/commit/a4c0d0b4df540b23fa85bf926f9cc97470737fa1) Thanks [@matthewp](https://github.com/matthewp)! - Fixes `astro add` so the tsconfig preview shows the actual pending changes before confirmation

## 6.0.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",
"version": "6.0.2",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
Expand Down
4 changes: 3 additions & 1 deletion packages/astro/src/vite-plugin-astro/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ async function enhanceCompileError({
const scannedFrontmatter = frontmatterRE.exec(source);
if (scannedFrontmatter) {
// Top-level return is not supported, so replace `return` with throw
const frontmatter = scannedFrontmatter[1].replace(/\breturn\b/g, 'throw');
const frontmatter = scannedFrontmatter[1]
.replace(/\breturn\s*;/g, 'throw 0;')
.replace(/\breturn\b/g, 'throw ');

// If frontmatter does not actually include the offending line, skip
if (lineText && !frontmatter.includes(lineText)) throw err;
Expand Down
11 changes: 11 additions & 0 deletions packages/integrations/cloudflare/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @astrojs/cloudflare

## 13.0.2

### Patch Changes

- [#15832](https://github.com/withastro/astro/pull/15832) [`95e12a2`](https://github.com/withastro/astro/commit/95e12a250ece206f55f8c0c07c9c05489f3df93f) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fixes `return;` syntax not working in the frontmatter correctly in certain contexts

- [#15803](https://github.com/withastro/astro/pull/15803) [`e42b015`](https://github.com/withastro/astro/commit/e42b015916b7f46a80676628f6d7c95279baf55a) Thanks [@merlinnot](https://github.com/merlinnot)! - Fixes the Cloudflare adapter adding a `SESSION` KV binding even when sessions are explicitly configured to use a different driver, such as `unstorage/drivers/null`.

- Updated dependencies []:
- @astrojs/underscore-redirects@1.0.1

## 13.0.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/cloudflare/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@astrojs/cloudflare",
"description": "Deploy your site to Cloudflare Workers",
"version": "13.0.1",
"version": "13.0.2",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export function astroFrontmatterScanPlugin(): ESBuildPlugin {
//
// Known Limitation: Using regex /\breturn\b/ will incorrectly match
// identifiers like `$return` or aliases like `import { return as ret }`.
const contents = frontmatterMatch[1].replace(/\breturn\b/g, 'throw ');
const contents = frontmatterMatch[1]
.replace(/\breturn\s*;/g, 'throw 0;')
.replace(/\breturn\b/g, 'throw ');

return {
contents,
Expand Down
25 changes: 25 additions & 0 deletions packages/integrations/cloudflare/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,28 @@ import { sessionDrivers } from 'astro/config';
import { createCloudflarePrerenderer } from './prerenderer.js';
import { createRequire } from 'node:module';

const CLOUDFLARE_KV_SESSION_DRIVER_ENTRYPOINT = sessionDrivers.cloudflareKVBinding().entrypoint;

function usesCloudflareKVSessionDriver(session: AstroConfig['session']): boolean {
const driver = session?.driver;

if (!driver) {
return false;
}

if (typeof driver === 'string') {
return driver === 'cloudflareKVBinding' || driver === 'cloudflare-kv-binding';
}

const entrypoint =
typeof driver.entrypoint === 'string' ? driver.entrypoint : driver.entrypoint.toString();

return (
entrypoint === CLOUDFLARE_KV_SESSION_DRIVER_ENTRYPOINT ||
entrypoint.endsWith('cloudflare-kv-binding')
);
}

export type { Runtime } from './utils/handler.js';

export interface Options
Expand Down Expand Up @@ -111,13 +133,16 @@ export default function createIntegration({
};
}

const needsSessionKVBinding = usesCloudflareKVSessionDriver(session);

// In dev, `compile` needs the IMAGES binding for real transforms
// (the image-transform-endpoint uses it). At build time,
// `compile` uses Sharp on the Node side instead.
const needsImagesBindingForDev = isCompile && command === 'dev';

cfPluginConfig = {
config: cloudflareConfigCustomizer({
needsSessionKVBinding,
sessionKVBindingName,
imagesBindingName:
needsImagesBinding || needsImagesBindingForDev ? imagesBindingName : false,
Expand Down
Loading
Loading