diff --git a/.changeset/chubby-plums-rule.md b/.changeset/chubby-plums-rule.md new file mode 100644 index 000000000000..88a5a0bf297b --- /dev/null +++ b/.changeset/chubby-plums-rule.md @@ -0,0 +1,9 @@ +--- +'@astrojs/internal-helpers': minor +--- + +Added a new entry point called `/request`, which exposes utilities to work with the `Request` type: +- `getFirstForwardedValue`: retrieves the first value of a multi-value header. +- `isValidIpAddress`: checks whether a string contains only characters valid in IPv4/IPv6 addresses. +- `getValidatedIpFromHeader`: extracts the first value from a header and validates it as an IP address. +- `getClientIpAddress`: retrieves and validates the first IP from the `x-forwarded-for` header. diff --git a/.changeset/clean-planets-flow.md b/.changeset/clean-planets-flow.md index 395589d4f9a8..40804e46970e 100644 --- a/.changeset/clean-planets-flow.md +++ b/.changeset/clean-planets-flow.md @@ -2,4 +2,4 @@ 'astro': patch --- -Improves rendering by preserving `hidden="until-found"` value in attribues +Improves rendering by preserving `hidden="until-found"` value in attributes diff --git a/.changeset/fix-envprefix-secret-leak.md b/.changeset/fix-envprefix-secret-leak.md new file mode 100644 index 000000000000..68a9f3324984 --- /dev/null +++ b/.changeset/fix-envprefix-secret-leak.md @@ -0,0 +1,24 @@ +--- +'astro': patch +--- + +Prevents `vite.envPrefix` misconfiguration from exposing `access: "secret"` environment variables in client-side bundles. Astro now throws a clear error at startup if any `vite.envPrefix` entry matches a variable declared with `access: "secret"` in `env.schema`. + +For example, the following configuration will throw an error for `API_SECRET` because it's defined as `secret` its name matches `['PUBLIC_', 'API_']` defined in `env.schema`: + +```js +// astro.config.mjs +import { defineConfig } from "astro/config"; + +export default defineConfig({ + env: { + schema: { + API_SECRET: envField.string({ context: 'server', access: 'secret', optional: true }), + API_URL: envField.string({ context: 'server', access: 'public', optional: true }), + } + }, + vite: { + envPrefix: ['PUBLIC_', 'API_'], + }, +}) +``` diff --git a/.changeset/full-poems-divide.md b/.changeset/full-poems-divide.md index 8abe7fb50c0d..a778d93c242b 100644 --- a/.changeset/full-poems-divide.md +++ b/.changeset/full-poems-divide.md @@ -3,4 +3,4 @@ 'astro': patch --- -Fixes a bug where the Astro, with the Cloudlfare integration, couldn't correctly serve certain routes in the development server. +Fixes a bug where the Astro, with the Cloudflare integration, couldn't correctly serve certain routes in the development server. diff --git a/.changeset/green-clowns-change.md b/.changeset/green-clowns-change.md new file mode 100644 index 000000000000..e43019f38765 --- /dev/null +++ b/.changeset/green-clowns-change.md @@ -0,0 +1,7 @@ +--- +'@astrojs/cloudflare': patch +'@astrojs/vercel': patch +'astro': patch +--- + +Fixes an issue where the computed `clientAddress` was incorrect in cases of a Request header with multiple values. The `clientAddress` is now also validated to contain only characters valid in IP addresses, rejecting injection payloads. diff --git a/.changeset/harden-merge-responses-framing.md b/.changeset/harden-merge-responses-framing.md new file mode 100644 index 000000000000..f3f30e1ad1b2 --- /dev/null +++ b/.changeset/harden-merge-responses-framing.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Hardens error page response merging to ensure framing headers from the original response are not carried over to the rendered error page diff --git a/.changeset/harden-node-server-defaults.md b/.changeset/harden-node-server-defaults.md new file mode 100644 index 000000000000..3a227f9c8ddf --- /dev/null +++ b/.changeset/harden-node-server-defaults.md @@ -0,0 +1,20 @@ +--- +'astro': patch +'@astrojs/node': minor +--- + +Adds a new `bodySizeLimit` option to the `@astrojs/node` adapter + +You can now configure a maximum allowed request body size for your Node.js standalone server. The default limit is 1 GB. Set the value in bytes, or pass `0` to disable the limit entirely: + +```js +import node from '@astrojs/node'; +import { defineConfig } from 'astro/config'; + +export default defineConfig({ + adapter: node({ + mode: 'standalone', + bodySizeLimit: 1024 * 1024 * 100, // 100 MB + }), +}); +``` diff --git a/.changeset/moody-owls-refuse.md b/.changeset/moody-owls-refuse.md index f3fcdf20bb43..4c08f1fd04b3 100644 --- a/.changeset/moody-owls-refuse.md +++ b/.changeset/moody-owls-refuse.md @@ -2,4 +2,4 @@ '@astrojs/cloudflare': patch --- -Removes unneccessary warning about sharp from being printed at start of dev server and build +Removes unnecessary warning about sharp from being printed at start of dev server and build diff --git a/.changeset/normalize-backslash-pathname.md b/.changeset/normalize-backslash-pathname.md new file mode 100644 index 000000000000..8484143ed228 --- /dev/null +++ b/.changeset/normalize-backslash-pathname.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Hardens URL pathname normalization to consistently handle backslash characters after decoding, ensuring middleware and router see the same canonical pathname diff --git a/.changeset/normalize-dotfile-pathname.md b/.changeset/normalize-dotfile-pathname.md new file mode 100644 index 000000000000..57f29faee108 --- /dev/null +++ b/.changeset/normalize-dotfile-pathname.md @@ -0,0 +1,5 @@ +--- +'@astrojs/node': patch +--- + +Normalizes static file paths before evaluating dotfile access rules for improved consistency diff --git a/.changeset/social-kings-swim.md b/.changeset/social-kings-swim.md index 778e12f63253..47db520798a3 100644 --- a/.changeset/social-kings-swim.md +++ b/.changeset/social-kings-swim.md @@ -2,4 +2,4 @@ 'astro': patch --- -Fixes an issue where the internal perfomance timers weren't correctly updated to reflect new build pipeline. +Fixes an issue where the internal performance timers weren't correctly updated to reflect new build pipeline. diff --git a/.changeset/warm-pens-glow.md b/.changeset/warm-pens-glow.md new file mode 100644 index 000000000000..0c40ed0af75a --- /dev/null +++ b/.changeset/warm-pens-glow.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes form actions incorrectly auto-executing during error page rendering. When an error page (e.g. 404) is rendered, form actions from the original request are no longer executed, since the full request handling pipeline is not active. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 984929a52f32..a6c860cd0ac6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -116,7 +116,7 @@ pnpm run test pnpm run test:match "$STRING_MATCH" # run tests on another package # (example - `pnpm --filter @astrojs/rss run test` runs `packages/astro-rss/test/rss.test.js`) -pnpm --filter $STRING_MATCH run test +pnpm --filter "$STRING_MATCH" run test ``` Most tests use [`mocha`](https://mochajs.org) as the test runner. We're slowly migrating to use [`node:test`](https://nodejs.org/api/test.html) instead through the custom [`astro-scripts test`](./scripts/cmd/test.js) command. For packages that use `node:test`, you can run these commands in their directories: @@ -165,7 +165,7 @@ node --test --test-only test/astro-basic.test.js #### Debugging tests in CI -There might be occasions where some tests fail in certain CI runs due to some timeout issue. If this happens, it will be very difficult to understand which file cause the timeout. That's caused by come quirks of the Node.js test runner combined with our architecture. +There might be occasions where some tests fail in certain CI runs due to some timeout issue. If this happens, it will be very difficult to understand which file cause the timeout. That's caused by some quirks of the Node.js test runner combined with our architecture. To understand which file causes the issue, you can modify the `test` script inside the `package.json` by adding the `--parallel` option: @@ -176,7 +176,7 @@ To understand which file causes the issue, you can modify the `test` script insi } ``` -Save the change and **push it** to your PR. This change will make the test CI slower, but it will allow to see which files causes the timeout. Once you fixed the issue **revert the change and push it**. +Save the change and **push it** to your PR. This change will make the test CI slower, but it will allow to see which files cause the timeout. Once you fixed the issue **revert the change and push it**. #### E2E tests @@ -194,7 +194,7 @@ pnpm run test:e2e:match "$STRING_MATCH" Any tests for `astro build` output should use the main `mocha` tests rather than E2E - these tests will run faster than having Playwright start the `astro preview` server. -If a test needs to validate what happens on the page after it's loading in the browser, that's a perfect use for E2E dev server tests, i.e. to verify that hot-module reloading works in `astro dev` or that components were client hydrated and are interactive. +If a test needs to validate what happens on the page after it's loaded in the browser, that's a perfect use for E2E dev server tests, i.e. to verify that hot-module reloading works in `astro dev` or that components were client hydrated and are interactive. #### Creating tests @@ -203,8 +203,8 @@ When creating new tests, it's best to reference other existing test files and re - When re-using a fixture multiple times with different configurations, you should also configure unique `outDir`, `build.client`, and `build.server` values so the build output runtime isn't cached and shared by ESM between test runs. > [!IMPORTANT] -> If tests start to fail for no apparent reason, the first thing to look at the `outDir` configuration. As build cache artifacts between runs, different tests might end up sharing some of the emitted modules. -> To avoid this possible overlap, **make sure to add a custom `outDir` to your test case** +> If tests start to fail for no apparent reason, the first thing to look at the `outDir` configuration. As build caches artifacts between runs, different tests might end up sharing some of the emitted modules. +> To avoid this possible overlap, **make sure to add a custom `outDir` to your test case**. > > ```js > await loadFixture({ @@ -259,7 +259,7 @@ To run only a specific benchmark on CI, add its name after the command in your c ## For maintainers -This paragraph provides some guidance to the maintainers of the monorepo. The guidelines explained here aren't necessarily followed by other repositories of the same GitHub organisation. +This paragraph provides some guidance to the maintainers of the monorepo. The guidelines explained here aren't necessarily followed by other repositories of the GitHub organisation. ### Issue triaging workflow @@ -301,7 +301,7 @@ The Astro project has five levels of priority to issues, where `p5` is the highe - `p4`: the bug impacts _many_ Astro projects, it doesn't have a workaround but Astro is still stable/usable. - `p3`: any bug that doesn't fall in the `p4` or `p5` category. If the documentation doesn't cover the case reported by the user, it's useful to initiate a discussion via the `"needs discussion"` label. Seek opinions from OP and other maintainers. -- `p2`: all the bugs that have workarounds. +- `p2`: all bugs that have workarounds. - `p1`: very minor bug, that impacts a small amount of users. Sometimes it's an edge case and it's easy to fix. Very useful if you want to assign the fix to a first-time contributor. > [!IMPORTANT] @@ -312,7 +312,7 @@ Assigning labels isn't always easy and many times the distinction between the di - When assigning a `p2`, **always** add a comment that explains the workaround. If a workaround isn't provided, ping the person that assigned the label and ask them to provide one. - Astro has **many** features, but there are some that have a larger impact than others: development server, build command, HMR (TBD, we don't have a page that explains expectations of HMR in Astro), **evident** regressions in performance. - In case the number of reactions of an issue grows, the number of users affected grows, or a discussion uncovers some insights that weren't clear before, it's OK to change the priority of the issue. The maintainer **should** provide an explanation when assigning a different label. - As with any other contribution, triaging is voluntary and best-efforts. We welcome and appreciate all the help you're happy to give (including reading this!) and nothing more. If you are not confident about an issue, you are welcome to leave an issue untriaged for someone who would have more context, or to bring it to their attention. + As with any other contribution, triaging is voluntary and best-effort. We welcome and appreciate all the help you're happy to give (including reading this!) and nothing more. If you are not confident about an issue, you are welcome to leave an issue untriaged for someone who would have more context, or to bring it to their attention. ### Preview releases @@ -348,7 +348,7 @@ Understanding in which environment code runs, and at which stage in the process, To make it easier to test code, try decoupling **business logic** from **infrastructure**: -- **Infrastucture** is code that depends on external systems and/or requires aspecial environment to run. For example: DB calls, file system, randomness etc... +- **Infrastructure** is code that depends on external systems and/or requires a special environment to run. For example: DB calls, file system, randomness etc... - **Business logic** (or _core logic_ or _domain_) is the rest. It's pure logic that's easy to run from anywhere. That means avoiding side-effects by making external dependencies explicit. This often means passing more things as arguments. diff --git a/STYLE_GUIDE.md b/STYLE_GUIDE.md index 6d0cc9e26a8f..69b69660481c 100644 --- a/STYLE_GUIDE.md +++ b/STYLE_GUIDE.md @@ -45,7 +45,7 @@ For example: "This is clean code" is a subjective point and should have limited In contrast: "Tabs are more accessible than spaces" is an objective point and should be strongly considered in a theoretical style discussion on tabs vs. spaces. (Fred: Believe me, I write this as someone who personally prefers spaces over tabs in my own code!) -Sometimes, not everyone will agree on style changes and 100% consensus is impossible. This is a condition commonly referred to as bike-shedding. If consensus can not be reached, a simple majority vote among core contributors (L3) will suffice. +Sometimes, not everyone will agree on style changes and 100% consensus is impossible. This is a condition commonly referred to as bike-shedding. If consensus cannot be reached, a simple majority vote among core contributors (L3) will suffice. _Note: This process is new, we are still figuring it out! This process will be moved into GOVERNANCE.md when finalized._ diff --git a/examples/blog/README.md b/examples/blog/README.md index 1e88fbf226fc..4307d60ba3c9 100644 --- a/examples/blog/README.md +++ b/examples/blog/README.md @@ -24,7 +24,7 @@ Features: - ✅ Minimal styling (make it your own!) - ✅ 100/100 Lighthouse performance -- ✅ SEO-friendly with canonical URLs and OpenGraph data +- ✅ SEO-friendly with canonical URLs and Open Graph data - ✅ Sitemap support - ✅ RSS Feed support - ✅ Markdown & MDX support diff --git a/examples/ssr/src/components/AddToCart.svelte b/examples/ssr/src/components/AddToCart.svelte index 9e6c8ba866e8..47136c1dcaa8 100644 --- a/examples/ssr/src/components/AddToCart.svelte +++ b/examples/ssr/src/components/AddToCart.svelte @@ -34,7 +34,7 @@ button:hover { transform:scale(1.1); } -.pretext { +.pre-text { color:#fff; background:#0652DD; position:absolute; @@ -50,5 +50,5 @@ button:hover { } diff --git a/examples/starlog/src/components/Header.astro b/examples/starlog/src/components/Header.astro index bbdaf1e70c10..e74f30f2aff8 100644 --- a/examples/starlog/src/components/Header.astro +++ b/examples/starlog/src/components/Header.astro @@ -42,7 +42,7 @@ import { SiteTitle } from '../consts';
diff --git a/examples/starlog/src/components/SEO.astro b/examples/starlog/src/components/SEO.astro index 8816bd7bee27..2ceebb4c9d6d 100644 --- a/examples/starlog/src/components/SEO.astro +++ b/examples/starlog/src/components/SEO.astro @@ -69,7 +69,7 @@ function normalizeImageUrl(image: string | ImageMetadata) { - + diff --git a/packages/astro-rss/CHANGELOG.md b/packages/astro-rss/CHANGELOG.md index ae1e8cd21725..2cc092daad9c 100644 --- a/packages/astro-rss/CHANGELOG.md +++ b/packages/astro-rss/CHANGELOG.md @@ -250,7 +250,7 @@ ### Patch Changes -- [#6614](https://github.com/withastro/astro/pull/6614) [`b1b9b1390`](https://github.com/withastro/astro/commit/b1b9b1390f95c6ae91389eba55f7563b911bccc7) Thanks [@aivarsliepa](https://github.com/aivarsliepa)! - Fixes `RSSOptions` type error when using `strictest` Typescript tsconfig +- [#6614](https://github.com/withastro/astro/pull/6614) [`b1b9b1390`](https://github.com/withastro/astro/commit/b1b9b1390f95c6ae91389eba55f7563b911bccc7) Thanks [@aivarsliepa](https://github.com/aivarsliepa)! - Fixes `RSSOptions` type error when using `strictest` TypeScript tsconfig ## 2.3.1 diff --git a/packages/astro-rss/README.md b/packages/astro-rss/README.md index de897d476029..7a660f46e3d1 100644 --- a/packages/astro-rss/README.md +++ b/packages/astro-rss/README.md @@ -49,7 +49,7 @@ An `RSSFeedItem` is a single item in the list of items in your feed. An example ```js const item = { title: 'Alpha Centauri: so close you can touch it', - link: '/blog/alpha-centuari', + link: '/blog/alpha-centauri', pubDate: new Date('2023-06-04'), description: 'Alpha Centauri is a triple star system, containing Proxima Centauri, the closest star to our sun at only 4.24 light-years away.', @@ -116,7 +116,7 @@ An object that defines the `title` and `url` of the original feed for items that ```js const item = { title: 'Alpha Centauri: so close you can touch it', - link: '/blog/alpha-centuari', + link: '/blog/alpha-centauri', pubDate: new Date('2023-06-04'), description: 'Alpha Centauri is a triple star system, containing Proxima Centauri, the closest star to our sun at only 4.24 light-years away.', diff --git a/packages/astro-rss/test/rss.test.js b/packages/astro-rss/test/rss.test.js index 63c91887d283..a52caf45c361 100644 --- a/packages/astro-rss/test/rss.test.js +++ b/packages/astro-rss/test/rss.test.js @@ -105,7 +105,7 @@ describe('getRssString', () => { assertXmlDeepEqual(str, validXmlWithContentResult); }); - it('should generate on valid RSSFeedItem array with missing date', async () => { + it('should generate on valid RSSFeedItem array that is missing date', async () => { const str = await getRssString({ title, description, diff --git a/packages/astro/CHANGELOG-v1.md b/packages/astro/CHANGELOG-v1.md index 1ebd4a598179..57c7c7a7bb5b 100644 --- a/packages/astro/CHANGELOG-v1.md +++ b/packages/astro/CHANGELOG-v1.md @@ -815,7 +815,7 @@ ### Patch Changes -- [#4768](https://github.com/withastro/astro/pull/4768) [`9a59e24e0`](https://github.com/withastro/astro/commit/9a59e24e0250617333c1a0fd89b7d52fd1c829de) Thanks [@matthewp](https://github.com/matthewp)! - nsure before-hydration is only loaded when used +- [#4768](https://github.com/withastro/astro/pull/4768) [`9a59e24e0`](https://github.com/withastro/astro/commit/9a59e24e0250617333c1a0fd89b7d52fd1c829de) Thanks [@matthewp](https://github.com/matthewp)! - Ensure before-hydration is only loaded when used - [#4759](https://github.com/withastro/astro/pull/4759) [`fc885eaea`](https://github.com/withastro/astro/commit/fc885eaea1f08429599c0ab4697ab6382f3d7fa4) Thanks [@matthewp](https://github.com/matthewp)! - Read jsxImportSource from tsconfig diff --git a/packages/astro/CHANGELOG-v2.md b/packages/astro/CHANGELOG-v2.md index d24276f25e8c..c3dd4e4519dd 100644 --- a/packages/astro/CHANGELOG-v2.md +++ b/packages/astro/CHANGELOG-v2.md @@ -268,7 +268,7 @@ - [#7786](https://github.com/withastro/astro/pull/7786) [`188eeddd4`](https://github.com/withastro/astro/commit/188eeddd47a61e04639670496924c37866180749) Thanks [@matthewp](https://github.com/matthewp)! - Execute scripts when navigating to a new page. - When navigating to an new page with client-side navigation, scripts are executed (and re-executed) so that any new scripts on the incoming page are run and the DOM can be updated. + When navigating to a new page with client-side navigation, scripts are executed (and re-executed) so that any new scripts on the incoming page are run and the DOM can be updated. However, `type=module` scripts never re-execute in Astro, and will not do so in client-side routing. To support cases where you want to modify the DOM, a new `astro:load` event listener been added: @@ -550,7 +550,7 @@ ### Patch Changes -- [#7527](https://github.com/withastro/astro/pull/7527) [`9e2426f75`](https://github.com/withastro/astro/commit/9e2426f75637a6318961f483de90b635f3fdadeb) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Default registry logic to fallback to NPM if registry command fails (sorry, Bun users!) +- [#7527](https://github.com/withastro/astro/pull/7527) [`9e2426f75`](https://github.com/withastro/astro/commit/9e2426f75637a6318961f483de90b635f3fdadeb) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Default registry logic to fall back to NPM if registry command fails (sorry, Bun users!) - [#7542](https://github.com/withastro/astro/pull/7542) [`cdc28326c`](https://github.com/withastro/astro/commit/cdc28326cf21f305924363e9c8c02ce54b6ff895) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Fix bug when using `define:vars` with a `style` object @@ -1087,7 +1087,7 @@ ### Patch Changes -- [#7009](https://github.com/withastro/astro/pull/7009) [`1d4db68e6`](https://github.com/withastro/astro/commit/1d4db68e64b7c3faf8863bf67f8332aa28e2f34b) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fix types from `astro/client` not working properly due to `client-base.d.ts` being an non-ambient declaration file +- [#7009](https://github.com/withastro/astro/pull/7009) [`1d4db68e6`](https://github.com/withastro/astro/commit/1d4db68e64b7c3faf8863bf67f8332aa28e2f34b) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fix types from `astro/client` not working properly due to `client-base.d.ts` being a non-ambient declaration file - [#7010](https://github.com/withastro/astro/pull/7010) [`e9f0dd9b4`](https://github.com/withastro/astro/commit/e9f0dd9b473c4793c958a6c81e743fd9b02b4f64) Thanks [@ematipico](https://github.com/ematipico)! - Call `next()` without return anything should work, with a warning @@ -1361,7 +1361,7 @@ - [#6675](https://github.com/withastro/astro/pull/6675) [`1f783e320`](https://github.com/withastro/astro/commit/1f783e32075c20b13063599696644f5d47b75d8d) Thanks [@matthewp](https://github.com/matthewp)! - Prevent frontmatter errors from crashing the dev server -- [#6688](https://github.com/withastro/astro/pull/6688) [`2e92e9aa9`](https://github.com/withastro/astro/commit/2e92e9aa976735c3ddb647152bb9c4850136e386) Thanks [@JohannesKlauss](https://github.com/JohannesKlauss)! - Add a additional check for `null` on the `req.body` check in `NodeApp.render`. +- [#6688](https://github.com/withastro/astro/pull/6688) [`2e92e9aa9`](https://github.com/withastro/astro/commit/2e92e9aa976735c3ddb647152bb9c4850136e386) Thanks [@JohannesKlauss](https://github.com/JohannesKlauss)! - Add an additional check for `null` on the `req.body` check in `NodeApp.render`. - [#6578](https://github.com/withastro/astro/pull/6578) [`adecda7d6`](https://github.com/withastro/astro/commit/adecda7d6009793c5d20519a997e3b7afb08ad57) Thanks [@wulinsheng123](https://github.com/wulinsheng123)! - add new flag with open for dev and preview @@ -1755,8 +1755,8 @@ - [#6052](https://github.com/withastro/astro/pull/6052) [`9793f19ec`](https://github.com/withastro/astro/commit/9793f19ecd4e64cbf3140454fe52aeee2c22c8c9) Thanks [@mayank99](https://github.com/mayank99)! - Error overlay will now show the error's `cause` if available. -- [#6070](https://github.com/withastro/astro/pull/6070) [`f91615f5c`](https://github.com/withastro/astro/commit/f91615f5c04fde36f115dad9110dd75254efd61d) Thanks [@AirBorne04](https://github.com/AirBorne04)! - \* safe guard against TextEncode.encode(HTMLString) [errors on vercel edge] - - safe guard against html.replace when html is undefined +- [#6070](https://github.com/withastro/astro/pull/6070) [`f91615f5c`](https://github.com/withastro/astro/commit/f91615f5c04fde36f115dad9110dd75254efd61d) Thanks [@AirBorne04](https://github.com/AirBorne04)! - \* safeguard against TextEncode.encode(HTMLString) [errors on vercel edge] + - safeguard against html.replace when html is undefined - [#6064](https://github.com/withastro/astro/pull/6064) [`2fb72c887`](https://github.com/withastro/astro/commit/2fb72c887f71c0a69ab512870d65b8c867774766) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Apply MDX `components` export when rendering as a content collection entry @@ -1853,7 +1853,7 @@ } ``` - This differs from previous behavior, where a Markdown file's frontmatter would _always_ override frontmatter injected via remark or reype. + This differs from previous behavior, where a Markdown file's frontmatter would _always_ override frontmatter injected via remark or rehype. - [#5891](https://github.com/withastro/astro/pull/5891) [`05caf445d`](https://github.com/withastro/astro/commit/05caf445d4d2728f1010aeb2179a9e756c2fd17d) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Remove deprecated Markdown APIs from Astro v0.X. This includes `getHeaders()`, the `.astro` property for layouts, and the `rawContent()` and `compiledContent()` error messages for MDX. @@ -2481,7 +2481,7 @@ } ``` - This differs from previous behavior, where a Markdown file's frontmatter would _always_ override frontmatter injected via remark or reype. + This differs from previous behavior, where a Markdown file's frontmatter would _always_ override frontmatter injected via remark or rehype. - [#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. diff --git a/packages/astro/CHANGELOG-v3.md b/packages/astro/CHANGELOG-v3.md index 06133bd50189..8c4e914fe0f5 100644 --- a/packages/astro/CHANGELOG-v3.md +++ b/packages/astro/CHANGELOG-v3.md @@ -146,7 +146,7 @@ - [#9121](https://github.com/withastro/astro/pull/9121) [`f4efd1c80`](https://github.com/withastro/astro/commit/f4efd1c808476c7e60fe00fcfb86276cf14fee79) Thanks [@peng](https://github.com/peng)! - Adds a warning if `astro add` fetches a package but returns a non-404 status -- [#9142](https://github.com/withastro/astro/pull/9142) [`7d55cf68d`](https://github.com/withastro/astro/commit/7d55cf68d89cb46bfb89a109b09af61be8431c89) Thanks [@ematipico](https://github.com/ematipico)! - Consistely emit fallback routes in the correct folders. +- [#9142](https://github.com/withastro/astro/pull/9142) [`7d55cf68d`](https://github.com/withastro/astro/commit/7d55cf68d89cb46bfb89a109b09af61be8431c89) Thanks [@ematipico](https://github.com/ematipico)! - Consistently emit fallback routes in the correct folders. - [#9119](https://github.com/withastro/astro/pull/9119) [`306781795`](https://github.com/withastro/astro/commit/306781795d5f4b755bbdf650a937f1f3c00030bd) Thanks [@ematipico](https://github.com/ematipico)! - Fix a flaw in the i18n fallback logic, where the routes didn't preserve their metadata, such as hoisted scripts @@ -166,7 +166,7 @@ ### Patch Changes -- [#9085](https://github.com/withastro/astro/pull/9085) [`fc66ecff1`](https://github.com/withastro/astro/commit/fc66ecff18a20dd436026cb8e75bcc8b5ab0e681) Thanks [@ematipico](https://github.com/ematipico)! - When redirecting to the default root locale, Astro middleare should take into consideration the value of `trailingSlash` +- [#9085](https://github.com/withastro/astro/pull/9085) [`fc66ecff1`](https://github.com/withastro/astro/commit/fc66ecff18a20dd436026cb8e75bcc8b5ab0e681) Thanks [@ematipico](https://github.com/ematipico)! - When redirecting to the default root locale, Astro middleware should take into consideration the value of `trailingSlash` - [#9067](https://github.com/withastro/astro/pull/9067) [`c6e449c5b`](https://github.com/withastro/astro/commit/c6e449c5b3e6e994b362b9ce441c8a1a81129f23) Thanks [@danielhajduk](https://github.com/danielhajduk)! - Fixes display of debug messages when using the `--verbose` flag @@ -403,7 +403,7 @@ ### Patch Changes -- [#9016](https://github.com/withastro/astro/pull/9016) [`1ecc9aa32`](https://github.com/withastro/astro/commit/1ecc9aa3240b79a3879b1329aa4f671d80e87649) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Add ability to "Click to go editor" on auditted elements in the dev overlay +- [#9016](https://github.com/withastro/astro/pull/9016) [`1ecc9aa32`](https://github.com/withastro/astro/commit/1ecc9aa3240b79a3879b1329aa4f671d80e87649) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Add ability to "Click to go editor" on audited elements in the dev overlay - [#9029](https://github.com/withastro/astro/pull/9029) [`29b83e9e4`](https://github.com/withastro/astro/commit/29b83e9e4b906cc0b5d92fae854fb350fc2be7c8) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Use UInt8Array instead of Buffer for both the input and return values of the `transform()` hook of the Image Service API to ensure compatibility with non-Node runtimes. @@ -873,7 +873,7 @@ - [#8484](https://github.com/withastro/astro/pull/8484) [`78b82bb39`](https://github.com/withastro/astro/commit/78b82bb3929bee5d8d9bd32d65374956ddb05859) Thanks [@bb010g](https://github.com/bb010g)! - fix(astro): add support for `src/content/config.mts` files -- [#8504](https://github.com/withastro/astro/pull/8504) [`5e1099f68`](https://github.com/withastro/astro/commit/5e1099f686abcc7026bd4fa74727f3b311c6d6d6) Thanks [@ematipico](https://github.com/ematipico)! - Minify the HTML of the redicts emitted during the build. +- [#8504](https://github.com/withastro/astro/pull/8504) [`5e1099f68`](https://github.com/withastro/astro/commit/5e1099f686abcc7026bd4fa74727f3b311c6d6d6) Thanks [@ematipico](https://github.com/ematipico)! - Minify the HTML of the redirects emitted during the build. - [#8480](https://github.com/withastro/astro/pull/8480) [`644825845`](https://github.com/withastro/astro/commit/644825845c11c8d100a9b0d16b69a23c165c529e) Thanks [@yamanoku](https://github.com/yamanoku)! - Do not add type="text/css" to inline style tag diff --git a/packages/astro/CHANGELOG-v4.md b/packages/astro/CHANGELOG-v4.md index 447c8b3d0ed5..32abbf44eba1 100644 --- a/packages/astro/CHANGELOG-v4.md +++ b/packages/astro/CHANGELOG-v4.md @@ -4,7 +4,7 @@ - [#12542](https://github.com/withastro/astro/pull/12542) [`65e50eb`](https://github.com/withastro/astro/commit/65e50eb7b6d7b10a193bba7d292804ac0e55be18) Thanks [@kadykov](https://github.com/kadykov)! - Fix JPEG image size determination -- [#12525](https://github.com/withastro/astro/pull/12525) [`cf0d8b0`](https://github.com/withastro/astro/commit/cf0d8b08a0f16bba7310d1a92c82b5a276682e8c) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where with `i18n` enabled, Astro couldn't render the `404.astro` component for non-existent routes. +- [#12525](https://github.com/withastro/astro/pull/12525) [`cf0d8b0`](https://github.com/withastro/astro/commit/cf0d8b08a0f16bba7310d1a92c82b5a276682e8c) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where with `i18n` enabled, Astro couldn't render the `404.astro` component for nonexistent routes. ## 4.16.15 @@ -770,7 +770,7 @@ - [#11360](https://github.com/withastro/astro/pull/11360) [`a79a8b0`](https://github.com/withastro/astro/commit/a79a8b0230b06ed32ce1802f2a5f84a6cf92dbe7) Thanks [@ascorbic](https://github.com/ascorbic)! - Adds a new [`injectTypes()` utility](https://docs.astro.build/en/reference/integrations-reference/#injecttypes-options) to the Integration API and refactors how type generation works - Use `injectTypes()` in the `astro:config:done` hook to inject types into your user's project by adding a new a `*.d.ts` file. + Use `injectTypes()` in the `astro:config:done` hook to inject types into your user's project by adding a new `*.d.ts` file. The `filename` property will be used to generate a file at `/.astro/integrations/