diff --git a/.changeset/pre.json b/.changeset/pre.json
index f3e532102..df8e641a7 100644
--- a/.changeset/pre.json
+++ b/.changeset/pre.json
@@ -60,5 +60,16 @@
"@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",
+ "shaggy-keys-turn",
+ "spotty-bees-switch",
+ "tricky-rabbits-count",
+ "two-geese-eat"
+ ]
}
diff --git a/examples/basics/package.json b/examples/basics/package.json
index c8c19c62e..a7be9f8f3 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 ac30b5213..4b0732129 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 55e4a6dd8..9d860df24 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 402a1e990..08c13c9b6 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 f9b87df31..64a279a61 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 991cc918e..1d99bee3d 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 b933e7766..020ee1a8d 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 c21335947..26e886e15 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 cbb556326..88e49f8d6 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 a4ff3b4d8..57451132c 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 c679a7ed5..b45dff226 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 ca1bd5f8b..f39ff727d 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 04d55915b..c06849fad 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 98cbcd067..1fe03e589 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 75dfac09c..434040f25 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 7f0e17aec..942154026 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 f37872df2..425b974aa 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 9e97536e8..25502339d 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 4f8d88c15..930b54edd 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 4793db5b9..c537aefdb 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 606a457e2..79c2f9841 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 29277f9a4..6821a6efa 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 d1668bd4c..6a7eefbf4 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 12eabda76..21bf23187 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 c206be0c3..dd058d723 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 ecba711b1..8608ad5f9 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 de8e5520f..f0ae7152f 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 2998942d1..9ee5bd21e 100644
--- a/packages/astro/CHANGELOG.md
+++ b/packages/astro/CHANGELOG.md
@@ -1,5 +1,180 @@
# 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`.
+
+- [#5684](https://github.com/withastro/astro/pull/5684) [`a9c292026`](https://github.com/withastro/astro/commit/a9c2920264e36cc5dc05f4adc1912187979edb0d) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Refine Markdown and MDX configuration options for ease-of-use.
+
+ #### Markdown
+
+ - **Remove `remark-smartypants`** from Astro's default Markdown plugins.
+ - **Replace the `extendDefaultPlugins` option** with a simplified `gfm` boolean. This is enabled by default, and can be disabled to remove GitHub-Flavored Markdown.
+ - Ensure GitHub-Flavored Markdown is applied whether or not custom `remarkPlugins` or `rehypePlugins` are configured. If you want to apply custom plugins _and_ remove GFM, manually set `gfm: false` in your config.
+
+ #### MDX
+
+ - Support _all_ Markdown configuration options (except `drafts`) from your MDX integration config. This includes `syntaxHighlighting` and `shikiConfig` options to further customize the MDX renderer.
+ - Simplify `extendDefaults` to an `extendMarkdownConfig` option. MDX options will default to their equivalent in your Markdown config. By setting `extendMarkdownConfig` to false, you can "eject" to set your own syntax highlighting, plugins, and more.
+
+ #### Migration
+
+ To preserve your existing Markdown and MDX setup, you may need some configuration changes:
+
+ ##### Smartypants manual installation
+
+ [Smartypants](https://github.com/silvenon/remark-smartypants) has been removed from Astro's default setup. If you rely on this plugin, [install `remark-smartypants`](https://github.com/silvenon/remark-smartypants#installing) and apply to your `astro.config.*`:
+
+ ```diff
+ // astro.config.mjs
+ import { defineConfig } from 'astro/config';
+ + import smartypants from 'remark-smartypants';
+
+ export default defineConfig({
+ markdown: {
+ + remarkPlugins: [smartypants],
+ }
+ });
+ ```
+
+ ##### Migrate `extendDefaultPlugins` to `gfm`
+
+ You may have disabled Astro's built-in plugins (GitHub-Flavored Markdown and Smartypants) with the `extendDefaultPlugins` option. Since Smartypants has been removed, this has been renamed to `gfm`.
+
+ ```diff
+ // astro.config.mjs
+ import { defineConfig } from 'astro/config';
+
+ export default defineConfig({
+ markdown: {
+ - extendDefaultPlugins: false,
+ + gfm: false,
+ }
+ });
+ ```
+
+ Additionally, applying remark and rehype plugins **no longer disables** `gfm`. You will need to opt-out manually by setting `gfm` to `false`.
+
+ ##### Migrate MDX's `extendPlugins` to `extendMarkdownConfig`
+
+ You may have used the `extendPlugins` option to manage plugin defaults in MDX. This has been replaced by 2 flags:
+
+ - `extendMarkdownConfig` (`true` by default) to toggle Markdown config inheritance. This replaces the `extendPlugins: 'markdown'` option.
+ - `gfm` (`true` by default) to toggle GitHub-Flavored Markdown in MDX. This replaces the `extendPlugins: 'defaults'` option.
+
+- [#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), [`a9c292026`](https://github.com/withastro/astro/commit/a9c2920264e36cc5dc05f4adc1912187979edb0d)]:
+ - @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 cc6313823..a087d6cf2 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 33dae5e65..38aa97350 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), [`a9c292026`](https://github.com/withastro/astro/commit/a9c2920264e36cc5dc05f4adc1912187979edb0d), [`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 e2823a363..b6b900b99 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 54e5807be..bc8be12b6 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), [`a9c292026`](https://github.com/withastro/astro/commit/a9c2920264e36cc5dc05f4adc1912187979edb0d), [`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 badde01cc..5178507fb 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 e5a66ff44..6539f1587 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 b57b80001..045ffba45 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 ddfdc787e..203e21b27 100644
--- a/packages/integrations/mdx/CHANGELOG.md
+++ b/packages/integrations/mdx/CHANGELOG.md
@@ -1,5 +1,110 @@
# @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.
+
+- [#5684](https://github.com/withastro/astro/pull/5684) [`a9c292026`](https://github.com/withastro/astro/commit/a9c2920264e36cc5dc05f4adc1912187979edb0d) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Refine Markdown and MDX configuration options for ease-of-use.
+
+ #### Markdown
+
+ - **Remove `remark-smartypants`** from Astro's default Markdown plugins.
+ - **Replace the `extendDefaultPlugins` option** with a simplified `gfm` boolean. This is enabled by default, and can be disabled to remove GitHub-Flavored Markdown.
+ - Ensure GitHub-Flavored Markdown is applied whether or not custom `remarkPlugins` or `rehypePlugins` are configured. If you want to apply custom plugins _and_ remove GFM, manually set `gfm: false` in your config.
+
+ #### MDX
+
+ - Support _all_ Markdown configuration options (except `drafts`) from your MDX integration config. This includes `syntaxHighlighting` and `shikiConfig` options to further customize the MDX renderer.
+ - Simplify `extendDefaults` to an `extendMarkdownConfig` option. MDX options will default to their equivalent in your Markdown config. By setting `extendMarkdownConfig` to false, you can "eject" to set your own syntax highlighting, plugins, and more.
+
+ #### Migration
+
+ To preserve your existing Markdown and MDX setup, you may need some configuration changes:
+
+ ##### Smartypants manual installation
+
+ [Smartypants](https://github.com/silvenon/remark-smartypants) has been removed from Astro's default setup. If you rely on this plugin, [install `remark-smartypants`](https://github.com/silvenon/remark-smartypants#installing) and apply to your `astro.config.*`:
+
+ ```diff
+ // astro.config.mjs
+ import { defineConfig } from 'astro/config';
+ + import smartypants from 'remark-smartypants';
+
+ export default defineConfig({
+ markdown: {
+ + remarkPlugins: [smartypants],
+ }
+ });
+ ```
+
+ ##### Migrate `extendDefaultPlugins` to `gfm`
+
+ You may have disabled Astro's built-in plugins (GitHub-Flavored Markdown and Smartypants) with the `extendDefaultPlugins` option. Since Smartypants has been removed, this has been renamed to `gfm`.
+
+ ```diff
+ // astro.config.mjs
+ import { defineConfig } from 'astro/config';
+
+ export default defineConfig({
+ markdown: {
+ - extendDefaultPlugins: false,
+ + gfm: false,
+ }
+ });
+ ```
+
+ Additionally, applying remark and rehype plugins **no longer disables** `gfm`. You will need to opt-out manually by setting `gfm` to `false`.
+
+ ##### Migrate MDX's `extendPlugins` to `extendMarkdownConfig`
+
+ You may have used the `extendPlugins` option to manage plugin defaults in MDX. This has been replaced by 2 flags:
+
+ - `extendMarkdownConfig` (`true` by default) to toggle Markdown config inheritance. This replaces the `extendPlugins: 'markdown'` option.
+ - `gfm` (`true` by default) to toggle GitHub-Flavored Markdown in MDX. This replaces the `extendPlugins: 'defaults'` option.
+
+### Patch Changes
+
+- Updated dependencies [[`e2019be6f`](https://github.com/withastro/astro/commit/e2019be6ffa46fa33d92cfd346f9ecbe51bb7144), [`a9c292026`](https://github.com/withastro/astro/commit/a9c2920264e36cc5dc05f4adc1912187979edb0d)]:
+ - @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 f83bfa822..1d3caad5e 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 e103cdc6f..b11c4058c 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 f73102fea..dcb7e7a0a 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 e8670e349..574aeedcb 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), [`a9c292026`](https://github.com/withastro/astro/commit/a9c2920264e36cc5dc05f4adc1912187979edb0d), [`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 fc2bcf58a..d7bcd67df 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 216816067..7a386b523 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. `