Skip to content

Commit 8b95f2b

Browse files
chore: Update version for release (pre) (#10626)
* chore: Update version for release (pre) * Update changelogs --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Brophy <[email protected]>
1 parent d9b3941 commit 8b95f2b

File tree

14 files changed

+182
-31
lines changed

14 files changed

+182
-31
lines changed

.changeset/pre.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,17 @@
88
"react-router-native": "6.13.0",
99
"@remix-run/router": "1.6.3"
1010
},
11-
"changesets": []
11+
"changesets": [
12+
"blocker-key-strict-mode",
13+
"formdata-submitter",
14+
"purple-islands-cough",
15+
"raw-payload-submission-router",
16+
"raw-payload-submission",
17+
"skip-fetcher-revalidate",
18+
"smart-pots-repair",
19+
"strip-basename-getkey",
20+
"strip-blocker-basename",
21+
"sync-window-location",
22+
"tsc-skiplibcheck-react17"
23+
]
1224
}

.changeset/raw-payload-submission-router.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ router.navigate("/", {
1111
body: { key: "value" },
1212
});
1313

14-
function action({ request }) {
15-
// request.formData => FormData instance with entry [key=value]
16-
// request.text => "key=value"
14+
async function action({ request }) {
15+
// await request.formData() => FormData instance with entry [key=value]
1716
}
1817
```
1918

@@ -25,9 +24,8 @@ router.navigate("/", {
2524
body: { key: "value" },
2625
});
2726

28-
function action({ request }) {
29-
// request.json => { key: "value" }
30-
// request.text => '{ "key":"value" }'
27+
async function action({ request }) {
28+
// await request.json() => { key: "value" }
3129
}
3230
```
3331

@@ -38,7 +36,7 @@ router.navigate("/", {
3836
body: "Text submission",
3937
});
4038

41-
function action({ request }) {
42-
// request.text => "Text submission"
39+
async function action({ request }) {
40+
// await request.text() => "Text submission"
4341
}
4442
```

.changeset/raw-payload-submission.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"react-router-dom": minor
33
---
44

5-
Add support for `application/json` and `text/plain` encodings for `useSubmit`/`fetcher.submit`. To reflect these additional types, `useNavigation`/`useFetcher` now also contain `navigation.json`/`navigation.text` and `fetcher.json`/`fetcher.text` which are getter functions mimicking `request.json` and `request.text`. Just as a `Request` does, if you access one of these methods for the incorrect encoding type, it will throw an Error (i.e. accessing `navigation.formData` when `navigation.formEncType` is `application/json`).
5+
Add support for `application/json` and `text/plain` encodings for `useSubmit`/`fetcher.submit`. To reflect these additional types, `useNavigation`/`useFetcher` now also contain `navigation.json`/`navigation.text` and `fetcher.json`/`fetcher.text` which include the json/text submission if applicable.
66

77
```jsx
88
// The default behavior will still serialize as FormData
@@ -12,13 +12,11 @@ function Component() {
1212
submit({ key: "value" });
1313
// navigation.formEncType => "application/x-www-form-urlencoded"
1414
// navigation.formData => FormData instance
15-
// navigation.text => "key=value"
1615
}
1716

18-
function action({ request }) {
17+
async function action({ request }) {
1918
// request.headers.get("Content-Type") => "application/x-www-form-urlencoded"
20-
// request.formData => FormData instance
21-
// request.text => "key=value"
19+
// await request.formData() => FormData instance
2220
}
2321
```
2422

@@ -29,13 +27,11 @@ function Component() {
2927
submit({ key: "value" }, { encType: "application/json" });
3028
// navigation.formEncType => "application/json"
3129
// navigation.json => { key: "value" }
32-
// navigation.text => '{"key":"value"}'
3330
}
3431

35-
function action({ request }) {
32+
async function action({ request }) {
3633
// request.headers.get("Content-Type") => "application/json"
37-
// request.json => { key: "value" }
38-
// request.text => '{"key":"value"}'
34+
// await request.json => { key: "value" }
3935
}
4036
```
4137

@@ -48,8 +44,8 @@ function Component() {
4844
// navigation.text => "Text submission"
4945
}
5046

51-
function action({ request }) {
47+
async function action({ request }) {
5248
// request.headers.get("Content-Type") => "text/plain"
53-
// request.text => "Text submission"
49+
// await request.text() => "Text submission"
5450
}
5551
```

.changeset/smart-pots-repair.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
"@remix-run/router": patch
77
---
88

9-
upgrade typescript to 5.1
9+
Upgrade `typescript` to 5.1

packages/react-router-dom-v5-compat/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# `react-router-dom-v5-compat`
22

3+
## 6.14.0-pre.0
4+
5+
### Patch Changes
6+
7+
- upgrade typescript to 5.1 ([#10581](https://github.com/remix-run/react-router/pull/10581))
8+
- Updated dependencies:
9+
10+
11+
312
## 6.13.0
413

514
### Patch Changes

packages/react-router-dom-v5-compat/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-router-dom-v5-compat",
3-
"version": "6.13.0",
3+
"version": "6.14.0-pre.0",
44
"description": "Migration path to React Router v6 from v4/5",
55
"keywords": [
66
"react",
@@ -24,7 +24,7 @@
2424
"types": "./dist/index.d.ts",
2525
"dependencies": {
2626
"history": "^5.3.0",
27-
"react-router": "6.13.0"
27+
"react-router": "6.14.0-pre.0"
2828
},
2929
"peerDependencies": {
3030
"react": ">=16.8",

packages/react-router-dom/CHANGELOG.md

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

3+
## 6.14.0-pre.0
4+
5+
### Minor Changes
6+
7+
- Add support for `application/json` and `text/plain` encodings for `useSubmit`/`fetcher.submit`. To reflect these additional types, `useNavigation`/`useFetcher` now also contain `navigation.json`/`navigation.text` and `fetcher.json`/`fetcher.text` which include the json/text submission if applicable. ([#10413](https://github.com/remix-run/react-router/pull/10413))
8+
9+
```jsx
10+
// The default behavior will still serialize as FormData
11+
function Component() {
12+
let navigation = useNavigation();
13+
let submit = useSubmit();
14+
submit({ key: "value" });
15+
// navigation.formEncType => "application/x-www-form-urlencoded"
16+
// navigation.formData => FormData instance
17+
}
18+
19+
async function action({ request }) {
20+
// request.headers.get("Content-Type") => "application/x-www-form-urlencoded"
21+
// await request.formData() => FormData instance
22+
}
23+
```
24+
25+
```js
26+
// Opt-into JSON encoding with `encType: "application/json"`
27+
function Component() {
28+
let submit = useSubmit();
29+
submit({ key: "value" }, { encType: "application/json" });
30+
// navigation.formEncType => "application/json"
31+
// navigation.json => { key: "value" }
32+
}
33+
34+
async function action({ request }) {
35+
// request.headers.get("Content-Type") => "application/json"
36+
// await request.json => { key: "value" }
37+
}
38+
```
39+
40+
```js
41+
// Opt-into JSON encoding with `encType: "application/json"`
42+
function Component() {
43+
let submit = useSubmit();
44+
submit("Text submission", { encType: "text/plain" });
45+
// navigation.formEncType => "text/plain"
46+
// navigation.text => "Text submission"
47+
}
48+
49+
async function action({ request }) {
50+
// request.headers.get("Content-Type") => "text/plain"
51+
// await request.text() => "Text submission"
52+
}
53+
```
54+
55+
### Patch Changes
56+
57+
- When submitting a form from a `submitter` element, prefer the built-in `new FormData(form, submitter)` instead of the previous manual approach in modern browsers (those that support the new `submitter` parameter). For browsers that don't support it, we continue to just append the submit button's entry to the end, and we also add rudimentary support for `type="image"` buttons. If developers want full spec-compliant support for legacy browsers, they can use the `formdata-submitter-polyfill`. ([#9865](https://github.com/remix-run/react-router/pull/9865))
58+
- upgrade `typescript` to 5.1 ([#10581](https://github.com/remix-run/react-router/pull/10581))
59+
- Call `window.history.pushState/replaceState` before updating React Router state (instead of after) so that `window.location` matches `useLocation` during synchronous React 17 rendering. However, generally apps should not be relying on `window.location` and should always reference `useLocation` when possible, as `window.location` will not be in sync 100% of the time (due to `popstate` events, concurrent mode, etc.) ([#10211](https://github.com/remix-run/react-router/pull/10211))
60+
- Fix `tsc --skipLibCheck:false` issues on React 17 ([#10622](https://github.com/remix-run/react-router/pull/10622))
61+
- Updated dependencies:
62+
63+
- `@remix-run/[email protected]`
64+
365
## 6.13.0
466

567
### Minor Changes

packages/react-router-dom/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-router-dom",
3-
"version": "6.13.0",
3+
"version": "6.14.0-pre.0",
44
"description": "Declarative routing for React web applications",
55
"keywords": [
66
"react",
@@ -23,8 +23,8 @@
2323
"module": "./dist/index.js",
2424
"types": "./dist/index.d.ts",
2525
"dependencies": {
26-
"@remix-run/router": "1.6.3",
27-
"react-router": "6.13.0"
26+
"@remix-run/router": "1.7.0-pre.0",
27+
"react-router": "6.14.0-pre.0"
2828
},
2929
"devDependencies": {
3030
"react": "^18.2.0",

packages/react-router-native/CHANGELOG.md

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

3+
## 6.14.0-pre.0
4+
5+
### Patch Changes
6+
7+
- upgrade typescript to 5.1 ([#10581](https://github.com/remix-run/react-router/pull/10581))
8+
- Updated dependencies:
9+
10+
311
## 6.13.0
412

513
### Patch Changes

packages/react-router-native/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-router-native",
3-
"version": "6.13.0",
3+
"version": "6.14.0-pre.0",
44
"description": "Declarative routing for React Native applications",
55
"keywords": [
66
"react",
@@ -22,7 +22,7 @@
2222
"types": "./dist/index.d.ts",
2323
"dependencies": {
2424
"@ungap/url-search-params": "^0.1.4",
25-
"react-router": "6.13.0"
25+
"react-router": "6.14.0-pre.0"
2626
},
2727
"devDependencies": {
2828
"react": "^18.2.0",

packages/react-router/CHANGELOG.md

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

3+
## 6.14.0-pre.0
4+
5+
### Patch Changes
6+
7+
- Strip `basename` from locations provided to `unstable_useBlocker` functions to match `useLocation` ([#10573](https://github.com/remix-run/react-router/pull/10573))
8+
- Fix `generatePath` when passed a numeric `0` value parameter ([#10612](https://github.com/remix-run/react-router/pull/10612))
9+
- Fix `unstable_useBlocker` key issues in `StrictMode` ([#10573](https://github.com/remix-run/react-router/pull/10573))
10+
- Fix `tsc --skipLibCheck:false` issues on React 17 ([#10622](https://github.com/remix-run/react-router/pull/10622))
11+
- upgrade `typescript` to 5.1 ([#10581](https://github.com/remix-run/react-router/pull/10581))
12+
- Updated dependencies:
13+
- `@remix-run/[email protected]`
14+
315
## 6.13.0
416

517
### Minor Changes

packages/react-router/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-router",
3-
"version": "6.13.0",
3+
"version": "6.14.0-pre.0",
44
"description": "Declarative routing for React",
55
"keywords": [
66
"react",
@@ -23,7 +23,7 @@
2323
"module": "./dist/index.js",
2424
"types": "./dist/index.d.ts",
2525
"dependencies": {
26-
"@remix-run/router": "1.6.3"
26+
"@remix-run/router": "1.7.0-pre.0"
2727
},
2828
"devDependencies": {
2929
"react": "^18.2.0"

packages/router/CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,59 @@
11
# `@remix-run/router`
22

3+
## 1.7.0-pre.0
4+
5+
### Minor Changes
6+
7+
- Add support for `application/json` and `text/plain` encodings for `router.navigate`/`router.fetch` submissions. To leverage these encodings, pass your data in a `body` parameter and specify the desired `formEncType`: ([#10413](https://github.com/remix-run/react-router/pull/10413))
8+
9+
```js
10+
// By default, the encoding is "application/x-www-form-urlencoded"
11+
router.navigate("/", {
12+
formMethod: "post",
13+
body: { key: "value" },
14+
});
15+
16+
async function action({ request }) {
17+
let formData = await request.formData();
18+
// formData => FormData instance with entry [key=value]
19+
}
20+
```
21+
22+
```js
23+
// Pass `formEncType` to opt-into a different encoding
24+
router.navigate("/", {
25+
formMethod: "post",
26+
formEncType: "application/json",
27+
body: { key: "value" },
28+
});
29+
30+
async function action({ request }) {
31+
let json = await request.json();
32+
// json => { key: "value" }
33+
}
34+
```
35+
36+
```js
37+
router.navigate("/", {
38+
formMethod: "post",
39+
formEncType: "text/plain",
40+
body: "Text submission",
41+
});
42+
43+
async function action({ request }) {
44+
let text = await request.text();
45+
// text => "Text submission"
46+
}
47+
```
48+
49+
### Patch Changes
50+
51+
- Call `window.history.pushState/replaceState` before updating React Router state (instead of after) so that `window.location` matches `useLocation` during synchronous React 17 rendering. However, generally apps should not be relying on `window.location` and should always reference `useLocation` when possible, as `window.location` will not be in sync 100% of the time (due to `popstate` events, concurrent mode, etc.) ([#10211](https://github.com/remix-run/react-router/pull/10211))
52+
- Avoid calling `shouldRevalidate` for fetchers that have not yet completed a data load ([#10623](https://github.com/remix-run/react-router/pull/10623))
53+
- Strip `basename` from the `location` provided to `<ScrollRestoration getKey>` to match the `useLocation` behavior ([#10550](https://github.com/remix-run/react-router/pull/10550))
54+
- Fix `unstable_useBlocker` key issues in `StrictMode` ([#10573](https://github.com/remix-run/react-router/pull/10573))
55+
- Upgrade `typescript` to 5.1 ([#10581](https://github.com/remix-run/react-router/pull/10581))
56+
357
## 1.6.3
458

559
### Patch Changes

packages/router/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@remix-run/router",
3-
"version": "1.6.3",
3+
"version": "1.7.0-pre.0",
44
"description": "Nested/Data-driven/Framework-agnostic Routing",
55
"keywords": [
66
"remix",

0 commit comments

Comments
 (0)