diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a628ed969c5..2b2f2c1b22f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,96 @@ # astro +## 0.25.0 + +### Minor Changes + +- [#2849](https://github.com/withastro/astro/pull/2849) [`72ef7ae6`](https://github.com/withastro/astro/commit/72ef7ae64a6d0fd17077bf6920ce11613116b659) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Introduce new `astro add` command to automatically configure integrations. + + ```shell + npx astro add + ``` + +* [#2833](https://github.com/withastro/astro/pull/2833) [`79545412`](https://github.com/withastro/astro/commit/7954541291a3dd7adbc1d5610e0c2e615d3dde46) Thanks [@natemoo-re](https://github.com/natemoo-re)! - This PR introduces a new internal CSS parser for `@astrojs/compiler`. See [`withastro/compiler#329`](https://github.com/withastro/compiler/pull/329) for more details. + + This fixes Astro's support for modern CSS syntax like `@container`, `@layer`, and nesting. **Note** While Astro now correctly parses this modern syntax, it does not automatically compile features for browser compatability purposes. + +- [#2824](https://github.com/withastro/astro/pull/2824) [`0a3d3e51`](https://github.com/withastro/astro/commit/0a3d3e51a66af80fa949ba0f5e2104439d2be634) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Change shiki to our default markdown syntax highlighter. This includes updates to all relevant starter projects that used Prism-specific styles. + +### Patch Changes + +- [#2879](https://github.com/withastro/astro/pull/2879) [`80034c6c`](https://github.com/withastro/astro/commit/80034c6cbc89761618847e6df43fd49560a05aa9) Thanks [@matthewp](https://github.com/matthewp)! - Netlify Adapter + + This change adds a Netlify adapter that uses Netlify Functions. You can use it like so: + + ```js + import { defineConfig } from 'astro/config'; + import netlify from '@astrojs/netlify/functions'; + + export default defineConfig({ + adapter: netlify(), + }); + ``` + +* [#2871](https://github.com/withastro/astro/pull/2871) [`5029382a`](https://github.com/withastro/astro/commit/5029382a8cab17f048372ee878d0778c89998009) Thanks [@FredKSchott](https://github.com/FredKSchott)! - Fix a bug where tailwind integration wouldn't apply to markdown pages + +- [#2852](https://github.com/withastro/astro/pull/2852) [`96372e6b`](https://github.com/withastro/astro/commit/96372e6beb976b57a8c52fd7c65f126899325160) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Fix "isSelfAccepting" exception when using the new @astrojs/react integration in development + +* [#2798](https://github.com/withastro/astro/pull/2798) [`4c25a1c2`](https://github.com/withastro/astro/commit/4c25a1c2eacf897427a7d6dac3bf476ef56799de) Thanks [@matthewp](https://github.com/matthewp)! - Implement APIs for headers for SSR flag + +- [#2855](https://github.com/withastro/astro/pull/2855) [`5e52814d`](https://github.com/withastro/astro/commit/5e52814d97a5723dbe7ebb32fbe040a7a4c0ea77) Thanks [@matthewp](https://github.com/matthewp)! - Adds support for the Node adapter (SSR) + + This provides the first SSR adapter available using the `integrations` API. It is a Node.js adapter that can be used with the `http` module or any framework that wraps it, like Express. + + In your astro.config.mjs use: + + ```js + import nodejs from '@astrojs/node'; + + export default { + adapter: nodejs(), + }; + ``` + + After performing a build there will be a `dist/server/entry.mjs` module that works like a middleware function. You can use with any framework that supports the Node `request` and `response` objects. For example, with Express you can do: + + ```js + import express from 'express'; + import { handler as ssrHandler } from '@astrojs/node'; + + const app = express(); + app.use(handler); + + app.listen(8080); + ``` + +* [#2859](https://github.com/withastro/astro/pull/2859) [`c781b12f`](https://github.com/withastro/astro/commit/c781b12f87398d51a6ecf5dcb8b35afb08591c29) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Ensure private, internal APIs are not enumerable + +- [#2835](https://github.com/withastro/astro/pull/2835) [`77ebab8b`](https://github.com/withastro/astro/commit/77ebab8bb27d67bc45a5af160d6b545521897802) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Fix missing `postcss-load-config` dependency + +* [#2878](https://github.com/withastro/astro/pull/2878) [`2db97f10`](https://github.com/withastro/astro/commit/2db97f10dc50f9498413181b78c477fe8833895b) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Move the built-in `Prism` component from `astro/components` to `@astrojs/prism/component`. + +- [#2857](https://github.com/withastro/astro/pull/2857) [`1061d647`](https://github.com/withastro/astro/commit/1061d6477af328e93c9a727e70900ae20c0116c8) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Improve granularity of production build logs. This now lists: + - the "data collection" build step, with timeout warnings for larger imports. This is useful for understanding large `import.meta.glob` calls. + - the Vite client bundling step. This logs all Vite production build info to clarify what assets are built alongside your HTML. + - the route generation step, complete with all output HTML files for a given input file. This is especially useful when debugging `getStaticPaths`. + - fixes "0 pages in Infinityms" log when building to SSR + +* [#2825](https://github.com/withastro/astro/pull/2825) [`1cd7184c`](https://github.com/withastro/astro/commit/1cd7184ca6fa6e60a69918e461f42c055e8a795e) Thanks [@hlynursmari1](https://github.com/hlynursmari1)! - Fix island deduplication ignoring props.Re-resolves an issue initially patched in https://github.com/withastro/astro/pull/846 but seemingly lost in the 0.21.0 mega-merge (https://github.com/withastro/astro/commit/d84bfe719a546ad855640338d5ed49ad3aa4ccb4).This change makes the component render step account for all props, even if they don't affect the generated HTML, when deduplicating island mounts. + +- [#2873](https://github.com/withastro/astro/pull/2873) [`e4025d1f`](https://github.com/withastro/astro/commit/e4025d1f530310d6ab951109f4f53878a307471a) Thanks [@matthewp](https://github.com/matthewp)! - Improves the build by building to a single file for rendering + +* [#2815](https://github.com/withastro/astro/pull/2815) [`7b9d042d`](https://github.com/withastro/astro/commit/7b9d042dde0c6ae74225de208222e0addf5f4989) Thanks [@matthewp](https://github.com/matthewp)! - Allows dynamic routes in SSR to avoid implementing getStaticPaths + +- [#2875](https://github.com/withastro/astro/pull/2875) [`55712277`](https://github.com/withastro/astro/commit/5571227718442e1ec38f4553863b6160b74df722) Thanks [@FredKSchott](https://github.com/FredKSchott)! - Generalize output assets to avoid adblocker false positives + +* [#2848](https://github.com/withastro/astro/pull/2848) [`981e2a83`](https://github.com/withastro/astro/commit/981e2a839b5a0292513bf2009216250f2a8730eb) Thanks [@FredKSchott](https://github.com/FredKSchott)! - add missing injected "page" scripts into markdown pages + +- [#2872](https://github.com/withastro/astro/pull/2872) [`098f6f6b`](https://github.com/withastro/astro/commit/098f6f6b06396441c576dc689d8552629ef260e1) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Fix `isSelfAccepting` errors when using the Preact integration with the Astro dev server + +- Updated dependencies [[`0a3d3e51`](https://github.com/withastro/astro/commit/0a3d3e51a66af80fa949ba0f5e2104439d2be634), [`2db97f10`](https://github.com/withastro/astro/commit/2db97f10dc50f9498413181b78c477fe8833895b), [`d763ec18`](https://github.com/withastro/astro/commit/d763ec183ea391ad79ca16bf2b2e76848fc1180c)]: + - @astrojs/markdown-remark@0.7.0 + - @astrojs/prism@0.4.1 + ## 0.25.0-next.3 ### Patch Changes @@ -16,7 +107,7 @@ import nodejs from '@astrojs/node'; export default { - adapter: nodejs(), + adapter: nodejs(), }; ``` @@ -112,7 +203,7 @@ import { defineConfig } from 'astro/config'; export default defineConfig({ - renderers: [], + renderers: [], }); ``` @@ -150,9 +241,9 @@ ```json { - "scripts": { - "build": "astro build --legacy-build" - } + "scripts": { + "build": "astro build --legacy-build" + } } ``` @@ -172,7 +263,7 @@ ```ts if (Astro.slots.has('default')) { - const content = await Astro.slots.render('default'); + const content = await Astro.slots.render('default'); } ``` @@ -256,7 +347,7 @@ ```ts if (Astro.slots.has('default')) { - const content = await Astro.slots.render('default'); + const content = await Astro.slots.render('default'); } ``` @@ -280,9 +371,9 @@ ```json { - "scripts": { - "build": "astro build --legacy-build" - } + "scripts": { + "build": "astro build --legacy-build" + } } ``` @@ -394,12 +485,12 @@ ```typescript // src/pages/company.json.ts export async function get() { - return { - body: JSON.stringify({ - name: 'Astro Technology Company', - url: 'https://astro.build/', - }), - }; + return { + body: JSON.stringify({ + name: 'Astro Technology Company', + url: 'https://astro.build/', + }), + }; } ``` @@ -561,12 +652,12 @@ ```typescript // src/pages/company.json.ts export async function get() { - return { - body: JSON.stringify({ - name: 'Astro Technology Company', - url: 'https://astro.build/', - }), - }; + return { + body: JSON.stringify({ + name: 'Astro Technology Company', + url: 'https://astro.build/', + }), + }; } ``` @@ -1921,10 +2012,10 @@ For convenience, you may now also move your `astro.config.js` file to a top-leve ```js export default { - markdownOptions: { - remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]], - rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]], - }, + markdownOptions: { + remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]], + rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]], + }, }; ``` @@ -1944,10 +2035,10 @@ For convenience, you may now also move your `astro.config.js` file to a top-leve ```js export default { - name: '@matthewp/my-renderer', - server: './server.js', - client: './client.js', - hydrationPolyfills: ['./my-polyfill.js'], + name: '@matthewp/my-renderer', + server: './server.js', + client: './client.js', + hydrationPolyfills: ['./my-polyfill.js'], }; ``` diff --git a/package.json b/package.json index da89cddd9a14..afcf72a77257 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "0.25.0-next.3", + "version": "0.25.0", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", @@ -75,8 +75,8 @@ "dependencies": { "@astrojs/compiler": "^0.13.1", "@astrojs/language-server": "^0.8.10", - "@astrojs/markdown-remark": "^0.7.0-next.1", - "@astrojs/prism": "0.4.1-next.0", + "@astrojs/markdown-remark": "^0.7.0", + "@astrojs/prism": "0.4.1", "@astrojs/webapi": "^0.11.0", "@babel/core": "^7.17.8", "@babel/generator": "^7.17.7",