Skip to content

Commit 4372b39

Browse files
committed
Merge branch 'main' into release-6.4.4
2 parents 0729641 + f3d3e05 commit 4372b39

27 files changed

+1814
-293
lines changed

.github/workflows/postrelease.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: 🕊 Post-release
2+
3+
on:
4+
push:
5+
tags:
6+
# only run on `react-router` tags
7+
- "react-router@*"
8+
9+
jobs:
10+
comment:
11+
name: 📝 Comment on related issues and pull requests
12+
if: github.repository == 'remix-run/react-router'
13+
uses: ./.github/workflows/release-comments.yml
14+
with:
15+
ref: ${{ github.ref }}
16+
# this should match the above tag to watch excluding the trailing "@"
17+
packageVersionToFollow: "react-router"

.github/workflows/release-comments.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
ref:
77
required: true
88
type: string
9+
packageVersionToFollow:
10+
required: true
11+
type: string
912

1013
jobs:
1114
comment:
@@ -20,16 +23,20 @@ jobs:
2023
uses: actions/setup-node@v3
2124
with:
2225
node-version-file: ".nvmrc"
23-
cache: "yarn"
26+
cache: "npm"
27+
cache-dependency-path: scripts/release/package-lock.json
2428

2529
- name: 📥 Install deps
26-
# even though this is called "npm-install" it does use yarn to install
27-
# because we have a yarn.lock and caches efficiently.
28-
uses: bahmutov/npm-install@v1
30+
run: npm ci
31+
working-directory: ./scripts/release
2932

3033
- name: 📝 Comment on issues
31-
run: node ./scripts/release/comment.mjs
34+
working-directory: ./scripts/release
35+
run: node -r esbuild-register ./comment.ts
3236
env:
3337
GITHUB_REPOSITORY: ${{ github.repository }}
3438
GITHUB_TOKEN: ${{ github.token }}
3539
VERSION: ${{ inputs.ref }}
40+
DEFAULT_BRANCH: "main"
41+
NIGHTLY_BRANCH: "dev"
42+
PACKAGE_VERSION_TO_FOLLOW: ${{ inputs.packageVersionToFollow }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
publish: yarn release
5656
createGithubReleases: false
5757
env:
58-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN_SO_OTHER_ACTIONS_RUN }}
5959
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6060

6161
# comment:

DEVELOPMENT.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ You may need to make changes to a pre-release prior to publishing a final stable
3737
- Commit the unpublished changesets and push the the `release-*` branch to GitHub; wait for the release workflow to finish and the Changesets action to open its PR that will increment all versions to stable
3838
- Review the updated `CHANGELOG` files and make any adjustments necessary, then merge the PR
3939
- Once the PR is merged, the release workflow will publish the updated packages to npm
40+
- Once the release is published:
41+
- merge the `release-*` branch into `main` and push it up to github
42+
- merge the `release-*` branch into `dev` and push it up to github
43+
- Convert the `[email protected]` tag to a Release on Github with the name `v6.x.y`
44+
- Copy the relevant changelog entries from all packages into the Release Notes and adjust accordingly, matching the format used by prior releases
4045

4146
### Experimental releases
4247

