From c2d92dc293bc5d3e2d9840fcf05cc6fa90b01327 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Wed, 30 Aug 2023 09:20:49 +0100 Subject: [PATCH 01/48] chore: exit from `next` mode (#8278) --- .changeset/pre.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 65f614f2a..c08c9984e 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -1,5 +1,5 @@ { - "mode": "pre", + "mode": "exit", "tag": "rc", "initialVersions": { "astro": "2.9.6", From e33d951af178ce0b50a41799d3ce76d107c961db Mon Sep 17 00:00:00 2001 From: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com> Date: Wed, 30 Aug 2023 08:25:29 -0300 Subject: [PATCH 02/48] Remove draft pages info from mdx integration guide (#8281) --- packages/integrations/mdx/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/integrations/mdx/README.md b/packages/integrations/mdx/README.md index ee20236c4..01cf26c0f 100644 --- a/packages/integrations/mdx/README.md +++ b/packages/integrations/mdx/README.md @@ -69,7 +69,7 @@ export default defineConfig({ With the Astro MDX integration, you can [add MDX pages to your project](https://docs.astro.build/en/guides/markdown-content/#markdown-and-mdx-pages) by adding `.mdx` files within your `src/pages/` directory. You can also [import `.mdx` files](https://docs.astro.build/en/guides/markdown-content/#importing-markdown) into `.astro` files. -Astro's MDX integration adds extra features to standard MDX, including Markdown-style frontmatter. This allows you to use most of Astro's built-in Markdown features like a [special frontmatter `layout` property](https://docs.astro.build/en/guides/markdown-content/#frontmatter-layout) and a [property for marking a page as a draft](https://docs.astro.build/en/guides/markdown-content/#draft-pages). +Astro's MDX integration adds extra features to standard MDX, including Markdown-style frontmatter. This allows you to use most of Astro's built-in Markdown features like a [special frontmatter `layout` property](https://docs.astro.build/en/guides/markdown-content/#frontmatter-layout). See how MDX works in Astro with examples in our [Markdown & MDX guide](https://docs.astro.build/en/guides/markdown-content/). From 5598feb71864f814d0a34bb6bf9f6ecdff081497 Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Wed, 30 Aug 2023 04:38:28 -0700 Subject: [PATCH 03/48] [ci] release (#8279) Co-authored-by: github-actions[bot] --- .changeset/afraid-dots-whisper.md | 29 - .changeset/angry-dogs-shake.md | 5 - .changeset/big-tips-whisper.md | 5 - .changeset/brave-cheetahs-float.md | 5 - .changeset/breezy-books-notice.md | 6 - .changeset/chatty-ways-hunt.md | 5 - .changeset/chilled-ducks-grin.md | 5 - .changeset/clever-bats-breathe.md | 13 - .changeset/cool-feet-rest.md | 7 - .changeset/cool-jokes-clap.md | 11 - .changeset/curvy-experts-jog.md | 30 - .changeset/cyan-carrots-stare.md | 5 - .changeset/dirty-lies-cover.md | 32 -- .changeset/fair-emus-divide.md | 39 -- .changeset/fair-eyes-promise.md | 7 - .changeset/famous-queens-itch.md | 5 - .changeset/five-geese-crash.md | 11 - .changeset/four-houses-compete.md | 18 - .changeset/fresh-shrimps-happen.md | 5 - .changeset/gentle-deers-yawn.md | 5 - .changeset/gentle-meals-crash.md | 9 - .changeset/giant-plants-sip.md | 29 - .changeset/gorgeous-kiwis-stare.md | 5 - .changeset/grumpy-pens-melt.md | 21 - .changeset/grumpy-years-remember.md | 5 - .changeset/happy-penguins-hug.md | 5 - .changeset/heavy-countries-wonder.md | 5 - .changeset/heavy-walls-arrive.md | 8 - .changeset/honest-houses-deny.md | 25 - .changeset/large-countries-share.md | 7 - .changeset/light-badgers-mate.md | 8 - .changeset/long-chefs-jump.md | 5 - .changeset/loud-candles-admire.md | 5 - .changeset/lovely-walls-call.md | 5 - .changeset/many-impalas-sit.md | 5 - .changeset/many-pears-explode.md | 35 -- .changeset/mighty-dancers-lay.md | 5 - .changeset/nasty-garlics-listen.md | 5 - .changeset/neat-mugs-end.md | 8 - .changeset/neat-owls-run.md | 25 - .changeset/neat-suns-search.md | 17 - .changeset/ninety-boats-brake.md | 9 - .changeset/odd-books-live.md | 23 - .changeset/olive-moles-tan.md | 5 - .changeset/perfect-horses-tell.md | 27 - .changeset/perfect-socks-hammer.md | 5 - .changeset/plenty-keys-add.md | 23 - .changeset/popular-carrots-sneeze.md | 5 - .changeset/pre.json | 121 ---- .changeset/proud-fans-type.md | 5 - .changeset/purple-buses-prove.md | 5 - .changeset/quick-boats-bow.md | 5 - .changeset/rude-ears-play.md | 5 - .changeset/serious-waves-fry.md | 5 - .changeset/shiny-dryers-swim.md | 5 - .changeset/silent-bikes-crash.md | 8 - .changeset/silly-dolphins-try.md | 9 - .changeset/six-grapes-look.md | 15 - .changeset/slimy-carrots-sell.md | 9 - .changeset/small-nails-try.md | 5 - .changeset/smart-numbers-shout.md | 19 - .changeset/spicy-eels-rush.md | 8 - .changeset/spicy-icons-live.md | 14 - .changeset/spicy-stingrays-cheer.md | 5 - .changeset/strange-peas-agree.md | 5 - .changeset/strong-needles-accept.md | 5 - .changeset/strong-papayas-chew.md | 5 - .changeset/swift-taxis-sing.md | 5 - .changeset/tame-files-glow.md | 23 - .changeset/tame-knives-shake.md | 5 - .changeset/tasty-camels-speak.md | 5 - .changeset/tasty-dragons-smash.md | 5 - .changeset/thin-ants-repeat.md | 6 - .changeset/three-adults-exist.md | 5 - .changeset/three-onions-repeat.md | 5 - .changeset/tricky-candles-suffer.md | 39 -- .changeset/twelve-coats-rush.md | 35 -- .changeset/twenty-cheetahs-deny.md | 17 - .changeset/unlucky-hotels-try.md | 5 - .changeset/unlucky-ravens-type.md | 14 - .changeset/unlucky-sheep-build.md | 7 - .changeset/violet-peaches-invent.md | 5 - .changeset/warm-weeks-yell.md | 13 - .changeset/wet-foxes-sleep.md | 5 - .changeset/wild-bobcats-carry.md | 5 - .changeset/wise-cameras-agree.md | 23 - .changeset/yellow-tips-cover.md | 26 - .changeset/young-roses-teach.md | 5 - examples/basics/package.json | 2 +- examples/blog/package.json | 8 +- examples/component/package.json | 2 +- examples/deno/package.json | 4 +- examples/framework-alpine/package.json | 4 +- examples/framework-lit/package.json | 4 +- examples/framework-multiple/package.json | 12 +- examples/framework-preact/package.json | 4 +- examples/framework-react/package.json | 4 +- examples/framework-solid/package.json | 4 +- examples/framework-svelte/package.json | 4 +- examples/framework-vue/package.json | 4 +- examples/hackernews/package.json | 4 +- examples/integration/package.json | 2 +- examples/middleware/package.json | 4 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 6 +- examples/with-markdoc/package.json | 4 +- examples/with-markdown-plugins/package.json | 4 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-mdx/package.json | 6 +- examples/with-nanostores/package.json | 4 +- examples/with-tailwindcss/package.json | 6 +- examples/with-vite-plugin-pwa/package.json | 2 +- examples/with-vitest/package.json | 2 +- packages/astro-prism/CHANGELOG.md | 8 + packages/astro-prism/package.json | 2 +- packages/astro-rss/CHANGELOG.md | 36 ++ packages/astro-rss/package.json | 2 +- packages/astro/CHANGELOG.md | 534 ++++++++++++++++++ packages/astro/package.json | 2 +- packages/create-astro/CHANGELOG.md | 8 + packages/create-astro/package.json | 2 +- packages/integrations/alpinejs/CHANGELOG.md | 8 + packages/integrations/alpinejs/package.json | 2 +- packages/integrations/cloudflare/CHANGELOG.md | 64 +++ packages/integrations/cloudflare/package.json | 4 +- packages/integrations/deno/CHANGELOG.md | 41 ++ packages/integrations/deno/package.json | 4 +- packages/integrations/lit/CHANGELOG.md | 8 + packages/integrations/lit/package.json | 2 +- packages/integrations/markdoc/CHANGELOG.md | 23 + packages/integrations/markdoc/package.json | 4 +- packages/integrations/mdx/CHANGELOG.md | 35 ++ packages/integrations/mdx/package.json | 4 +- packages/integrations/netlify/CHANGELOG.md | 98 ++++ packages/integrations/netlify/package.json | 4 +- packages/integrations/node/CHANGELOG.md | 41 ++ packages/integrations/node/package.json | 4 +- packages/integrations/partytown/CHANGELOG.md | 8 + packages/integrations/partytown/package.json | 2 +- packages/integrations/preact/CHANGELOG.md | 16 + packages/integrations/preact/package.json | 2 +- packages/integrations/prefetch/CHANGELOG.md | 8 + packages/integrations/prefetch/package.json | 2 +- packages/integrations/react/CHANGELOG.md | 23 + packages/integrations/react/package.json | 4 +- packages/integrations/sitemap/CHANGELOG.md | 8 + packages/integrations/sitemap/package.json | 2 +- packages/integrations/solid/CHANGELOG.md | 16 + packages/integrations/solid/package.json | 2 +- packages/integrations/svelte/CHANGELOG.md | 15 + packages/integrations/svelte/package.json | 4 +- packages/integrations/tailwind/CHANGELOG.md | 13 + packages/integrations/tailwind/package.json | 4 +- packages/integrations/vercel/CHANGELOG.md | 104 ++++ packages/integrations/vercel/package.json | 4 +- packages/integrations/vue/CHANGELOG.md | 15 + packages/integrations/vue/package.json | 4 +- packages/internal-helpers/CHANGELOG.md | 12 + packages/internal-helpers/package.json | 2 +- packages/markdown/remark/CHANGELOG.md | 20 + packages/markdown/remark/package.json | 6 +- packages/telemetry/CHANGELOG.md | 16 + packages/telemetry/package.json | 2 +- packages/underscore-redirects/CHANGELOG.md | 8 + packages/underscore-redirects/package.json | 2 +- pnpm-lock.yaml | 112 ++-- 168 files changed, 1335 insertions(+), 1252 deletions(-) delete mode 100644 .changeset/afraid-dots-whisper.md delete mode 100644 .changeset/angry-dogs-shake.md delete mode 100644 .changeset/big-tips-whisper.md delete mode 100644 .changeset/brave-cheetahs-float.md delete mode 100644 .changeset/breezy-books-notice.md delete mode 100644 .changeset/chatty-ways-hunt.md delete mode 100644 .changeset/chilled-ducks-grin.md delete mode 100644 .changeset/clever-bats-breathe.md delete mode 100644 .changeset/cool-feet-rest.md delete mode 100644 .changeset/cool-jokes-clap.md delete mode 100644 .changeset/curvy-experts-jog.md delete mode 100644 .changeset/cyan-carrots-stare.md delete mode 100644 .changeset/dirty-lies-cover.md delete mode 100644 .changeset/fair-emus-divide.md delete mode 100644 .changeset/fair-eyes-promise.md delete mode 100644 .changeset/famous-queens-itch.md delete mode 100644 .changeset/five-geese-crash.md delete mode 100644 .changeset/four-houses-compete.md delete mode 100644 .changeset/fresh-shrimps-happen.md delete mode 100644 .changeset/gentle-deers-yawn.md delete mode 100644 .changeset/gentle-meals-crash.md delete mode 100644 .changeset/giant-plants-sip.md delete mode 100644 .changeset/gorgeous-kiwis-stare.md delete mode 100644 .changeset/grumpy-pens-melt.md delete mode 100644 .changeset/grumpy-years-remember.md delete mode 100644 .changeset/happy-penguins-hug.md delete mode 100644 .changeset/heavy-countries-wonder.md delete mode 100644 .changeset/heavy-walls-arrive.md delete mode 100644 .changeset/honest-houses-deny.md delete mode 100644 .changeset/large-countries-share.md delete mode 100644 .changeset/light-badgers-mate.md delete mode 100644 .changeset/long-chefs-jump.md delete mode 100644 .changeset/loud-candles-admire.md delete mode 100644 .changeset/lovely-walls-call.md delete mode 100644 .changeset/many-impalas-sit.md delete mode 100644 .changeset/many-pears-explode.md delete mode 100644 .changeset/mighty-dancers-lay.md delete mode 100644 .changeset/nasty-garlics-listen.md delete mode 100644 .changeset/neat-mugs-end.md delete mode 100644 .changeset/neat-owls-run.md delete mode 100644 .changeset/neat-suns-search.md delete mode 100644 .changeset/ninety-boats-brake.md delete mode 100644 .changeset/odd-books-live.md delete mode 100644 .changeset/olive-moles-tan.md delete mode 100644 .changeset/perfect-horses-tell.md delete mode 100644 .changeset/perfect-socks-hammer.md delete mode 100644 .changeset/plenty-keys-add.md delete mode 100644 .changeset/popular-carrots-sneeze.md delete mode 100644 .changeset/pre.json delete mode 100644 .changeset/proud-fans-type.md delete mode 100644 .changeset/purple-buses-prove.md delete mode 100644 .changeset/quick-boats-bow.md delete mode 100644 .changeset/rude-ears-play.md delete mode 100644 .changeset/serious-waves-fry.md delete mode 100644 .changeset/shiny-dryers-swim.md delete mode 100644 .changeset/silent-bikes-crash.md delete mode 100644 .changeset/silly-dolphins-try.md delete mode 100644 .changeset/six-grapes-look.md delete mode 100644 .changeset/slimy-carrots-sell.md delete mode 100644 .changeset/small-nails-try.md delete mode 100644 .changeset/smart-numbers-shout.md delete mode 100644 .changeset/spicy-eels-rush.md delete mode 100644 .changeset/spicy-icons-live.md delete mode 100644 .changeset/spicy-stingrays-cheer.md delete mode 100644 .changeset/strange-peas-agree.md delete mode 100644 .changeset/strong-needles-accept.md delete mode 100644 .changeset/strong-papayas-chew.md delete mode 100644 .changeset/swift-taxis-sing.md delete mode 100644 .changeset/tame-files-glow.md delete mode 100644 .changeset/tame-knives-shake.md delete mode 100644 .changeset/tasty-camels-speak.md delete mode 100644 .changeset/tasty-dragons-smash.md delete mode 100644 .changeset/thin-ants-repeat.md delete mode 100644 .changeset/three-adults-exist.md delete mode 100644 .changeset/three-onions-repeat.md delete mode 100644 .changeset/tricky-candles-suffer.md delete mode 100644 .changeset/twelve-coats-rush.md delete mode 100644 .changeset/twenty-cheetahs-deny.md delete mode 100644 .changeset/unlucky-hotels-try.md delete mode 100644 .changeset/unlucky-ravens-type.md delete mode 100644 .changeset/unlucky-sheep-build.md delete mode 100644 .changeset/violet-peaches-invent.md delete mode 100644 .changeset/warm-weeks-yell.md delete mode 100644 .changeset/wet-foxes-sleep.md delete mode 100644 .changeset/wild-bobcats-carry.md delete mode 100644 .changeset/wise-cameras-agree.md delete mode 100644 .changeset/yellow-tips-cover.md delete mode 100644 .changeset/young-roses-teach.md diff --git a/.changeset/afraid-dots-whisper.md b/.changeset/afraid-dots-whisper.md deleted file mode 100644 index 272a1e212..000000000 --- a/.changeset/afraid-dots-whisper.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -'@astrojs/cloudflare': major -'@astrojs/partytown': major -'@astrojs/tailwind': major -'@astrojs/netlify': major -'@astrojs/sitemap': major -'@astrojs/preact': major -'@astrojs/svelte': major -'@astrojs/vercel': major -'@astrojs/react': major -'@astrojs/solid-js': major -'@astrojs/deno': major -'@astrojs/node': major -'@astrojs/lit': major -'@astrojs/vue': major -'create-astro': major -'@astrojs/prism': major -'@astrojs/rss': major -'@astrojs/telemetry': major -'astro': major -'@astrojs/alpinejs': minor -'@astrojs/prefetch': minor -'@astrojs/markdoc': minor -'@astrojs/underscore-redirects': minor -'@astrojs/mdx': minor -'@astrojs/internal-helpers': minor ---- - -Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023. diff --git a/.changeset/angry-dogs-shake.md b/.changeset/angry-dogs-shake.md deleted file mode 100644 index 979fcf0f4..000000000 --- a/.changeset/angry-dogs-shake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Use `undici` for File changeset for Node 16 compatibility diff --git a/.changeset/big-tips-whisper.md b/.changeset/big-tips-whisper.md deleted file mode 100644 index ad532760f..000000000 --- a/.changeset/big-tips-whisper.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/internal-helpers': patch ---- - -Trigger re-release to fix `collapseDuplicateSlashes` export diff --git a/.changeset/brave-cheetahs-float.md b/.changeset/brave-cheetahs-float.md deleted file mode 100644 index 84825ce0f..000000000 --- a/.changeset/brave-cheetahs-float.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Do not throw Error when users pass an object with a "type" property diff --git a/.changeset/breezy-books-notice.md b/.changeset/breezy-books-notice.md deleted file mode 100644 index 586b405ea..000000000 --- a/.changeset/breezy-books-notice.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@astrojs/telemetry': patch -'astro': patch ---- - -Update telemetry notice diff --git a/.changeset/chatty-ways-hunt.md b/.changeset/chatty-ways-hunt.md deleted file mode 100644 index d6a9584a1..000000000 --- a/.changeset/chatty-ways-hunt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Adds a link to the error reference in the CLI when an error occurs diff --git a/.changeset/chilled-ducks-grin.md b/.changeset/chilled-ducks-grin.md deleted file mode 100644 index b63b1f29c..000000000 --- a/.changeset/chilled-ducks-grin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Removed automatic flattening of `getStaticPaths` result. `.flatMap` and `.flat` should now be used to ensure that you're returning a flat array. diff --git a/.changeset/clever-bats-breathe.md b/.changeset/clever-bats-breathe.md deleted file mode 100644 index 2c1a6dc39..000000000 --- a/.changeset/clever-bats-breathe.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'astro': major ---- - -This import alias is no longer included by default with astro:assets. If you were using this alias with experimental assets, you must convert them to relative file paths, or create your own [import aliases](https://docs.astro.build/en/guides/aliases/). - -```diff ---- -// src/pages/posts/post-1.astro -- import rocket from '~/assets/rocket.png' -+ import rocket from '../../assets/rocket.png'; ---- -``` diff --git a/.changeset/cool-feet-rest.md b/.changeset/cool-feet-rest.md deleted file mode 100644 index c2e724d80..000000000 --- a/.changeset/cool-feet-rest.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@astrojs/solid-js': major ---- - -New `include` and `exclude` config options - -The Solid integration now has new `include` and `exclude` config options. Use these if you want to use Solid alongside another JSX framework; include specifies files to be compiled for Solid and `exclude` does the opposite. diff --git a/.changeset/cool-jokes-clap.md b/.changeset/cool-jokes-clap.md deleted file mode 100644 index 74176b259..000000000 --- a/.changeset/cool-jokes-clap.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'astro': major ---- - -Fixes for the `class:list` directive - -- Previously, `class:list` would ocassionally not be merged the `class` prop when passed to Astro components. Now, `class:list` is always converted to a `class` prop (as a string value). -- Previously, `class:list` diverged from [`clsx`](https://github.com/lukeed/clsx) in a few edge cases. Now, `class:list` uses [`clsx`](https://github.com/lukeed/clsx) directly. - - `class:list` used to deduplicate matching values, but it no longer does - - `class:list` used to sort individual values, but it no longer does - - `class:list` used to support `Set` and other iterables, but it no longer does diff --git a/.changeset/curvy-experts-jog.md b/.changeset/curvy-experts-jog.md deleted file mode 100644 index 156f7eabc..000000000 --- a/.changeset/curvy-experts-jog.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -'@astrojs/cloudflare': major -'@astrojs/partytown': major -'@astrojs/tailwind': major -'@astrojs/netlify': major -'@astrojs/sitemap': major -'@astrojs/preact': major -'@astrojs/svelte': major -'@astrojs/vercel': major -'@astrojs/react': major -'@astrojs/solid-js': major -'@astrojs/deno': major -'@astrojs/node': major -'@astrojs/lit': major -'@astrojs/mdx': major -'@astrojs/vue': major -'@astrojs/markdown-remark': major -'create-astro': major -'@astrojs/prism': major -'@astrojs/rss': major -'@astrojs/telemetry': major -'astro': major -'@astrojs/alpinejs': minor -'@astrojs/prefetch': minor -'@astrojs/markdoc': minor -'@astrojs/underscore-redirects': minor -'@astrojs/internal-helpers': minor ---- - -Astro 3.0 Release Candidate diff --git a/.changeset/cyan-carrots-stare.md b/.changeset/cyan-carrots-stare.md deleted file mode 100644 index f7bcd4870..000000000 --- a/.changeset/cyan-carrots-stare.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Update error message when Sharp couldn't be found (tends to happen on pnpm notably) diff --git a/.changeset/dirty-lies-cover.md b/.changeset/dirty-lies-cover.md deleted file mode 100644 index ae74e348e..000000000 --- a/.changeset/dirty-lies-cover.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -'@astrojs/cloudflare': minor -'@astrojs/netlify': minor -'@astrojs/vercel': minor -'@astrojs/deno': minor -'@astrojs/node': minor -'astro': minor ---- - -Introduced the concept of feature map. A feature map is a list of features that are built-in in Astro, and an Adapter -can tell Astro if it can support it. - -```ts -import {AstroIntegration} from "./astro"; - -function myIntegration(): AstroIntegration { - return { - name: 'astro-awesome-list', - // new feature map - supportedAstroFeatures: { - hybridOutput: 'experimental', - staticOutput: 'stable', - serverOutput: 'stable', - assets: { - supportKind: 'stable', - isSharpCompatible: false, - isSquooshCompatible: false, - }, - } - } -} -``` diff --git a/.changeset/fair-emus-divide.md b/.changeset/fair-emus-divide.md deleted file mode 100644 index 529760241..000000000 --- a/.changeset/fair-emus-divide.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -'astro': major -'@astrojs/netlify': minor ---- - -The `build.split` and `build.excludeMiddleware` configuration options are deprecated and have been replaced by options in the adapter config. - -If your config includes the `build.excludeMiddleware` option, replace it with `edgeMiddleware` in your adapter options: - -```diff -import { defineConfig } from "astro/config"; -import netlify from "@astrojs/netlify/functions"; - -export default defineConfig({ - build: { -- excludeMiddleware: true - }, - adapter: netlify({ -+ edgeMiddleware: true - }), -}); -``` - -If your config includes the `build.split` option, replace it with `functionPerRoute` in your adapter options: - -```diff -import { defineConfig } from "astro/config"; -import netlify from "@astrojs/netlify/functions"; - -export default defineConfig({ - build: { -- split: true - }, - adapter: netlify({ -+ functionPerRoute: true - }), -}); -``` - diff --git a/.changeset/fair-eyes-promise.md b/.changeset/fair-eyes-promise.md deleted file mode 100644 index c66a42d17..000000000 --- a/.changeset/fair-eyes-promise.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@astrojs/mdx': major ---- - -Support Astro 3 JSX format - -This upgrades the MDX plugin to correctly work with the new JSX render API in Astro 3. diff --git a/.changeset/famous-queens-itch.md b/.changeset/famous-queens-itch.md deleted file mode 100644 index e3538cdd6..000000000 --- a/.changeset/famous-queens-itch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/mdx': patch ---- - -Re-orders the MDX plugin to run before Astro's JSX plugin diff --git a/.changeset/five-geese-crash.md b/.changeset/five-geese-crash.md deleted file mode 100644 index 832d3daca..000000000 --- a/.changeset/five-geese-crash.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'astro': major ---- - -Change the [View Transition built-in animation](https://docs.astro.build/en/guides/view-transitions/#built-in-animation-directives) options. - -The `transition:animate` value `morph` has been renamed to `initial`. Also, this is no longer the default animation. - -If no `transition:animate` directive is specified, your animations will now default to `fade`. - -Astro also supports a new `transition:animate` value, `none`. This value can be used on a page's `` element to disable animated full-page transitions on an entire page. diff --git a/.changeset/four-houses-compete.md b/.changeset/four-houses-compete.md deleted file mode 100644 index 641bb1035..000000000 --- a/.changeset/four-houses-compete.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -'astro': major ---- - -Sharp is now the default image service used for `astro:assets`. If you would prefer to still use Squoosh, you can update your config with the following: - -```ts -import { defineConfig, squooshImageService } from "astro/config"; - -// https://astro.build/config -export default defineConfig({ - image: { - service: squooshImageService(), - } -}) -``` - -However, not only do we recommend using Sharp as it is faster and more reliable, it is also highly likely that the Squoosh service will be removed in a future release. diff --git a/.changeset/fresh-shrimps-happen.md b/.changeset/fresh-shrimps-happen.md deleted file mode 100644 index deb4f5c94..000000000 --- a/.changeset/fresh-shrimps-happen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/react": patch ---- - -Publish missing `vnode-children.js` file diff --git a/.changeset/gentle-deers-yawn.md b/.changeset/gentle-deers-yawn.md deleted file mode 100644 index 30e577c69..000000000 --- a/.changeset/gentle-deers-yawn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Call `astro sync` once before calling `astro check` diff --git a/.changeset/gentle-meals-crash.md b/.changeset/gentle-meals-crash.md deleted file mode 100644 index 5314442ea..000000000 --- a/.changeset/gentle-meals-crash.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'astro': major ---- - -Remove support for `Astro.__renderMarkdown` which is used by `@astrojs/markdown-component`. - -The `` component was deprecated in Astro v1 and is completely removed in v3. This integration must now be removed from your project. - -As an alternative, you can use community packages that provide a similar component like https://github.com/natemoo-re/astro-remote instead. diff --git a/.changeset/giant-plants-sip.md b/.changeset/giant-plants-sip.md deleted file mode 100644 index 884021b8e..000000000 --- a/.changeset/giant-plants-sip.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -'astro': major ---- - -Remove backwards-compatible kebab-case transform for camelCase CSS variable names passed to the `style` attribute. If you were relying on the kebab-case transform in your styles, make sure to use the camelCase version to prevent missing styles. For example: - -```astro ---- -const myValue = "red" ---- - - -
- - -
- - -
-``` - -```diff - -``` \ No newline at end of file diff --git a/.changeset/gorgeous-kiwis-stare.md b/.changeset/gorgeous-kiwis-stare.md deleted file mode 100644 index d7129ed88..000000000 --- a/.changeset/gorgeous-kiwis-stare.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Use .js to import logger diff --git a/.changeset/grumpy-pens-melt.md b/.changeset/grumpy-pens-melt.md deleted file mode 100644 index 14faf0676..000000000 --- a/.changeset/grumpy-pens-melt.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'astro': minor ---- - -View Transitions unflagged - -View Transition support in Astro is now unflagged. For those who have used the experimental feature you can remove the flag in your Astro config: - -```diff -import { defineConfig } from 'astro' - -export default defineConfig({ -- experimental: { -- viewTransitions: true, -- } -}) -``` - -After removing this flag, please also consult the specific [upgrade to v3.0 advice](https://docs.astro.build/en/guides/view-transitions/#upgrade-to-v30-from-v2x) as some API features have changed and you may have breaking changes with your existing view transitions. - -See the [View Transitions guide](https://docs.astro.build/en/guides/view-transitions/) to learn how to use the API. diff --git a/.changeset/grumpy-years-remember.md b/.changeset/grumpy-years-remember.md deleted file mode 100644 index 1e1906cd9..000000000 --- a/.changeset/grumpy-years-remember.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fix, lazily initialize ResponseWithEncoding diff --git a/.changeset/happy-penguins-hug.md b/.changeset/happy-penguins-hug.md deleted file mode 100644 index 215031769..000000000 --- a/.changeset/happy-penguins-hug.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Remove deprecated config option types, deprecated script/style attributes, and deprecated `image` export from `astro:content` diff --git a/.changeset/heavy-countries-wonder.md b/.changeset/heavy-countries-wonder.md deleted file mode 100644 index 599f0d8bb..000000000 --- a/.changeset/heavy-countries-wonder.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Add a type param to AstroGlobal to type params. This will eventually be used automatically by our tooling to provide typing and completions for `Astro.params` diff --git a/.changeset/heavy-walls-arrive.md b/.changeset/heavy-walls-arrive.md deleted file mode 100644 index 68f64dacb..000000000 --- a/.changeset/heavy-walls-arrive.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@astrojs/cloudflare': major -'@astrojs/netlify': major -'@astrojs/vercel': major -'astro': major ---- - -When using an adapter that supports neither Squoosh or Sharp, Astro will now automatically use an image service that does not support processing, but still provides the other benefits of `astro:assets` such as enforcing `alt`, no CLS etc to users diff --git a/.changeset/honest-houses-deny.md b/.changeset/honest-houses-deny.md deleted file mode 100644 index 962e04423..000000000 --- a/.changeset/honest-houses-deny.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'@astrojs/rss': major ---- - -Update the `rss()` default export to return a `Response` instead of a simple object, which is deprecated in Astro 3.0. If you were directly returning the `rss()` result from an endpoint before, this breaking change should not affect you. - -You can also import `getRssString()` to get the RSS string directly and use it to return your own Response: - -```ts -// src/pages/rss.xml.js -import { getRssString } from '@astrojs/rss'; - -export async function get(context) { - const rssString = await getRssString({ - title: 'Buzz’s Blog', - ... - }); - - return new Response(rssString, { - headers: { - 'Content-Type': 'application/xml', - }, - }); -} -``` diff --git a/.changeset/large-countries-share.md b/.changeset/large-countries-share.md deleted file mode 100644 index b3101d2f2..000000000 --- a/.changeset/large-countries-share.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@astrojs/preact': major ---- - -New `include` and `exclude` config options - -The Preact integration now has new `include` and `exclude` config options. Use these if you want to use Preact alongside another JSX framework; include specifies files to be compiled for Preact and `exclude` does the opposite. diff --git a/.changeset/light-badgers-mate.md b/.changeset/light-badgers-mate.md deleted file mode 100644 index ea0451bec..000000000 --- a/.changeset/light-badgers-mate.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'astro': patch ---- - -Specify `data-astro-reload` (no value) on an anchor element to force the browser to ignore view transitions and fall back to default loading. - -This is helpful when navigating to documents that have different content-types, e.g. application/pdf, where you want to use the build in viewer of the browser. -Example: `...` diff --git a/.changeset/long-chefs-jump.md b/.changeset/long-chefs-jump.md deleted file mode 100644 index ed8f47614..000000000 --- a/.changeset/long-chefs-jump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -The scrollend mechanism is a better way to record the scroll position compared to throttling, so we now use it whenever a browser supports it. \ No newline at end of file diff --git a/.changeset/loud-candles-admire.md b/.changeset/loud-candles-admire.md deleted file mode 100644 index 3fe1f12e7..000000000 --- a/.changeset/loud-candles-admire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/mdx': patch ---- - -Handle `components` exports handling itself diff --git a/.changeset/lovely-walls-call.md b/.changeset/lovely-walls-call.md deleted file mode 100644 index 408fa00c5..000000000 --- a/.changeset/lovely-walls-call.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Improve fidelity of time stats when running `astro build` diff --git a/.changeset/many-impalas-sit.md b/.changeset/many-impalas-sit.md deleted file mode 100644 index ad48de4f3..000000000 --- a/.changeset/many-impalas-sit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fix `image.service` requiring to be set manually when `image.domains` or `image.remotePatterns` was assigned a value diff --git a/.changeset/many-pears-explode.md b/.changeset/many-pears-explode.md deleted file mode 100644 index 1e2a30edc..000000000 --- a/.changeset/many-pears-explode.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -'astro': major ---- - -Export experimental `dev`, `build`, `preview`, and `sync` APIs from `astro`. These APIs allow you to run Astro's commands programmatically, and replaces the previous entry point that runs the Astro CLI. - -While these APIs are experimental, the inline config parameter is relatively stable without foreseeable changes. However, the returned results of these APIs are more likely to change in the future. - -```ts -import { dev, build, preview, sync, type AstroInlineConfig } from 'astro'; - -// Inline Astro config object. -// Provide a path to a configuration file to load or set options directly inline. -const inlineConfig: AstroInlineConfig = { - // Inline-specific options... - configFile: './astro.config.mjs', - logLevel: 'info', - // Standard Astro config options... - site: 'https://example.com', -}; - -// Start the Astro dev server -const devServer = await dev(inlineConfig); -await devServer.stop(); - -// Build your Astro project -await build(inlineConfig); - -// Preview your built project -const previewServer = await preview(inlineConfig); -await previewServer.stop(); - -// Generate types for your Astro project -await sync(inlineConfig); -``` diff --git a/.changeset/mighty-dancers-lay.md b/.changeset/mighty-dancers-lay.md deleted file mode 100644 index 873c4edd1..000000000 --- a/.changeset/mighty-dancers-lay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Removed support for old syntax of the API routes. diff --git a/.changeset/nasty-garlics-listen.md b/.changeset/nasty-garlics-listen.md deleted file mode 100644 index e1b19b96b..000000000 --- a/.changeset/nasty-garlics-listen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Reimplement https://github.com/withastro/astro/pull/7509 to correctly emit pre-rendered pages now that `build.split` is deprecated and this configuration has been moved to `functionPerRoute` inside the adapter. diff --git a/.changeset/neat-mugs-end.md b/.changeset/neat-mugs-end.md deleted file mode 100644 index dd65708a7..000000000 --- a/.changeset/neat-mugs-end.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'astro': minor ---- - - -`astro:`namespace aliases for middleware and components - -This adds aliases of `astro:middleware` and `astro:components` for the middleware and components modules. This is to make our documentation consistent between are various modules, where some are virtual modules and others are not. Going forward new built-in modules will use this namespace. diff --git a/.changeset/neat-owls-run.md b/.changeset/neat-owls-run.md deleted file mode 100644 index 501b5319f..000000000 --- a/.changeset/neat-owls-run.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'astro': major ---- - -Remove exports for `astro/internal/*` and `astro/runtime/server/*` in favour of `astro/runtime/*`. Add new `astro/compiler-runtime` export for compiler-specific runtime code. - -These are exports for Astro's internal API and should not affect your project, but if you do use these entrypoints, you can migrate like below: - -```diff -- import 'astro/internal/index.js'; -+ import 'astro/runtime/server/index.js'; - -- import 'astro/server/index.js'; -+ import 'astro/runtime/server/index.js'; -``` - -```diff -import { transform } from '@astrojs/compiler'; - -const result = await transform(source, { -- internalURL: 'astro/runtime/server/index.js', -+ internalURL: 'astro/compiler-runtime', - // ... -}); -``` diff --git a/.changeset/neat-suns-search.md b/.changeset/neat-suns-search.md deleted file mode 100644 index da743c9c7..000000000 --- a/.changeset/neat-suns-search.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'astro': major ---- - -Implements a new scope style strategy called `"attribute"`. When enabled, styles are applied using `data-*` attributes. - -The **default** value of `scopedStyleStrategy` is `"attribute"`. - -If you want to use the previous behaviour, you have to use the `"where"` option: - -```diff -import { defineConfig } from 'astro/config'; - -export default defineConfig({ -+ scopedStyleStrategy: 'where', -}); -``` diff --git a/.changeset/ninety-boats-brake.md b/.changeset/ninety-boats-brake.md deleted file mode 100644 index 30c13a820..000000000 --- a/.changeset/ninety-boats-brake.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@astrojs/react': patch -'@astrojs/preact': patch -'@astrojs/vue': patch -'@astrojs/solid-js': patch -'@astrojs/svelte': patch ---- - -Automatically unmount islands when `astro:unmount` is fired diff --git a/.changeset/odd-books-live.md b/.changeset/odd-books-live.md deleted file mode 100644 index 40f0d7c17..000000000 --- a/.changeset/odd-books-live.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -'astro': minor ---- - -Integrations can now log messages using Astro’s built-in logger. - -The logger is available to all hooks as an additional parameter: - -```ts -import {AstroIntegration} from "./astro"; - -// integration.js -export function myIntegration(): AstroIntegration { - return { - name: "my-integration", - hooks: { - "astro:config:done": ({ logger }) => { - logger.info("Configure integration..."); - } - } - } -} -``` diff --git a/.changeset/olive-moles-tan.md b/.changeset/olive-moles-tan.md deleted file mode 100644 index 9840fd4e3..000000000 --- a/.changeset/olive-moles-tan.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/deno': patch ---- - -TypeScript users now get better suggestions when configuring the Deno adapter. diff --git a/.changeset/perfect-horses-tell.md b/.changeset/perfect-horses-tell.md deleted file mode 100644 index 7723c665f..000000000 --- a/.changeset/perfect-horses-tell.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -'astro': major ---- - -Astro's JSX handling has been refactored with better support for each framework. - -Previously, Astro automatically scanned your components to determine which framework-specific transformations should be used. In practice, supporting advanced features like Fast Refresh with this approach proved difficult. - -Now, Astro determines which framework to use with `include` and `exclude` config options where you can specify files and folders on a per-framework basis. When using multiple JSX frameworks in the same project, users should manually control which files belong to each framework using the `include` and `exclude` options. - -```js -export default defineConfig({ - // The `include` config is only needed in projects that use multiple JSX frameworks; - // if only using one no extra config is needed. - integrations: [ - preact({ - include: ['**/preact/*'] - }), - react({ - include: ['**/react/*'] - }), - solid({ - include: ['**/solid/*'], - }), - ] -}); -``` diff --git a/.changeset/perfect-socks-hammer.md b/.changeset/perfect-socks-hammer.md deleted file mode 100644 index baae63ffe..000000000 --- a/.changeset/perfect-socks-hammer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fire `astro:unmount` event when island is disconnected diff --git a/.changeset/plenty-keys-add.md b/.changeset/plenty-keys-add.md deleted file mode 100644 index 73a78ba3b..000000000 --- a/.changeset/plenty-keys-add.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -'@astrojs/vercel': major ---- - -Remove the Vercel Edge adapter - - `@astrojs/vercel/serverless` now supports Edge middleware, so a separate adapter for Edge itself (deploying your entire app to the edge) is no longer necessary. Please update your Astro config to reflect this change: - - ```diff - // astro.config.mjs -import { defineConfig } from 'astro/config'; -- import vercel from '@astrojs/vercel/edge'; -+ import vercel from '@astrojs/vercel/serverless'; - -export default defineConfig({ - output: 'server', - adapter: vercel({ -+ edgeMiddleware: true - }), -}); -``` - -This adapter had several known limitations and compatibility issues that prevented many people from using it in production. To reduce maintenance costs and because we have a better story with Serveless + Edge Middleware, we are removing the Edge adapter. diff --git a/.changeset/popular-carrots-sneeze.md b/.changeset/popular-carrots-sneeze.md deleted file mode 100644 index 0f914891d..000000000 --- a/.changeset/popular-carrots-sneeze.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Open to configured `base` when `astro dev --open` runs diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index c08c9984e..000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "mode": "exit", - "tag": "rc", - "initialVersions": { - "astro": "2.9.6", - "@astrojs/prism": "2.1.2", - "@astrojs/rss": "2.4.3", - "create-astro": "3.1.10", - "@astrojs/alpinejs": "0.2.2", - "@astrojs/cloudflare": "6.6.2", - "@astrojs/deno": "4.3.0", - "@astrojs/lit": "2.1.0", - "@astrojs/markdoc": "0.4.4", - "@astrojs/mdx": "0.19.7", - "@astrojs/netlify": "2.5.1", - "@astrojs/node": "5.3.0", - "@astrojs/partytown": "1.2.3", - "@astrojs/preact": "2.2.1", - "@astrojs/prefetch": "0.3.0", - "@astrojs/react": "2.2.1", - "@astrojs/sitemap": "2.0.1", - "@astrojs/solid-js": "2.2.0", - "@astrojs/svelte": "3.1.0", - "@astrojs/tailwind": "4.0.0", - "@astrojs/vercel": "3.7.4", - "@astrojs/vue": "2.2.1", - "@astrojs/internal-helpers": "0.1.1", - "@astrojs/markdown-remark": "2.2.1", - "@astrojs/telemetry": "2.1.1", - "@astrojs/underscore-redirects": "0.2.0" - }, - "changesets": [ - "afraid-dots-whisper", - "angry-dogs-shake", - "big-tips-whisper", - "brave-cheetahs-float", - "breezy-books-notice", - "chatty-ways-hunt", - "chilled-ducks-grin", - "clever-bats-breathe", - "cool-feet-rest", - "cool-jokes-clap", - "curvy-experts-jog", - "cyan-carrots-stare", - "dirty-lies-cover", - "fair-emus-divide", - "fair-eyes-promise", - "famous-queens-itch", - "five-geese-crash", - "four-houses-compete", - "fresh-shrimps-happen", - "gentle-deers-yawn", - "gentle-meals-crash", - "giant-plants-sip", - "gorgeous-kiwis-stare", - "grumpy-pens-melt", - "grumpy-years-remember", - "happy-penguins-hug", - "heavy-countries-wonder", - "heavy-walls-arrive", - "honest-houses-deny", - "large-countries-share", - "light-badgers-mate", - "long-chefs-jump", - "loud-candles-admire", - "lovely-walls-call", - "many-impalas-sit", - "many-pears-explode", - "mighty-dancers-lay", - "nasty-garlics-listen", - "neat-mugs-end", - "neat-owls-run", - "neat-suns-search", - "ninety-boats-brake", - "odd-books-live", - "olive-moles-tan", - "perfect-horses-tell", - "perfect-socks-hammer", - "plenty-keys-add", - "popular-carrots-sneeze", - "proud-fans-type", - "purple-buses-prove", - "quick-boats-bow", - "rude-ears-play", - "serious-waves-fry", - "shiny-dryers-swim", - "silent-bikes-crash", - "silly-dolphins-try", - "six-grapes-look", - "slimy-carrots-sell", - "small-nails-try", - "smart-numbers-shout", - "spicy-eels-rush", - "spicy-icons-live", - "spicy-stingrays-cheer", - "strange-peas-agree", - "strong-needles-accept", - "strong-papayas-chew", - "swift-taxis-sing", - "tame-files-glow", - "tame-knives-shake", - "tasty-camels-speak", - "tasty-dragons-smash", - "thin-ants-repeat", - "three-adults-exist", - "three-onions-repeat", - "tricky-candles-suffer", - "twelve-coats-rush", - "twenty-cheetahs-deny", - "unlucky-hotels-try", - "unlucky-ravens-type", - "unlucky-sheep-build", - "violet-peaches-invent", - "warm-weeks-yell", - "wet-foxes-sleep", - "wild-bobcats-carry", - "wise-cameras-agree", - "yellow-tips-cover", - "young-roses-teach" - ] -} diff --git a/.changeset/proud-fans-type.md b/.changeset/proud-fans-type.md deleted file mode 100644 index 8b58da136..000000000 --- a/.changeset/proud-fans-type.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': minor ---- - -Finalize View Transition event names diff --git a/.changeset/purple-buses-prove.md b/.changeset/purple-buses-prove.md deleted file mode 100644 index c1e4876c9..000000000 --- a/.changeset/purple-buses-prove.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Remove StreamingCompatibleResponse polyfill diff --git a/.changeset/quick-boats-bow.md b/.changeset/quick-boats-bow.md deleted file mode 100644 index 1ab83ed5a..000000000 --- a/.changeset/quick-boats-bow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Removed duplicate `astro/dist/jsx` export. Please use the `astro/jsx` export instead diff --git a/.changeset/rude-ears-play.md b/.changeset/rude-ears-play.md deleted file mode 100644 index 660cfcb34..000000000 --- a/.changeset/rude-ears-play.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -Remove MDX plugin re-ordering hack diff --git a/.changeset/serious-waves-fry.md b/.changeset/serious-waves-fry.md deleted file mode 100644 index a8b8d77c1..000000000 --- a/.changeset/serious-waves-fry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': major ---- - -The scoped hash created by the Astro compiler is now **lowercase**. diff --git a/.changeset/shiny-dryers-swim.md b/.changeset/shiny-dryers-swim.md deleted file mode 100644 index f943b2180..000000000 --- a/.changeset/shiny-dryers-swim.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Paginate will now return exact types instead of a naive Record diff --git a/.changeset/silent-bikes-crash.md b/.changeset/silent-bikes-crash.md deleted file mode 100644 index 66f066943..000000000 --- a/.changeset/silent-bikes-crash.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@astrojs/rss': patch -'astro': patch ---- - -Deprecate the `markdown.drafts` configuration option. - -If you'd like to create draft pages that are visible in dev but not in production, you can [migrate to content collections](https://docs.astro.build/en/guides/content-collections/#migrating-from-file-based-routing) and [manually filter out pages](https://docs.astro.build/en/guides/content-collections/#filtering-collection-queries) with the `draft: true` frontmatter property instead. diff --git a/.changeset/silly-dolphins-try.md b/.changeset/silly-dolphins-try.md deleted file mode 100644 index dcd15130d..000000000 --- a/.changeset/silly-dolphins-try.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@astrojs/vercel': major ---- - -Vercel adapter now defaults to `functionPerRoute`. - -With this change, `@astrojs/vercel/serverless` now splits each route into its own function. By doing this, the size of each function is reduced and startup time is faster. - -You can disable this option, which will cause the code to be bundled into a single function, by setting `functionPerRoute` to `false`. diff --git a/.changeset/six-grapes-look.md b/.changeset/six-grapes-look.md deleted file mode 100644 index edf10e01a..000000000 --- a/.changeset/six-grapes-look.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'astro': major ---- - -The value of `import.meta.env.BASE_URL`, which is derived from the `base` option, will no longer have a trailing slash added by default or when `trailingSlash: "ignore"` is set. The existing behavior of `base` in combination with `trailingSlash: "always"` or `trailingSlash: "never"` is unchanged. - -If your `base` already has a trailing slash, no change is needed. - -If your `base` does not have a trailing slash, add one to preserve the previous behaviour: - -```diff -// astro.config.mjs -- base: 'my-base', -+ base: 'my-base/', -``` diff --git a/.changeset/slimy-carrots-sell.md b/.changeset/slimy-carrots-sell.md deleted file mode 100644 index c1c9e694f..000000000 --- a/.changeset/slimy-carrots-sell.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@astrojs/react': major ---- - -Support for React Refresh - -The React integration now fully supports React Refresh and is backed by `@vitejs/plugin-react`. - -Also included in this change are new `include` and `exclude` config options. Use these if you want to use React alongside another JSX framework; include specifies files to be compiled for React and `exclude` does the opposite. diff --git a/.changeset/small-nails-try.md b/.changeset/small-nails-try.md deleted file mode 100644 index 3f6f591f1..000000000 --- a/.changeset/small-nails-try.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -On back navigation only animate view transitions that were animated going forward. diff --git a/.changeset/smart-numbers-shout.md b/.changeset/smart-numbers-shout.md deleted file mode 100644 index 29d9c97e6..000000000 --- a/.changeset/smart-numbers-shout.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'astro': major ---- - -Astro is smarter about CSS! Small stylesheets are now inlined by default, and no longer incur the cost of additional requests to your server. Your visitors will have to wait less before they see your pages, especially those in remote locations or in a subway. - -This may not be news to you if you had opted-in via the `build.inlineStylesheets` configuration. Stabilized in Astro 2.6 and set to "auto" by default for Starlight, this configuration allows you to reduce the number of requests for stylesheets by inlining them into + ``` + +- [#8170](https://github.com/withastro/astro/pull/8170) [`be6bbd2c8`](https://github.com/withastro/astro/commit/be6bbd2c86b9bf5268e765bb937dda00ff15781a) Thanks [@bluwy](https://github.com/bluwy)! - Remove deprecated config option types, deprecated script/style attributes, and deprecated `image` export from `astro:content` + +- [#8188](https://github.com/withastro/astro/pull/8188) [`7511a4980`](https://github.com/withastro/astro/commit/7511a4980fd36536464c317de33a5190427f430a) Thanks [@ematipico](https://github.com/ematipico)! - When using an adapter that supports neither Squoosh or Sharp, Astro will now automatically use an image service that does not support processing, but still provides the other benefits of `astro:assets` such as enforcing `alt`, no CLS etc to users + +- [#7979](https://github.com/withastro/astro/pull/7979) [`dbc97b121`](https://github.com/withastro/astro/commit/dbc97b121f42583728f1cdfdbf14575fda943f5b) Thanks [@bluwy](https://github.com/bluwy)! - Export experimental `dev`, `build`, `preview`, and `sync` APIs from `astro`. These APIs allow you to run Astro's commands programmatically, and replaces the previous entry point that runs the Astro CLI. + + While these APIs are experimental, the inline config parameter is relatively stable without foreseeable changes. However, the returned results of these APIs are more likely to change in the future. + + ```ts + import { dev, build, preview, sync, type AstroInlineConfig } from 'astro'; + + // Inline Astro config object. + // Provide a path to a configuration file to load or set options directly inline. + const inlineConfig: AstroInlineConfig = { + // Inline-specific options... + configFile: './astro.config.mjs', + logLevel: 'info', + // Standard Astro config options... + site: 'https://example.com', + }; + + // Start the Astro dev server + const devServer = await dev(inlineConfig); + await devServer.stop(); + + // Build your Astro project + await build(inlineConfig); + + // Preview your built project + const previewServer = await preview(inlineConfig); + await previewServer.stop(); + + // Generate types for your Astro project + await sync(inlineConfig); + ``` + +- [#8188](https://github.com/withastro/astro/pull/8188) [`7d2f311d4`](https://github.com/withastro/astro/commit/7d2f311d428e3d1c8c13b9bf2a708d6435713fc2) Thanks [@ematipico](https://github.com/ematipico)! - Removed support for old syntax of the API routes. + +- [#8085](https://github.com/withastro/astro/pull/8085) [`68efd4a8b`](https://github.com/withastro/astro/commit/68efd4a8b29f248397667801465b3152dc98e9a7) Thanks [@bluwy](https://github.com/bluwy)! - Remove exports for `astro/internal/*` and `astro/runtime/server/*` in favour of `astro/runtime/*`. Add new `astro/compiler-runtime` export for compiler-specific runtime code. + + These are exports for Astro's internal API and should not affect your project, but if you do use these entrypoints, you can migrate like below: + + ```diff + - import 'astro/internal/index.js'; + + import 'astro/runtime/server/index.js'; + + - import 'astro/server/index.js'; + + import 'astro/runtime/server/index.js'; + ``` + + ```diff + import { transform } from '@astrojs/compiler'; + + const result = await transform(source, { + - internalURL: 'astro/runtime/server/index.js', + + internalURL: 'astro/compiler-runtime', + // ... + }); + ``` + +- [#7893](https://github.com/withastro/astro/pull/7893) [`7bd1b86f8`](https://github.com/withastro/astro/commit/7bd1b86f85c06fdde0a1ed9146d01bac69990671) Thanks [@ematipico](https://github.com/ematipico)! - Implements a new scope style strategy called `"attribute"`. When enabled, styles are applied using `data-*` attributes. + + The **default** value of `scopedStyleStrategy` is `"attribute"`. + + If you want to use the previous behaviour, you have to use the `"where"` option: + + ```diff + import { defineConfig } from 'astro/config'; + + export default defineConfig({ + + scopedStyleStrategy: 'where', + }); + ``` + +- [#7924](https://github.com/withastro/astro/pull/7924) [`519a1c4e8`](https://github.com/withastro/astro/commit/519a1c4e8407c7abcb8d879b67a9f4b960652cae) Thanks [@matthewp](https://github.com/matthewp)! - Astro's JSX handling has been refactored with better support for each framework. + + Previously, Astro automatically scanned your components to determine which framework-specific transformations should be used. In practice, supporting advanced features like Fast Refresh with this approach proved difficult. + + Now, Astro determines which framework to use with `include` and `exclude` config options where you can specify files and folders on a per-framework basis. When using multiple JSX frameworks in the same project, users should manually control which files belong to each framework using the `include` and `exclude` options. + + ```js + export default defineConfig({ + // The `include` config is only needed in projects that use multiple JSX frameworks; + // if only using one no extra config is needed. + integrations: [ + preact({ + include: ['**/preact/*'], + }), + react({ + include: ['**/react/*'], + }), + solid({ + include: ['**/solid/*'], + }), + ], + }); + ``` + +- [#8030](https://github.com/withastro/astro/pull/8030) [`5208a3c8f`](https://github.com/withastro/astro/commit/5208a3c8fefcec7694857fb344af351f4631fc34) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Removed duplicate `astro/dist/jsx` export. Please use the `astro/jsx` export instead + +- [#8188](https://github.com/withastro/astro/pull/8188) [`84af8ed9d`](https://github.com/withastro/astro/commit/84af8ed9d1e6401c6ebc9c60fe8cddb44d5044b0) Thanks [@ematipico](https://github.com/ematipico)! - Remove MDX plugin re-ordering hack + +- [#8180](https://github.com/withastro/astro/pull/8180) [`f003e7364`](https://github.com/withastro/astro/commit/f003e7364317cafdb8589913b26b28e928dd07c9) Thanks [@ematipico](https://github.com/ematipico)! - The scoped hash created by the Astro compiler is now **lowercase**. + +- [#7878](https://github.com/withastro/astro/pull/7878) [`0f637c71e`](https://github.com/withastro/astro/commit/0f637c71e511cb4c51712128d217a26c8eee4d40) Thanks [@bluwy](https://github.com/bluwy)! - The value of `import.meta.env.BASE_URL`, which is derived from the `base` option, will no longer have a trailing slash added by default or when `trailingSlash: "ignore"` is set. The existing behavior of `base` in combination with `trailingSlash: "always"` or `trailingSlash: "never"` is unchanged. + + If your `base` already has a trailing slash, no change is needed. + + If your `base` does not have a trailing slash, add one to preserve the previous behaviour: + + ```diff + // astro.config.mjs + - base: 'my-base', + + base: 'my-base/', + ``` + +- [#8118](https://github.com/withastro/astro/pull/8118) [`8a5b0c1f3`](https://github.com/withastro/astro/commit/8a5b0c1f3a4be6bb62db66ec70144109ff5b4c59) Thanks [@lilnasy](https://github.com/lilnasy)! - Astro is smarter about CSS! Small stylesheets are now inlined by default, and no longer incur the cost of additional requests to your server. Your visitors will have to wait less before they see your pages, especially those in remote locations or in a subway. + + This may not be news to you if you had opted-in via the `build.inlineStylesheets` configuration. Stabilized in Astro 2.6 and set to "auto" by default for Starlight, this configuration allows you to reduce the number of requests for stylesheets by inlining them into -

Testing

+

Testing index

diff --git a/packages/astro/test/ssr-split-manifest.test.js b/packages/astro/test/ssr-split-manifest.test.js index 38a3233ee..7df104e76 100644 --- a/packages/astro/test/ssr-split-manifest.test.js +++ b/packages/astro/test/ssr-split-manifest.test.js @@ -25,6 +25,11 @@ describe('astro:ssr-manifest, split', () => { setRoutes(routes) { currentRoutes = routes; }, + extendAdapter: { + adapterFeatures: { + functionPerRoute: true, + }, + }, }), // test suite was authored when inlineStylesheets defaulted to never build: { inlineStylesheets: 'never' }, @@ -70,4 +75,40 @@ describe('astro:ssr-manifest, split', () => { const html = await response.text(); expect(html.includes('Pre render me')).to.be.true; }); + + describe('when function per route is enabled', async () => { + before(async () => { + fixture = await loadFixture({ + root: './fixtures/ssr-split-manifest/', + output: 'server', + adapter: testAdapter({ + setEntryPoints(entries) { + if (entries) { + entryPoints = entries; + } + }, + setRoutes(routes) { + currentRoutes = routes; + }, + extendAdapter: { + adapterFeatures: { + functionPerRoute: true, + }, + }, + }), + // test suite was authored when inlineStylesheets defaulted to never + build: { inlineStylesheets: 'never' }, + }); + await fixture.build(); + }); + it('should correctly build, and not create a "uses" entry point', async () => { + const pagePath = 'src/pages/index.astro'; + const app = await fixture.loadEntryPoint(pagePath, currentRoutes); + const request = new Request('http://example.com/'); + const response = await app.render(request); + const html = await response.text(); + console.log(html); + expect(html.includes('Testing')).to.be.true; + }); + }); }); From d7579f36d7a1930ae53958a4be4b1b2df4416827 Mon Sep 17 00:00:00 2001 From: natemoo-re Date: Thu, 31 Aug 2023 17:37:00 +0000 Subject: [PATCH 29/48] [ci] format --- packages/astro/src/cli/info/index.ts | 39 ++++++++++++++++------------ 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/packages/astro/src/cli/info/index.ts b/packages/astro/src/cli/info/index.ts index 03bef2fea..2ee9ffd0d 100644 --- a/packages/astro/src/cli/info/index.ts +++ b/packages/astro/src/cli/info/index.ts @@ -1,12 +1,12 @@ /* eslint-disable no-console */ -import type yargs from 'yargs-parser'; import * as colors from 'kleur/colors'; +import { execSync } from 'node:child_process'; import { arch, platform } from 'node:os'; import prompts from 'prompts'; +import type yargs from 'yargs-parser'; import { resolveConfig } from '../../core/config/index.js'; import { ASTRO_VERSION } from '../../core/constants.js'; import { flagsToAstroInlineConfig } from '../flags.js'; -import { execSync } from 'node:child_process'; interface InfoOptions { flags: yargs.Arguments; @@ -18,13 +18,13 @@ export async function printInfo({ flags }: InfoOptions) { ['Node', process.version], ['System', getSystem()], ['Package Manager', getPackageManager()], - ] + ]; const inlineConfig = flagsToAstroInlineConfig(flags); try { const { userConfig } = await resolveConfig(inlineConfig, 'info'); - rows.push(['Output', userConfig.output ?? 'static']) - rows.push(['Adapter', userConfig.adapter?.name ?? 'none']) + rows.push(['Output', userConfig.output ?? 'static']); + rows.push(['Adapter', userConfig.adapter?.name ?? 'none']); const integrations = (userConfig?.integrations ?? []) .filter(Boolean) .flat() @@ -45,20 +45,25 @@ const SUPPORTED_SYSTEM = new Set(['darwin', 'win32']); async function copyToClipboard(text: string) { const system = platform(); if (!SUPPORTED_SYSTEM.has(system)) return; - + console.log(); const { shouldCopy } = await prompts({ type: 'confirm', name: 'shouldCopy', message: 'Copy to clipboard?', initial: true, - }) + }); if (!shouldCopy) return; const command = system === 'darwin' ? 'pbcopy' : 'clip'; try { - execSync(`echo ${JSON.stringify(text.trim())} | ${command}`, { encoding: 'utf8', stdio: 'ignore' }); + execSync(`echo ${JSON.stringify(text.trim())} | ${command}`, { + encoding: 'utf8', + stdio: 'ignore', + }); } catch (e) { - console.error(colors.red(`\nSorry, something went wrong!`) + ` Please copy the text above manually.`); + console.error( + colors.red(`\nSorry, something went wrong!`) + ` Please copy the text above manually.` + ); } } @@ -66,7 +71,7 @@ const PLATFORM_TO_OS: Partial, string>> = { darwin: 'macOS', win32: 'Windows', linux: 'Linux', -} +}; function getSystem() { const system = PLATFORM_TO_OS[platform()] ?? platform(); @@ -74,12 +79,12 @@ function getSystem() { } function getPackageManager() { - if (!process.env.npm_config_user_agent) { - return 'unknown' - } - const specifier = process.env.npm_config_user_agent.split(' ')[0]; - const name = specifier.substring(0, specifier.lastIndexOf('/')); - return name === 'npminstall' ? 'cnpm' : name; + if (!process.env.npm_config_user_agent) { + return 'unknown'; + } + const specifier = process.env.npm_config_user_agent.split(' ')[0]; + const name = specifier.substring(0, specifier.lastIndexOf('/')); + return name === 'npminstall' ? 'cnpm' : name; } const MAX_PADDING = 25; @@ -91,7 +96,7 @@ function printRow(label: string, value: string | string[]) { if (rest.length > 0) { for (const entry of rest) { plaintext += `\n${' '.repeat(MAX_PADDING)}${entry}`; - richtext += `\n${' '.repeat(MAX_PADDING)}${colors.green(entry)}` + richtext += `\n${' '.repeat(MAX_PADDING)}${colors.green(entry)}`; } } plaintext += '\n'; From 84427f33c139e6da9d1284a2bb6f420bb23d215c Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Thu, 31 Aug 2023 10:42:22 -0700 Subject: [PATCH 30/48] [ci] release (#8330) Co-authored-by: github-actions[bot] --- .changeset/beige-walls-grow.md | 5 -- .changeset/eight-zebras-rest.md | 5 -- .changeset/gorgeous-dogs-speak.md | 5 -- .changeset/late-foxes-juggle.md | 5 -- .changeset/twenty-crabs-fry.md | 5 -- examples/basics/package.json | 2 +- examples/blog/package.json | 2 +- examples/component/package.json | 2 +- examples/deno/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 2 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 2 +- examples/framework-solid/package.json | 2 +- examples/framework-svelte/package.json | 2 +- examples/framework-vue/package.json | 2 +- examples/hackernews/package.json | 2 +- examples/integration/package.json | 2 +- examples/middleware/package.json | 2 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 2 +- examples/with-markdoc/package.json | 2 +- examples/with-markdown-plugins/package.json | 2 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-mdx/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-vite-plugin-pwa/package.json | 2 +- examples/with-vitest/package.json | 2 +- packages/astro/CHANGELOG.md | 12 +++++ packages/astro/package.json | 2 +- packages/integrations/cloudflare/package.json | 2 +- packages/integrations/deno/package.json | 2 +- packages/integrations/markdoc/package.json | 2 +- packages/integrations/mdx/package.json | 2 +- packages/integrations/netlify/package.json | 2 +- packages/integrations/node/package.json | 2 +- packages/integrations/svelte/package.json | 2 +- packages/integrations/tailwind/package.json | 2 +- packages/integrations/vercel/CHANGELOG.md | 9 ++++ packages/integrations/vercel/package.json | 4 +- packages/integrations/vue/package.json | 2 +- pnpm-lock.yaml | 54 +++++++++---------- 46 files changed, 87 insertions(+), 91 deletions(-) delete mode 100644 .changeset/beige-walls-grow.md delete mode 100644 .changeset/eight-zebras-rest.md delete mode 100644 .changeset/gorgeous-dogs-speak.md delete mode 100644 .changeset/late-foxes-juggle.md delete mode 100644 .changeset/twenty-crabs-fry.md diff --git a/.changeset/beige-walls-grow.md b/.changeset/beige-walls-grow.md deleted file mode 100644 index 991ccba90..000000000 --- a/.changeset/beige-walls-grow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/vercel': patch ---- - -Add astro feature map and adapter features to the static adapter. This will remove the warning emitted by Astro. diff --git a/.changeset/eight-zebras-rest.md b/.changeset/eight-zebras-rest.md deleted file mode 100644 index 5f921c0b6..000000000 --- a/.changeset/eight-zebras-rest.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Improve `astro info` command formatting, allow users to copy info automatically diff --git a/.changeset/gorgeous-dogs-speak.md b/.changeset/gorgeous-dogs-speak.md deleted file mode 100644 index f479b86d8..000000000 --- a/.changeset/gorgeous-dogs-speak.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Exclude redirects from split entry points diff --git a/.changeset/late-foxes-juggle.md b/.changeset/late-foxes-juggle.md deleted file mode 100644 index 54374f2e4..000000000 --- a/.changeset/late-foxes-juggle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Prevent View Transition fallback from waiting on looping animations diff --git a/.changeset/twenty-crabs-fry.md b/.changeset/twenty-crabs-fry.md deleted file mode 100644 index 40e38852c..000000000 --- a/.changeset/twenty-crabs-fry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes scroll behavior when using View Transitions by enabling `manual` scroll restoration diff --git a/examples/basics/package.json b/examples/basics/package.json index cb9947d01..5b022f096 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.4" + "astro": "^3.0.5" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index c0dc959a4..1864a32b0 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -14,6 +14,6 @@ "@astrojs/mdx": "^1.0.0", "@astrojs/rss": "^3.0.0", "@astrojs/sitemap": "^3.0.0", - "astro": "^3.0.4" + "astro": "^3.0.5" } } diff --git a/examples/component/package.json b/examples/component/package.json index 14b9f93d0..de66702ae 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^3.0.4" + "astro": "^3.0.5" }, "peerDependencies": { "astro": "^2.0.0-beta.0" diff --git a/examples/deno/package.json b/examples/deno/package.json index d52b799c5..dc86ccac0 100644 --- a/examples/deno/package.json +++ b/examples/deno/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.4" + "astro": "^3.0.5" }, "devDependencies": { "@astrojs/deno": "^5.0.0" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index ea4216453..337237b5b 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -14,6 +14,6 @@ "@astrojs/alpinejs": "^0.3.0", "@types/alpinejs": "^3.7.2", "alpinejs": "^3.12.3", - "astro": "^3.0.4" + "astro": "^3.0.5" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index ecb6783b3..77137423e 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/lit": "^3.0.0", "@webcomponents/template-shadowroot": "^0.2.1", - "astro": "^3.0.4", + "astro": "^3.0.5", "lit": "^2.8.0" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index a39c2a004..8b0b64814 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -16,7 +16,7 @@ "@astrojs/solid-js": "^3.0.0", "@astrojs/svelte": "^4.0.0", "@astrojs/vue": "^3.0.0", - "astro": "^3.0.4", + "astro": "^3.0.5", "preact": "^10.17.1", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index d39252890..b4ddc309b 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.0.0", "@preact/signals": "^1.2.1", - "astro": "^3.0.4", + "astro": "^3.0.5", "preact": "^10.17.1" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 1e0b2875f..41f13bfca 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -14,7 +14,7 @@ "@astrojs/react": "^3.0.0", "@types/react": "^18.2.21", "@types/react-dom": "^18.2.7", - "astro": "^3.0.4", + "astro": "^3.0.5", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 9e5ba1a62..cf90e9ed8 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/solid-js": "^3.0.0", - "astro": "^3.0.4", + "astro": "^3.0.5", "solid-js": "^1.7.11" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index afe27882c..4866075a2 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/svelte": "^4.0.0", - "astro": "^3.0.4", + "astro": "^3.0.5", "svelte": "^4.2.0" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 884ad01d8..987030e99 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/vue": "^3.0.0", - "astro": "^3.0.4", + "astro": "^3.0.5", "vue": "^3.3.4" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 22de1926d..3e1b66836 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/node": "^6.0.0", - "astro": "^3.0.4" + "astro": "^3.0.5" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index 15f0fa1ee..220b6aade 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^3.0.4" + "astro": "^3.0.5" }, "peerDependencies": { "astro": "^2.0.0-beta.0" diff --git a/examples/middleware/package.json b/examples/middleware/package.json index 7e3d75cfd..5f18f11a8 100644 --- a/examples/middleware/package.json +++ b/examples/middleware/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@astrojs/node": "^6.0.0", - "astro": "^3.0.4", + "astro": "^3.0.5", "html-minifier": "^4.0.0" } } diff --git a/examples/minimal/package.json b/examples/minimal/package.json index ca21f650f..997d2513a 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.4" + "astro": "^3.0.5" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index 600405857..5b40e8e5d 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.4" + "astro": "^3.0.5" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index ab6c49fca..2f8c9750d 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.4" + "astro": "^3.0.5" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 37d39b4f7..55a82361a 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -14,7 +14,7 @@ "dependencies": { "@astrojs/node": "^6.0.0", "@astrojs/svelte": "^4.0.0", - "astro": "^3.0.4", + "astro": "^3.0.5", "svelte": "^4.2.0" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index 0da6c95e1..c34d95f22 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/markdoc": "^0.5.0", - "astro": "^3.0.4" + "astro": "^3.0.5" } } diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 8e4e60363..01b1e60f0 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/markdown-remark": "^3.0.0", - "astro": "^3.0.4", + "astro": "^3.0.5", "hast-util-select": "^5.0.5", "rehype-autolink-headings": "^6.1.1", "rehype-slug": "^5.1.0", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index ca06cf4b1..399a52490 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.4" + "astro": "^3.0.5" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index 55f716da2..54d3f74e3 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/mdx": "^1.0.0", "@astrojs/preact": "^3.0.0", - "astro": "^3.0.4", + "astro": "^3.0.5", "preact": "^10.17.1" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index d8b2e4d03..644d09591 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.0.0", "@nanostores/preact": "^0.5.0", - "astro": "^3.0.4", + "astro": "^3.0.5", "nanostores": "^0.9.3", "preact": "^10.17.1" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 9d2d9e9ea..b6eab5e6f 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -14,7 +14,7 @@ "@astrojs/mdx": "^1.0.0", "@astrojs/tailwind": "^5.0.0", "@types/canvas-confetti": "^1.6.0", - "astro": "^3.0.4", + "astro": "^3.0.5", "autoprefixer": "^10.4.15", "canvas-confetti": "^1.6.0", "postcss": "^8.4.28", diff --git a/examples/with-vite-plugin-pwa/package.json b/examples/with-vite-plugin-pwa/package.json index 4e3b80e9e..c6bf7ccda 100644 --- a/examples/with-vite-plugin-pwa/package.json +++ b/examples/with-vite-plugin-pwa/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.4", + "astro": "^3.0.5", "vite-plugin-pwa": "0.16.4", "workbox-window": "^7.0.0" } diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index 923f8a125..15ba98638 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^3.0.4", + "astro": "^3.0.5", "vitest": "^0.34.2" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 7c8f11c61..6c0c281a0 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,17 @@ # astro +## 3.0.5 + +### Patch Changes + +- [#8327](https://github.com/withastro/astro/pull/8327) [`5f3a44aee`](https://github.com/withastro/astro/commit/5f3a44aeeff3c5f31a8063b6005abb90343a817e) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Improve `astro info` command formatting, allow users to copy info automatically + +- [#8320](https://github.com/withastro/astro/pull/8320) [`b21038c19`](https://github.com/withastro/astro/commit/b21038c193fd30351235a1b241a4a0aaf4e692f2) Thanks [@ematipico](https://github.com/ematipico)! - Exclude redirects from split entry points + +- [#8331](https://github.com/withastro/astro/pull/8331) [`7a894eec3`](https://github.com/withastro/astro/commit/7a894eec3e6d2670632ca8cdb592cf5649a22d3e) Thanks [@matthewp](https://github.com/matthewp)! - Prevent View Transition fallback from waiting on looping animations + +- [#8231](https://github.com/withastro/astro/pull/8231) [`af41b03d0`](https://github.com/withastro/astro/commit/af41b03d05f8a561990de42ccc93663343da2c0d) Thanks [@justinbeaty](https://github.com/justinbeaty)! - Fixes scroll behavior when using View Transitions by enabling `manual` scroll restoration + ## 3.0.4 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 28f501145..e21ba678c 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "3.0.4", + "version": "3.0.5", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json index f2b5b1387..c1845fb03 100644 --- a/packages/integrations/cloudflare/package.json +++ b/packages/integrations/cloudflare/package.json @@ -45,7 +45,7 @@ "tiny-glob": "^0.2.9" }, "peerDependencies": { - "astro": "workspace:^3.0.4" + "astro": "workspace:^3.0.5" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/deno/package.json b/packages/integrations/deno/package.json index f9b23e2b3..037c870ab 100644 --- a/packages/integrations/deno/package.json +++ b/packages/integrations/deno/package.json @@ -36,7 +36,7 @@ "esbuild": "^0.19.2" }, "peerDependencies": { - "astro": "workspace:^3.0.4" + "astro": "workspace:^3.0.5" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json index e4eaba71e..6556c7639 100644 --- a/packages/integrations/markdoc/package.json +++ b/packages/integrations/markdoc/package.json @@ -75,7 +75,7 @@ "zod": "3.21.1" }, "peerDependencies": { - "astro": "workspace:^3.0.4" + "astro": "workspace:^3.0.5" }, "devDependencies": { "@astrojs/markdown-remark": "workspace:*", diff --git a/packages/integrations/mdx/package.json b/packages/integrations/mdx/package.json index f32678b0a..f85e91c75 100644 --- a/packages/integrations/mdx/package.json +++ b/packages/integrations/mdx/package.json @@ -54,7 +54,7 @@ "vfile": "^5.3.7" }, "peerDependencies": { - "astro": "workspace:^3.0.4" + "astro": "workspace:^3.0.5" }, "devDependencies": { "@types/chai": "^4.3.5", diff --git a/packages/integrations/netlify/package.json b/packages/integrations/netlify/package.json index 716d49ede..fbf81f9e0 100644 --- a/packages/integrations/netlify/package.json +++ b/packages/integrations/netlify/package.json @@ -43,7 +43,7 @@ "esbuild": "^0.19.2" }, "peerDependencies": { - "astro": "workspace:^3.0.4" + "astro": "workspace:^3.0.5" }, "devDependencies": { "@netlify/edge-functions": "^2.0.0", diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json index d94fe2dfb..32196837d 100644 --- a/packages/integrations/node/package.json +++ b/packages/integrations/node/package.json @@ -37,7 +37,7 @@ "server-destroy": "^1.0.1" }, "peerDependencies": { - "astro": "workspace:^3.0.4" + "astro": "workspace:^3.0.5" }, "devDependencies": { "@types/node": "^18.17.8", diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index 0bed53d93..13d38abf9 100644 --- a/packages/integrations/svelte/package.json +++ b/packages/integrations/svelte/package.json @@ -48,7 +48,7 @@ "vite": "^4.4.9" }, "peerDependencies": { - "astro": "workspace:^3.0.4", + "astro": "workspace:^3.0.5", "svelte": "^3.55.0 || ^4.0.0" }, "engines": { diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json index 1ba226084..51fb3c7d9 100644 --- a/packages/integrations/tailwind/package.json +++ b/packages/integrations/tailwind/package.json @@ -43,7 +43,7 @@ "vite": "^4.4.9" }, "peerDependencies": { - "astro": "workspace:^3.0.4", + "astro": "workspace:^3.0.5", "tailwindcss": "^3.0.24" } } diff --git a/packages/integrations/vercel/CHANGELOG.md b/packages/integrations/vercel/CHANGELOG.md index 6e1373e7b..5d7fb4af6 100644 --- a/packages/integrations/vercel/CHANGELOG.md +++ b/packages/integrations/vercel/CHANGELOG.md @@ -1,5 +1,14 @@ # @astrojs/vercel +## 4.0.2 + +### Patch Changes + +- [#8318](https://github.com/withastro/astro/pull/8318) [`c58472756`](https://github.com/withastro/astro/commit/c58472756ea30d2496592b2bde390cf858c1876f) Thanks [@ematipico](https://github.com/ematipico)! - Add astro feature map and adapter features to the static adapter. This will remove the warning emitted by Astro. + +- Updated dependencies [[`5f3a44aee`](https://github.com/withastro/astro/commit/5f3a44aeeff3c5f31a8063b6005abb90343a817e), [`b21038c19`](https://github.com/withastro/astro/commit/b21038c193fd30351235a1b241a4a0aaf4e692f2), [`7a894eec3`](https://github.com/withastro/astro/commit/7a894eec3e6d2670632ca8cdb592cf5649a22d3e), [`af41b03d0`](https://github.com/withastro/astro/commit/af41b03d05f8a561990de42ccc93663343da2c0d)]: + - astro@3.0.5 + ## 4.0.1 ### Patch Changes diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index 78a3fcfb4..fb853bf53 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/vercel", "description": "Deploy your site to Vercel", - "version": "4.0.1", + "version": "4.0.2", "type": "module", "author": "withastro", "license": "MIT", @@ -60,7 +60,7 @@ "web-vitals": "^3.4.0" }, "peerDependencies": { - "astro": "workspace:^3.0.4" + "astro": "workspace:^3.0.5" }, "devDependencies": { "@types/set-cookie-parser": "^2.4.3", diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index fb33cbf11..745867138 100644 --- a/packages/integrations/vue/package.json +++ b/packages/integrations/vue/package.json @@ -56,7 +56,7 @@ "vue": "^3.3.4" }, "peerDependencies": { - "astro": "workspace:^3.0.4", + "astro": "workspace:^3.0.5", "vue": "^3.2.30" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 884e444bd..5ba108296 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -125,7 +125,7 @@ importers: examples/basics: dependencies: astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro examples/blog: @@ -140,19 +140,19 @@ importers: specifier: ^3.0.0 version: link:../../packages/integrations/sitemap astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro examples/deno: dependencies: astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro devDependencies: '@astrojs/deno': @@ -171,7 +171,7 @@ importers: specifier: ^3.12.3 version: 3.12.3 astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro examples/framework-lit: @@ -183,7 +183,7 @@ importers: specifier: ^0.2.1 version: 0.2.1 astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro lit: specifier: ^2.8.0 @@ -207,7 +207,7 @@ importers: specifier: ^3.0.0 version: link:../../packages/integrations/vue astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro preact: specifier: ^10.17.1 @@ -237,7 +237,7 @@ importers: specifier: ^1.2.1 version: 1.2.1(preact@10.17.1) astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro preact: specifier: ^10.17.1 @@ -255,7 +255,7 @@ importers: specifier: ^18.2.7 version: 18.2.7 astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro react: specifier: ^18.2.0 @@ -270,7 +270,7 @@ importers: specifier: ^3.0.0 version: link:../../packages/integrations/solid astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro solid-js: specifier: ^1.7.11 @@ -282,7 +282,7 @@ importers: specifier: ^4.0.0 version: link:../../packages/integrations/svelte astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro svelte: specifier: ^4.2.0 @@ -294,7 +294,7 @@ importers: specifier: ^3.0.0 version: link:../../packages/integrations/vue astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro vue: specifier: ^3.3.4 @@ -306,13 +306,13 @@ importers: specifier: ^6.0.0 version: link:../../packages/integrations/node astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro examples/middleware: @@ -321,7 +321,7 @@ importers: specifier: ^6.0.0 version: link:../../packages/integrations/node astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro html-minifier: specifier: ^4.0.0 @@ -330,19 +330,19 @@ importers: examples/minimal: dependencies: astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro examples/non-html-pages: dependencies: astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro examples/ssr: @@ -354,7 +354,7 @@ importers: specifier: ^4.0.0 version: link:../../packages/integrations/svelte astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro svelte: specifier: ^4.2.0 @@ -366,7 +366,7 @@ importers: specifier: ^0.5.0 version: link:../../packages/integrations/markdoc astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro examples/with-markdown-plugins: @@ -375,7 +375,7 @@ importers: specifier: ^3.0.0 version: link:../../packages/markdown/remark astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro hast-util-select: specifier: ^5.0.5 @@ -396,7 +396,7 @@ importers: examples/with-markdown-shiki: dependencies: astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro examples/with-mdx: @@ -408,7 +408,7 @@ importers: specifier: ^3.0.0 version: link:../../packages/integrations/preact astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro preact: specifier: ^10.17.1 @@ -423,7 +423,7 @@ importers: specifier: ^0.5.0 version: 0.5.0(nanostores@0.9.3)(preact@10.17.1) astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro nanostores: specifier: ^0.9.3 @@ -444,7 +444,7 @@ importers: specifier: ^1.6.0 version: 1.6.0 astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro autoprefixer: specifier: ^10.4.15 @@ -462,7 +462,7 @@ importers: examples/with-vite-plugin-pwa: dependencies: astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro vite-plugin-pwa: specifier: 0.16.4 @@ -474,7 +474,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^3.0.4 + specifier: ^3.0.5 version: link:../../packages/astro vitest: specifier: ^0.34.2 From d3a6f9f836e35932a950e40ba69eff63d7db7eed Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Thu, 31 Aug 2023 11:05:39 -0700 Subject: [PATCH 31/48] add leading and trailing slash sanitization for params (#8276) * add leading and trailing slash sanitization for params * chore: fix lint * refactor: use shared trimSlashes util --------- Co-authored-by: Nate Moore Co-authored-by: Nate Moore --- .changeset/chilled-hornets-press.md | 5 ++ packages/astro/src/core/routing/params.ts | 5 +- .../units/routing/route-sanitization.test.js | 66 +++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 .changeset/chilled-hornets-press.md create mode 100644 packages/astro/test/units/routing/route-sanitization.test.js diff --git a/.changeset/chilled-hornets-press.md b/.changeset/chilled-hornets-press.md new file mode 100644 index 000000000..5283117fe --- /dev/null +++ b/.changeset/chilled-hornets-press.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Sanitize route params for leading and trailing slashes diff --git a/packages/astro/src/core/routing/params.ts b/packages/astro/src/core/routing/params.ts index fc05c9696..d2856563e 100644 --- a/packages/astro/src/core/routing/params.ts +++ b/packages/astro/src/core/routing/params.ts @@ -1,5 +1,6 @@ import type { GetStaticPathsItem, Params, RouteData } from '../../@types/astro'; import { validateGetStaticPathsParameter } from './validation.js'; +import { trimSlashes } from '../path.js'; /** * given an array of params like `['x', 'y', 'z']` for @@ -32,7 +33,9 @@ export function stringifyParams(params: GetStaticPathsItem['params'], route: Rou const validatedParams = Object.entries(params).reduce((acc, next) => { validateGetStaticPathsParameter(next, route.component); const [key, value] = next; - acc[key] = value?.toString(); + if (value !== undefined) { + acc[key] = typeof value === 'string' ? trimSlashes(value) : value.toString() + } return acc; }, {} as Params); diff --git a/packages/astro/test/units/routing/route-sanitization.test.js b/packages/astro/test/units/routing/route-sanitization.test.js new file mode 100644 index 000000000..3bddeb92a --- /dev/null +++ b/packages/astro/test/units/routing/route-sanitization.test.js @@ -0,0 +1,66 @@ +import { + createBasicSettings, + createFs, + createRequestAndResponse, + defaultLogger, +} from '../test-utils.js'; +import { fileURLToPath } from 'node:url'; +import { expect } from 'chai'; +import { createContainer } from '../../../dist/core/dev/container.js'; +import * as cheerio from 'cheerio'; +import testAdapter from '../../test-adapter.js'; + +const root = new URL('../../fixtures/alias/', import.meta.url); +const fileSystem = { +'/src/pages/[...testSlashTrim].astro': ` + --- + export function getStaticPaths() { + return [ + { + params: { + testSlashTrim: "/a-route-param-with-leading-trailing-slash/", + }, + }, + ]; + } + --- +

Success!

+`, +}; + +describe('Route sanitization', () => { + let container; + let settings; + + before(async () => { + const fs = createFs(fileSystem, root); + settings = await createBasicSettings({ + root: fileURLToPath(root), + trailingSlash: 'never', + output: 'hybrid', + adapter: testAdapter(), + }); + container = await createContainer({ + fs, + settings, + logger: defaultLogger, + }); + }); + + after(async () => { + await container.close(); + }); + + describe('Request', () => { + it('should correctly match a route param with a trailing slash', async () => { + const { req, res, text } = createRequestAndResponse({ + method: 'GET', + url: '/a-route-param-with-leading-trailing-slash', + }); + container.handle(req, res); + const html = await text(); + const $ = cheerio.load(html); + expect($('p').text()).to.equal('Success!'); + }); + }); +}); From a4780e97f61ac55d3c111efb7b484a74383592a9 Mon Sep 17 00:00:00 2001 From: natemoo-re Date: Thu, 31 Aug 2023 18:08:08 +0000 Subject: [PATCH 32/48] [ci] format --- packages/astro/src/core/routing/params.ts | 4 ++-- packages/astro/test/units/routing/route-sanitization.test.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/astro/src/core/routing/params.ts b/packages/astro/src/core/routing/params.ts index d2856563e..1e6b16858 100644 --- a/packages/astro/src/core/routing/params.ts +++ b/packages/astro/src/core/routing/params.ts @@ -1,6 +1,6 @@ import type { GetStaticPathsItem, Params, RouteData } from '../../@types/astro'; -import { validateGetStaticPathsParameter } from './validation.js'; import { trimSlashes } from '../path.js'; +import { validateGetStaticPathsParameter } from './validation.js'; /** * given an array of params like `['x', 'y', 'z']` for @@ -34,7 +34,7 @@ export function stringifyParams(params: GetStaticPathsItem['params'], route: Rou validateGetStaticPathsParameter(next, route.component); const [key, value] = next; if (value !== undefined) { - acc[key] = typeof value === 'string' ? trimSlashes(value) : value.toString() + acc[key] = typeof value === 'string' ? trimSlashes(value) : value.toString(); } return acc; }, {} as Params); diff --git a/packages/astro/test/units/routing/route-sanitization.test.js b/packages/astro/test/units/routing/route-sanitization.test.js index 3bddeb92a..14c9c3829 100644 --- a/packages/astro/test/units/routing/route-sanitization.test.js +++ b/packages/astro/test/units/routing/route-sanitization.test.js @@ -12,7 +12,7 @@ import testAdapter from '../../test-adapter.js'; const root = new URL('../../fixtures/alias/', import.meta.url); const fileSystem = { -'/src/pages/[...testSlashTrim].astro': ` + '/src/pages/[...testSlashTrim].astro': ` --- export function getStaticPaths() { return [ From f21599671a90c3327307eb6d2f4d5c02e9137207 Mon Sep 17 00:00:00 2001 From: Martin Trapp <94928215+martrapp@users.noreply.github.com> Date: Thu, 31 Aug 2023 23:51:03 +0200 Subject: [PATCH 33/48] Respect the download attribute in links when using view transitions (#8339) * Respect the download attribute in links when using view transitions * cleanup --- .changeset/quiet-rockets-juggle.md | 5 ++ .../astro/components/ViewTransitions.astro | 1 + .../fixtures/view-transitions/public/logo.svg | 13 +++ .../view-transitions/src/pages/four.astro | 1 + packages/astro/e2e/view-transitions.test.js | 85 +++++++++++-------- 5 files changed, 70 insertions(+), 35 deletions(-) create mode 100644 .changeset/quiet-rockets-juggle.md create mode 100644 packages/astro/e2e/fixtures/view-transitions/public/logo.svg diff --git a/.changeset/quiet-rockets-juggle.md b/.changeset/quiet-rockets-juggle.md new file mode 100644 index 000000000..36d36746c --- /dev/null +++ b/.changeset/quiet-rockets-juggle.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Respect the download attribute in links when using view transitions diff --git a/packages/astro/components/ViewTransitions.astro b/packages/astro/components/ViewTransitions.astro index 29fe5dd1f..6cf0a5ccd 100644 --- a/packages/astro/components/ViewTransitions.astro +++ b/packages/astro/components/ViewTransitions.astro @@ -300,6 +300,7 @@ const { fallback = 'animate' } = Astro.props as Props; !link || !(link instanceof HTMLAnchorElement) || link.dataset.astroReload !== undefined || + link.hasAttribute('download') || !link.href || (link.target && link.target !== '_self') || link.origin !== location.origin || diff --git a/packages/astro/e2e/fixtures/view-transitions/public/logo.svg b/packages/astro/e2e/fixtures/view-transitions/public/logo.svg new file mode 100644 index 000000000..e9c63b295 --- /dev/null +++ b/packages/astro/e2e/fixtures/view-transitions/public/logo.svg @@ -0,0 +1,13 @@ + diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/four.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/four.astro index 915b9814f..c6547dc20 100644 --- a/packages/astro/e2e/fixtures/view-transitions/src/pages/four.astro +++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/four.astro @@ -10,4 +10,5 @@ import Layout from '../components/Layout.astro'; load page / no navigation + diff --git a/packages/astro/e2e/view-transitions.test.js b/packages/astro/e2e/view-transitions.test.js index 11ff97e40..944d40343 100644 --- a/packages/astro/e2e/view-transitions.test.js +++ b/packages/astro/e2e/view-transitions.test.js @@ -443,47 +443,62 @@ test.describe('View Transitions', () => { 'There should be only 1 page load. No additional loads for going back on same page' ).toEqual(1); }); -}); -test('Navigation also swaps the attributes of the document root', async ({ page, astro }) => { - await page.goto(astro.resolveUrl('/some-attributes')); - let p = page.locator('#heading'); - await expect(p, 'should have content').toHaveText('Page with some attributes'); + test('Navigation also swaps the attributes of the document root', async ({ page, astro }) => { + await page.goto(astro.resolveUrl('/some-attributes')); + let p = page.locator('#heading'); + await expect(p, 'should have content').toHaveText('Page with some attributes'); - let h = page.locator('html'); - await expect(h, 'should have content').toHaveAttribute('lang', 'en'); + let h = page.locator('html'); + await expect(h, 'should have content').toHaveAttribute('lang', 'en'); - await page.click('#click-other-attributes'); - p = page.locator('#heading'); - await expect(p, 'should have content').toHaveText('Page with other attributes'); + await page.click('#click-other-attributes'); + p = page.locator('#heading'); + await expect(p, 'should have content').toHaveText('Page with other attributes'); - h = page.locator('html'); - await expect(h, 'should have content').toHaveAttribute('lang', 'es'); - await expect(h, 'should have content').toHaveAttribute('style', 'background-color: green'); - await expect(h, 'should have content').toHaveAttribute('data-other-name', 'value'); - await expect(h, 'should have content').toHaveAttribute('data-astro-fake', 'value'); - await expect(h, 'should have content').toHaveAttribute('data-astro-transition', 'forward'); - await expect(h, 'should be absent').not.toHaveAttribute('class', /.*/); -}); - -test('Link with data-astro-reload attribute should trigger page load, no tranistion', async ({ - page, - astro, -}) => { - const loads = []; - page.addListener('load', (p) => { - loads.push(p.title()); + h = page.locator('html'); + await expect(h, 'should have content').toHaveAttribute('lang', 'es'); + await expect(h, 'should have content').toHaveAttribute('style', 'background-color: green'); + await expect(h, 'should have content').toHaveAttribute('data-other-name', 'value'); + await expect(h, 'should have content').toHaveAttribute('data-astro-fake', 'value'); + await expect(h, 'should have content').toHaveAttribute('data-astro-transition', 'forward'); + await expect(h, 'should be absent').not.toHaveAttribute('class', /.*/); }); - // Go to page 4 - await page.goto(astro.resolveUrl('/four')); - let p = page.locator('#four'); - await expect(p, 'should have content').toHaveText('Page 4'); + test('Link with data-astro-reload attribute should trigger page load, no tranistion', async ({ + page, + astro, + }) => { + const loads = []; + page.addListener('load', (p) => { + loads.push(p.title()); + }); - // go to page 2 - await page.click('#click-two'); - p = page.locator('#two'); - await expect(p, 'should have content').toHaveText('Page 2'); + // Go to page 4 + await page.goto(astro.resolveUrl('/four')); + let p = page.locator('#four'); + await expect(p, 'should have content').toHaveText('Page 4'); - expect(loads.length, 'There should be 2 page load').toEqual(2); + // go to page 2 + await page.click('#click-two'); + p = page.locator('#two'); + await expect(p, 'should have content').toHaveText('Page 2'); + + expect(loads.length, 'There should be 2 page load').toEqual(2); + }); + + test('Link with download attribute should trigger download, no transition', async ({ + page, + astro, + }) => { + // Go to page 4 + await page.goto(astro.resolveUrl('/four')); + let p = page.locator('#four'); + await expect(p, 'should have content').toHaveText('Page 4'); + + // Start waiting for download before clicking. Note no await. + const downloadPromise = page.waitForEvent('download', { timeout: 4000 }); + await page.click('#click-logo'); + await downloadPromise; + }); }); From 5f2c55bb54bb66693d278b7cd705c198aecc0331 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Fri, 1 Sep 2023 14:33:04 +0100 Subject: [PATCH 34/48] fix(@astrojs/vercel): slowness and symbolic link (#8348) --- .changeset/proud-forks-rescue.md | 6 +++ packages/integrations/vercel/src/lib/fs.ts | 13 +++--- packages/integrations/vercel/src/lib/nft.ts | 32 ++++++++++----- .../vercel/src/serverless/adapter.ts | 40 ++++++++++++++----- 4 files changed, 64 insertions(+), 27 deletions(-) create mode 100644 .changeset/proud-forks-rescue.md diff --git a/.changeset/proud-forks-rescue.md b/.changeset/proud-forks-rescue.md new file mode 100644 index 000000000..e968a699f --- /dev/null +++ b/.changeset/proud-forks-rescue.md @@ -0,0 +1,6 @@ +--- +'@astrojs/vercel': patch +--- + +- Cache result during bundling, to speed up the process of multiple functions; +- Avoid creating multiple symbolic links of the dependencies when building the project with `funcitonPerRoute` enabled; diff --git a/packages/integrations/vercel/src/lib/fs.ts b/packages/integrations/vercel/src/lib/fs.ts index 51b12d52f..3ef9adadb 100644 --- a/packages/integrations/vercel/src/lib/fs.ts +++ b/packages/integrations/vercel/src/lib/fs.ts @@ -1,5 +1,6 @@ import type { PathLike } from 'node:fs'; import * as fs from 'node:fs/promises'; +import { existsSync } from 'node:fs'; import nodePath from 'node:path'; import { fileURLToPath } from 'node:url'; @@ -74,11 +75,13 @@ export async function copyFilesToFunction( if (isSymlink) { const realdest = fileURLToPath(new URL(nodePath.relative(commonAncestor, realpath), outDir)); - await fs.symlink( - nodePath.relative(fileURLToPath(new URL('.', dest)), realdest), - dest, - isDir ? 'dir' : 'file' - ); + const target = nodePath.relative(fileURLToPath(new URL('.', dest)), realdest); + // NOTE: when building function per route, dependencies are linked at the first run, then there's no need anymore to do that once more. + // So we check if the destination already exists. If it does, move on. + // Symbolic links here are usually dependencies and not user code. Symbolic links exist because of the pnpm strategy. + if (!existsSync(dest)) { + await fs.symlink(target, dest, isDir ? 'dir' : 'file'); + } } else if (!isDir) { await fs.copyFile(origin, dest); } diff --git a/packages/integrations/vercel/src/lib/nft.ts b/packages/integrations/vercel/src/lib/nft.ts index 10c298a1d..95c06f07c 100644 --- a/packages/integrations/vercel/src/lib/nft.ts +++ b/packages/integrations/vercel/src/lib/nft.ts @@ -1,19 +1,28 @@ import { relative as relativePath } from 'node:path'; import { fileURLToPath } from 'node:url'; +import { relative } from 'node:path'; import { copyFilesToFunction } from './fs.js'; +import type { AstroIntegrationLogger } from 'astro'; -export async function copyDependenciesToFunction({ - entry, - outDir, - includeFiles, - excludeFiles, -}: { - entry: URL; - outDir: URL; - includeFiles: URL[]; - excludeFiles: URL[]; -}): Promise<{ handler: string }> { +export async function copyDependenciesToFunction( + { + entry, + outDir, + includeFiles, + excludeFiles, + logger, + }: { + entry: URL; + outDir: URL; + includeFiles: URL[]; + excludeFiles: URL[]; + logger: AstroIntegrationLogger; + }, + // we want to pass the caching by reference, and not by value + cache: object +): Promise<{ handler: string }> { const entryPath = fileURLToPath(entry); + logger.info(`Bundling function ${relative(fileURLToPath(outDir), entryPath)}`); // Get root of folder of the system (like C:\ on Windows or / on Linux) let base = entry; @@ -31,6 +40,7 @@ export async function copyDependenciesToFunction({ // If you have a route of /dev this appears in source and NFT will try to // scan your local /dev :8 ignore: ['/dev/**'], + cache, }); for (const error of result.warnings) { diff --git a/packages/integrations/vercel/src/serverless/adapter.ts b/packages/integrations/vercel/src/serverless/adapter.ts index 90d40a52d..24db23f80 100644 --- a/packages/integrations/vercel/src/serverless/adapter.ts +++ b/packages/integrations/vercel/src/serverless/adapter.ts @@ -1,4 +1,10 @@ -import type { AstroAdapter, AstroConfig, AstroIntegration, RouteData } from 'astro'; +import type { + AstroAdapter, + AstroConfig, + AstroIntegration, + RouteData, + AstroIntegrationLogger, +} from 'astro'; import { AstroError } from 'astro/errors'; import glob from 'fast-glob'; import { basename } from 'node:path'; @@ -78,16 +84,27 @@ export default function vercelServerless({ // Extra files to be merged with `includeFiles` during build const extraFilesToInclude: URL[] = []; - async function createFunctionFolder(funcName: string, entry: URL, inc: URL[]) { + const NTF_CACHE = Object.create(null); + + async function createFunctionFolder( + funcName: string, + entry: URL, + inc: URL[], + logger: AstroIntegrationLogger + ) { const functionFolder = new URL(`./functions/${funcName}.func/`, _config.outDir); // Copy necessary files (e.g. node_modules/) - const { handler } = await copyDependenciesToFunction({ - entry, - outDir: functionFolder, - includeFiles: inc, - excludeFiles: excludeFiles?.map((file) => new URL(file, _config.root)) || [], - }); + const { handler } = await copyDependenciesToFunction( + { + entry, + outDir: functionFolder, + includeFiles: inc, + excludeFiles: excludeFiles?.map((file) => new URL(file, _config.root)) || [], + logger, + }, + NTF_CACHE + ); // Enable ESM // https://aws.amazon.com/blogs/compute/using-node-js-es-modules-and-top-level-await-in-aws-lambda/ @@ -167,7 +184,7 @@ You can set functionPerRoute: false to prevent surpassing the limit.` } }, - 'astro:build:done': async ({ routes }) => { + 'astro:build:done': async ({ routes, logger }) => { // Merge any includes from `vite.assetsInclude if (_config.vite.assetsInclude) { const mergeGlobbedIncludes = (globPattern: unknown) => { @@ -192,7 +209,7 @@ You can set functionPerRoute: false to prevent surpassing the limit.` if (_entryPoints.size) { for (const [route, entryFile] of _entryPoints) { const func = basename(entryFile.toString()).replace(/\.mjs$/, ''); - await createFunctionFolder(func, entryFile, filesToInclude); + await createFunctionFolder(func, entryFile, filesToInclude, logger); routeDefinitions.push({ src: route.pattern.source, dest: func, @@ -202,7 +219,8 @@ You can set functionPerRoute: false to prevent surpassing the limit.` await createFunctionFolder( 'render', new URL(serverEntry, buildTempFolder), - filesToInclude + filesToInclude, + logger ); routeDefinitions.push({ src: '/.*', dest: 'render' }); } From cc99b2814fc404d3b715bf015eb314b05d947c60 Mon Sep 17 00:00:00 2001 From: ematipico Date: Fri, 1 Sep 2023 13:35:21 +0000 Subject: [PATCH 35/48] [ci] format --- packages/integrations/vercel/src/lib/fs.ts | 2 +- packages/integrations/vercel/src/lib/nft.ts | 7 +++---- packages/integrations/vercel/src/serverless/adapter.ts | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/integrations/vercel/src/lib/fs.ts b/packages/integrations/vercel/src/lib/fs.ts index 3ef9adadb..b3dadcfc2 100644 --- a/packages/integrations/vercel/src/lib/fs.ts +++ b/packages/integrations/vercel/src/lib/fs.ts @@ -1,6 +1,6 @@ import type { PathLike } from 'node:fs'; -import * as fs from 'node:fs/promises'; import { existsSync } from 'node:fs'; +import * as fs from 'node:fs/promises'; import nodePath from 'node:path'; import { fileURLToPath } from 'node:url'; diff --git a/packages/integrations/vercel/src/lib/nft.ts b/packages/integrations/vercel/src/lib/nft.ts index 95c06f07c..6cdbe530a 100644 --- a/packages/integrations/vercel/src/lib/nft.ts +++ b/packages/integrations/vercel/src/lib/nft.ts @@ -1,8 +1,7 @@ -import { relative as relativePath } from 'node:path'; -import { fileURLToPath } from 'node:url'; -import { relative } from 'node:path'; -import { copyFilesToFunction } from './fs.js'; import type { AstroIntegrationLogger } from 'astro'; +import { relative, relative as relativePath } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { copyFilesToFunction } from './fs.js'; export async function copyDependenciesToFunction( { diff --git a/packages/integrations/vercel/src/serverless/adapter.ts b/packages/integrations/vercel/src/serverless/adapter.ts index 24db23f80..a7178b3e3 100644 --- a/packages/integrations/vercel/src/serverless/adapter.ts +++ b/packages/integrations/vercel/src/serverless/adapter.ts @@ -2,8 +2,8 @@ import type { AstroAdapter, AstroConfig, AstroIntegration, - RouteData, AstroIntegrationLogger, + RouteData, } from 'astro'; import { AstroError } from 'astro/errors'; import glob from 'fast-glob'; From 0eb09dbab1674a57d23ac97950a527d2e5a9c9fb Mon Sep 17 00:00:00 2001 From: Erika <3019731+Princesseuh@users.noreply.github.com> Date: Fri, 1 Sep 2023 16:14:15 +0200 Subject: [PATCH 36/48] fix(vercel): Don't output an error message for failing to resolve sharp (#8354) * fix(vercel): Don't output an error message for failing to resolve sharp * chore: changeset --- .changeset/shy-socks-return.md | 5 +++++ packages/integrations/vercel/src/lib/nft.ts | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .changeset/shy-socks-return.md diff --git a/.changeset/shy-socks-return.md b/.changeset/shy-socks-return.md new file mode 100644 index 000000000..ea046be2d --- /dev/null +++ b/.changeset/shy-socks-return.md @@ -0,0 +1,5 @@ +--- +'@astrojs/vercel': patch +--- + +Fix unnecessary warning about Sharp showing while building diff --git a/packages/integrations/vercel/src/lib/nft.ts b/packages/integrations/vercel/src/lib/nft.ts index 6cdbe530a..585a45e99 100644 --- a/packages/integrations/vercel/src/lib/nft.ts +++ b/packages/integrations/vercel/src/lib/nft.ts @@ -49,6 +49,9 @@ export async function copyDependenciesToFunction( // The import(astroRemark) sometimes fails to resolve, but it's not a problem if (module === '@astrojs/') continue; + // Sharp is always external and won't be able to be resolved, but that's also not a problem + if (module === 'sharp') continue; + if (entryPath === file) { console.warn( `[@astrojs/vercel] The module "${module}" couldn't be resolved. This may not be a problem, but it's worth checking.` From 1b9de317377f2fdbf872d178b2412e062a5f97fe Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Fri, 1 Sep 2023 07:19:30 -0700 Subject: [PATCH 37/48] [ci] release (#8335) Co-authored-by: github-actions[bot] --- .changeset/chilled-hornets-press.md | 5 -- .changeset/proud-forks-rescue.md | 6 --- .changeset/quiet-rockets-juggle.md | 5 -- .changeset/shy-socks-return.md | 5 -- examples/basics/package.json | 2 +- examples/blog/package.json | 2 +- examples/component/package.json | 2 +- examples/deno/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 2 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 2 +- examples/framework-solid/package.json | 2 +- examples/framework-svelte/package.json | 2 +- examples/framework-vue/package.json | 2 +- examples/hackernews/package.json | 2 +- examples/integration/package.json | 2 +- examples/middleware/package.json | 2 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 2 +- examples/with-markdoc/package.json | 2 +- examples/with-markdown-plugins/package.json | 2 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-mdx/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-vite-plugin-pwa/package.json | 2 +- examples/with-vitest/package.json | 2 +- packages/astro/CHANGELOG.md | 8 +++ packages/astro/package.json | 2 +- packages/integrations/cloudflare/package.json | 2 +- packages/integrations/deno/package.json | 2 +- packages/integrations/markdoc/package.json | 2 +- packages/integrations/mdx/package.json | 2 +- packages/integrations/netlify/package.json | 2 +- packages/integrations/node/package.json | 2 +- packages/integrations/svelte/package.json | 2 +- packages/integrations/tailwind/package.json | 2 +- packages/integrations/vercel/CHANGELOG.md | 13 +++++ packages/integrations/vercel/package.json | 4 +- packages/integrations/vue/package.json | 2 +- pnpm-lock.yaml | 54 +++++++++---------- 45 files changed, 87 insertions(+), 87 deletions(-) delete mode 100644 .changeset/chilled-hornets-press.md delete mode 100644 .changeset/proud-forks-rescue.md delete mode 100644 .changeset/quiet-rockets-juggle.md delete mode 100644 .changeset/shy-socks-return.md diff --git a/.changeset/chilled-hornets-press.md b/.changeset/chilled-hornets-press.md deleted file mode 100644 index 5283117fe..000000000 --- a/.changeset/chilled-hornets-press.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Sanitize route params for leading and trailing slashes diff --git a/.changeset/proud-forks-rescue.md b/.changeset/proud-forks-rescue.md deleted file mode 100644 index e968a699f..000000000 --- a/.changeset/proud-forks-rescue.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@astrojs/vercel': patch ---- - -- Cache result during bundling, to speed up the process of multiple functions; -- Avoid creating multiple symbolic links of the dependencies when building the project with `funcitonPerRoute` enabled; diff --git a/.changeset/quiet-rockets-juggle.md b/.changeset/quiet-rockets-juggle.md deleted file mode 100644 index 36d36746c..000000000 --- a/.changeset/quiet-rockets-juggle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Respect the download attribute in links when using view transitions diff --git a/.changeset/shy-socks-return.md b/.changeset/shy-socks-return.md deleted file mode 100644 index ea046be2d..000000000 --- a/.changeset/shy-socks-return.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/vercel': patch ---- - -Fix unnecessary warning about Sharp showing while building diff --git a/examples/basics/package.json b/examples/basics/package.json index 5b022f096..362f167a6 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.5" + "astro": "^3.0.6" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index 1864a32b0..c319d0553 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -14,6 +14,6 @@ "@astrojs/mdx": "^1.0.0", "@astrojs/rss": "^3.0.0", "@astrojs/sitemap": "^3.0.0", - "astro": "^3.0.5" + "astro": "^3.0.6" } } diff --git a/examples/component/package.json b/examples/component/package.json index de66702ae..5609da382 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^3.0.5" + "astro": "^3.0.6" }, "peerDependencies": { "astro": "^2.0.0-beta.0" diff --git a/examples/deno/package.json b/examples/deno/package.json index dc86ccac0..5eee77243 100644 --- a/examples/deno/package.json +++ b/examples/deno/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.5" + "astro": "^3.0.6" }, "devDependencies": { "@astrojs/deno": "^5.0.0" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 337237b5b..26a39c619 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -14,6 +14,6 @@ "@astrojs/alpinejs": "^0.3.0", "@types/alpinejs": "^3.7.2", "alpinejs": "^3.12.3", - "astro": "^3.0.5" + "astro": "^3.0.6" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index 77137423e..960f29416 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/lit": "^3.0.0", "@webcomponents/template-shadowroot": "^0.2.1", - "astro": "^3.0.5", + "astro": "^3.0.6", "lit": "^2.8.0" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 8b0b64814..eb7512275 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -16,7 +16,7 @@ "@astrojs/solid-js": "^3.0.0", "@astrojs/svelte": "^4.0.0", "@astrojs/vue": "^3.0.0", - "astro": "^3.0.5", + "astro": "^3.0.6", "preact": "^10.17.1", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index b4ddc309b..423cbe226 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.0.0", "@preact/signals": "^1.2.1", - "astro": "^3.0.5", + "astro": "^3.0.6", "preact": "^10.17.1" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 41f13bfca..6efdc8a38 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -14,7 +14,7 @@ "@astrojs/react": "^3.0.0", "@types/react": "^18.2.21", "@types/react-dom": "^18.2.7", - "astro": "^3.0.5", + "astro": "^3.0.6", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index cf90e9ed8..07c4a1117 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/solid-js": "^3.0.0", - "astro": "^3.0.5", + "astro": "^3.0.6", "solid-js": "^1.7.11" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 4866075a2..87b8186ed 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/svelte": "^4.0.0", - "astro": "^3.0.5", + "astro": "^3.0.6", "svelte": "^4.2.0" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 987030e99..9f5f9dcc7 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/vue": "^3.0.0", - "astro": "^3.0.5", + "astro": "^3.0.6", "vue": "^3.3.4" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 3e1b66836..8694939ac 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/node": "^6.0.0", - "astro": "^3.0.5" + "astro": "^3.0.6" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index 220b6aade..df23262cc 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^3.0.5" + "astro": "^3.0.6" }, "peerDependencies": { "astro": "^2.0.0-beta.0" diff --git a/examples/middleware/package.json b/examples/middleware/package.json index 5f18f11a8..a5c2134b2 100644 --- a/examples/middleware/package.json +++ b/examples/middleware/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@astrojs/node": "^6.0.0", - "astro": "^3.0.5", + "astro": "^3.0.6", "html-minifier": "^4.0.0" } } diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 997d2513a..cb6b3c6d2 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.5" + "astro": "^3.0.6" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index 5b40e8e5d..ca66352d5 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.5" + "astro": "^3.0.6" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 2f8c9750d..bf365d49d 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.5" + "astro": "^3.0.6" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 55a82361a..06f20bc79 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -14,7 +14,7 @@ "dependencies": { "@astrojs/node": "^6.0.0", "@astrojs/svelte": "^4.0.0", - "astro": "^3.0.5", + "astro": "^3.0.6", "svelte": "^4.2.0" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index c34d95f22..eb25f4892 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/markdoc": "^0.5.0", - "astro": "^3.0.5" + "astro": "^3.0.6" } } diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 01b1e60f0..73723916c 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/markdown-remark": "^3.0.0", - "astro": "^3.0.5", + "astro": "^3.0.6", "hast-util-select": "^5.0.5", "rehype-autolink-headings": "^6.1.1", "rehype-slug": "^5.1.0", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index 399a52490..620740515 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.5" + "astro": "^3.0.6" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index 54d3f74e3..2681e81f6 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/mdx": "^1.0.0", "@astrojs/preact": "^3.0.0", - "astro": "^3.0.5", + "astro": "^3.0.6", "preact": "^10.17.1" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index 644d09591..a27a5a024 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.0.0", "@nanostores/preact": "^0.5.0", - "astro": "^3.0.5", + "astro": "^3.0.6", "nanostores": "^0.9.3", "preact": "^10.17.1" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index b6eab5e6f..773e77847 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -14,7 +14,7 @@ "@astrojs/mdx": "^1.0.0", "@astrojs/tailwind": "^5.0.0", "@types/canvas-confetti": "^1.6.0", - "astro": "^3.0.5", + "astro": "^3.0.6", "autoprefixer": "^10.4.15", "canvas-confetti": "^1.6.0", "postcss": "^8.4.28", diff --git a/examples/with-vite-plugin-pwa/package.json b/examples/with-vite-plugin-pwa/package.json index c6bf7ccda..af0570da0 100644 --- a/examples/with-vite-plugin-pwa/package.json +++ b/examples/with-vite-plugin-pwa/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.5", + "astro": "^3.0.6", "vite-plugin-pwa": "0.16.4", "workbox-window": "^7.0.0" } diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index 15ba98638..c6e72f3cb 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^3.0.5", + "astro": "^3.0.6", "vitest": "^0.34.2" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 6c0c281a0..5b0071572 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,13 @@ # astro +## 3.0.6 + +### Patch Changes + +- [#8276](https://github.com/withastro/astro/pull/8276) [`d3a6f9f83`](https://github.com/withastro/astro/commit/d3a6f9f836e35932a950e40ba69eff63d7db7eed) Thanks [@FredKSchott](https://github.com/FredKSchott)! - Sanitize route params for leading and trailing slashes + +- [#8339](https://github.com/withastro/astro/pull/8339) [`f21599671`](https://github.com/withastro/astro/commit/f21599671a90c3327307eb6d2f4d5c02e9137207) Thanks [@martrapp](https://github.com/martrapp)! - Respect the download attribute in links when using view transitions + ## 3.0.5 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index e21ba678c..6f4dab863 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "3.0.5", + "version": "3.0.6", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json index c1845fb03..b60d7ccba 100644 --- a/packages/integrations/cloudflare/package.json +++ b/packages/integrations/cloudflare/package.json @@ -45,7 +45,7 @@ "tiny-glob": "^0.2.9" }, "peerDependencies": { - "astro": "workspace:^3.0.5" + "astro": "workspace:^3.0.6" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/deno/package.json b/packages/integrations/deno/package.json index 037c870ab..0ae24d3fb 100644 --- a/packages/integrations/deno/package.json +++ b/packages/integrations/deno/package.json @@ -36,7 +36,7 @@ "esbuild": "^0.19.2" }, "peerDependencies": { - "astro": "workspace:^3.0.5" + "astro": "workspace:^3.0.6" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json index 6556c7639..e64c232fe 100644 --- a/packages/integrations/markdoc/package.json +++ b/packages/integrations/markdoc/package.json @@ -75,7 +75,7 @@ "zod": "3.21.1" }, "peerDependencies": { - "astro": "workspace:^3.0.5" + "astro": "workspace:^3.0.6" }, "devDependencies": { "@astrojs/markdown-remark": "workspace:*", diff --git a/packages/integrations/mdx/package.json b/packages/integrations/mdx/package.json index f85e91c75..f7fe1557f 100644 --- a/packages/integrations/mdx/package.json +++ b/packages/integrations/mdx/package.json @@ -54,7 +54,7 @@ "vfile": "^5.3.7" }, "peerDependencies": { - "astro": "workspace:^3.0.5" + "astro": "workspace:^3.0.6" }, "devDependencies": { "@types/chai": "^4.3.5", diff --git a/packages/integrations/netlify/package.json b/packages/integrations/netlify/package.json index fbf81f9e0..3498b37a2 100644 --- a/packages/integrations/netlify/package.json +++ b/packages/integrations/netlify/package.json @@ -43,7 +43,7 @@ "esbuild": "^0.19.2" }, "peerDependencies": { - "astro": "workspace:^3.0.5" + "astro": "workspace:^3.0.6" }, "devDependencies": { "@netlify/edge-functions": "^2.0.0", diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json index 32196837d..fc4c36c89 100644 --- a/packages/integrations/node/package.json +++ b/packages/integrations/node/package.json @@ -37,7 +37,7 @@ "server-destroy": "^1.0.1" }, "peerDependencies": { - "astro": "workspace:^3.0.5" + "astro": "workspace:^3.0.6" }, "devDependencies": { "@types/node": "^18.17.8", diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index 13d38abf9..d3dd01b6c 100644 --- a/packages/integrations/svelte/package.json +++ b/packages/integrations/svelte/package.json @@ -48,7 +48,7 @@ "vite": "^4.4.9" }, "peerDependencies": { - "astro": "workspace:^3.0.5", + "astro": "workspace:^3.0.6", "svelte": "^3.55.0 || ^4.0.0" }, "engines": { diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json index 51fb3c7d9..479a1801f 100644 --- a/packages/integrations/tailwind/package.json +++ b/packages/integrations/tailwind/package.json @@ -43,7 +43,7 @@ "vite": "^4.4.9" }, "peerDependencies": { - "astro": "workspace:^3.0.5", + "astro": "workspace:^3.0.6", "tailwindcss": "^3.0.24" } } diff --git a/packages/integrations/vercel/CHANGELOG.md b/packages/integrations/vercel/CHANGELOG.md index 5d7fb4af6..f936b71e1 100644 --- a/packages/integrations/vercel/CHANGELOG.md +++ b/packages/integrations/vercel/CHANGELOG.md @@ -1,5 +1,18 @@ # @astrojs/vercel +## 4.0.3 + +### Patch Changes + +- [#8348](https://github.com/withastro/astro/pull/8348) [`5f2c55bb5`](https://github.com/withastro/astro/commit/5f2c55bb54bb66693d278b7cd705c198aecc0331) Thanks [@ematipico](https://github.com/ematipico)! - - Cache result during bundling, to speed up the process of multiple functions; + + - Avoid creating multiple symbolic links of the dependencies when building the project with `funcitonPerRoute` enabled; + +- [#8354](https://github.com/withastro/astro/pull/8354) [`0eb09dbab`](https://github.com/withastro/astro/commit/0eb09dbab1674a57d23ac97950a527d2e5a9c9fb) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fix unnecessary warning about Sharp showing while building + +- Updated dependencies [[`d3a6f9f83`](https://github.com/withastro/astro/commit/d3a6f9f836e35932a950e40ba69eff63d7db7eed), [`f21599671`](https://github.com/withastro/astro/commit/f21599671a90c3327307eb6d2f4d5c02e9137207)]: + - astro@3.0.6 + ## 4.0.2 ### Patch Changes diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index fb853bf53..219eda70d 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/vercel", "description": "Deploy your site to Vercel", - "version": "4.0.2", + "version": "4.0.3", "type": "module", "author": "withastro", "license": "MIT", @@ -60,7 +60,7 @@ "web-vitals": "^3.4.0" }, "peerDependencies": { - "astro": "workspace:^3.0.5" + "astro": "workspace:^3.0.6" }, "devDependencies": { "@types/set-cookie-parser": "^2.4.3", diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index 745867138..bfb924a5c 100644 --- a/packages/integrations/vue/package.json +++ b/packages/integrations/vue/package.json @@ -56,7 +56,7 @@ "vue": "^3.3.4" }, "peerDependencies": { - "astro": "workspace:^3.0.5", + "astro": "workspace:^3.0.6", "vue": "^3.2.30" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5ba108296..80e2726c7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -125,7 +125,7 @@ importers: examples/basics: dependencies: astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro examples/blog: @@ -140,19 +140,19 @@ importers: specifier: ^3.0.0 version: link:../../packages/integrations/sitemap astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro examples/deno: dependencies: astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro devDependencies: '@astrojs/deno': @@ -171,7 +171,7 @@ importers: specifier: ^3.12.3 version: 3.12.3 astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro examples/framework-lit: @@ -183,7 +183,7 @@ importers: specifier: ^0.2.1 version: 0.2.1 astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro lit: specifier: ^2.8.0 @@ -207,7 +207,7 @@ importers: specifier: ^3.0.0 version: link:../../packages/integrations/vue astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro preact: specifier: ^10.17.1 @@ -237,7 +237,7 @@ importers: specifier: ^1.2.1 version: 1.2.1(preact@10.17.1) astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro preact: specifier: ^10.17.1 @@ -255,7 +255,7 @@ importers: specifier: ^18.2.7 version: 18.2.7 astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro react: specifier: ^18.2.0 @@ -270,7 +270,7 @@ importers: specifier: ^3.0.0 version: link:../../packages/integrations/solid astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro solid-js: specifier: ^1.7.11 @@ -282,7 +282,7 @@ importers: specifier: ^4.0.0 version: link:../../packages/integrations/svelte astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro svelte: specifier: ^4.2.0 @@ -294,7 +294,7 @@ importers: specifier: ^3.0.0 version: link:../../packages/integrations/vue astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro vue: specifier: ^3.3.4 @@ -306,13 +306,13 @@ importers: specifier: ^6.0.0 version: link:../../packages/integrations/node astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro examples/middleware: @@ -321,7 +321,7 @@ importers: specifier: ^6.0.0 version: link:../../packages/integrations/node astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro html-minifier: specifier: ^4.0.0 @@ -330,19 +330,19 @@ importers: examples/minimal: dependencies: astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro examples/non-html-pages: dependencies: astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro examples/ssr: @@ -354,7 +354,7 @@ importers: specifier: ^4.0.0 version: link:../../packages/integrations/svelte astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro svelte: specifier: ^4.2.0 @@ -366,7 +366,7 @@ importers: specifier: ^0.5.0 version: link:../../packages/integrations/markdoc astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro examples/with-markdown-plugins: @@ -375,7 +375,7 @@ importers: specifier: ^3.0.0 version: link:../../packages/markdown/remark astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro hast-util-select: specifier: ^5.0.5 @@ -396,7 +396,7 @@ importers: examples/with-markdown-shiki: dependencies: astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro examples/with-mdx: @@ -408,7 +408,7 @@ importers: specifier: ^3.0.0 version: link:../../packages/integrations/preact astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro preact: specifier: ^10.17.1 @@ -423,7 +423,7 @@ importers: specifier: ^0.5.0 version: 0.5.0(nanostores@0.9.3)(preact@10.17.1) astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro nanostores: specifier: ^0.9.3 @@ -444,7 +444,7 @@ importers: specifier: ^1.6.0 version: 1.6.0 astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro autoprefixer: specifier: ^10.4.15 @@ -462,7 +462,7 @@ importers: examples/with-vite-plugin-pwa: dependencies: astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro vite-plugin-pwa: specifier: 0.16.4 @@ -474,7 +474,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^3.0.5 + specifier: ^3.0.6 version: link:../../packages/astro vitest: specifier: ^0.34.2 From b74dacdb6a49755f979f15091355f06bd6bd64bf Mon Sep 17 00:00:00 2001 From: Chris Swithinbank Date: Fri, 1 Sep 2023 17:11:55 +0200 Subject: [PATCH 38/48] Uppercase endpoint examples in adapter READMEs (#8346) --- .changeset/quiet-sheep-refuse.md | 6 ++++++ packages/integrations/cloudflare/README.md | 2 +- packages/integrations/netlify/README.md | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changeset/quiet-sheep-refuse.md diff --git a/.changeset/quiet-sheep-refuse.md b/.changeset/quiet-sheep-refuse.md new file mode 100644 index 000000000..3660e03fc --- /dev/null +++ b/.changeset/quiet-sheep-refuse.md @@ -0,0 +1,6 @@ +--- +'@astrojs/cloudflare': patch +'@astrojs/netlify': patch +--- + +Update README diff --git a/packages/integrations/cloudflare/README.md b/packages/integrations/cloudflare/README.md index 25cd7c376..99b2d7528 100644 --- a/packages/integrations/cloudflare/README.md +++ b/packages/integrations/cloudflare/README.md @@ -99,7 +99,7 @@ From an endpoint: ```js // src/pages/api/someFile.js -export function get(context) { +export function GET(context) { const runtime = context.locals.runtime; return new Response('Some body'); diff --git a/packages/integrations/netlify/README.md b/packages/integrations/netlify/README.md index c29d2d126..a313486dc 100644 --- a/packages/integrations/netlify/README.md +++ b/packages/integrations/netlify/README.md @@ -243,7 +243,7 @@ We check for common mime types for audio, image, and video files. To include spe import fs from 'node:fs'; -export function get() { +export function GET() { const buffer = fs.readFileSync('../image.jpg'); // Return the buffer directly, @astrojs/netlify will base64 encode the body From 6b1e7981469d30aa4c3658487abed6ffea94797f Mon Sep 17 00:00:00 2001 From: Matteo Manfredi Date: Fri, 1 Sep 2023 20:29:57 +0200 Subject: [PATCH 39/48] feat: add progress to asset generation (#8357) --- .changeset/polite-scissors-invent.md | 6 ++++++ packages/astro/src/assets/build/generate.ts | 8 +++---- packages/astro/src/core/build/generate.ts | 24 ++++++++++++--------- 3 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 .changeset/polite-scissors-invent.md diff --git a/.changeset/polite-scissors-invent.md b/.changeset/polite-scissors-invent.md new file mode 100644 index 000000000..57a1ab0a0 --- /dev/null +++ b/.changeset/polite-scissors-invent.md @@ -0,0 +1,6 @@ +--- +'astro': patch +--- + +Added counter to show progress for assets image generation. +Fixed small unit of measurement error. \ No newline at end of file diff --git a/packages/astro/src/assets/build/generate.ts b/packages/astro/src/assets/build/generate.ts index 282db9d6d..84dd3ee68 100644 --- a/packages/astro/src/assets/build/generate.ts +++ b/packages/astro/src/assets/build/generate.ts @@ -155,12 +155,12 @@ export async function generateImage( }; } -export function getStaticImageList(): Iterable< - [string, { path: string; options: ImageTransform }] +export function getStaticImageList(): Map< + string, { path: string; options: ImageTransform } > { if (!globalThis?.astroAsset?.staticImages) { - return []; + return new Map(); } - return globalThis.astroAsset.staticImages?.entries(); + return globalThis.astroAsset.staticImages; } diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index df6b2c4b2..494fcb327 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -196,9 +196,12 @@ export async function generatePages(opts: StaticBuildOptions, internals: BuildIn } } - logger.info(null, `\n${bgGreen(black(` generating optimized images `))}`); - for (const imageData of getStaticImageList()) { - await generateImage(pipeline, imageData[1].options, imageData[1].path); + const staticImageList = getStaticImageList() + + if (staticImageList.size) logger.info(null, `\n${bgGreen(black(` generating optimized images `))}`); let count = 0; + for (const imageData of staticImageList.entries()) { + count++ + await generateImage(pipeline, imageData[1].options, imageData[1].path, count, staticImageList.size); } delete globalThis?.astroAsset?.addStaticImage; @@ -211,7 +214,7 @@ export async function generatePages(opts: StaticBuildOptions, internals: BuildIn logger.info(null, dim(`Completed in ${getTimeStat(timer, performance.now())}.\n`)); } -async function generateImage(pipeline: BuildPipeline, transform: ImageTransform, path: string) { +async function generateImage(pipeline: BuildPipeline, transform: ImageTransform, path: string, count: number, totalCount: number) { const logger = pipeline.getLogger(); let timeStart = performance.now(); const generationData = await generateImageInternal(pipeline, transform, path); @@ -225,8 +228,9 @@ async function generateImage(pipeline: BuildPipeline, transform: ImageTransform, const timeIncrease = `(+${timeChange})`; const statsText = generationData.cached ? `(reused cache entry)` - : `(before: ${generationData.weight.before}kb, after: ${generationData.weight.after}kb)`; - logger.info(null, ` ${green('▶')} ${path} ${dim(statsText)} ${dim(timeIncrease)}`); + : `(before: ${generationData.weight.before}kB, after: ${generationData.weight.after}kB)`; + const counter = `(${count}/${totalCount})`; + logger.info(null, ` ${green('▶')} ${path} ${dim(statsText)} ${dim(timeIncrease)} ${dim(counter)}}`); } async function generatePage( @@ -390,10 +394,10 @@ function getInvalidRouteSegmentError( ...AstroErrorData.InvalidDynamicRoute, message: invalidParam ? AstroErrorData.InvalidDynamicRoute.message( - route.route, - JSON.stringify(invalidParam), - JSON.stringify(received) - ) + route.route, + JSON.stringify(invalidParam), + JSON.stringify(received) + ) : `Generated path for ${route.route} is invalid.`, hint, }); From 7a91600a9e9d26f214890f958a31339edd82311c Mon Sep 17 00:00:00 2001 From: Princesseuh Date: Fri, 1 Sep 2023 18:32:11 +0000 Subject: [PATCH 40/48] [ci] format --- packages/astro/src/assets/build/generate.ts | 4 +-- packages/astro/src/core/build/generate.ts | 37 +++++++++++++++------ 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/packages/astro/src/assets/build/generate.ts b/packages/astro/src/assets/build/generate.ts index 84dd3ee68..b2004fad0 100644 --- a/packages/astro/src/assets/build/generate.ts +++ b/packages/astro/src/assets/build/generate.ts @@ -155,9 +155,7 @@ export async function generateImage( }; } -export function getStaticImageList(): Map< - string, { path: string; options: ImageTransform } -> { +export function getStaticImageList(): Map { if (!globalThis?.astroAsset?.staticImages) { return new Map(); } diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 494fcb327..111b8ef05 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -196,12 +196,20 @@ export async function generatePages(opts: StaticBuildOptions, internals: BuildIn } } - const staticImageList = getStaticImageList() + const staticImageList = getStaticImageList(); - if (staticImageList.size) logger.info(null, `\n${bgGreen(black(` generating optimized images `))}`); let count = 0; + if (staticImageList.size) + logger.info(null, `\n${bgGreen(black(` generating optimized images `))}`); + let count = 0; for (const imageData of staticImageList.entries()) { - count++ - await generateImage(pipeline, imageData[1].options, imageData[1].path, count, staticImageList.size); + count++; + await generateImage( + pipeline, + imageData[1].options, + imageData[1].path, + count, + staticImageList.size + ); } delete globalThis?.astroAsset?.addStaticImage; @@ -214,7 +222,13 @@ export async function generatePages(opts: StaticBuildOptions, internals: BuildIn logger.info(null, dim(`Completed in ${getTimeStat(timer, performance.now())}.\n`)); } -async function generateImage(pipeline: BuildPipeline, transform: ImageTransform, path: string, count: number, totalCount: number) { +async function generateImage( + pipeline: BuildPipeline, + transform: ImageTransform, + path: string, + count: number, + totalCount: number +) { const logger = pipeline.getLogger(); let timeStart = performance.now(); const generationData = await generateImageInternal(pipeline, transform, path); @@ -230,7 +244,10 @@ async function generateImage(pipeline: BuildPipeline, transform: ImageTransform, ? `(reused cache entry)` : `(before: ${generationData.weight.before}kB, after: ${generationData.weight.after}kB)`; const counter = `(${count}/${totalCount})`; - logger.info(null, ` ${green('▶')} ${path} ${dim(statsText)} ${dim(timeIncrease)} ${dim(counter)}}`); + logger.info( + null, + ` ${green('▶')} ${path} ${dim(statsText)} ${dim(timeIncrease)} ${dim(counter)}}` + ); } async function generatePage( @@ -394,10 +411,10 @@ function getInvalidRouteSegmentError( ...AstroErrorData.InvalidDynamicRoute, message: invalidParam ? AstroErrorData.InvalidDynamicRoute.message( - route.route, - JSON.stringify(invalidParam), - JSON.stringify(received) - ) + route.route, + JSON.stringify(invalidParam), + JSON.stringify(received) + ) : `Generated path for ${route.route} is invalid.`, hint, }); From 0ce0720c7f2c7ba21dddfea0b75d1e9b39c6a274 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Fri, 1 Sep 2023 14:19:12 -0500 Subject: [PATCH 41/48] Wrap `JSON.parse` in `try`/`catch` (#8363) * fix(telemetry): wrap JSON.parse in try/catch * fix: always write the store * chore(lint): fix --- .changeset/fair-berries-study.md | 5 +++++ packages/telemetry/src/config.ts | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 .changeset/fair-berries-study.md diff --git a/.changeset/fair-berries-study.md b/.changeset/fair-berries-study.md new file mode 100644 index 000000000..fadde388e --- /dev/null +++ b/.changeset/fair-berries-study.md @@ -0,0 +1,5 @@ +--- +'@astrojs/telemetry': patch +--- + +Wrap `JSON.parse` in `try`/`catch` diff --git a/packages/telemetry/src/config.ts b/packages/telemetry/src/config.ts index f0d855597..6efcb7fe5 100644 --- a/packages/telemetry/src/config.ts +++ b/packages/telemetry/src/config.ts @@ -46,13 +46,15 @@ export class GlobalConfig { if (this._store) return this._store; this.ensureDir(); if (fs.existsSync(this.file)) { - this._store = JSON.parse(fs.readFileSync(this.file).toString()); - } else { - const store = {}; - this._store = store; + try { + this._store = JSON.parse(fs.readFileSync(this.file).toString()); + } catch {} + } + if (!this._store) { + this._store = {}; this.write(); } - return this._store!; + return this._store; } private set store(value: Record) { this._store = value; From 405ad950173dadddc519cf1c2e7f2523bf5326a8 Mon Sep 17 00:00:00 2001 From: Erika <3019731+Princesseuh@users.noreply.github.com> Date: Fri, 1 Sep 2023 23:20:42 +0200 Subject: [PATCH 42/48] fix: tsc complaining about astro imports again (#8367) --- .changeset/flat-cows-own.md | 5 +++++ packages/astro/components/index.ts | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/flat-cows-own.md diff --git a/.changeset/flat-cows-own.md b/.changeset/flat-cows-own.md new file mode 100644 index 000000000..68b4589af --- /dev/null +++ b/.changeset/flat-cows-own.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix `tsc` complaining about imports of `.astro` files in specific cases diff --git a/packages/astro/components/index.ts b/packages/astro/components/index.ts index 13ab357a4..e5ac0251d 100644 --- a/packages/astro/components/index.ts +++ b/packages/astro/components/index.ts @@ -1,6 +1,6 @@ -// The `ts-expect-error` comments here are necessary because we're importing this file inside the `astro:components` +// The `ts-ignore` comments here are necessary because we're importing this file inside the `astro:components` // virtual module's types, which means that `tsc` will try to resolve these imports. Don't mind the editor errors. -// @ts-expect-error +// @ts-ignore export { default as Code } from './Code.astro'; -// @ts-expect-error +// @ts-ignore export { default as Debug } from './Debug.astro'; From c5633434f02cc477ee8da380e22efaccfa55d459 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Fri, 1 Sep 2023 18:13:32 -0500 Subject: [PATCH 43/48] Ensure `chunkFileNames` do not include invalid characters (#8366) --- .changeset/eighty-laws-brake.md | 5 +++++ packages/astro/src/core/build/static-build.ts | 18 ++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 .changeset/eighty-laws-brake.md diff --git a/.changeset/eighty-laws-brake.md b/.changeset/eighty-laws-brake.md new file mode 100644 index 000000000..b4947f1aa --- /dev/null +++ b/.changeset/eighty-laws-brake.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Update `chunkFileNames` to avoid emitting invalid characters diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index 0bfb4e3ae..407e0ecde 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -172,7 +172,21 @@ async function ssrBuild( format: 'esm', // Server chunks can't go in the assets (_astro) folder // We need to keep these separate - chunkFileNames: `chunks/[name].[hash].mjs`, + chunkFileNames(chunkInfo) { + const { name } = chunkInfo; + // Sometimes chunks have the `@_@astro` suffix due to SSR logic. Remove it! + // TODO: refactor our build logic to avoid this + if (name.includes(ASTRO_PAGE_EXTENSION_POST_PATTERN)) { + const [sanitizedName] = name.split(ASTRO_PAGE_EXTENSION_POST_PATTERN); + return `chunks/${sanitizedName}_[hash].mjs` + } + // Injected routes include "pages/[name].[ext]" already. Clean those up! + if (name.startsWith('pages/')) { + const sanitizedName = name.split('.')[0]; + return `chunks/${sanitizedName}_[hash].mjs` + } + return `chunks/[name]_[hash].mjs` + }, assetFileNames: `${settings.config.build.assets}/[name].[hash][extname]`, ...viteConfig.build?.rollupOptions?.output, entryFileNames(chunkInfo) { @@ -189,7 +203,7 @@ async function ssrBuild( } else if (chunkInfo.facadeModuleId === RESOLVED_RENDERERS_MODULE_ID) { return 'renderers.mjs'; } else if (chunkInfo.facadeModuleId === RESOLVED_SSR_MANIFEST_VIRTUAL_MODULE_ID) { - return 'manifest.[hash].mjs'; + return 'manifest_[hash].mjs'; } else { return '[name].mjs'; } From d8ecae2c54a89b16af81ceafc0746867547eb7b5 Mon Sep 17 00:00:00 2001 From: natemoo-re Date: Fri, 1 Sep 2023 23:15:14 +0000 Subject: [PATCH 44/48] [ci] format --- packages/astro/src/core/build/static-build.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index 407e0ecde..c37ad542e 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -178,14 +178,14 @@ async function ssrBuild( // TODO: refactor our build logic to avoid this if (name.includes(ASTRO_PAGE_EXTENSION_POST_PATTERN)) { const [sanitizedName] = name.split(ASTRO_PAGE_EXTENSION_POST_PATTERN); - return `chunks/${sanitizedName}_[hash].mjs` + return `chunks/${sanitizedName}_[hash].mjs`; } // Injected routes include "pages/[name].[ext]" already. Clean those up! if (name.startsWith('pages/')) { const sanitizedName = name.split('.')[0]; - return `chunks/${sanitizedName}_[hash].mjs` + return `chunks/${sanitizedName}_[hash].mjs`; } - return `chunks/[name]_[hash].mjs` + return `chunks/[name]_[hash].mjs`; }, assetFileNames: `${settings.config.build.assets}/[name].[hash][extname]`, ...viteConfig.build?.rollupOptions?.output, From e34175be340f8fab60610523905cb7847809929e Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Fri, 1 Sep 2023 16:26:05 -0700 Subject: [PATCH 45/48] [ci] release (#8356) --- .changeset/eighty-laws-brake.md | 5 -- .changeset/fair-berries-study.md | 5 -- .changeset/flat-cows-own.md | 5 -- .changeset/polite-scissors-invent.md | 6 --- .changeset/quiet-sheep-refuse.md | 6 --- examples/basics/package.json | 2 +- examples/blog/package.json | 2 +- examples/component/package.json | 2 +- examples/deno/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 2 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 2 +- examples/framework-solid/package.json | 2 +- examples/framework-svelte/package.json | 2 +- examples/framework-vue/package.json | 2 +- examples/hackernews/package.json | 2 +- examples/integration/package.json | 2 +- examples/middleware/package.json | 2 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 2 +- examples/with-markdoc/package.json | 2 +- examples/with-markdown-plugins/package.json | 2 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-mdx/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-vite-plugin-pwa/package.json | 2 +- examples/with-vitest/package.json | 2 +- packages/astro/CHANGELOG.md | 13 +++++ packages/astro/package.json | 2 +- packages/integrations/cloudflare/CHANGELOG.md | 10 ++++ packages/integrations/cloudflare/package.json | 4 +- packages/integrations/deno/package.json | 2 +- packages/integrations/markdoc/package.json | 2 +- packages/integrations/mdx/package.json | 2 +- packages/integrations/netlify/CHANGELOG.md | 10 ++++ packages/integrations/netlify/package.json | 4 +- packages/integrations/node/package.json | 2 +- packages/integrations/svelte/package.json | 2 +- packages/integrations/tailwind/package.json | 2 +- packages/integrations/vercel/package.json | 2 +- packages/integrations/vue/package.json | 2 +- packages/telemetry/CHANGELOG.md | 6 +++ packages/telemetry/package.json | 2 +- pnpm-lock.yaml | 54 +++++++++---------- 49 files changed, 107 insertions(+), 95 deletions(-) delete mode 100644 .changeset/eighty-laws-brake.md delete mode 100644 .changeset/fair-berries-study.md delete mode 100644 .changeset/flat-cows-own.md delete mode 100644 .changeset/polite-scissors-invent.md delete mode 100644 .changeset/quiet-sheep-refuse.md diff --git a/.changeset/eighty-laws-brake.md b/.changeset/eighty-laws-brake.md deleted file mode 100644 index b4947f1aa..000000000 --- a/.changeset/eighty-laws-brake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Update `chunkFileNames` to avoid emitting invalid characters diff --git a/.changeset/fair-berries-study.md b/.changeset/fair-berries-study.md deleted file mode 100644 index fadde388e..000000000 --- a/.changeset/fair-berries-study.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/telemetry': patch ---- - -Wrap `JSON.parse` in `try`/`catch` diff --git a/.changeset/flat-cows-own.md b/.changeset/flat-cows-own.md deleted file mode 100644 index 68b4589af..000000000 --- a/.changeset/flat-cows-own.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fix `tsc` complaining about imports of `.astro` files in specific cases diff --git a/.changeset/polite-scissors-invent.md b/.changeset/polite-scissors-invent.md deleted file mode 100644 index 57a1ab0a0..000000000 --- a/.changeset/polite-scissors-invent.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'astro': patch ---- - -Added counter to show progress for assets image generation. -Fixed small unit of measurement error. \ No newline at end of file diff --git a/.changeset/quiet-sheep-refuse.md b/.changeset/quiet-sheep-refuse.md deleted file mode 100644 index 3660e03fc..000000000 --- a/.changeset/quiet-sheep-refuse.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@astrojs/cloudflare': patch -'@astrojs/netlify': patch ---- - -Update README diff --git a/examples/basics/package.json b/examples/basics/package.json index 362f167a6..864468d9b 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.6" + "astro": "^3.0.7" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index c319d0553..5c93b7353 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -14,6 +14,6 @@ "@astrojs/mdx": "^1.0.0", "@astrojs/rss": "^3.0.0", "@astrojs/sitemap": "^3.0.0", - "astro": "^3.0.6" + "astro": "^3.0.7" } } diff --git a/examples/component/package.json b/examples/component/package.json index 5609da382..e015ed5c2 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^3.0.6" + "astro": "^3.0.7" }, "peerDependencies": { "astro": "^2.0.0-beta.0" diff --git a/examples/deno/package.json b/examples/deno/package.json index 5eee77243..3c13131aa 100644 --- a/examples/deno/package.json +++ b/examples/deno/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.6" + "astro": "^3.0.7" }, "devDependencies": { "@astrojs/deno": "^5.0.0" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 26a39c619..64d1ed26b 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -14,6 +14,6 @@ "@astrojs/alpinejs": "^0.3.0", "@types/alpinejs": "^3.7.2", "alpinejs": "^3.12.3", - "astro": "^3.0.6" + "astro": "^3.0.7" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index 960f29416..b509d6a87 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/lit": "^3.0.0", "@webcomponents/template-shadowroot": "^0.2.1", - "astro": "^3.0.6", + "astro": "^3.0.7", "lit": "^2.8.0" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index eb7512275..d7f0dbd04 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -16,7 +16,7 @@ "@astrojs/solid-js": "^3.0.0", "@astrojs/svelte": "^4.0.0", "@astrojs/vue": "^3.0.0", - "astro": "^3.0.6", + "astro": "^3.0.7", "preact": "^10.17.1", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 423cbe226..7683269b9 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.0.0", "@preact/signals": "^1.2.1", - "astro": "^3.0.6", + "astro": "^3.0.7", "preact": "^10.17.1" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 6efdc8a38..c36be8c79 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -14,7 +14,7 @@ "@astrojs/react": "^3.0.0", "@types/react": "^18.2.21", "@types/react-dom": "^18.2.7", - "astro": "^3.0.6", + "astro": "^3.0.7", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 07c4a1117..4012d3289 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/solid-js": "^3.0.0", - "astro": "^3.0.6", + "astro": "^3.0.7", "solid-js": "^1.7.11" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 87b8186ed..15c2ec1e2 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/svelte": "^4.0.0", - "astro": "^3.0.6", + "astro": "^3.0.7", "svelte": "^4.2.0" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 9f5f9dcc7..ab885fd24 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/vue": "^3.0.0", - "astro": "^3.0.6", + "astro": "^3.0.7", "vue": "^3.3.4" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 8694939ac..727aa633b 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/node": "^6.0.0", - "astro": "^3.0.6" + "astro": "^3.0.7" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index df23262cc..6be586671 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^3.0.6" + "astro": "^3.0.7" }, "peerDependencies": { "astro": "^2.0.0-beta.0" diff --git a/examples/middleware/package.json b/examples/middleware/package.json index a5c2134b2..e262751a9 100644 --- a/examples/middleware/package.json +++ b/examples/middleware/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@astrojs/node": "^6.0.0", - "astro": "^3.0.6", + "astro": "^3.0.7", "html-minifier": "^4.0.0" } } diff --git a/examples/minimal/package.json b/examples/minimal/package.json index cb6b3c6d2..4c2681aee 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.6" + "astro": "^3.0.7" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index ca66352d5..359134563 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.6" + "astro": "^3.0.7" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index bf365d49d..8c98a0988 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.6" + "astro": "^3.0.7" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 06f20bc79..a826a924a 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -14,7 +14,7 @@ "dependencies": { "@astrojs/node": "^6.0.0", "@astrojs/svelte": "^4.0.0", - "astro": "^3.0.6", + "astro": "^3.0.7", "svelte": "^4.2.0" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index eb25f4892..16d04e6fa 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/markdoc": "^0.5.0", - "astro": "^3.0.6" + "astro": "^3.0.7" } } diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 73723916c..1b9b571be 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/markdown-remark": "^3.0.0", - "astro": "^3.0.6", + "astro": "^3.0.7", "hast-util-select": "^5.0.5", "rehype-autolink-headings": "^6.1.1", "rehype-slug": "^5.1.0", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index 620740515..86fbfbfe7 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.6" + "astro": "^3.0.7" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index 2681e81f6..7dbf9a7d6 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/mdx": "^1.0.0", "@astrojs/preact": "^3.0.0", - "astro": "^3.0.6", + "astro": "^3.0.7", "preact": "^10.17.1" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index a27a5a024..4a81979bd 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.0.0", "@nanostores/preact": "^0.5.0", - "astro": "^3.0.6", + "astro": "^3.0.7", "nanostores": "^0.9.3", "preact": "^10.17.1" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 773e77847..ab1d57dc1 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -14,7 +14,7 @@ "@astrojs/mdx": "^1.0.0", "@astrojs/tailwind": "^5.0.0", "@types/canvas-confetti": "^1.6.0", - "astro": "^3.0.6", + "astro": "^3.0.7", "autoprefixer": "^10.4.15", "canvas-confetti": "^1.6.0", "postcss": "^8.4.28", diff --git a/examples/with-vite-plugin-pwa/package.json b/examples/with-vite-plugin-pwa/package.json index af0570da0..2b308bd56 100644 --- a/examples/with-vite-plugin-pwa/package.json +++ b/examples/with-vite-plugin-pwa/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^3.0.6", + "astro": "^3.0.7", "vite-plugin-pwa": "0.16.4", "workbox-window": "^7.0.0" } diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index c6e72f3cb..5c1dee86b 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^3.0.6", + "astro": "^3.0.7", "vitest": "^0.34.2" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 5b0071572..82dfdc1b0 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,18 @@ # astro +## 3.0.7 + +### Patch Changes + +- [#8366](https://github.com/withastro/astro/pull/8366) [`c5633434f`](https://github.com/withastro/astro/commit/c5633434f02cc477ee8da380e22efaccfa55d459) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Update `chunkFileNames` to avoid emitting invalid characters + +- [#8367](https://github.com/withastro/astro/pull/8367) [`405ad9501`](https://github.com/withastro/astro/commit/405ad950173dadddc519cf1c2e7f2523bf5326a8) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fix `tsc` complaining about imports of `.astro` files in specific cases + +- [#8357](https://github.com/withastro/astro/pull/8357) [`6b1e79814`](https://github.com/withastro/astro/commit/6b1e7981469d30aa4c3658487abed6ffea94797f) Thanks [@itsmatteomanf](https://github.com/itsmatteomanf)! - Added counter to show progress for assets image generation. + Fixed small unit of measurement error. +- Updated dependencies [[`0ce0720c7`](https://github.com/withastro/astro/commit/0ce0720c7f2c7ba21dddfea0b75d1e9b39c6a274)]: + - @astrojs/telemetry@3.0.1 + ## 3.0.6 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 6f4dab863..354a030b5 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "3.0.6", + "version": "3.0.7", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", diff --git a/packages/integrations/cloudflare/CHANGELOG.md b/packages/integrations/cloudflare/CHANGELOG.md index 89cbf8c1e..212a67277 100644 --- a/packages/integrations/cloudflare/CHANGELOG.md +++ b/packages/integrations/cloudflare/CHANGELOG.md @@ -1,5 +1,15 @@ # @astrojs/cloudflare +## 7.0.1 + +### Patch Changes + +- [#8346](https://github.com/withastro/astro/pull/8346) [`b74dacdb6`](https://github.com/withastro/astro/commit/b74dacdb6a49755f979f15091355f06bd6bd64bf) Thanks [@delucis](https://github.com/delucis)! - Update README + +- Updated dependencies [[`c5633434f`](https://github.com/withastro/astro/commit/c5633434f02cc477ee8da380e22efaccfa55d459), [`405ad9501`](https://github.com/withastro/astro/commit/405ad950173dadddc519cf1c2e7f2523bf5326a8), [`6b1e79814`](https://github.com/withastro/astro/commit/6b1e7981469d30aa4c3658487abed6ffea94797f)]: + - astro@3.0.7 + - @astrojs/underscore-redirects@0.3.0 + ## 7.0.0 ### Major Changes diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json index b60d7ccba..776964cf0 100644 --- a/packages/integrations/cloudflare/package.json +++ b/packages/integrations/cloudflare/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/cloudflare", "description": "Deploy your site to Cloudflare Workers/Pages", - "version": "7.0.0", + "version": "7.0.1", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", @@ -45,7 +45,7 @@ "tiny-glob": "^0.2.9" }, "peerDependencies": { - "astro": "workspace:^3.0.6" + "astro": "workspace:^3.0.7" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/deno/package.json b/packages/integrations/deno/package.json index 0ae24d3fb..a6e8f25ee 100644 --- a/packages/integrations/deno/package.json +++ b/packages/integrations/deno/package.json @@ -36,7 +36,7 @@ "esbuild": "^0.19.2" }, "peerDependencies": { - "astro": "workspace:^3.0.6" + "astro": "workspace:^3.0.7" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json index e64c232fe..99b661e3b 100644 --- a/packages/integrations/markdoc/package.json +++ b/packages/integrations/markdoc/package.json @@ -75,7 +75,7 @@ "zod": "3.21.1" }, "peerDependencies": { - "astro": "workspace:^3.0.6" + "astro": "workspace:^3.0.7" }, "devDependencies": { "@astrojs/markdown-remark": "workspace:*", diff --git a/packages/integrations/mdx/package.json b/packages/integrations/mdx/package.json index f7fe1557f..61fd30374 100644 --- a/packages/integrations/mdx/package.json +++ b/packages/integrations/mdx/package.json @@ -54,7 +54,7 @@ "vfile": "^5.3.7" }, "peerDependencies": { - "astro": "workspace:^3.0.6" + "astro": "workspace:^3.0.7" }, "devDependencies": { "@types/chai": "^4.3.5", diff --git a/packages/integrations/netlify/CHANGELOG.md b/packages/integrations/netlify/CHANGELOG.md index 33745abb7..d963405ac 100644 --- a/packages/integrations/netlify/CHANGELOG.md +++ b/packages/integrations/netlify/CHANGELOG.md @@ -1,5 +1,15 @@ # @astrojs/netlify +## 3.0.1 + +### Patch Changes + +- [#8346](https://github.com/withastro/astro/pull/8346) [`b74dacdb6`](https://github.com/withastro/astro/commit/b74dacdb6a49755f979f15091355f06bd6bd64bf) Thanks [@delucis](https://github.com/delucis)! - Update README + +- Updated dependencies [[`c5633434f`](https://github.com/withastro/astro/commit/c5633434f02cc477ee8da380e22efaccfa55d459), [`405ad9501`](https://github.com/withastro/astro/commit/405ad950173dadddc519cf1c2e7f2523bf5326a8), [`6b1e79814`](https://github.com/withastro/astro/commit/6b1e7981469d30aa4c3658487abed6ffea94797f)]: + - astro@3.0.7 + - @astrojs/underscore-redirects@0.3.0 + ## 3.0.0 ### Major Changes diff --git a/packages/integrations/netlify/package.json b/packages/integrations/netlify/package.json index 3498b37a2..fa7233f8f 100644 --- a/packages/integrations/netlify/package.json +++ b/packages/integrations/netlify/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/netlify", "description": "Deploy your site to Netlify", - "version": "3.0.0", + "version": "3.0.1", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", @@ -43,7 +43,7 @@ "esbuild": "^0.19.2" }, "peerDependencies": { - "astro": "workspace:^3.0.6" + "astro": "workspace:^3.0.7" }, "devDependencies": { "@netlify/edge-functions": "^2.0.0", diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json index fc4c36c89..902a30467 100644 --- a/packages/integrations/node/package.json +++ b/packages/integrations/node/package.json @@ -37,7 +37,7 @@ "server-destroy": "^1.0.1" }, "peerDependencies": { - "astro": "workspace:^3.0.6" + "astro": "workspace:^3.0.7" }, "devDependencies": { "@types/node": "^18.17.8", diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index d3dd01b6c..4d4c592a6 100644 --- a/packages/integrations/svelte/package.json +++ b/packages/integrations/svelte/package.json @@ -48,7 +48,7 @@ "vite": "^4.4.9" }, "peerDependencies": { - "astro": "workspace:^3.0.6", + "astro": "workspace:^3.0.7", "svelte": "^3.55.0 || ^4.0.0" }, "engines": { diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json index 479a1801f..5b947ea3c 100644 --- a/packages/integrations/tailwind/package.json +++ b/packages/integrations/tailwind/package.json @@ -43,7 +43,7 @@ "vite": "^4.4.9" }, "peerDependencies": { - "astro": "workspace:^3.0.6", + "astro": "workspace:^3.0.7", "tailwindcss": "^3.0.24" } } diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index 219eda70d..93dbb0ac1 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -60,7 +60,7 @@ "web-vitals": "^3.4.0" }, "peerDependencies": { - "astro": "workspace:^3.0.6" + "astro": "workspace:^3.0.7" }, "devDependencies": { "@types/set-cookie-parser": "^2.4.3", diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index bfb924a5c..7cb2ee991 100644 --- a/packages/integrations/vue/package.json +++ b/packages/integrations/vue/package.json @@ -56,7 +56,7 @@ "vue": "^3.3.4" }, "peerDependencies": { - "astro": "workspace:^3.0.6", + "astro": "workspace:^3.0.7", "vue": "^3.2.30" }, "engines": { diff --git a/packages/telemetry/CHANGELOG.md b/packages/telemetry/CHANGELOG.md index edad7a2da..702565f34 100644 --- a/packages/telemetry/CHANGELOG.md +++ b/packages/telemetry/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/telemetry +## 3.0.1 + +### Patch Changes + +- [#8363](https://github.com/withastro/astro/pull/8363) [`0ce0720c7`](https://github.com/withastro/astro/commit/0ce0720c7f2c7ba21dddfea0b75d1e9b39c6a274) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Wrap `JSON.parse` in `try`/`catch` + ## 3.0.0 ### Major Changes diff --git a/packages/telemetry/package.json b/packages/telemetry/package.json index 58c8de32e..8f8a634bf 100644 --- a/packages/telemetry/package.json +++ b/packages/telemetry/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/telemetry", - "version": "3.0.0", + "version": "3.0.1", "type": "module", "types": "./dist/types/index.d.ts", "author": "withastro", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 80e2726c7..9988bdbac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -125,7 +125,7 @@ importers: examples/basics: dependencies: astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro examples/blog: @@ -140,19 +140,19 @@ importers: specifier: ^3.0.0 version: link:../../packages/integrations/sitemap astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro examples/deno: dependencies: astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro devDependencies: '@astrojs/deno': @@ -171,7 +171,7 @@ importers: specifier: ^3.12.3 version: 3.12.3 astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro examples/framework-lit: @@ -183,7 +183,7 @@ importers: specifier: ^0.2.1 version: 0.2.1 astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro lit: specifier: ^2.8.0 @@ -207,7 +207,7 @@ importers: specifier: ^3.0.0 version: link:../../packages/integrations/vue astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro preact: specifier: ^10.17.1 @@ -237,7 +237,7 @@ importers: specifier: ^1.2.1 version: 1.2.1(preact@10.17.1) astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro preact: specifier: ^10.17.1 @@ -255,7 +255,7 @@ importers: specifier: ^18.2.7 version: 18.2.7 astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro react: specifier: ^18.2.0 @@ -270,7 +270,7 @@ importers: specifier: ^3.0.0 version: link:../../packages/integrations/solid astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro solid-js: specifier: ^1.7.11 @@ -282,7 +282,7 @@ importers: specifier: ^4.0.0 version: link:../../packages/integrations/svelte astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro svelte: specifier: ^4.2.0 @@ -294,7 +294,7 @@ importers: specifier: ^3.0.0 version: link:../../packages/integrations/vue astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro vue: specifier: ^3.3.4 @@ -306,13 +306,13 @@ importers: specifier: ^6.0.0 version: link:../../packages/integrations/node astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro examples/middleware: @@ -321,7 +321,7 @@ importers: specifier: ^6.0.0 version: link:../../packages/integrations/node astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro html-minifier: specifier: ^4.0.0 @@ -330,19 +330,19 @@ importers: examples/minimal: dependencies: astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro examples/non-html-pages: dependencies: astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro examples/ssr: @@ -354,7 +354,7 @@ importers: specifier: ^4.0.0 version: link:../../packages/integrations/svelte astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro svelte: specifier: ^4.2.0 @@ -366,7 +366,7 @@ importers: specifier: ^0.5.0 version: link:../../packages/integrations/markdoc astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro examples/with-markdown-plugins: @@ -375,7 +375,7 @@ importers: specifier: ^3.0.0 version: link:../../packages/markdown/remark astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro hast-util-select: specifier: ^5.0.5 @@ -396,7 +396,7 @@ importers: examples/with-markdown-shiki: dependencies: astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro examples/with-mdx: @@ -408,7 +408,7 @@ importers: specifier: ^3.0.0 version: link:../../packages/integrations/preact astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro preact: specifier: ^10.17.1 @@ -423,7 +423,7 @@ importers: specifier: ^0.5.0 version: 0.5.0(nanostores@0.9.3)(preact@10.17.1) astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro nanostores: specifier: ^0.9.3 @@ -444,7 +444,7 @@ importers: specifier: ^1.6.0 version: 1.6.0 astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro autoprefixer: specifier: ^10.4.15 @@ -462,7 +462,7 @@ importers: examples/with-vite-plugin-pwa: dependencies: astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro vite-plugin-pwa: specifier: 0.16.4 @@ -474,7 +474,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^3.0.6 + specifier: ^3.0.7 version: link:../../packages/astro vitest: specifier: ^0.34.2 From 06e7256b58682064cf7410f72658ce44507f639e Mon Sep 17 00:00:00 2001 From: Matteo Manfredi Date: Sat, 2 Sep 2023 03:03:50 +0200 Subject: [PATCH 46/48] fix: remove double `}` (#8370) * fix: remove extra `}` * changeset: add --- .changeset/many-mayflies-punch.md | 5 +++++ packages/astro/src/core/build/generate.ts | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 .changeset/many-mayflies-punch.md diff --git a/.changeset/many-mayflies-punch.md b/.changeset/many-mayflies-punch.md new file mode 100644 index 000000000..6e33df252 --- /dev/null +++ b/.changeset/many-mayflies-punch.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Removed extra curly brace. diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 111b8ef05..b6bda6271 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -246,7 +246,7 @@ async function generateImage( const counter = `(${count}/${totalCount})`; logger.info( null, - ` ${green('▶')} ${path} ${dim(statsText)} ${dim(timeIncrease)} ${dim(counter)}}` + ` ${green('▶')} ${path} ${dim(statsText)} ${dim(timeIncrease)} ${dim(counter)}` ); } @@ -411,10 +411,10 @@ function getInvalidRouteSegmentError( ...AstroErrorData.InvalidDynamicRoute, message: invalidParam ? AstroErrorData.InvalidDynamicRoute.message( - route.route, - JSON.stringify(invalidParam), - JSON.stringify(received) - ) + route.route, + JSON.stringify(invalidParam), + JSON.stringify(received) + ) : `Generated path for ${route.route} is invalid.`, hint, }); From dc8bcb6ae7c59dce3b4ee39510293361a4f7d140 Mon Sep 17 00:00:00 2001 From: matthewp Date: Sat, 2 Sep 2023 01:06:06 +0000 Subject: [PATCH 47/48] [ci] format --- packages/astro/src/core/build/generate.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index b6bda6271..5fe670e99 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -411,10 +411,10 @@ function getInvalidRouteSegmentError( ...AstroErrorData.InvalidDynamicRoute, message: invalidParam ? AstroErrorData.InvalidDynamicRoute.message( - route.route, - JSON.stringify(invalidParam), - JSON.stringify(received) - ) + route.route, + JSON.stringify(invalidParam), + JSON.stringify(received) + ) : `Generated path for ${route.route} is invalid.`, hint, }); From 8d12659ce88460b2af00a6752feb7fcca9ac9bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=91=9E=E4=B8=B0?= Date: Mon, 4 Sep 2023 11:19:53 +0800 Subject: [PATCH 48/48] Fix benchmark import path (#8389) --- benchmark/bench/render.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/bench/render.js b/benchmark/bench/render.js index dae33f470..8b0e30ad7 100644 --- a/benchmark/bench/render.js +++ b/benchmark/bench/render.js @@ -5,7 +5,7 @@ import http from 'node:http'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; import { waitUntilBusy } from 'port-authority'; -import { calculateStat } from '../make-project/_util.js'; +import { calculateStat } from './_util.js'; import { renderFiles } from '../make-project/render-default.js'; import { astroBin } from './_util.js';