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/fix-netlify-external.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@astrojs/netlify': patch
---

Fixes builds that were failing with "Entry module cannot be external" error when using the Netlify adapter

This error was preventing sites from building after recent internal changes. Your builds should now work as expected without any changes to your code.
8 changes: 8 additions & 0 deletions .changeset/happy-falcons-show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@astrojs/cloudflare': patch
'astro': patch
---

Removes the `cssesc` dependency

This CommonJS dependency could sometimes cause errors because Astro is ESM-only. It is now replaced with a built-in ESM-friendly implementation.
6 changes: 6 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,17 @@
"fix-create-astro-registry-hang",
"fix-font-head-swap",
"fix-forwarded-proto-allowed-domains",
"fix-large-static-build-promise-all",
"fix-large-static-routes-stack-overflow",
"fix-markdoc-table-attributes",
"fix-mdx-slot-hydration",
"fix-netlify-external",
"fix-preact-cloudflare-hooks",
"fix-rewrite-non-ascii-paths",
"fix-serve-files-outside-srcdir",
"fix-ssr-prerendered-image-deletion",
"fix-store-race-condition",
"fix-svg-content-collection-deadlock",
"fix-vite-runner-closed",
"flat-lions-care",
"flat-symbols-arrive",
Expand All @@ -140,6 +143,7 @@
"green-plants-act",
"green-zebras-lick",
"grumpy-tables-serve",
"happy-falcons-show",
"heavy-beers-unite",
"heavy-cats-own",
"heavy-parts-throw",
Expand All @@ -161,6 +165,7 @@
"large-lemons-relax",
"late-carrots-cough",
"late-spiders-change",
"lazy-insects-wave",
"legacy-collections-backwards-compat-docs",
"light-parrots-find",
"little-goats-poke",
Expand Down Expand Up @@ -215,6 +220,7 @@
"slimy-queens-punch",
"slow-laws-marry",
"small-ghosts-sort",
"smart-mammals-stop",
"smooth-kids-tease",
"social-kings-swim",
"social-maps-shine",
Expand Down
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.15"
"astro": "^6.0.0-beta.16"
}
}
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@astrojs/mdx": "^5.0.0-beta.8",
"@astrojs/rss": "^4.0.15-beta.4",
"@astrojs/sitemap": "^3.6.1-beta.3",
"astro": "^6.0.0-beta.15",
"astro": "^6.0.0-beta.16",
"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.15"
"astro": "^6.0.0-beta.16"
},
"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.15",
"astro": "^6.0.0-beta.16",
"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.15"
"astro": "^6.0.0-beta.16"
}
}
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-beta.1",
"@types/react": "^18.3.28",
"@types/react-dom": "^18.3.7",
"astro": "^6.0.0-beta.15",
"astro": "^6.0.0-beta.16",
"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-beta.4",
"@preact/signals": "^2.8.1",
"astro": "^6.0.0-beta.15",
"astro": "^6.0.0-beta.16",
"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.15",
"astro": "^6.0.0-beta.16",
"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.15",
"astro": "^6.0.0-beta.16",
"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-beta.3",
"astro": "^6.0.0-beta.15",
"astro": "^6.0.0-beta.16",
"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.15",
"astro": "^6.0.0-beta.16",
"vue": "^3.5.28"
}
}
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-beta.5",
"astro": "^6.0.0-beta.15"
"astro": "^6.0.0-beta.16"
}
}
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.15"
"astro": "^6.0.0-beta.16"
},
"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-beta.15"
"astro": "^6.0.0-beta.16"
}
}
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-beta.15"
"astro": "^6.0.0-beta.16"
}
}
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-beta.5",
"@astrojs/svelte": "^8.0.0-beta.3",
"astro": "^6.0.0-beta.15",
"astro": "^6.0.0-beta.16",
"svelte": "^5.53.0"
}
}
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-beta.15",
"astro": "^6.0.0-beta.16",
"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-beta.15"
"astro": "^6.0.0-beta.16"
},
"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-beta.11",
"astro": "^6.0.0-beta.15"
"astro": "^6.0.0-beta.16"
}
}
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-beta.8",
"@astrojs/preact": "^5.0.0-beta.4",
"astro": "^6.0.0-beta.15",
"astro": "^6.0.0-beta.16",
"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-beta.4",
"@nanostores/preact": "^1.0.0",
"astro": "^6.0.0-beta.15",
"astro": "^6.0.0-beta.16",
"nanostores": "^1.1.0",
"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-beta.8",
"@tailwindcss/vite": "^4.2.0",
"@types/canvas-confetti": "^1.9.0",
"astro": "^6.0.0-beta.15",
"astro": "^6.0.0-beta.16",
"canvas-confetti": "^1.9.4",
"tailwindcss": "^4.2.0"
}
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-beta.15",
"astro": "^6.0.0-beta.16",
"vitest": "^3.2.4"
}
}
19 changes: 19 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# astro

## 6.0.0-beta.16