contributors.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- abdallah-nour
22
- abhi-kr-2100
3-
- adamdotjs
43
- AchThomas
4+
- adamdotjs
55
- Ajayff4
66
- alany411
77
- alexlbr
@@ -18,6 +18,7 @@
1818
- brockross
1919
- brophdawg11
2020
- btav
21+
- bvangraafeiland
2122
- CanRau
2223
- chaance
2324
- chasinhues
@@ -31,6 +32,8 @@
3132
- danielberndt
3233
- dauletbaev
3334
- david-crespo
35+
- DigitalNaut
36+
- dmitrytarassov
3437
- dokeet
3538
- Drishtantr
3639
- edwin177
@@ -57,10 +60,12 @@
5760
- infoxicator
5861
- IsaiStormBlesed
5962
- Isammoc
63+
- ivanjeremic
6064
- jacob-ebey
6165
- JaffParker
6266
- JakubDrozd
6367
- janpaepke
68+
- jasonpaulos
6469
- jimniels
6570
- jmargeta
6671
- johnpangalos
@@ -76,14 +81,17 @@
7681
- KostiantynPopovych
7782
- KutnerUri
7883
- latin-1
84+
- lequangdongg
7985
- liuhanqu
86+
- lopezac
8087
- loun4
8188
- lqze
8289
- lukerSpringTree
8390
- Manc
8491
- manzano78
8592
- marc2332
8693
- markivancho
94+
- maruffahmed
8795
- marvinruder
8896
- maxpou
8997
- mcansh
@@ -92,9 +100,11 @@
92100
- MichaelDeBoey
93101
- michal-antczak
94102
- minami-minami
103+
- modex98
95104
- morleytatro
96105
- ms10596
97106
- noisypigeon
107+
- omar-moquete
98108
- p13i
99109
- parched
100110
- paulsmithkc
@@ -129,6 +139,7 @@
129139
- tyankatsu0105
130140
- underager
131141
- vijaypushkin
142+
- vishwast03
132143
- vikingviolinist
133144
- willemarcel
134145
- williamsdyyz

docs/components/await.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ import {
108108
defer,
109109
Route,
110110
useLoaderData,
111-
Async,
111+
Await,
112112
} from "react-router-dom";
113113

114114
// given this route

