From c090094f40b22153ffc1abaee18dba0e76d177d8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Jan 2023 21:36:16 +0000 Subject: [PATCH] [ci] release (beta) --- .changeset/pre.json | 12 +- examples/basics/package.json | 2 +- examples/blog/package.json | 4 +- examples/component/package.json | 4 +- examples/deno/package.json | 4 +- examples/docs/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 6 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 2 +- examples/framework-solid/package.json | 2 +- examples/framework-svelte/package.json | 4 +- examples/framework-vue/package.json | 4 +- examples/hackernews/package.json | 4 +- examples/integration/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-content/package.json | 4 +- examples/with-markdown-plugins/package.json | 4 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-mdx/package.json | 4 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 4 +- examples/with-vite-plugin-pwa/package.json | 2 +- examples/with-vitest/package.json | 2 +- packages/astro/CHANGELOG.md | 117 +++++++ packages/astro/package.json | 4 +- packages/integrations/cloudflare/CHANGELOG.md | 11 + packages/integrations/cloudflare/package.json | 4 +- packages/integrations/deno/CHANGELOG.md | 11 + packages/integrations/deno/package.json | 4 +- packages/integrations/image/CHANGELOG.md | 6 + packages/integrations/image/package.json | 2 +- packages/integrations/mdx/CHANGELOG.md | 47 +++ packages/integrations/mdx/package.json | 4 +- packages/integrations/netlify/CHANGELOG.md | 6 + packages/integrations/netlify/package.json | 2 +- packages/integrations/node/CHANGELOG.md | 11 + packages/integrations/node/package.json | 4 +- packages/integrations/svelte/CHANGELOG.md | 8 + packages/integrations/svelte/package.json | 2 +- packages/integrations/vercel/CHANGELOG.md | 6 + packages/integrations/vercel/package.json | 2 +- packages/integrations/vue/CHANGELOG.md | 6 + packages/integrations/vue/package.json | 2 +- packages/markdown/remark/CHANGELOG.md | 42 +++ packages/markdown/remark/package.json | 2 +- pnpm-lock.yaml | 299 ++++++++++++++---- 51 files changed, 578 insertions(+), 120 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index f3e532102fbdd..d77435b9fbaa1 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -60,5 +60,15 @@ "@astrojs/webapi": "1.1.1", "astro-scripts": "0.0.9" }, - "changesets": [] + "changesets": [ + "beige-pumpkins-pump", + "chilled-geese-worry", + "lovely-terms-drive", + "new-lies-guess", + "selfish-tigers-do", + "serious-cats-jog", + "spotty-bees-switch", + "tricky-rabbits-count", + "two-geese-eat" + ] } diff --git a/examples/basics/package.json b/examples/basics/package.json index c8c19c62e4a78..a7be9f8f32554 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0" + "astro": "^2.0.0-beta.0" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index ac30b5213baad..4b0732129383b 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -11,8 +11,8 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0", - "@astrojs/mdx": "^0.14.0", + "astro": "^2.0.0-beta.0", + "@astrojs/mdx": "^0.15.0-beta.0", "@astrojs/rss": "^2.0.0", "@astrojs/sitemap": "^1.0.0" } diff --git a/examples/component/package.json b/examples/component/package.json index 55e4a6dd8159d..9d860df245146 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,9 +15,9 @@ ], "scripts": {}, "devDependencies": { - "astro": "^1.9.0" + "astro": "^2.0.0-beta.0" }, "peerDependencies": { - "astro": "^1.7.2" + "astro": "^2.0.0-beta.0" } } diff --git a/examples/deno/package.json b/examples/deno/package.json index 402a1e9907719..08c13c9b6bdc2 100644 --- a/examples/deno/package.json +++ b/examples/deno/package.json @@ -10,9 +10,9 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0" + "astro": "^2.0.0-beta.0" }, "devDependencies": { - "@astrojs/deno": "^3.0.0" + "@astrojs/deno": "^4.0.0-beta.0" } } diff --git a/examples/docs/package.json b/examples/docs/package.json index f9b87df31d92d..64a279a61a3f9 100644 --- a/examples/docs/package.json +++ b/examples/docs/package.json @@ -12,7 +12,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0", + "astro": "^2.0.0-beta.0", "preact": "^10.7.3", "react": "^18.1.0", "react-dom": "^18.1.0", diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 991cc918e8311..1d99bee3df387 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0", + "astro": "^2.0.0-beta.0", "alpinejs": "^3.10.2", "@astrojs/alpinejs": "^0.1.2", "@types/alpinejs": "^3.7.0" diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index b933e77666ce1..020ee1a8d21c1 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0", + "astro": "^2.0.0-beta.0", "lit": "^2.2.5", "@astrojs/lit": "^1.0.0", "@webcomponents/template-shadowroot": "^0.1.0" diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index c21335947d5b7..26e886e152ede 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0", + "astro": "^2.0.0-beta.0", "preact": "^10.7.3", "react": "^18.1.0", "react-dom": "^18.1.0", @@ -21,7 +21,7 @@ "@astrojs/preact": "^1.2.0", "@astrojs/react": "^1.2.2", "@astrojs/solid-js": "^1.2.3", - "@astrojs/svelte": "^1.0.2", - "@astrojs/vue": "^1.2.2" + "@astrojs/svelte": "^2.0.0-beta.0", + "@astrojs/vue": "^2.0.0-beta.0" } } diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index cbb5563268ba2..88e49f8d6ec16 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0", + "astro": "^2.0.0-beta.0", "preact": "^10.7.3", "@astrojs/preact": "^1.2.0", "@preact/signals": "^1.1.0" diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index a4ff3b4d890bc..57451132c32ac 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0", + "astro": "^2.0.0-beta.0", "react": "^18.1.0", "react-dom": "^18.1.0", "@astrojs/react": "^1.2.2", diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index c679a7ed50cd2..b45dff2261c0c 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0", + "astro": "^2.0.0-beta.0", "solid-js": "^1.4.3", "@astrojs/solid-js": "^1.2.3" } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index ca1bd5f8b2093..f39ff727d83bd 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "svelte": "^3.48.0", - "@astrojs/svelte": "^1.0.2", - "astro": "^1.9.0" + "@astrojs/svelte": "^2.0.0-beta.0", + "astro": "^2.0.0-beta.0" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 04d55915b8bed..c06849fad2ea1 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -11,8 +11,8 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0", + "astro": "^2.0.0-beta.0", "vue": "^3.2.37", - "@astrojs/vue": "^1.2.2" + "@astrojs/vue": "^2.0.0-beta.0" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 98cbcd0673cdd..1fe03e589329e 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -12,7 +12,7 @@ "astro": "astro" }, "dependencies": { - "@astrojs/node": "^4.0.0", - "astro": "^1.9.0" + "@astrojs/node": "^5.0.0-beta.0", + "astro": "^2.0.0-beta.0" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index 75dfac09c0983..434040f25386b 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,9 +15,9 @@ ], "scripts": {}, "devDependencies": { - "astro": "^1.9.0" + "astro": "^2.0.0-beta.0" }, "peerDependencies": { - "astro": "^1.7.2" + "astro": "^2.0.0-beta.0" } } diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 7f0e17aec6397..942154026f4e4 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0" + "astro": "^2.0.0-beta.0" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index f37872df2e666..425b974aa78f7 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0" + "astro": "^2.0.0-beta.0" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 9e97536e85e6f..25502339d061d 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0" + "astro": "^2.0.0-beta.0" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 4f8d88c153e3a..930b54edd74b9 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -12,10 +12,10 @@ "server": "node dist/server/entry.mjs" }, "dependencies": { - "astro": "^1.9.0", + "astro": "^2.0.0-beta.0", "svelte": "^3.48.0", - "@astrojs/svelte": "^1.0.2", - "@astrojs/node": "^4.0.0", + "@astrojs/svelte": "^2.0.0-beta.0", + "@astrojs/node": "^5.0.0-beta.0", "concurrently": "^7.2.1", "unocss": "^0.15.6", "vite-imagetools": "^4.0.4" diff --git a/examples/with-content/package.json b/examples/with-content/package.json index 4793db5b9f55d..c537aefdb27d8 100644 --- a/examples/with-content/package.json +++ b/examples/with-content/package.json @@ -11,8 +11,8 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0", - "@astrojs/mdx": "^0.14.0", + "astro": "^2.0.0-beta.0", + "@astrojs/mdx": "^0.15.0-beta.0", "@astrojs/sitemap": "^1.0.0" } } diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 606a457e2656c..79c2f98417e74 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -11,8 +11,8 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0", - "@astrojs/markdown-remark": "^1.2.0", + "astro": "^2.0.0-beta.0", + "@astrojs/markdown-remark": "^2.0.0-beta.0", "hast-util-select": "5.0.1", "rehype-autolink-headings": "^6.1.1", "rehype-slug": "^5.0.1", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index 29277f9a4d131..6821a6efa031b 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0" + "astro": "^2.0.0-beta.0" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index d1668bd4c5dfc..6a7eefbf4f237 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -11,9 +11,9 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0", + "astro": "^2.0.0-beta.0", "preact": "^10.6.5", "@astrojs/preact": "^1.2.0", - "@astrojs/mdx": "^0.14.0" + "@astrojs/mdx": "^0.15.0-beta.0" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index 12eabda76bae3..21bf231874d16 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.9.0", + "astro": "^2.0.0-beta.0", "preact": "^10.7.3", "@astrojs/preact": "^1.2.0", "nanostores": "^0.5.12", diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index c206be0c30b1a..dd058d723afeb 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -11,10 +11,10 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^0.14.0", + "@astrojs/mdx": "^0.15.0-beta.0", "@astrojs/tailwind": "^2.1.3", "@types/canvas-confetti": "^1.4.3", - "astro": "^1.9.0", + "astro": "^2.0.0-beta.0", "autoprefixer": "^10.4.7", "canvas-confetti": "^1.5.1", "postcss": "^8.4.14", diff --git a/examples/with-vite-plugin-pwa/package.json b/examples/with-vite-plugin-pwa/package.json index ecba711b14219..8608ad5f903b1 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": "^1.9.0", + "astro": "^2.0.0-beta.0", "vite-plugin-pwa": "0.11.11", "workbox-window": "^6.5.3" } diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index de8e5520f6752..f0ae7152f6526 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^1.9.0", + "astro": "^2.0.0-beta.0", "vitest": "^0.20.3" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 2998942d1f97e..9dd9f95400e56 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,122 @@ # astro +## 2.0.0-beta.0 + +### Major Changes + +- [#5687](https://github.com/withastro/astro/pull/5687) [`e2019be6f`](https://github.com/withastro/astro/commit/e2019be6ffa46fa33d92cfd346f9ecbe51bb7144) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Give remark and rehype plugins access to user frontmatter via frontmatter injection. This means `data.astro.frontmatter` is now the _complete_ Markdown or MDX document's frontmatter, rather than an empty object. + + This allows plugin authors to modify existing frontmatter, or compute new properties based on other properties. For example, say you want to compute a full image URL based on an `imageSrc` slug in your document frontmatter: + + ```ts + export function remarkInjectSocialImagePlugin() { + return function (tree, file) { + const { frontmatter } = file.data.astro; + frontmatter.socialImageSrc = new URL(frontmatter.imageSrc, 'https://my-blog.com/').pathname; + }; + } + ``` + + #### Content Collections - new `remarkPluginFrontmatter` property + + We have changed _inject_ frontmatter to _modify_ frontmatter in our docs to improve discoverability. This is based on support forum feedback, where "injection" is rarely the term used. + + To reflect this, the `injectedFrontmatter` property has been renamed to `remarkPluginFrontmatter`. This should clarify this plugin is still separate from the `data` export Content Collections expose today. + + #### Migration instructions + + Plugin authors should now **check for user frontmatter when applying defaults.** + + For example, say a remark plugin wants to apply a default `title` if none is present. Add a conditional to check if the property is present, and update if none exists: + + ```diff + export function remarkInjectTitlePlugin() { + return function (tree, file) { + const { frontmatter } = file.data.astro; + + if (!frontmatter.title) { + frontmatter.title = 'Default title'; + + } + } + } + ``` + + This differs from previous behavior, where a Markdown file's frontmatter would _always_ override frontmatter injected via remark or reype. + +- [#5728](https://github.com/withastro/astro/pull/5728) [`8fb28648f`](https://github.com/withastro/astro/commit/8fb28648f66629741cb976bfe34ccd9d8f55661e) Thanks [@natemoo-re](https://github.com/natemoo-re)! - The previously experimental features `--experimental-error-overlay` and `--experimental-prerender`, both added in v1.7.0, are now the default. + + You'll notice that the error overlay during `astro dev` has a refreshed visual design and provides more context for your errors. + + The `prerender` feature is now enabled by default when using `output: 'server'`. To prerender a particular page, add `export const prerender = true` to your frontmatter. + + > **Warning** + > Integration authors that previously relied on the exact structure of Astro's v1.0 build output may notice some changes to our output file structure. Please test your integrations to ensure compatability. + > Users that have configured a custom `vite.build.rollupOptions.output.chunkFileNames` should ensure that their Astro project is configured as an ESM Node project. Either include `"type": "module"` in your root `package.json` file or use the `.mjs` extension for `chunkFileNames`. + +- [#5716](https://github.com/withastro/astro/pull/5716) [`dd56c1941`](https://github.com/withastro/astro/commit/dd56c19411b126439b8bc42d681b6fa8c06e8c61) Thanks [@bluwy](https://github.com/bluwy)! - Remove MDX Fragment hack. This was used by `@astrojs/mdx` to access the `Fragment` component, but isn't require anymore since `@astrojs/mdx` v0.12.1. + +- [#5685](https://github.com/withastro/astro/pull/5685) [`f6cf92b48`](https://github.com/withastro/astro/commit/f6cf92b48317a19a3840ad781b77d6d3cae143bb) Thanks [@bluwy](https://github.com/bluwy)! - Upgrade to Vite 4. Please see its [migration guide](https://vitejs.dev/guide/migration.html) for more information. + +- [#5724](https://github.com/withastro/astro/pull/5724) [`16c7d0bfd`](https://github.com/withastro/astro/commit/16c7d0bfd49d2b9bfae45385f506bcd642f9444a) Thanks [@bluwy](https://github.com/bluwy)! - Remove outdated Vue info log. Remove `toString` support for `RenderTemplateResult`. + +- [#5707](https://github.com/withastro/astro/pull/5707) [`5eba34fcc`](https://github.com/withastro/astro/commit/5eba34fcc663def20bdf6e0daad02a6a5472776b) Thanks [@bluwy](https://github.com/bluwy)! - Remove deprecated `Astro` global APIs, including `Astro.resolve`, `Astro.fetchContent`, and `Astro.canonicalURL`. + + #### `Astro.resolve` + + You can resolve asset paths using `import` instead. For example: + + ```astro + --- + import 'style.css'; + import imageUrl from './image.png'; + --- + + + ``` + + See the [v0.25 migration guide](https://docs.astro.build/en/migrate/#deprecated-astroresolve) for more information. + + #### `Astro.fetchContent` + + Use `Astro.glob` instead to fetch markdown files, or migrate to the [Content Collections](https://docs.astro.build/en/guides/content-collections/) feature. + + ```js + let allPosts = await Astro.glob('./posts/*.md'); + ``` + + #### `Astro.canonicalURL` + + Use `Astro.url` instead to construct the canonical URL. + + ```js + const canonicalURL = new URL(Astro.url.pathname, Astro.site); + ``` + +- [#5707](https://github.com/withastro/astro/pull/5707) [`5eba34fcc`](https://github.com/withastro/astro/commit/5eba34fcc663def20bdf6e0daad02a6a5472776b) Thanks [@bluwy](https://github.com/bluwy)! - Remove `buildConfig` option parameter from integration `astro:build:start` hook in favour of the `build.config` option in the `astro:config:setup` hook. + + ```js + export default function myIntegration() { + return { + name: 'my-integration', + hooks: { + 'astro:config:setup': ({ updateConfig }) => { + updateConfig({ + build: { + client: '...', + server: '...', + serverEntry: '...', + }, + }); + }, + }, + }; + } + ``` + +### Patch Changes + +- Updated dependencies [[`e2019be6f`](https://github.com/withastro/astro/commit/e2019be6ffa46fa33d92cfd346f9ecbe51bb7144)]: + - @astrojs/markdown-remark@2.0.0-beta.0 + ## 1.9.0 ### Minor Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index cc6313823ff7e..a087d6cf280da 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "1.9.0", + "version": "2.0.0-beta.0", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", @@ -111,7 +111,7 @@ "dependencies": { "@astrojs/compiler": "^0.31.0", "@astrojs/language-server": "^0.28.3", - "@astrojs/markdown-remark": "^1.2.0", + "@astrojs/markdown-remark": "^2.0.0-beta.0", "@astrojs/telemetry": "^1.0.1", "@astrojs/webapi": "^1.1.1", "@babel/core": "^7.18.2", diff --git a/packages/integrations/cloudflare/CHANGELOG.md b/packages/integrations/cloudflare/CHANGELOG.md index 33dae5e65cc8a..90bd65318d932 100644 --- a/packages/integrations/cloudflare/CHANGELOG.md +++ b/packages/integrations/cloudflare/CHANGELOG.md @@ -1,5 +1,16 @@ # @astrojs/cloudflare +## 6.0.0-beta.0 + +### Major Changes + +- [#5707](https://github.com/withastro/astro/pull/5707) [`5eba34fcc`](https://github.com/withastro/astro/commit/5eba34fcc663def20bdf6e0daad02a6a5472776b) Thanks [@bluwy](https://github.com/bluwy)! - Remove `astro:build:start` backwards compatibility code + +### Patch Changes + +- Updated dependencies [[`e2019be6f`](https://github.com/withastro/astro/commit/e2019be6ffa46fa33d92cfd346f9ecbe51bb7144), [`8fb28648f`](https://github.com/withastro/astro/commit/8fb28648f66629741cb976bfe34ccd9d8f55661e), [`dd56c1941`](https://github.com/withastro/astro/commit/dd56c19411b126439b8bc42d681b6fa8c06e8c61), [`f6cf92b48`](https://github.com/withastro/astro/commit/f6cf92b48317a19a3840ad781b77d6d3cae143bb), [`16c7d0bfd`](https://github.com/withastro/astro/commit/16c7d0bfd49d2b9bfae45385f506bcd642f9444a), [`5eba34fcc`](https://github.com/withastro/astro/commit/5eba34fcc663def20bdf6e0daad02a6a5472776b), [`5eba34fcc`](https://github.com/withastro/astro/commit/5eba34fcc663def20bdf6e0daad02a6a5472776b)]: + - astro@2.0.0-beta.0 + ## 5.0.0 ### Patch Changes diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json index e2823a363fcf1..b6b900b993303 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 or cloudflare pages", - "version": "5.0.0", + "version": "6.0.0-beta.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", @@ -38,7 +38,7 @@ "tiny-glob": "^0.2.9" }, "peerDependencies": { - "astro": "^1.7.2" + "astro": "^2.0.0-beta.0" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/deno/CHANGELOG.md b/packages/integrations/deno/CHANGELOG.md index 54e5807be6c86..e74a45d7fe0dd 100644 --- a/packages/integrations/deno/CHANGELOG.md +++ b/packages/integrations/deno/CHANGELOG.md @@ -1,5 +1,16 @@ # @astrojs/deno +## 4.0.0-beta.0 + +### Major Changes + +- [#5707](https://github.com/withastro/astro/pull/5707) [`5eba34fcc`](https://github.com/withastro/astro/commit/5eba34fcc663def20bdf6e0daad02a6a5472776b) Thanks [@bluwy](https://github.com/bluwy)! - Remove `astro:build:start` backwards compatibility code + +### Patch Changes + +- Updated dependencies [[`e2019be6f`](https://github.com/withastro/astro/commit/e2019be6ffa46fa33d92cfd346f9ecbe51bb7144), [`8fb28648f`](https://github.com/withastro/astro/commit/8fb28648f66629741cb976bfe34ccd9d8f55661e), [`dd56c1941`](https://github.com/withastro/astro/commit/dd56c19411b126439b8bc42d681b6fa8c06e8c61), [`f6cf92b48`](https://github.com/withastro/astro/commit/f6cf92b48317a19a3840ad781b77d6d3cae143bb), [`16c7d0bfd`](https://github.com/withastro/astro/commit/16c7d0bfd49d2b9bfae45385f506bcd642f9444a), [`5eba34fcc`](https://github.com/withastro/astro/commit/5eba34fcc663def20bdf6e0daad02a6a5472776b), [`5eba34fcc`](https://github.com/withastro/astro/commit/5eba34fcc663def20bdf6e0daad02a6a5472776b)]: + - astro@2.0.0-beta.0 + ## 3.0.0 ### Patch Changes diff --git a/packages/integrations/deno/package.json b/packages/integrations/deno/package.json index badde01cc5432..5178507fbfc2a 100644 --- a/packages/integrations/deno/package.json +++ b/packages/integrations/deno/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/deno", "description": "Deploy your site to a Deno server", - "version": "3.0.0", + "version": "4.0.0-beta.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", @@ -32,7 +32,7 @@ "esbuild": "^0.15.18" }, "peerDependencies": { - "astro": "^1.7.2" + "astro": "^2.0.0-beta.0" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/image/CHANGELOG.md b/packages/integrations/image/CHANGELOG.md index e5a66ff44405c..6539f1587cc8a 100644 --- a/packages/integrations/image/CHANGELOG.md +++ b/packages/integrations/image/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/image +## 0.13.0-beta.0 + +### Minor Changes + +- [#5707](https://github.com/withastro/astro/pull/5707) [`5eba34fcc`](https://github.com/withastro/astro/commit/5eba34fcc663def20bdf6e0daad02a6a5472776b) Thanks [@bluwy](https://github.com/bluwy)! - Remove `astro:build:start` backwards compatibility code + ## 0.12.1 ### Patch Changes diff --git a/packages/integrations/image/package.json b/packages/integrations/image/package.json index b57b8000110eb..045ffba45610c 100644 --- a/packages/integrations/image/package.json +++ b/packages/integrations/image/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/image", "description": "Load and transform images in your Astro site.", - "version": "0.12.1", + "version": "0.13.0-beta.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/mdx/CHANGELOG.md b/packages/integrations/mdx/CHANGELOG.md index ddfdc787e2e13..137b13049c73d 100644 --- a/packages/integrations/mdx/CHANGELOG.md +++ b/packages/integrations/mdx/CHANGELOG.md @@ -1,5 +1,52 @@ # @astrojs/mdx +## 0.15.0-beta.0 + +### Minor Changes + +- [#5687](https://github.com/withastro/astro/pull/5687) [`e2019be6f`](https://github.com/withastro/astro/commit/e2019be6ffa46fa33d92cfd346f9ecbe51bb7144) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Give remark and rehype plugins access to user frontmatter via frontmatter injection. This means `data.astro.frontmatter` is now the _complete_ Markdown or MDX document's frontmatter, rather than an empty object. + + This allows plugin authors to modify existing frontmatter, or compute new properties based on other properties. For example, say you want to compute a full image URL based on an `imageSrc` slug in your document frontmatter: + + ```ts + export function remarkInjectSocialImagePlugin() { + return function (tree, file) { + const { frontmatter } = file.data.astro; + frontmatter.socialImageSrc = new URL(frontmatter.imageSrc, 'https://my-blog.com/').pathname; + }; + } + ``` + + #### Content Collections - new `remarkPluginFrontmatter` property + + We have changed _inject_ frontmatter to _modify_ frontmatter in our docs to improve discoverability. This is based on support forum feedback, where "injection" is rarely the term used. + + To reflect this, the `injectedFrontmatter` property has been renamed to `remarkPluginFrontmatter`. This should clarify this plugin is still separate from the `data` export Content Collections expose today. + + #### Migration instructions + + Plugin authors should now **check for user frontmatter when applying defaults.** + + For example, say a remark plugin wants to apply a default `title` if none is present. Add a conditional to check if the property is present, and update if none exists: + + ```diff + export function remarkInjectTitlePlugin() { + return function (tree, file) { + const { frontmatter } = file.data.astro; + + if (!frontmatter.title) { + frontmatter.title = 'Default title'; + + } + } + } + ``` + + This differs from previous behavior, where a Markdown file's frontmatter would _always_ override frontmatter injected via remark or reype. + +### Patch Changes + +- Updated dependencies [[`e2019be6f`](https://github.com/withastro/astro/commit/e2019be6ffa46fa33d92cfd346f9ecbe51bb7144)]: + - @astrojs/markdown-remark@2.0.0-beta.0 + ## 0.14.0 ### Minor Changes diff --git a/packages/integrations/mdx/package.json b/packages/integrations/mdx/package.json index 820b61775e3ca..053cb3efb13c4 100644 --- a/packages/integrations/mdx/package.json +++ b/packages/integrations/mdx/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/mdx", "description": "Use MDX within Astro", - "version": "0.14.0", + "version": "0.15.0-beta.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", @@ -30,7 +30,7 @@ "test:match": "mocha --timeout 20000 -g" }, "dependencies": { - "@astrojs/markdown-remark": "^1.2.0", + "@astrojs/markdown-remark": "^2.0.0-beta.0", "@astrojs/prism": "^1.0.2", "@mdx-js/mdx": "^2.1.2", "@mdx-js/rollup": "^2.1.1", diff --git a/packages/integrations/netlify/CHANGELOG.md b/packages/integrations/netlify/CHANGELOG.md index e103cdc6fda36..b11c4058c66cf 100644 --- a/packages/integrations/netlify/CHANGELOG.md +++ b/packages/integrations/netlify/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/netlify +## 2.0.0-beta.0 + +### Major Changes + +- [#5707](https://github.com/withastro/astro/pull/5707) [`5eba34fcc`](https://github.com/withastro/astro/commit/5eba34fcc663def20bdf6e0daad02a6a5472776b) Thanks [@bluwy](https://github.com/bluwy)! - Remove `astro:build:start` backwards compatibility code + ## 1.3.0 ### Minor Changes diff --git a/packages/integrations/netlify/package.json b/packages/integrations/netlify/package.json index f73102fea0b3b..dcb7e7a0aecd6 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": "1.3.0", + "version": "2.0.0-beta.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/node/CHANGELOG.md b/packages/integrations/node/CHANGELOG.md index e8670e34975d7..5967bcf1938ac 100644 --- a/packages/integrations/node/CHANGELOG.md +++ b/packages/integrations/node/CHANGELOG.md @@ -1,5 +1,16 @@ # @astrojs/node +## 5.0.0-beta.0 + +### Major Changes + +- [#5707](https://github.com/withastro/astro/pull/5707) [`5eba34fcc`](https://github.com/withastro/astro/commit/5eba34fcc663def20bdf6e0daad02a6a5472776b) Thanks [@bluwy](https://github.com/bluwy)! - Remove `astro:build:start` backwards compatibility code + +### Patch Changes + +- Updated dependencies [[`e2019be6f`](https://github.com/withastro/astro/commit/e2019be6ffa46fa33d92cfd346f9ecbe51bb7144), [`8fb28648f`](https://github.com/withastro/astro/commit/8fb28648f66629741cb976bfe34ccd9d8f55661e), [`dd56c1941`](https://github.com/withastro/astro/commit/dd56c19411b126439b8bc42d681b6fa8c06e8c61), [`f6cf92b48`](https://github.com/withastro/astro/commit/f6cf92b48317a19a3840ad781b77d6d3cae143bb), [`16c7d0bfd`](https://github.com/withastro/astro/commit/16c7d0bfd49d2b9bfae45385f506bcd642f9444a), [`5eba34fcc`](https://github.com/withastro/astro/commit/5eba34fcc663def20bdf6e0daad02a6a5472776b), [`5eba34fcc`](https://github.com/withastro/astro/commit/5eba34fcc663def20bdf6e0daad02a6a5472776b)]: + - astro@2.0.0-beta.0 + ## 4.0.0 ### Patch Changes diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json index fc2bcf58a7b49..d7bcd67df3f37 100644 --- a/packages/integrations/node/package.json +++ b/packages/integrations/node/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/node", "description": "Deploy your site to a Node.js server", - "version": "4.0.0", + "version": "5.0.0-beta.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", @@ -34,7 +34,7 @@ "send": "^0.18.0" }, "peerDependencies": { - "astro": "^1.7.2" + "astro": "^2.0.0-beta.0" }, "devDependencies": { "@types/node-fetch": "^2.6.2", diff --git a/packages/integrations/svelte/CHANGELOG.md b/packages/integrations/svelte/CHANGELOG.md index 216816067c115..7a386b523dc2c 100644 --- a/packages/integrations/svelte/CHANGELOG.md +++ b/packages/integrations/svelte/CHANGELOG.md @@ -1,5 +1,13 @@ # @astrojs/svelte +## 2.0.0-beta.0 + +### Major Changes + +- [#5685](https://github.com/withastro/astro/pull/5685) [`f6cf92b48`](https://github.com/withastro/astro/commit/f6cf92b48317a19a3840ad781b77d6d3cae143bb) Thanks [@bluwy](https://github.com/bluwy)! - Upgrade to Vite 4. Please see its [migration guide](https://vitejs.dev/guide/migration.html) for more information. + +- [#5685](https://github.com/withastro/astro/pull/5685) [`f6cf92b48`](https://github.com/withastro/astro/commit/f6cf92b48317a19a3840ad781b77d6d3cae143bb) Thanks [@bluwy](https://github.com/bluwy)! - Simplify Svelte preprocess setup. `