Skip to content

Commit 6d542b9

Browse files
committed
Merge branch 'release-next'
2 parents c9dc2d5 + 49e7664 commit 6d542b9

File tree

42 files changed

+419
-11274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+419
-11274
lines changed

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ node_modules/
33
pnpm-lock.yaml
44
/docs/api
55
examples/**/dist/
6-
/integration/helpers/vite-plugin-cloudflare-template/worker-configuration.d.ts
6+
worker-configuration.d.ts
77
/playground/
88
/playground-local/
99
packages/**/dist/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ node_modules/
3030
.tmp
3131
tsup.config.bundled_*.mjs
3232
build.utils.d.ts
33+
worker-configuration.d.ts
3334
/.env
3435
/NOTES.md
3536

CHANGELOG.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ We manage release notes in this file instead of the paginated Github Releases Pa
1313
<summary>Table of Contents</summary>
1414

1515
- [React Router Releases](#react-router-releases)
16+
- [v7.6.2](#v762)
17+
- [Patch Changes](#patch-changes)
1618
- [v7.6.1](#v761)
1719
- [Patch Changes](#patch-changes)
1820
- [Unstable Changes](#unstable-changes)
@@ -337,6 +339,78 @@ Date: YYYY-MM-DD
337339
**Full Changelog**: [`v7.X.Y...v7.X.Y`](https://github.com/remix-run/react-router/compare/[email protected]@7.X.Y)
338340
-->
339341

342+
## v7.6.2
343+
344+
Date: 2025-06-03
345+
346+
### Patch Changes
347+
348+
- `create-react-router` - Update `tar-fs` ([#13675](https://github.com/remix-run/react-router/pull/13675))
349+
- `react-router` - (INTERNAL) Slight refactor of internal `headers()` function processing for use with RSC ([#13639](https://github.com/remix-run/react-router/pull/13639))
350+
- `react-router` `@react-router/dev` - Avoid additional `with-props` chunk in Framework Mode by moving route module component prop logic from the Vite plugin to `react-router` ([#13650](https://github.com/remix-run/react-router/pull/13650))
351+
- `@react-router/dev` - When `future.unstable_viteEnvironmentApi` is enabled and an absolute Vite `base` has been configured, ensure critical CSS is handled correctly during development ([#13598](https://github.com/remix-run/react-router/pull/13598))
352+
- `@react-router/dev` - Update `vite-node` ([#13673](https://github.com/remix-run/react-router/pull/13673))
353+
- `@react-router/dev` - Fix typegen for non-{.js,.jsx,.ts,.tsx} routes like .mdx ([#12453](https://github.com/remix-run/react-router/pull/12453))
354+
- `@react-router/dev` - Fix href types for optional dynamic params ([#13725](https://github.com/remix-run/react-router/pull/13725))
355+
356+
7.6.1 introduced fixes for `href` when using optional static segments,
357+
but those fixes caused regressions with how optional dynamic params worked in 7.6.0:
358+
359+
```ts
360+
// 7.6.0
361+
href("/users/:id?"); // ✅
362+
href("/users/:id?", { id: 1 }); // ✅
363+
364+
// 7.6.1
365+
href("/users/:id?"); // ❌
366+
href("/users/:id?", { id: 1 }); // ❌
367+
```
368+
369+
Now, optional static segments are expanded into different paths for `href`, but optional dynamic params are not.
370+
This way `href` can unambiguously refer to an exact URL path, all while keeping the number of path options to a minimum.
371+
372+
```ts
373+
// 7.6.2
374+
375+
// path: /users/:id?/edit?
376+
href("
377+
// ^ suggestions when cursor is here:
378+
//
379+
// /users/:id?
380+
// /users/:id?/edit
381+
```
382+
383+
Additionally, you can pass `params` from component props without needing to narrow them manually:
384+
385+
```ts
386+
declare const params: { id?: number };
387+
388+
// 7.6.0
389+
href("/users/:id?", params);
390+
391+
// 7.6.1
392+
href("/users/:id?", params); // ❌
393+
"id" in params ? href("/users/:id", params) : href("/users"); // works... but is annoying
394+
395+
// 7.6.2
396+
href("/users/:id?", params); // restores behavior of 7.6.0
397+
```
398+
399+
### Changes by Package
400+
401+
- [`create-react-router`](https://github.com/remix-run/react-router/blob/react-router%407.6.2/packages/create-react-router/CHANGELOG.md#762)
402+
- [`react-router`](https://github.com/remix-run/react-router/blob/react-router%407.6.2/packages/react-router/CHANGELOG.md#762)
403+
- [`@react-router/architect`](https://github.com/remix-run/react-router/blob/react-router%407.6.2/packages/react-router-architect/CHANGELOG.md#762)
404+
- [`@react-router/cloudflare`](https://github.com/remix-run/react-router/blob/react-router%407.6.2/packages/react-router-cloudflare/CHANGELOG.md#762)
405+
- [`@react-router/dev`](https://github.com/remix-run/react-router/blob/react-router%407.6.2/packages/react-router-dev/CHANGELOG.md#762)
406+
- [`@react-router/express`](https://github.com/remix-run/react-router/blob/react-router%407.6.2/packages/react-router-express/CHANGELOG.md#762)
407+
- [`@react-router/fs-routes`](https://github.com/remix-run/react-router/blob/react-router%407.6.2/packages/react-router-fs-routes/CHANGELOG.md#762)
408+
- [`@react-router/node`](https://github.com/remix-run/react-router/blob/react-router%407.6.2/packages/react-router-node/CHANGELOG.md#762)
409+
- [`@react-router/remix-config-routes-adapter`](https://github.com/remix-run/react-router/blob/react-router%407.6.2/packages/react-router-remix-config-routes-adapter/CHANGELOG.md#762)
410+
- [`@react-router/serve`](https://github.com/remix-run/react-router/blob/react-router%407.6.2/packages/react-router-serve/CHANGELOG.md#762)
411+
412+
**Full Changelog**: [`v7.6.1...v7.6.2`](https://github.com/remix-run/react-router/compare/[email protected]@7.6.2)
413+
340414
## v7.6.1
341415

342416
Date: 2025-05-25

contributors.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,13 @@
6666
- chaance
6767
- chasinhues
6868
- chensokheng
69+
- chr33s
6970
- chrisngobanh
7071
- christopherchudzicki
7172
- ChristophP
7273
- christowiz
7374
- clavery
75+
- clonemycode
7476
- Cmoen11
7577
- codeape2
7678
- coryhouse
@@ -258,6 +260,7 @@
258260
- Nismit
259261
- nnhjs
260262
- noisypigeon
263+
- nowells
261264
- Nurai1
262265
- Obi-Dann
263266
- OlegDev1

integration/error-sanitization-test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ test.describe("Error Sanitization", () => {
212212
expect(html).toMatch("Defer Route");
213213
expect(html).toMatch("RESOLVED");
214214
expect(html).not.toMatch("MESSAGE:");
215-
// Defer errors are not not part of the JSON blob but rather rejected
215+
// Defer errors are not part of the JSON blob but rather rejected
216216
// against a pending promise and therefore are inlined JS.
217217
expect(html).not.toMatch("x.stack=e.stack;");
218218
});
@@ -608,7 +608,7 @@ test.describe("Error Sanitization", () => {
608608
expect(html).toMatch("Defer Route");
609609
expect(html).toMatch("RESOLVED");
610610
expect(html).not.toMatch("MESSAGE:");
611-
// Defer errors are not not part of the JSON blob but rather rejected
611+
// Defer errors are not part of the JSON blob but rather rejected
612612
// against a pending promise and therefore are inlined JS.
613613
expect(html).not.toMatch("x.stack=e.stack;");
614614
});

integration/helpers/vite-plugin-cloudflare-template/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"scripts": {
88
"dev": "react-router dev",
99
"build": "react-router build",
10-
"typecheck": "wrangler types && react-router typegen && tsc"
10+
"typegen": "wrangler types && react-router typegen",
11+
"typecheck": "pnpm typegen && tsc"
1112
},
1213
"dependencies": {
1314
"express": "^4.19.2",

0 commit comments

Comments
 (0)