docs/components/form.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ The method will be available on [`request.method`][requestmethod] inside the rou
128128
path="/projects/:id"
129129
element={<Project />}
130130
loader={async ({ params }) => {
131-
return fakeLoadProject(params.id)
131+
return fakeLoadProject(params.id);
132132
}}
133133
action={async ({ request, params }) => {
134134
switch (request.method) {
@@ -140,8 +140,8 @@ The method will be available on [`request.method`][requestmethod] inside the rou
140140
case "delete": {
141141
return fakeDeleteProject(params.id);
142142
}
143-
default {
144-
throw new Response("", { status: 405 })
143+
default: {
144+
throw new Response("", { status: 405 });
145145
}
146146
}
147147
}}

docs/guides/deferred.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export default function PackageRoute() {
112112
113113
If you're not jazzed about bringing back render props, you can use a hook, but you'll have to break things out into another component:
114114
115-
```jsx lines=[21]
115+
```jsx lines=[11, 16, 23-31]
116116
export default function PackageRoute() {
117117
const data = useLoaderData();
118118
@@ -205,6 +205,6 @@ So just keep this in mind: **Deferred is 100% only about the initial load of a r
205205
206206
[link]: ../components/link
207207
[usefetcher]: ../hooks/use-fetcher
208-
[defer response]: ../fetch/defer
208+
[defer response]: ../utils/defer
209209
[await]: ../components/await
210-
[useasyncvalue]: ../hooks/use-async-data
210+
[useasyncvalue]: ../hooks/use-async-value

docs/hooks/use-outlet-context.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function Parent() {
2424
}
2525
```
2626

27-
```tsx lines=[2]
27+
```tsx lines=[4]
2828
import { useOutletContext } from "react-router-dom";
2929

3030
function Child() {
@@ -36,7 +36,7 @@ function Child() {
3636

3737
If you're using TypeScript, we recommend the parent component provide a custom hook for accessing the context value. This makes it easier for consumers to get nice typings, control consumers, and know who's consuming the context value. Here's a more realistic example:
3838

39-
```tsx filename=src/routes/dashboard.tsx lines=[12,17-19]
39+
```tsx filename=src/routes/dashboard.tsx lines=[13, 19]
4040
import * as React from "react";
4141
import type { User } from "./types";
4242
import { Outlet, useOutletContext } from "react-router-dom";

docs/hooks/use-route-error.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ new: true
55

66
# `useRouteError`
77

8-
Inside of an [`errorElement`][errorelement], this hooks returns anything thrown during an action, loader, or rendering. Note that thrown responses have special treatment, see [`isRouteErrorResponse`][isrouteerrorresponse] for more information.
8+
Inside of an [`errorElement`][errorelement], this hook returns anything thrown during an action, loader, or rendering. Note that thrown responses have special treatment, see [`isRouteErrorResponse`][isrouteerrorresponse] for more information.
99

1010
<docs-warning>This feature only works if using a data router, see [Picking a Router][pickingarouter]</docs-warning>
1111

docs/route/error-element.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ When a route does not have an `errorElement`, errors will bubble up through pare
4040

4141
Put an `errorElement` at the top of your route tree and handle nearly every error in your app in one place. Or, put them on all of your routes and allow the parts of the app that don't have errors to continue to render normally. This gives the user more options to recover from errors instead of a hard refresh and 🤞.
4242

43+
### Default Error Element
44+
45+
<docs-warning>We recommend _always_ providing at least a root-level `errorElement` before shipping your application to production, because the UI of the default `errorElement` is ugly and not intended for end-user consumption.</docs-warning>
46+
47+
If you do not provide an `errorElement` in your route tree to handle a given error, errors will bubble up and be handled by a default `errorElement` which will print the error message and stack trace. Some folks have questioned why the stack trace shows up in production builds. Normally, you don't want to expose stack traces on your production sites for security reasons. However, this is more applicable to server-side errors (and Remix does indeed strip stack traces from server-side loader/action responses). In the case of client-side `react-router-dom` applications the code is already available in the browser anyway so any hiding is just security through obscurity. Furthermore, we would still want to expose the error in the console, so removing it from the UI display is still not hiding any information about the stack trace. Not showing it in the UI _and_ not logging it to to the console would mean that application developers have no information _at all_ about production bugs, which poses its own set of issues. So, again we recommend you always add a root level `errorElement` before deploying your site to production!
48+
4349
## Throwing Manually
4450

4551
While `errorElement` handles unexpected errors, it can also be used to handle exceptions you expect.

docs/route/loader.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Note that the APIs here are not React Router specific, but rather standard web o
8989

9090
While you can return anything you want from a loader and get access to it from [`useLoaderData`][useloaderdata], you can also return a web [Response][response].
9191

92-
This might not seem immediately useful, but consider `fetch`. Since the return value of of `fetch` is a Response, and loaders understand responses, many loaders can return a simple fetch!
92+
This might not seem immediately useful, but consider `fetch`. Since the return value of `fetch` is a Response, and loaders understand responses, many loaders can return a simple fetch!
9393

9494
```tsx
9595
// an HTTP/REST API

docs/route/should-revalidate.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ interface ShouldRevalidateFunction {
7575
[action]: ./action
7676
[form]: ../components/form
7777
[fetcher]: ../hooks/use-fetcher
78+
[usesubmit]: ../hooks/use-submit
7879
[loader]: ./loader
7980
[useloaderdata]: ../hooks/use-loader-data
8081
[params]: ./route#dynamic-segments

docs/start/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ We'll create new contacts by exporting an `action` in our root route, wiring it
595595

596596
👉 **Create the action and change `<form>` to `<Form>`**
597597

598-
```jsx filename=src/routes/root.jsx lines=[5,7,9-11,22-24]
598+
```jsx filename=src/routes/root.jsx lines=[5,7,9-11,22-25]
599599
import {
600600
Outlet,
601601
Link,
@@ -1830,7 +1830,7 @@ If you click the button now you should see the star _immediately_ change to the
18301830

18311831
## Not Found Data
18321832

1833-
What happens if the contact we're trying load doesn't exist?
1833+
What happens if the contact we're trying to load doesn't exist?
18341834

18351835
<img loading="lazy" class="tutorial" src="/_docs/tutorial/25.webp" />
18361836

docs/upgrading/v5.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,8 +922,8 @@ import { matchPath } from "react-router-dom";
922922
const match = matchPath(
923923
{
924924
path: "/users/:id",
925-
caseSensitive: false, // Optional. Should be `true` if the static portions of the `path` should be matched in the same case.
926-
end: true, // Optional. Should be `true` if this pattern should match the entire URL pathname
925+
caseSensitive: false, // Optional, `true` == static parts of `path` should match case
926+
end: true, // Optional, `true` == pattern should match the entire URL pathname
927927
},
928928
"/users/123"
929929
);

scripts/release/comment.mjs

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)