diff options
author | 2024-10-31 02:07:35 -0700 | |
---|---|---|
committer | 2024-10-31 17:07:35 +0800 | |
commit | 731b69712b0e9c5d5a4058db3fa3e8bf628c7aad (patch) | |
tree | beff9546e16f67f7bca902670440de4365fd7c1b /packages | |
parent | d879c02a269e1417d675fa03506bc845c7158643 (diff) | |
download | astro@5.0.0-beta.6.tar.gz astro@5.0.0-beta.6.tar.zst astro@5.0.0-beta.6.zip |
[ci] release (beta) (#12250)astro@5.0.0-beta.6@astrojs/vue@5.0.0-beta.1@astrojs/mdx@4.0.0-beta.3
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'packages')
-rw-r--r-- | packages/astro/CHANGELOG.md | 56 | ||||
-rw-r--r-- | packages/astro/package.json | 2 | ||||
-rw-r--r-- | packages/astro/src/core/render/params-and-props.ts | 2 | ||||
-rw-r--r-- | packages/astro/src/types/public/config.ts | 2 | ||||
-rw-r--r-- | packages/astro/test/types/define-config.ts | 2 | ||||
-rw-r--r-- | packages/integrations/mdx/CHANGELOG.md | 10 | ||||
-rw-r--r-- | packages/integrations/mdx/package.json | 2 | ||||
-rw-r--r-- | packages/integrations/vue/CHANGELOG.md | 6 | ||||
-rw-r--r-- | packages/integrations/vue/package.json | 2 |
9 files changed, 78 insertions, 6 deletions
diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 87d6ab508..5cb1cb5c0 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,61 @@ # astro +## 5.0.0-beta.6 + +### Major Changes + +- [#12268](https://github.com/withastro/astro/pull/12268) [`4e9a3ac`](https://github.com/withastro/astro/commit/4e9a3ac0bd30b4013ac0b2caf068552258dfe6d9) Thanks [@ematipico](https://github.com/ematipico)! - The command `astro add vercel` now updates the configuration file differently, and adds `@astrojs/vercel` as module to import. + + This is a breaking change because it requires the version `8.*` of `@astrojs/vercel`. + +- [#12231](https://github.com/withastro/astro/pull/12231) [`90ae100`](https://github.com/withastro/astro/commit/90ae100cf482529828febed591172433309bc12e) Thanks [@bluwy](https://github.com/bluwy)! - Updates the automatic `charset=utf-8` behavior for Markdown pages, where instead of responding with `charset=utf-8` in the `Content-Type` header, Astro will now automatically add the `<meta charset="utf-8">` tag instead. + + This behaviour only applies to Markdown pages (`.md` or similar Markdown files located within `src/pages/`) that do not use Astro's special `layout` frontmatter property. It matches the rendering behaviour of other non-content pages, and retains the minimal boilerplate needed to write with non-ASCII characters when adding individual Markdown pages to your site. + + If your Markdown pages use the `layout` frontmatter property, then HTML encoding will be handled by the designated layout component instead, and the `<meta charset="utf-8">` tag will not be added to your page by default. + + If you require `charset=utf-8` to render your page correctly, make sure that your layout components contain the `<meta charset="utf-8">` tag. You may need to add this if you have not already done so. + +### Minor Changes + +- [#12243](https://github.com/withastro/astro/pull/12243) [`eb41d13`](https://github.com/withastro/astro/commit/eb41d13162c84e9495489403611bc875eb190fed) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Improves `defineConfig` type safety. TypeScript will now error if a group of related configuration options do not have consistent types. For example, you will now see an error if your language set for `i18n.defaultLocale` is not one of the supported locales specified in `i18n.locales`. + +- [#12150](https://github.com/withastro/astro/pull/12150) [`93351bc`](https://github.com/withastro/astro/commit/93351bc78aed8f4ecff003268bad21c3b93c2f56) Thanks [@bluwy](https://github.com/bluwy)! - Adds support for passing values other than `"production"` or `"development"` to the `--mode` flag (e.g. `"staging"`, `"testing"`, or any custom value) to change the value of `import.meta.env.MODE` or the loaded `.env` file. This allows you take advantage of Vite's [mode](https://vite.dev/guide/env-and-mode#modes) feature. + + Also adds a new `--devOutput` flag for `astro build` that will output a development-based build. + + Note that changing the `mode` does not change the kind of code transform handled by Vite and Astro: + + - In `astro dev`, Astro will transform code with debug information. + - In `astro build`, Astro will transform code with the most optimized output and removes debug information. + - In `astro build --devOutput` (new flag), Astro will transform code with debug information like in `astro dev`. + + This enables various usecases like: + + ```bash + # Run the dev server connected to a "staging" API + astro dev --mode staging + + # Build a site that connects to a "staging" API + astro build --mode staging + + # Build a site that connects to a "production" API with additional debug information + astro build --devOutput + + # Build a site that connects to a "testing" API + astro build --mode testing + ``` + + The different modes can be used to load different `.env` files, e.g. `.env.staging` or `.env.production`, which can be customized for each environment, for example with different `API_URL` environment variable values. + +### Patch Changes + +- [#12302](https://github.com/withastro/astro/pull/12302) [`7196c24`](https://github.com/withastro/astro/commit/7196c244ea75d2f2aafbec332d91cb681f0a4cb7) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where the origin check middleware run for prendered pages + +- [#12341](https://github.com/withastro/astro/pull/12341) [`c1786d6`](https://github.com/withastro/astro/commit/c1786d64c4d8b25ed28f5e178531952466158e04) Thanks [@ematipico](https://github.com/ematipico)! - Fixes and issue where `Astro.currentLocale` always returned the default locale when consumed inside a server island. + +- [#12270](https://github.com/withastro/astro/pull/12270) [`25192a0`](https://github.com/withastro/astro/commit/25192a059975f5a31a9c43e5d605541f4e9618bc) Thanks [@ematipico](https://github.com/ematipico)! - Fixes a bug where the params weren't correctly computed when rendering URLs with non-English characters + ## 5.0.0-beta.5 ### Minor Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index f10f9ddff..adedcd026 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "5.0.0-beta.5", + "version": "5.0.0-beta.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/astro/src/core/render/params-and-props.ts b/packages/astro/src/core/render/params-and-props.ts index 588969eb4..c1fe318ce 100644 --- a/packages/astro/src/core/render/params-and-props.ts +++ b/packages/astro/src/core/render/params-and-props.ts @@ -47,7 +47,7 @@ export async function getProps(opts: GetParamsAndPropsOptions): Promise<Props> { base, }); - // The pathname used here comes from the server, which already encored. + // The pathname used here comes from the server, which already encored. // Since we decided to not mess up with encoding anymore, we need to decode them back so the parameters can match // the ones expected from the users const params = getParams(route, decodeURI(pathname)); diff --git a/packages/astro/src/types/public/config.ts b/packages/astro/src/types/public/config.ts index 1e24f4194..1f8318726 100644 --- a/packages/astro/src/types/public/config.ts +++ b/packages/astro/src/types/public/config.ts @@ -109,7 +109,7 @@ export interface ViteUserConfig extends OriginalViteUserConfig { /** * Astro User Config * Docs: https://docs.astro.build/reference/configuration-reference/ - * + * * Generics do not follow semver and may change at any time. */ export interface AstroUserConfig<TLocales extends Locales = never> { /** diff --git a/packages/astro/test/types/define-config.ts b/packages/astro/test/types/define-config.ts index 9015694e2..7d68ae035 100644 --- a/packages/astro/test/types/define-config.ts +++ b/packages/astro/test/types/define-config.ts @@ -1,7 +1,7 @@ import { describe, it } from 'node:test'; +import { expectTypeOf } from 'expect-type'; import { defineConfig } from '../../dist/config/index.js'; import type { AstroUserConfig } from '../../dist/types/public/index.js'; -import { expectTypeOf } from 'expect-type'; describe('defineConfig()', () => { it('Infers generics correctly', () => { diff --git a/packages/integrations/mdx/CHANGELOG.md b/packages/integrations/mdx/CHANGELOG.md index 1b3baaeec..a8c94b496 100644 --- a/packages/integrations/mdx/CHANGELOG.md +++ b/packages/integrations/mdx/CHANGELOG.md @@ -1,5 +1,15 @@ # @astrojs/mdx +## 4.0.0-beta.3 + +### Major Changes + +- [#12231](https://github.com/withastro/astro/pull/12231) [`90ae100`](https://github.com/withastro/astro/commit/90ae100cf482529828febed591172433309bc12e) Thanks [@bluwy](https://github.com/bluwy)! - Handles the breaking change in Astro where content pages (including `.mdx` pages located within `src/pages/`) no longer respond with `charset=utf-8` in the `Content-Type` header. + + For MDX pages without layouts, `@astrojs/mdx` will automatically add the `<meta charset="utf-8">` tag to the page by default. This reduces the boilerplate needed to write with non-ASCII characters. If your MDX pages have a layout, the layout component should include the `<meta charset="utf-8">` tag. + + If you require `charset=utf-8` to render your page correctly, make sure that your layout components have the `<meta charset="utf-8">` tag added. + ## 4.0.0-alpha.2 ### Patch Changes diff --git a/packages/integrations/mdx/package.json b/packages/integrations/mdx/package.json index 1783f3e89..e09364a89 100644 --- a/packages/integrations/mdx/package.json +++ b/packages/integrations/mdx/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/mdx", "description": "Add support for MDX pages in your Astro site", - "version": "4.0.0-beta.2", + "version": "4.0.0-beta.3", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/vue/CHANGELOG.md b/packages/integrations/vue/CHANGELOG.md index 65921980e..764f28483 100644 --- a/packages/integrations/vue/CHANGELOG.md +++ b/packages/integrations/vue/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/vue +## 5.0.0-beta.1 + +### Patch Changes + +- [`81b0bf5`](https://github.com/withastro/astro/commit/81b0bf5734735a0633bfc1089151e174ba9fbc83) Thanks [@bluwy](https://github.com/bluwy)! - New release to include changes from 4.5.2 + ## 5.0.0-beta.0 ### Major Changes diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index a64712b52..a0982db15 100644 --- a/packages/integrations/vue/package.json +++ b/packages/integrations/vue/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/vue", - "version": "5.0.0-beta.0", + "version": "5.0.0-beta.1", "description": "Use Vue components within Astro", "type": "module", "types": "./dist/index.d.ts", |