### Minor Changes

- [#15646](https://github.com/withastro/astro/pull/15646) [`0dd9d00`](https://github.com/withastro/astro/commit/0dd9d00cf8be38c53217426f6b0e155a6f7c2a22) Thanks [@delucis](https://github.com/delucis)! - Removes redundant `fetchpriority` attributes from the output of Astro’s `<Image>` component

Previously, Astro would always include `fetchpriority="auto"` on images not using the `priority` attribute.
However, this is the default value, so specifying it is redundant. This change omits the attribute by default.

### Patch Changes

- [#15661](https://github.com/withastro/astro/pull/15661) [`7150a2e`](https://github.com/withastro/astro/commit/7150a2e2aa022a9a957684ad8091f85aedb243f1) Thanks [@ematipico](https://github.com/ematipico)! - Fixes a build error when generating projects with 100k+ static routes.

- [#15603](https://github.com/withastro/astro/pull/15603) [`5bc2b2c`](https://github.com/withastro/astro/commit/5bc2b2c2f4a9928efa16452b64729586dc79a0c7) Thanks [@0xRozier](https://github.com/0xRozier)! - Fixes a deadlock that occurred when using SVG images in content collections

- [#15669](https://github.com/withastro/astro/pull/15669) [`d5a888b`](https://github.com/withastro/astro/commit/d5a888ba645de356673605a0b70f9c721cf6cb3b) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Removes the `cssesc` dependency

This CommonJS dependency could sometimes cause errors because Astro is ESM-only. It is now replaced with a built-in ESM-friendly implementation.

## 6.0.0-beta.15

### Minor Changes
Expand Down
4 changes: 1 addition & 3 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "astro",
"version": "6.0.0-beta.15",
"version": "6.0.0-beta.16",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
Expand Down Expand Up @@ -130,7 +130,6 @@
"clsx": "^2.1.1",
"common-ancestor-path": "^2.0.0",
"cookie": "^1.1.1",
"cssesc": "^3.0.0",
"devalue": "^5.6.3",
"diff": "^8.0.3",
"dlv": "^1.1.3",
Expand Down Expand Up @@ -180,7 +179,6 @@
"@astrojs/compiler-rs": "^0.1.1",
"@playwright/test": "1.58.2",
"@types/aria-query": "^5.0.4",
"@types/cssesc": "^3.0.2",
"@types/dlv": "^1.1.5",
"@types/hast": "^3.0.4",
"@types/html-escaper": "3.0.4",
Expand Down
31 changes: 1 addition & 30 deletions packages/astro/src/core/routing/match.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { RoutesList } from '../../types/astro.js';
import type { RouteData } from '../../types/public/internal.js';
import { redirectIsExternal } from '../redirects/render.js';
import { SERVER_ISLAND_BASE_PREFIX, SERVER_ISLAND_COMPONENT } from '../server-islands/endpoint.js';
import { SERVER_ISLAND_COMPONENT } from '../server-islands/endpoint.js';
import { isRoute404, isRoute500 } from './internal/route-errors.js';

/** Find matching route from pathname */
Expand Down Expand Up @@ -39,35 +39,6 @@ export function isRouteServerIsland(route: RouteData): boolean {
return route.component === SERVER_ISLAND_COMPONENT;
}

/**
* Determines whether the given `Request` is targeted to a "server island" based on its URL.
*
* @param {Request} request - The request object to be evaluated.
* @param {string} [base=''] - The base path provided via configuration.
* @return {boolean} - Returns `true` if the request is for a server island, otherwise `false`.
*/
export function isRequestServerIsland(request: Request, base = ''): boolean {
const url = new URL(request.url);
const pathname =
base === '/' ? url.pathname.slice(base.length) : url.pathname.slice(base.length + 1);

return pathname.startsWith(SERVER_ISLAND_BASE_PREFIX);
}

/**
* Checks if the given request corresponds to a 404 or 500 route based on the specified base path.
*
* @param {Request} request - The HTTP request object to be checked.
* @param {string} [base=''] - The base path to trim from the request's URL before checking the route. Default is an empty string.
* @return {boolean} Returns true if the request matches a 404 or 500 route; otherwise, returns false.
*/
export function requestIs404Or500(request: Request, base = '') {
const url = new URL(request.url);
const pathname = url.pathname.slice(base.length);

return isRoute404(pathname) || isRoute500(pathname);
}

/**
* Determines whether a given route is an external redirect.
*
Expand Down
1 change: 0 additions & 1 deletion packages/astro/src/core/server-islands/endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { getPattern } from '../routing/pattern.js';

export const SERVER_ISLAND_ROUTE = '/_server-islands/[name]';
export const SERVER_ISLAND_COMPONENT = '_server-islands.astro';
export const SERVER_ISLAND_BASE_PREFIX = '_server-islands';

type ConfigFields = Pick<SSRManifest, 'base' | 'trailingSlash'>;

Expand Down
Loading
Loading