Skip to content

Commit 916a3c4

Browse files
committed
Merge branch 'release-next'
2 parents 10322d5 + e75da95 commit 916a3c4

File tree

40 files changed

+958
-181
lines changed

40 files changed

+958
-181
lines changed

CHANGELOG.md

Lines changed: 156 additions & 109 deletions
Large diffs are not rendered by default.

contributors.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@
148148
- HelpMe-Pls
149149
- HenriqueLimas
150150
- hernanif1
151+
- HeyyyNeo
151152
- hi-ogawa
152153
- HK-SHAO
153154
- holynewbie
@@ -382,6 +383,7 @@
382383
- stasundr
383384
- stmtk1
384385
- sukvvon
386+
- sunnyraindy
385387
- swalker326
386388
- szhsin
387389
- tanayv

docs/how-to/navigation-blocking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ If the user clicks "leave" then `blocker.proceed()` will proceed with the naviga
166166

167167
## 5. Reset the blocker when the action resolves
168168

169-
If the user doesn't click either "leave" or "stay here", then then submits the form, the blocker will still be active. Let's reset the blocker when the action resolves with an effect.
169+
If the user doesn't click either "leave" or "stay here", then submits the form, the blocker will still be active. Let's reset the blocker when the action resolves with an effect.
170170

171171
```tsx filename=routes/contact.tsx
172172
useEffect(() => {

integration/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Minor Changes
66

77
- Unstable Vite support for Node-based Remix apps ([#7590](https://github.com/remix-run/remix/pull/7590))
8+
89
- `remix build` 👉 `vite build && vite build --ssr`
910
- `remix dev` 👉 `vite dev`
1011

integration/http-test.ts

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
import { test, expect } from "@playwright/test";
2+
3+
import { UNSAFE_ServerMode as ServerMode } from "react-router";
4+
import { createFixture, js } from "./helpers/create-fixture.js";
5+
import type { Fixture } from "./helpers/create-fixture.js";
6+
7+
test.describe("HTTP behavior", () => {
8+
let appFixture: Fixture;
9+
10+
test.beforeAll(async () => {
11+
appFixture = await createFixture({
12+
files: {
13+
"app/root.tsx": js`
14+
import { Links, Meta, Outlet, Scripts } from "react-router";
15+
16+
export default function Root() {
17+
return (
18+
<html lang="en">
19+
<head>
20+
<Meta />
21+
<Links />
22+
</head>
23+
<body>
24+
<Outlet />
25+
<Scripts />
26+
</body>
27+
</html>
28+
);
29+
}
30+
`,
31+
32+
"app/routes/_index.tsx": js`
33+
import { data } from "react-router";
34+
35+
export function loader() {
36+
return data("INDEX", { status: 202 })
37+
}
38+
39+
export default function Index() {
40+
return <div>Heyo!</div>
41+
}
42+
`,
43+
44+
"app/routes/resource.tsx": js`
45+
export function loader() {
46+
return new Response("RESOURCE", { status: 202 })
47+
}
48+
`,
49+
},
50+
});
51+
});
52+
53+
test("includes body on GET request", async () => {
54+
let response = await appFixture.requestDocument("/");
55+
expect(response.status).toBe(202);
56+
expect(await response.text()).toContain("<div>Heyo!</div>");
57+
58+
response = await appFixture.requestResource("/resource");
59+
expect(response.status).toBe(202);
60+
expect(await response.text()).toBe("RESOURCE");
61+
62+
let singleFetchResponse =
63+
await appFixture.requestSingleFetchData("/_root.data");
64+
expect(response.status).toBe(202);
65+
expect(singleFetchResponse.data).toEqual({
66+
"routes/_index": { data: "INDEX" },
67+
});
68+
});
69+
70+
test("does not include body on HEAD request", async () => {
71+
let response = await appFixture.requestDocument("/", { method: "HEAD" });
72+
expect(response.status).toBe(202);
73+
expect(response.body).toBe(null);
74+
75+
response = await appFixture.requestResource("/resource", {
76+
method: "HEAD",
77+
});
78+
expect(response.status).toBe(202);
79+
expect(response.body).toBe(null);
80+
81+
let singleFetchResponse = await appFixture.requestSingleFetchData(
82+
"/_root.data",
83+
{ method: "HEAD" },
84+
);
85+
expect(response.status).toBe(202);
86+
expect(singleFetchResponse.data).toBe(null);
87+
});
88+
});

packages/create-react-router/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# `create-react-router`
22

3+
## 7.9.6
4+
35
## 7.9.5
46

57
## 7.9.4

packages/create-react-router/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-react-router",
3-
"version": "7.9.5",
3+
"version": "7.9.6",
44
"description": "Create a new React Router app",
55
"homepage": "https://reactrouter.com",
66
"bugs": {

packages/react-router-architect/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# `@react-router/architect`
22

3+
## 7.9.6
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
- `react-router@7.9.6`
9+
- `@react-router/node@7.9.6`
10+
311
## 7.9.5
412

513
### Patch Changes
@@ -47,6 +55,7 @@
4755
- Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))
4856

4957
We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:
58+
5059
- [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
5160
- [`createContext`](https://reactrouter.com/api/utils/createContext)
5261
- `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
@@ -270,6 +279,7 @@
270279
### Major Changes
271280

272281
- For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837))
282+
273283
- `createCookie`
274284
- `createCookieSessionStorage`
275285
- `createMemorySessionStorage`
@@ -278,6 +288,7 @@
278288
For consumers running older versions of Node, the `installGlobals` function from `@remix-run/node` has been updated to define `globalThis.crypto`, using [Node's `require('node:crypto').webcrypto` implementation.](https://nodejs.org/api/webcrypto.html)
279289

280290
Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:
291+
281292
- `createCookieFactory`
282293
- `createSessionStorageFactory`
283294
- `createCookieSessionStorageFactory`

packages/react-router-architect/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-router/architect",
3-
"version": "7.9.5",
3+
"version": "7.9.6",
44
"description": "Architect server request handler for React Router",
55
"bugs": {
66
"url": "https://github.com/remix-run/react-router/issues"

packages/react-router-cloudflare/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# `@react-router/cloudflare`
22

3+
## 7.9.6
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
- `react-router@7.9.6`
9+
310
## 7.9.5
411

512
### Patch Changes
@@ -42,6 +49,7 @@
4249
- Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))
4350

4451
We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:
52+
4553
- [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
4654
- [`createContext`](https://reactrouter.com/api/utils/createContext)
4755
- `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
@@ -240,6 +248,7 @@
240248

241249
- For Remix consumers migrating to React Router, all exports from `@remix-run/cloudflare-pages` are now provided for React Router consumers in the `@react-router/cloudflare` package. There is no longer a separate package for Cloudflare Pages. ([#11801](https://github.com/remix-run/react-router/pull/11801))
242250
- For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837))
251+
243252
- `createCookie`
244253
- `createCookieSessionStorage`
245254
- `createMemorySessionStorage`
@@ -248,6 +257,7 @@
248257
For consumers running older versions of Node, the `installGlobals` function from `@remix-run/node` has been updated to define `globalThis.crypto`, using [Node's `require('node:crypto').webcrypto` implementation.](https://nodejs.org/api/webcrypto.html)
249258

250259
Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:
260+
251261
- `createCookieFactory`
252262
- `createSessionStorageFactory`
253263
- `createCookieSessionStorageFactory`

0 commit comments

Comments
 (0)