Repository navigation
Port Go's csrf protection - #15595
Conversation
🦋 Changeset detectedLatest commit: 750edb5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
b41fd09 to
e0b5d14
Compare
| request = new Request('http://example.com/api/', { | ||
| headers: { origin: 'http://example.com', 'content-type': 'multipart/form-data' }, | ||
| method: 'POST', | ||
| examplethod: 'POST', |
There was a problem hiding this comment.
Whoops, sorry will fix.
e0b5d14 to
de0d2e4
Compare
| } | ||
| return false; | ||
|
|
||
| // this is what go does, not looking at the protocol(with a comment from the go implementation). |
There was a problem hiding this comment.
note: this whole block can be removed if the PR is approved, I left it here as reference for comparison with the go implementation.
bbdb2f1 to
bfd132b
Compare
|
last force push was to retrigger ci, since I believe the 2 failing tests was bogus and not related to this PR. |
bfd132b to
5caeea9
Compare
# Conflicts: # packages/astro/src/core/app/middlewares.ts # packages/astro/test/csrf-protection.test.js
There was a problem hiding this comment.
```
Findings
No findings.
Merge Requirement Assessment
Status: satisfied
- Refactor the
checkOriginmiddleware to port Go's CSRF protection — Implemented inpackages/astro/src/core/app/origin-check.ts. Unsafe, form-like requests are first gated bySec-Fetch-Site, falling back to host-onlyOriginmatching when the header is absent, matching the described port and the new inline JSDoc. - Add/update tests covering the new behavior —
packages/astro/test/units/app/csrf.test.tsnow covers allowedSec-Fetch-Sitevalues (same-origin,none), blocked values (same-site,cross-site,invalid), non-browser/no-header requests, and theOrigin-host fallback. - Update documentation comments for the changed behavior —
packages/astro/src/types/public/config.tsnow documentsSec-Fetch-Sitechecking and the same-origin/non-browser fallback. - Include a changeset —
.changeset/proud-lizards-tease.mdadds anastropatch changeset describing the new header-based CSRF check.
Questions
None.
Review Status
Verdict: ready to merge based on static review
Context: PR #15595 (withastro/astro), head 90e698723b5d5c81fb2c79ca58328184aca9f678
Scope: PR base de5cc2d54e92d8746959e39fee1a8f0b4ddfe4bf to head 90e698723b5d5c81fb2c79ca58328184aca9f678; files reviewed: packages/astro/src/core/app/origin-check.ts, packages/astro/src/types/public/config.ts, packages/astro/test/units/app/csrf.test.ts, .changeset/proud-lizards-tease.md.
Changeset: present and covers astro.
Limitations: The external Go CSRF reference source and article could not be independently fetched in this environment; the assessment is based on the implementation, inline comments, the updated tests, and Astro's existing security.checkOrigin documentation.
Validation: Static review only; no project code, tests, builds, or checks were run.
GitHub context: collected.
Git scope: PR base/head verified.
```
This review was made by an LLM. The analysis may be wrong, and reports might be incorrect.
| const formLikeHeader = hasFormLikeHeader(request.headers.get('content-type')); | ||
| return formLikeHeader && !isSameOrigin; | ||
| const contentType = request.headers.get('content-type'); | ||
| if (contentType !== null && !hasFormLikeHeader(contentType)) { |
There was a problem hiding this comment.
this lets anything with a content-type through, which seems pretty wrong. I know that this is pre-existing but I think we need to check sec-fetch-site first.
There was a problem hiding this comment.
Here's the order they use in Go:
https://github.com/golang/go/blob/master/src/net/http/csrf.go#L134-L174
|
It's fun to see some attention to this, but I have a hard time making sense of what is happening here. first of all, I was surprised that you can push to my fork.(!?) what is happening? |
|
ok, so I can still push to my own repository, that's nice. Not sure if removing the content type is what you need, but hey! 😅 |
|
I simply resumed the PR. There were conflicts and resolved them. I didn't rewrite any commits. |
|
Now the CI is failing. I want to bring this PR to the finish line @qzio |
b84d1a4 to
dd5c124
Compare
|
I've removed my latest test commit. Anyway, it's such a small PR, I'm not sure it makes sense to take my prior work and mangle it into the new function. Could it not be easier to just create a new PR on top of main and go from there? Since this PR have been stale for almost a year now. |
|
Yeah that's another solution. I can do that on your behalf (you'll keep the authorship), unless you want to. Just let know what you prefer |
|
@qzio just run the single test that fails using node. node --test path/to/test.js |
|
Finally, ci is green, ping @ematipico What is left to get this into a mergable state? |
ematipico
left a comment
There was a problem hiding this comment.
I think we're almost there. Just a suggestion for the changeset
ArmandPhilippot
left a comment
There was a problem hiding this comment.
Thanks @qzio! I've left a few suggestions for the changeset and the configuration reference:
- As Ema said, the changeset doesn't currently explain to users what that means for them
- I think an external link to explain what CSRF is can be helpful, and avoid us to go into too much details
- It seems that one paragraph repeats what has already been said, but in reverse.
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
Co-authored-by: Armand Philippot <git@armand.philippot.eu>
ArmandPhilippot
left a comment
There was a problem hiding this comment.
Thank you, LGTM docs-wise!
|
@matthewp can you do a review? |
This PR contains the following updates:
| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | Type | Update |
|---|---|---|---|---|---|
| [@astrojs/node](https://docs.astro.build/en/guides/integrations-guide/node/) ([source](https://github.com/withastro/astro/tree/HEAD/packages/integrations/node)) | [`11.1.6` → `11.1.7`](https://renovatebot.com/diffs/npm/@astrojs%2fnode/11.1.6/11.1.7) |  |  | dependencies | patch |
| [@playwright/test](https://playwright.dev) ([source](https://github.com/microsoft/playwright)) | [`1.63.0` → `1.64.0`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.63.0/1.64.0) |  |  | devDependencies | minor |
| [@react-email/ui](https://github.com/resend/react-email) ([source](https://github.com/resend/react-email/tree/HEAD/packages/ui)) | [`6.11.0` → `6.11.1`](https://renovatebot.com/diffs/npm/@react-email%2fui/6.11.0/6.11.1) |  |  | devDependencies | patch |
| [actions/setup-node](https://github.com/actions/setup-node) | `v7.0.0` → `v7.1.0` |  |  | action | minor |
| [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`7.3.5` → `7.3.8`](https://renovatebot.com/diffs/npm/astro/7.3.5/7.3.8) |  |  | dependencies | patch |
| [pnpm](https://pnpm.io) ([source](https://github.com/pnpm/pnpm/tree/HEAD/pnpm/npm/pnpm)) | [`12.9.1` → `12.10.1`](https://renovatebot.com/diffs/npm/pnpm/12.9.1/12.10.1) |  |  | packageManager | minor |
| [pnpm](https://pnpm.io) ([source](https://github.com/pnpm/pnpm/tree/HEAD/pnpm/npm/pnpm)) | [`12.9.1` → `12.10.1`](https://renovatebot.com/diffs/npm/pnpm/12.9.1/12.10.1) |  |  | engines | minor |
| [react-email](https://github.com/resend/react-email) ([source](https://github.com/resend/react-email/tree/HEAD/packages/react-email)) | [`6.11.0` → `6.11.1`](https://renovatebot.com/diffs/npm/react-email/6.11.0/6.11.1) |  |  | dependencies | patch |
| [renovate/renovate](https://renovatebot.com) ([source](https://github.com/renovatebot/renovate)) | [`44.133.0` → `44.149.0`](https://octochangelog.com/compare?repo=renovatebot%2Frenovate&from=44.133.0&to=44.149.0) |  |  | container | minor |
| [resend](https://github.com/resend/resend-node) | [`6.31.0` → `6.32.1`](https://renovatebot.com/diffs/npm/resend/6.31.0/6.32.1) |  |  | dependencies | minor |
| stripe/stripe-cli | `v1.53.0` → `v1.53.1` |  |  | | patch |
| [svelte](https://svelte.dev) ([source](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte)) | [`5.57.1` → `5.57.2`](https://renovatebot.com/diffs/npm/svelte/5.57.1/5.57.2) |  |  | dependencies | patch |
| [typescript-eslint](https://typescript-eslint.io/packages/typescript-eslint) ([source](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint)) | [`8.71.0` → `8.71.1`](https://renovatebot.com/diffs/npm/typescript-eslint/8.71.0/8.71.1) |  |  | dependencies | patch |
---
### Release Notes
<details>
<summary>withastro/astro (@​astrojs/node)</summary>
### [`v11.1.7`](https://github.com/withastro/astro/blob/HEAD/packages/integrations/node/CHANGELOG.md#1117)
[Compare Source](https://github.com/withastro/astro/compare/@astrojs/node@11.1.6...@astrojs/node@11.1.7)
##### Patch Changes
- [`1d9e910`](https://github.com/withastro/astro/commit/1d9e910a0308ef9699694a2871b3d71b6f5c3383) Thanks [@​matthewp](https://github.com/matthewp)! - Validates the `Host` header against `security.allowedDomains` when using the Node adapter
- Updated dependencies \[[`6987261`](https://github.com/withastro/astro/commit/69872618b7b7c915b2bd51a4b41e3a3e3116f3bb), [`62b13ba`](https://github.com/withastro/astro/commit/62b13ba3e0068057a47fbfc2ab8842b263c68f0d)]:
- [@​astrojs/internal-helpers](https://github.com/astrojs/internal-helpers)@0.12.0
</details>
<details>
<summary>microsoft/playwright (@​playwright/test)</summary>
### [`v1.64.0`](https://github.com/microsoft/playwright/releases/tag/v1.64.0)
[Compare Source](https://github.com/microsoft/playwright/compare/v1.63.0...v1.64.0)
#### 🧰 WebMCP
New [page.webmcp](https://playwright.dev/docs/api/class-page#page-webmcp) and [frame.webmcp](https://playwright.dev/docs/api/class-frame#frame-webmcp) give access to the tools that a page registers through the experimental [WebMCP](https://playwright.dev/docs/api/class-webmcp) browser API, so you can test them like any other part of your app:
```js
const browser = await chromium.launch({ args: ['--enable-features=WebMCP'] });
const page = await browser.newPage();
await page.goto('https://example.com');
for (const tool of await page.webmcp.tools())
console.log(tool.name, tool.description);
const result = await page.webmcp.callTool('add', { a: 2, b: 40 });
console.log(result.content[0].text); // "42"
```
[Playwright MCP](https://playwright.dev/docs/getting-started-mcp) also supports WebMCP by default, with page-defined tools offered to the agent as `webmcp_<tool>`. Pass `--no-webmcp` to opt out.
[`playwright-cli`](https://playwright.dev/docs/getting-started-cli) exposes them as well:
```bash
playwright-cli webmcp-list
playwright-cli webmcp-call search_catalog --params '{"query":"cats"}'
```
#### 🎬 Better videos
Videos can now be recorded at a custom frame rate, and the decorations for actions are styled with plain CSS:
```js
// playwright.config.ts
import { defineConfig } from '@playwright/test';
export default defineConfig({
use: {
video: {
mode: 'on',
size: { width: 1920, height: 1080 },
fps: 60,
show: {
actions: {
style: {
point: 'width: 20px; height: 20px; border-radius: 50%; background: red',
highlight: 'outline: 2px solid #​333; background: rgba(0, 128, 255, .15)',
title: 'font-size: 16px',
},
},
},
},
},
});
```
- New `fps` option in [testOptions.video](https://playwright.dev/docs/api/class-testoptions#test-options-video), [`recordVideo`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-record-video) and
[screencast.start()](https://playwright.dev/docs/api/class-screencast#screencast-start). Firefox and WebKit currently capture up to 25 frames per second.
- New [`style`](https://playwright.dev/docs/api/class-screencast#screencast-show-actions-option-style) option takes CSS declarations for the `point` marker, the target
`highlight` and the action `title`. It replaces the `fontSize` option, which is now deprecated.
- The cursor stays visible at the last action point, survives navigations and travels along a natural, eased path.
- Videos are encoded with VP9 instead of VP8, which takes less CPU and produces smaller files of the same or better
quality.
- All video options are also available in [Playwright MCP](https://playwright.dev/docs/getting-started-mcp) and [`playwright-cli`](https://playwright.dev/docs/getting-started-cli).
#### 🎯 Test runner
- New [testProject.default](https://playwright.dev/docs/api/class-testproject#test-project-default) option keeps a project in the config without running it by default. You can configure every browser you care about, and let a plain `npx playwright test` run just your favourite one:
```js
// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
projects: [
{ name: 'chromium', use: devices['Desktop Chrome'] },
{ name: 'firefox', use: devices['Desktop Firefox'], default: false },
{ name: 'webkit', use: devices['Desktop Safari'], default: false },
],
});
```
```bash
npx playwright test # runs chromium only
npx playwright test --project=firefox # runs firefox
npx playwright test --project="*" # runs all three, for example on CI
```
- New `--shuffle` command line option schedules tests in a random order, which helps to find tests that accidentally depend on each other.
```bash
npx playwright test --shuffle
# Running 42 tests using 4 workers, shuffle seed 271828182
# ...
# Pass the seed to reproduce the same order.
npx playwright test --shuffle 271828182
```
- New `lock` option in [test.describe.configure()](https://playwright.dev/docs/api/class-test#test-describe-configure) adds [test locks](https://playwright.dev/docs/test-parallel#test-locks) to all tests in a file or a group:
```js
test.describe.configure({ lock: 'user-settings' });
```
- New `type` option of `toHaveScreenshot` in [testConfig.expect](https://playwright.dev/docs/api/class-testconfig#test-config-expect) stores all unnamed screenshots as WebP:
```js
// playwright.config.ts
export default defineConfig({
expect: {
toHaveScreenshot: { type: 'webp' },
},
});
```
#### 🪆 Locator.within()
New [locator.within()](https://playwright.dev/docs/api/class-locator#locator-within) combines two locators that you already have, reading in the natural order —
"this button, within that dialog":
```js
const saveButton = page.getByRole('button', { name: 'Save' });
const dialog = page.getByTestId('settings-dialog');
await saveButton.within(dialog).click();
```
Relative locators such as [locator.nth()](https://playwright.dev/docs/api/class-locator#locator-nth) or [locator.first()](https://playwright.dev/docs/api/class-locator#locator-first) are resolved inside each parent
separately, which makes column-like queries straightforward:
```js
// The third cell of every row, not the third cell in the table.
const thirdColumn = page.getByRole('cell').nth(2).within(page.getByRole('row'));
await expect(thirdColumn).toHaveText(['Apple', 'Banana', 'Cherry']);
```
#### New APIs
- New [page.getByRef()](https://playwright.dev/docs/api/class-page#page-get-by-ref) locates an element by its aria ref, such as `e2`, reported by [page.ariaSnapshot()](https://playwright.dev/docs/api/class-page#page-aria-snapshot) in the `'ai'` mode.
- New option [`includeShadow`](https://playwright.dev/docs/api/class-page#page-content-option-include-shadow) in [page.content()](https://playwright.dev/docs/api/class-page#page-content) and [frame.content()](https://playwright.dev/docs/api/class-frame#frame-content) serializes open shadow roots as [declarative shadow DOM](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM#declaratively_with_html).
- New option [`signCount`](https://playwright.dev/docs/api/class-credentials#credentials-create-option-sign-count) sets the initial signature counter of a virtual credential. [credentials.create()](https://playwright.dev/docs/api/class-credentials#credentials-create) and [credentials.get()](https://playwright.dev/docs/api/class-credentials#credentials-get) return the current `signCount`, and it is saved and restored together with the credentials in the storage state.
- New [fullConfig.filteredProjects](https://playwright.dev/docs/api/class-fullconfig#full-config-filtered-projects) lists the projects that were selected to run after applying the `--project` filter. It is available in global setup and reporters.
- New [apiRequestContext.addCookies()](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-add-cookies), [apiRequestContext.cookies()](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-cookies) and [apiRequestContext.clearCookies()](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-clear-cookies) manage cookies of a request context, mirroring the [BrowserContext](https://playwright.dev/docs/api/class-browsercontext) methods:
```js
await request.addCookies([{ name: 'session-id', value: '42', url: 'https://example.com' }]);
console.log(await request.cookies('https://example.com'));
await request.clearCookies({ name: 'session-id' });
```
#### Breaking changes ⚠️
- `screen` property is now forwarded from the [device descriptors](https://playwright.dev/docs/emulation#devices). If you use `...devices['Desktop Chrome']` and alike, `window.screen` and media queries now see the emulated screen size. You can opt-out by explicitly setting `screen` to `undefined`:
```js
// playwright.config.ts
export default defineConfig({
use: {
...devices['Desktop Chrome'],
screen: undefined,
},
});
```
- JSX in your test files now follows your `tsconfig.json`. Playwright compiles JSX in test files according to the `jsx`, `jsxFactory`, `jsxFragmentFactory` and `jsxImportSource` [tsconfig options](https://playwright.dev/docs/test-typescript#tsconfig-jsx-options), and defaults to the automatic runtime from `react/jsx-runtime`.
- `--update-snapshots=missing` now passes the test run. Tests that only create missing snapshots now pass in the `'missing'` mode of [testConfig.updateSnapshots](https://playwright.dev/docs/api/class-testconfig#test-config-update-snapshots), so that CI can generate new snapshots and verify the existing ones in a single run. The mode used when the option is not specified is now called `'default'` and behaves as before: missing snapshots are written and the test fails.
- Elements inside hidden iframes are considered hidden. Elements inside an iframe that is not visible, for example with `visibility: hidden`, are now considered hidden by actions, [locator.isVisible()](https://playwright.dev/docs/api/class-locator#locator-is-visible) and [expect(locator).toBeVisible()](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-be-visible).
#### Browser Versions
- Chromium 156.0.8078.4
- Mozilla Firefox 157.0
- WebKit 27.2
This version was also tested against the following stable channels:
- Google Chrome 155
- Microsoft Edge 155
</details>
<details>
<summary>resend/react-email (@​react-email/ui)</summary>
### [`v6.11.1`](https://github.com/resend/react-email/blob/HEAD/packages/ui/CHANGELOG.md#6111)
[Compare Source](https://github.com/resend/react-email/compare/@react-email/ui@6.11.0...@react-email/ui@6.11.1)
</details>
<details>
<summary>actions/setup-node (actions/setup-node)</summary>
### [`v7.1.0`](https://github.com/actions/setup-node/releases/tag/v7.1.0)
[Compare Source](https://github.com/actions/setup-node/compare/v7.0.0...v7.1.0)
#### What's Changed
##### Enhancements:
- Add support for mise.toml file by [@​gperdomor](https://github.com/gperdomor) in [#​1421](https://github.com/actions/setup-node/pull/1421)
- Support absolute paths in node-version-file by [@​v-mahabaleshwars](https://github.com/v-mahabaleshwars) in [#​1633](https://github.com/actions/setup-node/pull/1633)
##### Bug fixes:
- Add Node version validation and manifest fetch retry by [@​v-jitenderpalsingh](https://github.com/v-jitenderpalsingh) in [#​1580](https://github.com/actions/setup-node/pull/1580)
##### Documentation updates:
- README.md: bump actions/checkout to latest version 7 by [@​deining](https://github.com/deining) in [#​1578](https://github.com/actions/setup-node/pull/1578)
- docs: add V7 ESM migration and NODE\_AUTH\_TOKEN behavior change by [@​v-gowridurgad](https://github.com/v-gowridurgad) in [#​1593](https://github.com/actions/setup-node/pull/1593)
- Fixed cache recommendation syntax by [@​SubJunk](https://github.com/SubJunk) in [#​1603](https://github.com/actions/setup-node/pull/1603)
##### Dependency updates:
- Update workflow pins and migrate Node matrices to modern versions by [@​v-HarithaVattikuti](https://github.com/v-HarithaVattikuti) in [#​1583](https://github.com/actions/setup-node/pull/1583)
- Upgrade [@​actions/cache](https://github.com/actions/cache) to 6.2.0 by [@​philip-gai](https://github.com/philip-gai) in [#​1584](https://github.com/actions/setup-node/pull/1584)
- Pin [@​types/node](https://github.com/types/node) to v24 by [@​v-priyagupta108](https://github.com/v-priyagupta108) in [#​1585](https://github.com/actions/setup-node/pull/1585)
- Override brace-expansion to 5.0.8 by [@​v-priyagupta108](https://github.com/v-priyagupta108) with [@​Copilot](https://github.com/Copilot) in [#​1599](https://github.com/actions/setup-node/pull/1599)
- Upgrade actions/checkout from 7.0.0 to 7.0.1 by [@​dependabot](https://github.com/dependabot) in [#​1598](https://github.com/actions/setup-node/pull/1598)
- Upgrade prettier from 3.8.4 to 3.9.6 by [@​dependabot](https://github.com/dependabot) in [#​1590](https://github.com/actions/setup-node/pull/1590)
- Upgrade [@​vercel/ncc](https://github.com/vercel/ncc) from 0.44.0 to 0.45.0 by [@​dependabot](https://github.com/dependabot) in [#​1610](https://github.com/actions/setup-node/pull/1610)
- Upgrade pnpm/action-setup from 6.0.9 to 6.0.10 by [@​dependabot](https://github.com/dependabot) in [#​1602](https://github.com/actions/setup-node/pull/1602)
- Upgrade baseline-browser-mapping from 2.10.38 to 2.11.22 by [@​dependabot](https://github.com/dependabot) in [#​1629](https://github.com/actions/setup-node/pull/1629)
- Upgrade [@​types/semver](https://github.com/types/semver) from 7.7.1 to 7.8.0 by [@​dependabot](https://github.com/dependabot) in [#​1616](https://github.com/actions/setup-node/pull/1616)
- Upgrade [@​typescript-eslint/parser](https://github.com/typescript-eslint/parser) from 8.62.0 to 8.70.0 by [@​dependabot](https://github.com/dependabot) in [#​1615](https://github.com/actions/setup-node/pull/1615)
- Upgrade pnpm/action-setup from 6.0.10 to 6.1.0 by [@​dependabot](https://github.com/dependabot) in [#​1631](https://github.com/actions/setup-node/pull/1631)
- Upgrade jest-each from 30.4.1 to 30.5.2 by [@​dependabot](https://github.com/dependabot) in [#​1636](https://github.com/actions/setup-node/pull/1636)
- Upgrade eslint-plugin-n from 18.1.0 to 18.3.0 by [@​dependabot](https://github.com/dependabot) in [#​1638](https://github.com/actions/setup-node/pull/1638)
- Update dependencies and add license files by [@​v-HarithaVattikuti](https://github.com/v-HarithaVattikuti) in [#​1642](https://github.com/actions/setup-node/pull/1642)
- Upgrade eslint from 10.5.0 to 10.11.0 and package.json from 7.0.0 to 7.1.0 by [@​dependabot](https://github.com/dependabot) in [#​1635](https://github.com/actions/setup-node/pull/1635)
#### New Contributors
- [@​v-jitenderpalsingh](https://github.com/v-jitenderpalsingh) made their first contribution in [#​1580](https://github.com/actions/setup-node/pull/1580)
- [@​philip-gai](https://github.com/philip-gai) made their first contribution in [#​1584](https://github.com/actions/setup-node/pull/1584)
- [@​gperdomor](https://github.com/gperdomor) made their first contribution in [#​1421](https://github.com/actions/setup-node/pull/1421)
- [@​SubJunk](https://github.com/SubJunk) made their first contribution in [#​1603](https://github.com/actions/setup-node/pull/1603)
**Full Changelog**: <https://github.com/actions/setup-node/compare/v7.0.0...v7.1.0>
</details>
<details>
<summary>withastro/astro (astro)</summary>
### [`v7.3.8`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#738)
[Compare Source](https://github.com/withastro/astro/compare/astro@7.3.7...astro@7.3.8)
##### Patch Changes
- [#​18293](https://github.com/withastro/astro/pull/18293) [`28e7410`](https://github.com/withastro/astro/commit/28e74103fe3d999a56ae3404b5fe67a1ad6d8013) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes `Astro.cache` being `undefined` when a custom 404 or 500 page is rendered by the error handler, for example after a request to an API route with an HTTP method the route doesn't export
- [#​18298](https://github.com/withastro/astro/pull/18298) [`0e9e857`](https://github.com/withastro/astro/commit/0e9e85728999907127e817287dc0a0e3accdbe8e) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes `astro add` removing existing `allowBuilds` approvals from `pnpm-workspace.yaml` with pnpm v11.0–v11.22
- [#​18263](https://github.com/withastro/astro/pull/18263) [`882dd98`](https://github.com/withastro/astro/commit/882dd98cd9f11c4e7bd0b812d37f865dfca75d3d) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - Refactors internal bundling and code transforms to use Vite's Oxc-based `transformWithOxc` and Rolldown instead of esbuild. These packages no longer depend on esbuild directly.
- [#​18290](https://github.com/withastro/astro/pull/18290) [`31f13c3`](https://github.com/withastro/astro/commit/31f13c3710f2c128d3e1684100e44022a598ffcf) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes the `glob()` loader not reloading changed files in dev when the pattern starts with an extglob such as `!(drafts)/**/*.md`
### [`v7.3.7`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#737)
[Compare Source](https://github.com/withastro/astro/compare/astro@7.3.6...astro@7.3.7)
##### Patch Changes
- [#​18266](https://github.com/withastro/astro/pull/18266) [`cba76cc`](https://github.com/withastro/astro/commit/cba76cc8200890186acf26444d473ebac0fc2623) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes a build error when a Markdown content collection entry loaded with `glob({ deferRender: true })` has a `layout` frontmatter property. `layout` is now ignored for content collection entries, as documented.
- [#​18287](https://github.com/withastro/astro/pull/18287) [`38f6793`](https://github.com/withastro/astro/commit/38f6793291ea01a13cf4e51a83aeb16966a5a495) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes `astro add cloudflare` failing to install dependencies with pnpm v11+ by approving the `workerd` build script, and shows the package manager's error output when `astro add` fails to install dependencies
- [#​18222](https://github.com/withastro/astro/pull/18222) [`fcf6ed6`](https://github.com/withastro/astro/commit/fcf6ed6d4915eed6c18a20658b73372d074c4832) Thanks [@​mingjunlu](https://github.com/mingjunlu)! - Fixes an issue where AVIF images were served as `image/heif` instead of `image/avif` in the dev server.
- [#​18240](https://github.com/withastro/astro/pull/18240) [`de4df06`](https://github.com/withastro/astro/commit/de4df060306ea4ad78db8438e06bc4640df60ef2) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes the `cache()` handler from `astro/hono` and `astro/fetch` throwing a `TypeError` when a cache provider is configured. It now registers the cache provider before rendering, so `Astro.cache` is available to downstream handlers like `pages()`.
- [#​18268](https://github.com/withastro/astro/pull/18268) [`547b572`](https://github.com/withastro/astro/commit/547b572c65238e20a2fc1b03f6a8a5700035abc0) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes `security.checkOrigin` rejecting cross-origin requests with non-form content types such as `application/json`. As documented, the check only applies to unsafe requests that have no `content-type` header or one of `application/x-www-form-urlencoded`, `multipart/form-data`, or `text/plain`.
### [`v7.3.6`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#736)
[Compare Source](https://github.com/withastro/astro/compare/astro@7.3.5...astro@7.3.6)
##### Patch Changes
- [#​18166](https://github.com/withastro/astro/pull/18166) [`5134d0f`](https://github.com/withastro/astro/commit/5134d0f9e7478f23b1a590fa2416a2469c62ee23) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes an intermittent dev server crash when using `astro:actions` inside a server island with adapters that use a pre-bundled SSR environment (e.g. `@astrojs/cloudflare`)
- [#​18076](https://github.com/withastro/astro/pull/18076) [`8a2df66`](https://github.com/withastro/astro/commit/8a2df6675aa62fea382bce1cdb30c4260e0f104b) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes stale scoped styles during HMR when both markup and `<style>` are changed in a single save
- [#​18252](https://github.com/withastro/astro/pull/18252) [`2d29e7e`](https://github.com/withastro/astro/commit/2d29e7e38db65fcca7f241c967417003e20ecf43) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes CSS from other pages leaking into a page's `<head>` in dev when the page imports a module such as `astro:config/server`.
- [#​18000](https://github.com/withastro/astro/pull/18000) [`6724575`](https://github.com/withastro/astro/commit/67245751e02fb94223266d3c55cc7d7ac65ab060) Thanks [@​barclayd](https://github.com/barclayd)! - Fixes a bug where server islands containing framework components rendered empty in the dev server when using a custom `src/fetch.ts`
- [#​18241](https://github.com/withastro/astro/pull/18241) [`7c5fd6f`](https://github.com/withastro/astro/commit/7c5fd6f1faf4d87d0c9c5836ee47cc0d6d529ca3) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes the composable `i18n()` handler from `astro/fetch` and `astro/hono` returning an empty 404 for paths without a locale prefix. It now renders the custom 404 page, matching `astro()`.
- [#​18164](https://github.com/withastro/astro/pull/18164) [`1a6997f`](https://github.com/withastro/astro/commit/1a6997f280529650e4f1dacf0388e8fe07d05a1a) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes CSS Module HMR in dev when a component is rendered both with and without hydration on the same page. Astro now uses path-based class name hashing in dev mode so that editing CSS declarations no longer changes the generated selectors, allowing Vite's CSS HMR to update styles without a full page reload.
- [#​18243](https://github.com/withastro/astro/pull/18243) [`dd29d62`](https://github.com/withastro/astro/commit/dd29d62b1e7bd071804f822e90361cf5c9784682) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes `context.props` being `null` in middleware and endpoints when the composable `astro/hono` or `astro/fetch` `actions()` handler runs before `middleware()`, or when `pages()` runs without `middleware()`
- [#​18193](https://github.com/withastro/astro/pull/18193) [`95d5d16`](https://github.com/withastro/astro/commit/95d5d16ce983612e09b588bb249f76d273c872f7) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes `astro build` failing on Windows with Node.js 25+ with `ERR_INVALID_ARG_VALUE` when clearing the output directory hits a transient `EPERM` error
- [#​18220](https://github.com/withastro/astro/pull/18220) [`d6c13a4`](https://github.com/withastro/astro/commit/d6c13a48c682bb42da1eb295d520f9667035e1fb) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes type errors reported in Astro's built-in `<Picture />` and `<Font />` components when type-checking a project with `tsc` and `@astrojs/ts-content-mapper`
- [#​18133](https://github.com/withastro/astro/pull/18133) [`faac481`](https://github.com/withastro/astro/commit/faac481dc86efdd2e4987069a7298f2aea3f1c6c) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes lost request state when Vite discovers server dependencies during a request in Cloudflare dev mode
- [#​18146](https://github.com/withastro/astro/pull/18146) [`2af4516`](https://github.com/withastro/astro/commit/2af45163fb7757a533bdf929874278e0a7483cfc) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes CSS imported from an `injectScript('page')` script being dropped during build
- [#​18159](https://github.com/withastro/astro/pull/18159) [`e5f8fe0`](https://github.com/withastro/astro/commit/e5f8fe0fcfd1c1845ae425cbf874864ce5ab5a37) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes a hang when a `server:defer` component is inside a slot of another component in an MDX content collection entry
- [#​18246](https://github.com/withastro/astro/pull/18246) [`c3b42ad`](https://github.com/withastro/astro/commit/c3b42adb50612041b2e1c59f386065be934e5259) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes the `glob()` loader skipping content files whose paths contain `#` or `?`
- [#​18248](https://github.com/withastro/astro/pull/18248) [`b97184e`](https://github.com/withastro/astro/commit/b97184e53012404990da6788be5aa30f99c4cf6e) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes a bug where page routes added with `injectRoute()` returned a 404 when `i18n.routing.prefixDefaultLocale` was `true` and the route path had no locale prefix
- [#​18251](https://github.com/withastro/astro/pull/18251) [`3415263`](https://github.com/withastro/astro/commit/34152630b0dd77c2bfae68e568e01f824a8ee603) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes content collection changes being ignored in `astro dev` after the dev server restarts because of a config change
- [#​18226](https://github.com/withastro/astro/pull/18226) [`ad54af0`](https://github.com/withastro/astro/commit/ad54af063accfa123bf36c44a126da0404c480bb) Thanks [@​imharjot](https://github.com/imharjot)! - Fixes `Astro.cookies.get()` returning `undefined` for request cookies with empty values
- [#​18155](https://github.com/withastro/astro/pull/18155) [`37ab0e4`](https://github.com/withastro/astro/commit/37ab0e47ff53a688b667b6197807717bc4454e1b) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes nondeterministic ordering of the server manifest's `assets` array, ensuring builds with identical inputs produce byte-identical output
- [#​18099](https://github.com/withastro/astro/pull/18099) [`6987261`](https://github.com/withastro/astro/commit/69872618b7b7c915b2bd51a4b41e3a3e3116f3bb) Thanks [@​renovate](https://github.com/apps/renovate)! - Adds YAML parsing with timestamp and merge key support, and formats YAML errors consistently across Astro, Markdown, MDX, and Markdoc.
- [#​15595](https://github.com/withastro/astro/pull/15595) [`64e4039`](https://github.com/withastro/astro/commit/64e40396dc7e955986fd6d7bbd195f72556933d5) Thanks [@​qzio](https://github.com/qzio)! - Improves CSRF protection by taking modern browsers headers into account
- [#​18215](https://github.com/withastro/astro/pull/18215) [`941bd5e`](https://github.com/withastro/astro/commit/941bd5ecbe0b8ffdc9cde92880d402b8edc37d7a) Thanks [@​ump45nose](https://github.com/ump45nose)! - Fixes a runtime `ReferenceError` for inlined scripts that import a URL with `/* @vite-ignore */`.
Astro now inlines scripts after Vite replaces its preload markers, so ignored dynamic imports can remain inline without shipping an unresolved `__VITE_PRELOAD__` reference.
- [#​18179](https://github.com/withastro/astro/pull/18179) [`6caa659`](https://github.com/withastro/astro/commit/6caa6594afb557177e885077028db37506c409b7) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes custom View Transition direction names that are not valid CSS identifiers, such as names starting with a digit or containing spaces. These directions now match their animations correctly.
- [#​18250](https://github.com/withastro/astro/pull/18250) [`7eae39b`](https://github.com/withastro/astro/commit/7eae39bebbafc5a7b7763a8733a6e60ded5ead17) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes a 404 for a CSS file that a dynamic import preloads when the imported module uses a component that is also a hydrated island on the same page
- [#​18176](https://github.com/withastro/astro/pull/18176) [`7c9d00d`](https://github.com/withastro/astro/commit/7c9d00d251e42b577ed298879fe9e68a345bd776) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes duplicate CSS in production builds when a component is both server-rendered and used with `client:only` on the same page
- [#​18245](https://github.com/withastro/astro/pull/18245) [`492e95f`](https://github.com/withastro/astro/commit/492e95f8716829f1bd0ead70405ad982a0a5c105) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes the composable `astro/fetch` and `astro/hono` handlers (`trailingSlash()`, `redirects()`, `actions()`, `middleware()`, and `pages()`) so they reject over-encoded request paths with a `400 Bad Request`, matching `astro()`. For these requests, `redirects()` and `actions()` return the `400` response instead of `undefined`, so no redirect is issued and no action runs.
- [#​18078](https://github.com/withastro/astro/pull/18078) [`0a2ab10`](https://github.com/withastro/astro/commit/0a2ab102a91c141f42b6d7da9810db74f61d1fa0) Thanks [@​manuelgruber](https://github.com/manuelgruber)! - Fixes `Astro.rewrite()` and `context.rewrite()` selecting the wrong route in `astro dev` when two dynamic routes match the same path
- [#​18210](https://github.com/withastro/astro/pull/18210) [`62b13ba`](https://github.com/withastro/astro/commit/62b13ba3e0068057a47fbfc2ab8842b263c68f0d) Thanks [@​edmundhung](https://github.com/edmundhung)! - Allows Astro CLI commands to install tagged package versions
- [#​18069](https://github.com/withastro/astro/pull/18069) [`d39eb97`](https://github.com/withastro/astro/commit/d39eb97752ea6f5d02c82e6fe35fdbfb8d9f8982) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes a dev server dependency scan failure when an `.astro` file contains a literal `<script` in frontmatter or a template expression
- [#​18114](https://github.com/withastro/astro/pull/18114) [`c17d920`](https://github.com/withastro/astro/commit/c17d9209bef385ea88b6fee36e91ad4e635f4a86) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes Astro on StackBlitz and other WebContainer environments
- [#​18088](https://github.com/withastro/astro/pull/18088) [`cb767f9`](https://github.com/withastro/astro/commit/cb767f974e7ef1fec9b2d496e51b09c985c93947) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes a `MODULE_LEVEL_DIRECTIVE` warning during build caused by a stale `"use astro:head-inject"` directive in content collection propagated asset modules
- [#​18247](https://github.com/withastro/astro/pull/18247) [`2b3f73d`](https://github.com/withastro/astro/commit/2b3f73db230e3bff28ed9784a3b21257a97611e0) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes actions returning 500 for malformed JSON request bodies and undecodable action names. A `SyntaxError` from invalid JSON now returns 400 (`BAD_REQUEST`), and a `URIError` from a malformed percent-encoded action name now returns 404 (`NOT_FOUND`).
- [`1d9e910`](https://github.com/withastro/astro/commit/1d9e910a0308ef9699694a2871b3d71b6f5c3383) Thanks [@​matthewp](https://github.com/matthewp)! - Validates the `Host` header against `security.allowedDomains` when using the Node adapter
- [#​18249](https://github.com/withastro/astro/pull/18249) [`c7799a4`](https://github.com/withastro/astro/commit/c7799a4b21f2f7384cf070765f0912f9ac08848b) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes the `fontsource` font provider to resolve variable fonts when using the "Variable" suffix in the font name (e.g. `"Inter Variable"`)
- [#​18163](https://github.com/withastro/astro/pull/18163) [`e48da9d`](https://github.com/withastro/astro/commit/e48da9d4f6f293d8708bd8de9ae235429272f556) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes `<video muted>` losing its muted state after a ClientRouter navigation in Chrome
- [#​18244](https://github.com/withastro/astro/pull/18244) [`f67e7f7`](https://github.com/withastro/astro/commit/f67e7f7fe13e67131bb4e4c538970af60bdbbb94) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes localized error pages such as `src/pages/pt/404.astro` returning a `200` status when rendered through the `pages()` handler from `astro/fetch` or `astro/hono`
- [#​18242](https://github.com/withastro/astro/pull/18242) [`c5275e3`](https://github.com/withastro/astro/commit/c5275e3d5a688a7d246c9576b594870675b70e37) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes `experimental_AstroContainer` output including dev toolbar `data-astro-source-file` and `data-astro-source-loc` attributes when rendering components under Vitest
- Updated dependencies \[[`6987261`](https://github.com/withastro/astro/commit/69872618b7b7c915b2bd51a4b41e3a3e3116f3bb), [`62b13ba`](https://github.com/withastro/astro/commit/62b13ba3e0068057a47fbfc2ab8842b263c68f0d)]:
- [@​astrojs/internal-helpers](https://github.com/astrojs/internal-helpers)@0.12.0
- [@​astrojs/markdown-satteri](https://github.com/astrojs/markdown-satteri)@0.4.3
</details>
<details>
<summary>pnpm/pnpm (pnpm)</summary>
### [`v12.10.1`](https://github.com/pnpm/pnpm/releases/tag/v12.10.1): pnpm 12.10.1
[Compare Source](https://github.com/pnpm/pnpm/compare/v12.10.0...v12.10.1)
This release fixes `pnpm install` failures after an `overrides` change and on a filtered frozen install with `catalogPrune`. It also fixes several bugs in the experimental `nodeLinker.type: loaded`, which now keeps its generated files in `node_modules`.
##### Patch Changes
- With `nodeLinker.type: loaded`, pnpm now writes its generated files to `node_modules`, which projects already ignore in git. The store manifest and loader are `node_modules/.pnpm/.store-manifest.json` and `node_modules/.pnpm/.store-loader.mjs`. Bin shims are in `node_modules/.bin`.
Earlier versions wrote `.pnpm-store.json` and `.pnpm-store-loader.mjs` to the project root, and a `.pnpm` directory to the root and to each workspace package. Delete them after reinstalling.
- With `nodeLinker.type: loaded`, packages that ship their own `node_modules` directory, such as `npm` with its bundled dependencies, now load from the store. Before, one such package in the install stopped every Node.js process from starting.
- With `nodeLinker.type: loaded`, scripts can now run a Node.js runtime installed through `devEngines.runtime`. Before, every script that called `node` re-ran its own shim until it failed with "Argument list too long".
- With `nodeLinker.type: loaded`, Node.js processes start faster. In a project with 13,000 stored files, the startup overhead per process dropped from 67 ms to 18 ms.
- `pnpm install` no longer fails with `ERR_PNPM_NO_MATCHING_VERSION` after a change to `overrides` when the lockfile resolves an optional peer dependency to an npm alias of another package [#​16654](https://github.com/pnpm/pnpm/issues/16654).
- A frozen install with `catalogPrune` no longer removes catalog entries that `pnpm-lock.yaml` still records. Before, `pnpm install --frozen-lockfile --filter` failed with `ERR_PNPM_LOCKFILE_CONFIG_MISMATCH` when some workspace projects were missing from disk [#​16638](https://github.com/pnpm/pnpm/issues/16638).
- `pnpm install --fix-lockfile` no longer removes the `deprecated` and `hasBin` fields from lockfile entries [#​6600](https://github.com/pnpm/pnpm/issues/6600).
- With `enableGlobalVirtualStore`, an install that updates `node_modules` now repairs a package in the global virtual store that an interrupted install left without some of its dependency links or package files. Before, such an install kept the incomplete package if the project's `node_modules` already recorded it [#​16642](https://github.com/pnpm/pnpm/issues/16642).
- `pnpm install` now skips the Cargo and Python projects inside a nested directory that has its own `pnpm-workspace.yaml` or `.git` directory, such as a git worktree of the same workspace or a separate clone.
- The `Request took` warning for package metadata now starts timing when pnpm sends the request. Before, it also counted the time the request waited for a free request slot, so large installs printed it for requests the registry answered quickly.
<!-- sponsors -->
##### Platinum Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://bit.cloud/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/bit.svg" width="80" alt="Bit"></a>
</td>
<td align="center" valign="middle">
<a href="https://openai.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/openai_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/openai_light.svg" />
<img src="https://pnpm.io/img/users/openai_dark.svg" width="160" alt="OpenAI" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://notion.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/notion.svg" width="80" alt="Notion"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/coderabbit.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
<img src="https://pnpm.io/img/users/coderabbit.svg" width="220" alt="CodeRabbit" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
##### Gold Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/sanity.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/sanity_light.svg" />
<img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/discord.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/discord_light.svg" />
<img src="https://pnpm.io/img/users/discord.svg" width="220" alt="Discord" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://vite.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/vitejs.svg" width="42" alt="Vite"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/serpapi_light.svg" />
<img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160" alt="SerpApi" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/stackblitz.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
<img src="https://pnpm.io/img/users/stackblitz.svg" width="190" alt="Stackblitz" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/workleap.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/workleap_light.svg" />
<img src="https://pnpm.io/img/users/workleap.svg" width="190" alt="Workleap" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nx.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nx_light.svg" />
<img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://latitude.so/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/latitude.svg" width="160" alt="Latitude"></a>
</td>
</tr>
</tbody>
</table>
<!-- sponsors end -->
### [`v12.10.0`](https://github.com/pnpm/pnpm/releases/tag/v12.10.0): pnpm 12.10.0
[Compare Source](https://github.com/pnpm/pnpm/compare/v12.9.1...v12.10.0)
This release adds an experimental `loaded` node linker, lets `pnpm-lock.yaml` record resolution settings, and reads cached registry metadata faster. It also carries several security fixes, including one that stops a dependency version from writing files outside the global virtual store.
##### Minor Changes
- Added experimental `nodeLinker: { type: loaded }` installation. Compatible dependencies load directly from the content-addressable store through an automatically registered Node.js loader. `nodeLinker.excluded` selects packages and their dependency trees to install in the global virtual store.
- `lockfile.includeResolutionSettings: true` makes `pnpm-lock.yaml` record `autoDedupe`, `dedupeInjectedDeps`, `dedupePeerDependents` and `linkWorkspacePackages`. Installs then treat a lockfile that records other values as outdated. A lockfile that records `autoDedupe` is reused by later installs on any machine, so `pnpm run` after `pnpm install --frozen-lockfile` no longer starts another install [#​16583](https://github.com/pnpm/pnpm/issues/16583).
##### Patch Changes
##### Security
- `pnpm install` now prevents dependency versions with path traversal from writing files outside the global virtual store.
- pnpm now verifies locked config dependencies against their registry before installing them. Config dependencies must come from an npm registry. The lockfile can no longer replace the integrity of a config dependency pinned with `version+integrity`.
- Lockfile verification now checks the tarballs inside a `variations` resolution against the registry. A `name@version` lockfile entry with an empty `variations` resolution is now rejected.
- `pnpm audit signatures` now verifies signatures against the integrity recorded in the lockfile. Packages without a recorded integrity cannot pass signature verification.
- `pnpm install` and `pnpm publish` now reject archive metadata larger than 64 MiB before reading it into memory. Publishing a pre-built tarball also rejects manifests and README files larger than 64 MiB.
- Two URL or local path dependencies no longer share a virtual store directory when one URL has `+`, `#`, `:`, or `?` where the other has `/`. Such dependencies, including git dependencies pinned with `#`, now get a hash suffix on their directory name.
- The warning about an ignored project `.npmrc` registry setting no longer prints the username and password of a URL-scoped key such as `//user:password@registry.example.com/${PATH}/:_authToken`.
##### Installing and resolving dependencies
- `pnpm install` now fails with `ERR_PNPM_UNSUPPORTED_PROTOCOL` when a dependency uses a specifier with a protocol pnpm does not support, such as Yarn's `patch:`. On Windows, such a specifier failed with `os error 123`. On other platforms, pnpm linked it to a directory that does not exist. Reading a `package.json` that fails now names the file [#​16590](https://github.com/pnpm/pnpm/issues/16590).
- `pnpm install` now fails with `ERR_PNPM_PACKAGE_MANIFEST_INVALID_ATTRIBUTE` when a project declares a dependency whose specifier is not a string, such as `"is-positive": 42`. Before, the dependency was silently left out of the lockfile. A `readPackage` hook can still correct the specifier.
- Fixed `pnpm install` failing with `ERR_PNPM_CMD_SHIM_RESOLVE_PATH` when an executable's parent directory contains a dangling symlink.
- `pnpm install --frozen-lockfile` no longer fails with `ERR_PNPM_RESOLUTION_SHAPE_MISMATCH` when a `name@version` lockfile entry has a resolution served by a custom fetcher [pnpm/tasks#108](https://github.com/pnpm/tasks/issues/108).
- `pnpm install --fix-lockfile` repairs a lockfile whose importer references a package that has no snapshot entry, as left by a badly merged lockfile. It failed with `ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY` since 12.8.0 [#​16618](https://github.com/pnpm/pnpm/issues/16618).
- When a dependency moves an exact dependency of its own to an older version, a peer dependency that pnpm installed automatically now moves with it. Before, `pnpm install` and `pnpm dedupe` kept the newer locked version of the peer, so the lockfile held two copies of it, for example two copies of `vue` [pnpm/tasks#61](https://github.com/pnpm/tasks/issues/61).
- `pnpm dedupe` now reads registry metadata for a dependency pinned to an exact version, as `pnpm install` does. If the registry metadata disagreed with the package's `package.json`, the lockfile it wrote depended on whether `minimumReleaseAge` was set [#​16615](https://github.com/pnpm/pnpm/issues/16615).
##### Speed and size
- Dependency resolution reads cached registry metadata faster. The metadata cache moved to `<cache-dir>/v12/`, so the first install after upgrading downloads registry metadata again. A damaged cache entry is downloaded again, or reported as an error when `--offline` is set. `pnpm cache prune` also removes the metadata cache that older pnpm versions wrote under `<cache-dir>/v11/` [#​13512](https://github.com/pnpm/pnpm/pull/13512).
- Package metadata requests no longer wait behind queued tarball downloads when `maxSockets` or a proxy limits the connections to a registry. Large installs resolve faster and print fewer `Request took` warnings.
- Sped up installs in large workspaces on macOS when the dependency links already exist. pnpm now keeps a link that already points at the right package without trying to create it first. Relinking the direct dependencies of 1,000 workspace projects took 45 ms, down from 116 ms [pnpm/tasks#65](https://github.com/pnpm/tasks/issues/65).
- Commands in a project that pins a different pnpm version start about 13 ms faster on macOS. pnpm now runs the pinned version's binary directly, without the shell script in front of it [pnpm/tasks#66](https://github.com/pnpm/tasks/issues/66).
- The pnpm binary is about 0.9 MB smaller, and the arm64 Linux binary is about 1 MB smaller still.
##### Running scripts and commands
- `pnpm run` no longer prints `[ELIFECYCLE] Command failed ...` after Ctrl+C ends the script. pnpm still exits the way the script's shell did: on Windows with the shell's exit code (`cmd` reports `-1073741510`, PowerShell `1`), on Unix by re-raising `SIGINT` [#​16579](https://github.com/pnpm/pnpm/issues/16579).
- `pnpm run "/<regex>/"` now accepts JavaScript regular expression syntax such as lookahead and lookbehind. A selector like `"/^hello:(?!b).*$/"` failed with `ERR_PNPM_NO_SCRIPT` [#​16604](https://github.com/pnpm/pnpm/issues/16604).
- `pnpm run` and `pnpm exec` now forward `--config.*` command-line flags to the install started by `verifyDepsBeforeRun` [pnpm/tasks#60](https://github.com/pnpm/tasks/issues/60).
- On Windows, a process started by `pnpm run` or `pnpm exec` can again start a child with `CREATE_BREAKAWAY_FROM_JOB`. That child keeps running after pnpm exits, even if the command fails [#​16628](https://github.com/pnpm/pnpm/issues/16628).
- Empty `nodeOptions` values from command-line flags and environment variables now override lower-priority settings. Scripts retain `NODE_OPTIONS` from the parent environment or `extraEnv` when `nodeOptions` is empty.
- pnpm now reads the `failIfNoMatch` setting from `pnpm-workspace.yaml`, so a filter that matches no workspace project exits with code 1 when the setting is `true`. The new `--no-fail-if-no-match` flag turns the setting off for one command [#​16577](https://github.com/pnpm/pnpm/issues/16577).
##### Configuration, setup, and pnpm versions
- `pnpm config get --global` and `pnpm config list --global` now show only the global configuration, also when run inside a project. Settings from the project's `pnpm-workspace.yaml` and `.npmrc` were included before. The same applies to `--location=global` [#​16598](https://github.com/pnpm/pnpm/issues/16598).
- pnpm now prints config warnings, such as an unset environment variable in `.npmrc`, when loading the config fails.
- pnpm 11 releases older than 11.28.4 can run pnpm 12 again when the `packageManager` field pins it. Since 12.9.0 they failed with `SyntaxError: Invalid or unexpected token` [#​16594](https://github.com/pnpm/pnpm/issues/16594).
- On Windows, `pnpm self-update` no longer runs the update a second time when it replaces a `pnpm.cmd` linked by pnpm 12.8 or older. cmd.exe read on in the replaced `pnpm.cmd`, printed an error about a command that is not recognized, and ran the new pnpm once more [#​16573](https://github.com/pnpm/pnpm/issues/16573).
- `pnpm setup` now puts `$PNPM_HOME/bin` first on `PATH` in login shells that inherited it further down, such as the VS Code terminal on macOS. Before, another `node` took precedence over the one installed by `pnpm runtime set node -g`. Run `pnpm setup` again to update the block in your shell config [#​16635](https://github.com/pnpm/pnpm/issues/16635).
- `pnpm setup` now names the shell config file even if it is already up to date [#​16608](https://github.com/pnpm/pnpm/issues/16608).
##### Updating, auditing, and publishing
- `pnpm update --latest` now applies the `savePrefix` setting when it rewrites a dependency whose range has no operator of its own, such as `<2.0.0`.
- The interactive `pnpm audit --fix` picker now shows each patched version with the `saveExact` and `savePrefix` style that the override is written with [#​13209](https://github.com/pnpm/pnpm/issues/13209).
- `pnpm unpublish <pkg>@<version>` now deletes the tarball under the registry's path when the registry is served under one, such as Gitea's npm registry. It used to send the delete to the host root and report success without removing the version [#​16568](https://github.com/pnpm/pnpm/issues/16568). It also no longer mistakes a sibling path such as `/npm-mirror/` for the registry path `/npm/` [pnpm/tasks#94](https://github.com/pnpm/tasks/issues/94).
##### Output and messages
- A warning about a project's `devEngines` or `packageManager` pin is now printed to stderr. A command such as `pnpm cache path` or `pnpm list --json` keeps only its own output on stdout [#​16584](https://github.com/pnpm/pnpm/issues/16584).
- `pnpm list` now reports the correct package paths when `nodeLinker` is `hoisted` [#​9593](https://github.com/pnpm/pnpm/issues/9593).
- Resolution errors now name the failing dependency and its parent packages. Fatal errors appear as structured error records with their error codes when using `--reporter=ndjson`.
- The error for an invalid git repository in the lockfile now has the code `ERR_PNPM_INVALID_GIT_REPOSITORY`. Its message now lists every rejected form of the value.
- `pnpm runtime --help` and `pnpm help runtime` now name the `set` subcommand and the runtimes it accepts [#​16580](https://github.com/pnpm/pnpm/issues/16580).
<!-- sponsors -->
##### Platinum Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://bit.cloud/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/bit.svg" width="80" alt="Bit"></a>
</td>
<td align="center" valign="middle">
<a href="https://openai.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/openai_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/openai_light.svg" />
<img src="https://pnpm.io/img/users/openai_dark.svg" width="160" alt="OpenAI" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://notion.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/notion.svg" width="80" alt="Notion"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/coderabbit.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
<img src="https://pnpm.io/img/users/coderabbit.svg" width="220" alt="CodeRabbit" />
</picture>
</a>
</td>
</tr>
</tbody>
</table>
##### Gold Sponsors
<table>
<tbody>
<tr>
<td align="center" valign="middle">
<a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/sanity.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/sanity_light.svg" />
<img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/discord.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/discord_light.svg" />
<img src="https://pnpm.io/img/users/discord.svg" width="220" alt="Discord" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://vite.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/vitejs.svg" width="42" alt="Vite"></a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/serpapi_light.svg" />
<img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160" alt="SerpApi" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/stackblitz.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
<img src="https://pnpm.io/img/users/stackblitz.svg" width="190" alt="Stackblitz" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/workleap.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/workleap_light.svg" />
<img src="https://pnpm.io/img/users/workleap.svg" width="190" alt="Workleap" />
</picture>
</a>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nx.svg" />
<source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nx_light.svg" />
<img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
</picture>
</a>
</td>
<td align="center" valign="middle">
<a href="https://latitude.so/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/latitude.svg" width="160" alt="Latitude"></a>
</td>
</tr>
</tbody>
</table>
<!-- sponsors end -->
</details>
<details>
<summary>resend/react-email (react-email)</summary>
### [`v6.11.1`](https://github.com/resend/react-email/blob/HEAD/packages/react-email/CHANGELOG.md#6111)
[Compare Source](https://github.com/resend/react-email/compare/react-email@6.1…
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [@astrojs/markdown-remark](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/markdown/remark)) | [`7.3.1` → `7.3.2`](https://renovatebot.com/diffs/npm/@astrojs%2fmarkdown-remark/7.3.1/7.3.2) |  |  | | [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`7.3.5` → `7.3.6`](https://renovatebot.com/diffs/npm/astro/7.3.5/7.3.6) |  |  | --- ### Release Notes <details> <summary>withastro/astro (@​astrojs/markdown-remark)</summary> ### [`v7.3.2`](https://github.com/withastro/astro/blob/HEAD/packages/markdown/remark/CHANGELOG.md#732) [Compare Source](https://github.com/withastro/astro/compare/@astrojs/markdown-remark@7.3.1...@astrojs/markdown-remark@7.3.2) ##### Patch Changes - [#​18099](withastro/astro#18099) [`6987261`](withastro/astro@6987261) Thanks [@​renovate](https://github.com/apps/renovate)! - Adds YAML parsing with timestamp and merge key support, and formats YAML errors consistently across Astro, Markdown, MDX, and Markdoc. - [#​18139](withastro/astro#18139) [`d047b5c`](withastro/astro@d047b5c) Thanks [@​breken-ai](https://github.com/breken-ai)! - Fixes Markdown code blocks with languages ending in a symbol, such as `c#`, `c++`, and `f#`, being highlighted as `c` or `f` - Updated dependencies \[[`6987261`](withastro/astro@6987261), [`62b13ba`](withastro/astro@62b13ba)]: - [@​astrojs/internal-helpers](https://github.com/astrojs/internal-helpers)@0.12.0 </details> <details> <summary>withastro/astro (astro)</summary> ### [`v7.3.6`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#736) [Compare Source](https://github.com/withastro/astro/compare/astro@7.3.5...astro@7.3.6) ##### Patch Changes - [#​18166](withastro/astro#18166) [`5134d0f`](withastro/astro@5134d0f) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes an intermittent dev server crash when using `astro:actions` inside a server island with adapters that use a pre-bundled SSR environment (e.g. `@astrojs/cloudflare`) - [#​18076](withastro/astro#18076) [`8a2df66`](withastro/astro@8a2df66) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes stale scoped styles during HMR when both markup and `<style>` are changed in a single save - [#​18252](withastro/astro#18252) [`2d29e7e`](withastro/astro@2d29e7e) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes CSS from other pages leaking into a page's `<head>` in dev when the page imports a module such as `astro:config/server`. - [#​18000](withastro/astro#18000) [`6724575`](withastro/astro@6724575) Thanks [@​barclayd](https://github.com/barclayd)! - Fixes a bug where server islands containing framework components rendered empty in the dev server when using a custom `src/fetch.ts` - [#​18241](withastro/astro#18241) [`7c5fd6f`](withastro/astro@7c5fd6f) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes the composable `i18n()` handler from `astro/fetch` and `astro/hono` returning an empty 404 for paths without a locale prefix. It now renders the custom 404 page, matching `astro()`. - [#​18164](withastro/astro#18164) [`1a6997f`](withastro/astro@1a6997f) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes CSS Module HMR in dev when a component is rendered both with and without hydration on the same page. Astro now uses path-based class name hashing in dev mode so that editing CSS declarations no longer changes the generated selectors, allowing Vite's CSS HMR to update styles without a full page reload. - [#​18243](withastro/astro#18243) [`dd29d62`](withastro/astro@dd29d62) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes `context.props` being `null` in middleware and endpoints when the composable `astro/hono` or `astro/fetch` `actions()` handler runs before `middleware()`, or when `pages()` runs without `middleware()` - [#​18193](withastro/astro#18193) [`95d5d16`](withastro/astro@95d5d16) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes `astro build` failing on Windows with Node.js 25+ with `ERR_INVALID_ARG_VALUE` when clearing the output directory hits a transient `EPERM` error - [#​18220](withastro/astro#18220) [`d6c13a4`](withastro/astro@d6c13a4) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes type errors reported in Astro's built-in `<Picture />` and `<Font />` components when type-checking a project with `tsc` and `@astrojs/ts-content-mapper` - [#​18133](withastro/astro#18133) [`faac481`](withastro/astro@faac481) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes lost request state when Vite discovers server dependencies during a request in Cloudflare dev mode - [#​18146](withastro/astro#18146) [`2af4516`](withastro/astro@2af4516) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes CSS imported from an `injectScript('page')` script being dropped during build - [#​18159](withastro/astro#18159) [`e5f8fe0`](withastro/astro@e5f8fe0) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes a hang when a `server:defer` component is inside a slot of another component in an MDX content collection entry - [#​18246](withastro/astro#18246) [`c3b42ad`](withastro/astro@c3b42ad) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes the `glob()` loader skipping content files whose paths contain `#` or `?` - [#​18248](withastro/astro#18248) [`b97184e`](withastro/astro@b97184e) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes a bug where page routes added with `injectRoute()` returned a 404 when `i18n.routing.prefixDefaultLocale` was `true` and the route path had no locale prefix - [#​18251](withastro/astro#18251) [`3415263`](withastro/astro@3415263) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes content collection changes being ignored in `astro dev` after the dev server restarts because of a config change - [#​18226](withastro/astro#18226) [`ad54af0`](withastro/astro@ad54af0) Thanks [@​imharjot](https://github.com/imharjot)! - Fixes `Astro.cookies.get()` returning `undefined` for request cookies with empty values - [#​18155](withastro/astro#18155) [`37ab0e4`](withastro/astro@37ab0e4) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes nondeterministic ordering of the server manifest's `assets` array, ensuring builds with identical inputs produce byte-identical output - [#​18099](withastro/astro#18099) [`6987261`](withastro/astro@6987261) Thanks [@​renovate](https://github.com/apps/renovate)! - Adds YAML parsing with timestamp and merge key support, and formats YAML errors consistently across Astro, Markdown, MDX, and Markdoc. - [#​15595](withastro/astro#15595) [`64e4039`](withastro/astro@64e4039) Thanks [@​qzio](https://github.com/qzio)! - Improves CSRF protection by taking modern browsers headers into account - [#​18215](withastro/astro#18215) [`941bd5e`](withastro/astro@941bd5e) Thanks [@​ump45nose](https://github.com/ump45nose)! - Fixes a runtime `ReferenceError` for inlined scripts that import a URL with `/* @vite-ignore */`. Astro now inlines scripts after Vite replaces its preload markers, so ignored dynamic imports can remain inline without shipping an unresolved `__VITE_PRELOAD__` reference. - [#​18179](withastro/astro#18179) [`6caa659`](withastro/astro@6caa659) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes custom View Transition direction names that are not valid CSS identifiers, such as names starting with a digit or containing spaces. These directions now match their animations correctly. - [#​18250](withastro/astro#18250) [`7eae39b`](withastro/astro@7eae39b) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes a 404 for a CSS file that a dynamic import preloads when the imported module uses a component that is also a hydrated island on the same page - [#​18176](withastro/astro#18176) [`7c9d00d`](withastro/astro@7c9d00d) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes duplicate CSS in production builds when a component is both server-rendered and used with `client:only` on the same page - [#​18245](withastro/astro#18245) [`492e95f`](withastro/astro@492e95f) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes the composable `astro/fetch` and `astro/hono` handlers (`trailingSlash()`, `redirects()`, `actions()`, `middleware()`, and `pages()`) so they reject over-encoded request paths with a `400 Bad Request`, matching `astro()`. For these requests, `redirects()` and `actions()` return the `400` response instead of `undefined`, so no redirect is issued and no action runs. - [#​18078](withastro/astro#18078) [`0a2ab10`](withastro/astro@0a2ab10) Thanks [@​manuelgruber](https://github.com/manuelgruber)! - Fixes `Astro.rewrite()` and `context.rewrite()` selecting the wrong route in `astro dev` when two dynamic routes match the same path - [#​18210](withastro/astro#18210) [`62b13ba`](withastro/astro@62b13ba) Thanks [@​edmundhung](https://github.com/edmundhung)! - Allows Astro CLI commands to install tagged package versions - [#​18069](withastro/astro#18069) [`d39eb97`](withastro/astro@d39eb97) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes a dev server dependency scan failure when an `.astro` file contains a literal `<script` in frontmatter or a template expression - [#​18114](withastro/astro#18114) [`c17d920`](withastro/astro@c17d920) Thanks [@​matthewp](https://github.com/matthewp)! - Fixes Astro on StackBlitz and other WebContainer environments - [#​18088](withastro/astro#18088) [`cb767f9`](withastro/astro@cb767f9) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes a `MODULE_LEVEL_DIRECTIVE` warning during build caused by a stale `"use astro:head-inject"` directive in content collection propagated asset modules - [#​18247](withastro/astro#18247) [`2b3f73d`](withastro/astro@2b3f73d) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes actions returning 500 for malformed JSON request bodies and undecodable action names. A `SyntaxError` from invalid JSON now returns 400 (`BAD_REQUEST`), and a `URIError` from a malformed percent-encoded action name now returns 404 (`NOT_FOUND`). - [`1d9e910`](withastro/astro@1d9e910) Thanks [@​matthewp](https://github.com/matthewp)! - Validates the `Host` header against `security.allowedDomains` when using the Node adapter - [#​18249](withastro/astro#18249) [`c7799a4`](withastro/astro@c7799a4) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes the `fontsource` font provider to resolve variable fonts when using the "Variable" suffix in the font name (e.g. `"Inter Variable"`) - [#​18163](withastro/astro#18163) [`e48da9d`](withastro/astro@e48da9d) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes `<video muted>` losing its muted state after a ClientRouter navigation in Chrome - [#​18244](withastro/astro#18244) [`f67e7f7`](withastro/astro@f67e7f7) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes localized error pages such as `src/pages/pt/404.astro` returning a `200` status when rendered through the `pages()` handler from `astro/fetch` or `astro/hono` - [#​18242](withastro/astro#18242) [`c5275e3`](withastro/astro@c5275e3) Thanks [@​astro-factory](https://github.com/apps/astro-factory)! - Fixes `experimental_AstroContainer` output including dev toolbar `data-astro-source-file` and `data-astro-source-loc` attributes when rendering components under Vitest - Updated dependencies \[[`6987261`](withastro/astro@6987261), [`62b13ba`](withastro/astro@62b13ba)]: - [@​astrojs/internal-helpers](https://github.com/astrojs/internal-helpers)@0.12.0 - [@​astrojs/markdown-satteri](https://github.com/astrojs/markdown-satteri)@0.4.3 </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNDguNCIsInVwZGF0ZWRJblZlciI6IjQ0LjE0OC40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
…igin Since Astro 7.3.6 (withastro/astro#15595), the origin check reads Sec-Fetch-Site first and lets an unsafe form request through when it carries neither Sec-Fetch-Site nor Origin: that is not a browser, so there is no cross-site forgery to stop. The fixture still expected such a request to be rejected, so `bun test` has failed on main since the 7.3.8 bump (#109). The guard now pins what matters: a cross-site POST is refused by its Origin and by Sec-Fetch-Site, a browser's same-origin POST passes behind the proxy, and the header-less request passes as Astro intends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EFZr7o8YHwA5CjGXpoJcp (cherry picked from commit 352bf46)
…igin Since Astro 7.3.6 (withastro/astro#15595), the origin check reads Sec-Fetch-Site first and lets an unsafe form request through when it carries neither Sec-Fetch-Site nor Origin: that is not a browser, so there is no cross-site forgery to stop. The fixture still expected such a request to be rejected, so `bun test` has failed on main since the 7.3.8 bump (#109). The guard now pins what matters: a cross-site POST is refused by its Origin and by Sec-Fetch-Site, a browser's same-origin POST passes behind the proxy, and the header-less request passes as Astro intends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EFZr7o8YHwA5CjGXpoJcp (cherry picked from commit 352bf46)
…igin Since Astro 7.3.6 (withastro/astro#15595), the origin check reads Sec-Fetch-Site first and lets an unsafe form request through when it carries neither Sec-Fetch-Site nor Origin: that is not a browser, so there is no cross-site forgery to stop. The fixture still expected such a request to be rejected, so `bun test` has failed on main since the 7.3.8 bump (#109). The guard now pins what matters: a cross-site POST is refused by its Origin and by Sec-Fetch-Site, a browser's same-origin POST passes behind the proxy, and the header-less request passes as Astro intends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017EFZr7o8YHwA5CjGXpoJcp
Changes
Refactors the checkOrigin middleware to be a port of go's csrf protection.
Ref: https://cs.opensource.google/go/go/+/refs/tags/go1.26.0:src/net/http/csrf.go;l=206
Ref article by the one of go author: https://words.filippo.io/csrf/
Testing
One test was added to check the green path.
Docs
Since this PR don't change the
security.checkOriginvariable, no docs should need update.However, since the new implementation checks not only the origin, but also sec-fetch-site maybe the variable name should change?