Skip to content

Commit

Permalink
Merge branch 'next' into feat/default-exclude
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh authored Sep 13, 2024
2 parents e58f7ad + f15922d commit 66c67ce
Show file tree
Hide file tree
Showing 51 changed files with 604 additions and 241 deletions.
21 changes: 21 additions & 0 deletions .changeset/brave-elephants-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
'astro': major
---

### [changed]: `entryPoint` type inside the hook `astro:build:ssr`
In Astro v4.x, the `entryPoint` type was `RouteData`.

Astro v5.0 the `entryPoint` type is `IntegrationRouteData`, which contains a subset of the `RouteData` type. The fields `isIndex` and `fallbackRoutes` were removed.

#### What should I do?
Update your adapter to change the type of `entryPoint` from `RouteData` to `IntegrationRouteData`.

```diff
-import type {RouteData} from 'astro';
+import type {IntegrationRouteData} from "astro"

-function useRoute(route: RouteData) {
+function useRoute(route: IntegrationRouteData) {

}
```
7 changes: 7 additions & 0 deletions .changeset/fluffy-jars-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'astro': major
---

Removes the `assets` property on `supportedAstroFeatures` for adapters, as it did not reflect reality properly in many cases.

Now, relating to assets, only a single `sharpImageService` property is available, determining if the adapter is compatible with the built-in sharp image service.
21 changes: 21 additions & 0 deletions .changeset/fuzzy-pugs-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
'astro': major
---

### [changed]: `routes` type inside the hook `astro:build:done`
In Astro v4.x, the `routes` type was `RouteData`.

Astro v5.0 the `routes` type is `IntegrationRouteData`, which contains a subset of the `RouteData` type. The fields `isIndex` and `fallbackRoutes` were removed.

#### What should I do?
Update your adapter to change the type of `routes` from `RouteData` to `IntegrationRouteData`.

```diff
-import type {RouteData} from 'astro';
+import type {IntegrationRouteData} from "astro"

-function useRoute(route: RouteData) {
+function useRoute(route: IntegrationRouteData) {

}
```
15 changes: 12 additions & 3 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,19 @@
"changesets": [
"afraid-apricots-buy",
"blue-boats-relax",
"brave-elephants-fly",
"breezy-colts-promise",
"chatty-teachers-sit",
"chilly-terms-know",
"clean-donuts-walk",
"cuddly-shoes-press",
"curvy-walls-kneel",
"dry-worms-knock",
"eighty-bags-cross",
"eighty-boxes-applaud",
"empty-spoons-kiss",
"five-jars-hear",
"forty-spies-train",
"fluffy-jars-live",
"fuzzy-pugs-live",
"giant-rocks-thank",
"healthy-ads-scream",
"heavy-seahorses-poke",
Expand All @@ -55,6 +58,7 @@
"long-months-rule",
"many-garlics-lick",
"mean-donkeys-switch",
"mighty-stingrays-press",
"modern-bears-deny",
"moody-waves-think",
"nasty-crabs-worry",
Expand All @@ -68,10 +72,15 @@
"selfish-cats-crash",
"selfish-impalas-grin",
"sharp-worms-sniff",
"slimy-queens-hang",
"small-ties-sort",
"spotty-garlics-cheat",
"strange-sheep-film",
"ten-students-repair",
"ten-walls-tap",
"twelve-comics-march",
"twenty-cobras-push"
"twenty-cobras-push",
"unlucky-bobcats-sit",
"violet-goats-grab"
]
}
7 changes: 7 additions & 0 deletions .changeset/slimy-queens-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'astro': minor
---

The value of the different properties on `supportedAstroFeatures` for adapters can now be objects, with a `support` and `message` properties. The content of the `message` property will be shown in the Astro CLI when the adapter is not compatible with the feature, allowing one to give a better informational message to the user.

This is notably useful with the new `limited` value, to explain to the user why support is limited.
24 changes: 24 additions & 0 deletions .changeset/ten-walls-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
'astro': major
---

### [changed]: `RouteData.distURL` is now an array
In Astro v4.x, `RouteData.distURL` was `undefined` or a `URL`

Astro v5.0, `RouteData.distURL` is `undefined` or an array of `URL`. This was a bug, because a route can generate multiple files on disk, especially when using dynamic routes such as `[slug]` or `[...slug]`.

#### What should I do?
Update your code to handle `RouteData.distURL` as an array.

```diff
if (route.distURL) {
- if (route.distURL.endsWith('index.html')) {
- // do something
- }
+ for (const url of route.distURL) {
+ if (url.endsWith('index.html')) {
+ // do something
+ }
+ }
}
```
5 changes: 5 additions & 0 deletions .changeset/unlucky-bobcats-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': minor
---

Adds a new `limited` value for the different properties of `supportedAstroFeatures` for adapters, which indicates that the adapter is compatible with the feature, but with some limitations. This is useful for adapters that support a feature, but not in all cases or with all options.
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-alpha.6"
"astro": "^5.0.0-alpha.7"
}
}
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"@astrojs/mdx": "^4.0.0-alpha.2",
"@astrojs/rss": "^4.0.7",
"@astrojs/sitemap": "^3.1.6",
"astro": "^5.0.0-alpha.6"
"astro": "^5.0.0-alpha.7"
}
}
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": "^5.0.0-alpha.6"
"astro": "^5.0.0-alpha.7"
},
"peerDependencies": {
"astro": "^4.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 @@
"test": "vitest run"
},
"dependencies": {
"astro": "^5.0.0-alpha.6",
"astro": "^5.0.0-alpha.7",
"@astrojs/react": "^3.6.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
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 @@ -14,6 +14,6 @@
"@astrojs/alpinejs": "^0.4.0",
"@types/alpinejs": "^3.13.10",
"alpinejs": "^3.14.1",
"astro": "^5.0.0-alpha.6"
"astro": "^5.0.0-alpha.7"
}
}
2 changes: 1 addition & 1 deletion examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@astrojs/vue": "^5.0.0-alpha.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"astro": "^5.0.0-alpha.6",
"astro": "^5.0.0-alpha.7",
"preact": "^10.23.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 @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.5.3",
"@preact/signals": "^1.3.0",
"astro": "^5.0.0-alpha.6",
"astro": "^5.0.0-alpha.7",
"preact": "^10.23.2"
}
}
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@astrojs/react": "^3.6.2",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"astro": "^5.0.0-alpha.6",
"astro": "^5.0.0-alpha.7",
"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 @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^4.4.1",
"astro": "^5.0.0-alpha.6",
"astro": "^5.0.0-alpha.7",
"solid-js": "^1.8.22"
}
}
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/svelte": "^6.0.0-alpha.0",
"astro": "^5.0.0-alpha.6",
"astro": "^5.0.0-alpha.7",
"svelte": "^4.2.19"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/vue": "^5.0.0-alpha.0",
"astro": "^5.0.0-alpha.6",
"astro": "^5.0.0-alpha.7",
"vue": "^3.4.38"
}
}
2 changes: 1 addition & 1 deletion examples/hackernews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/node": "^9.0.0-alpha.1",
"astro": "^5.0.0-alpha.6"
"astro": "^5.0.0-alpha.7"
}
}
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": "^5.0.0-alpha.6"
"astro": "^5.0.0-alpha.7"
},
"peerDependencies": {
"astro": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"@astrojs/node": "^9.0.0-alpha.1",
"astro": "^5.0.0-alpha.6",
"astro": "^5.0.0-alpha.7",
"html-minifier": "^4.0.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-alpha.6"
"astro": "^5.0.0-alpha.7"
}
}
2 changes: 1 addition & 1 deletion examples/non-html-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-alpha.6"
"astro": "^5.0.0-alpha.7"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-alpha.6"
"astro": "^5.0.0-alpha.7"
}
}
2 changes: 1 addition & 1 deletion examples/server-islands/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@tailwindcss/forms": "^0.5.9",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"astro": "^5.0.0-alpha.6",
"astro": "^5.0.0-alpha.7",
"postcss": "^8.4.43",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@astrojs/node": "^9.0.0-alpha.1",
"@astrojs/svelte": "^6.0.0-alpha.0",
"astro": "^5.0.0-alpha.6",
"astro": "^5.0.0-alpha.7",
"svelte": "^4.2.19"
}
}
2 changes: 1 addition & 1 deletion examples/starlog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-alpha.6",
"astro": "^5.0.0-alpha.7",
"sass": "^1.77.8",
"sharp": "^0.33.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 @@ -15,6 +15,6 @@
"./app": "./dist/app.js"
},
"devDependencies": {
"astro": "^5.0.0-alpha.6"
"astro": "^5.0.0-alpha.7"
}
}
2 changes: 1 addition & 1 deletion examples/view-transitions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"devDependencies": {
"@astrojs/tailwind": "^6.0.0-alpha.0",
"@astrojs/node": "^9.0.0-alpha.1",
"astro": "^5.0.0-alpha.6"
"astro": "^5.0.0-alpha.7"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^1.0.0-alpha.1",
"astro": "^5.0.0-alpha.6"
"astro": "^5.0.0-alpha.7"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^6.0.0-alpha.1",
"astro": "^5.0.0-alpha.6",
"astro": "^5.0.0-alpha.7",
"hast-util-select": "^6.0.2",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-markdown-shiki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.0.0-alpha.6"
"astro": "^5.0.0-alpha.7"
}
}
4 changes: 2 additions & 2 deletions examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"dependencies": {
"@astrojs/mdx": "^4.0.0-alpha.2",
"@astrojs/preact": "^3.5.2",
"astro": "^5.0.0-alpha.6",
"@astrojs/preact": "^3.5.3",
"astro": "^5.0.0-alpha.7",
"preact": "^10.23.2"
}
}
2 changes: 1 addition & 1 deletion examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.5.3",
"@nanostores/preact": "^0.5.2",
"astro": "^5.0.0-alpha.6",
"astro": "^5.0.0-alpha.7",
"nanostores": "^0.11.3",
"preact": "^10.23.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 @@ -14,7 +14,7 @@
"@astrojs/mdx": "^4.0.0-alpha.2",
"@astrojs/tailwind": "^6.0.0-alpha.0",
"@types/canvas-confetti": "^1.6.4",
"astro": "^5.0.0-alpha.6",
"astro": "^5.0.0-alpha.7",
"autoprefixer": "^10.4.20",
"canvas-confetti": "^1.9.3",
"postcss": "^8.4.45",
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 @@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^5.0.0-alpha.6",
"astro": "^5.0.0-alpha.7",
"vitest": "^2.0.5"
}
}
Loading

0 comments on commit 66c67ce

Please sign in to comment.