Skip to content

Commit 0252132

Browse files
committed
Merge branch 'main' into release-next
2 parents f92aa2e + 393c30e commit 0252132

Some content is hidden

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

44 files changed

+1875
-1988
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ body:
2323
2424
### Test Case Starters:
2525
26-
* [Using `<RouterProvider>`](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/data-router?file=src/App.tsx)
26+
* [Using `<RouterProvider>`](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/basic-data-router?file=src/app.tsx)
2727
* [Using `<BrowserRouter>`](https://stackblitz.com/github/remix-run/react-router/tree/main/examples/basic?file=src/App.tsx)
2828
- type: input
2929
attributes:

.github/workflows/no-response.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,27 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: 🥺 Handle Ghosting
18-
uses: actions/stale@v7
18+
uses: actions/stale@v8
1919
with:
20-
days-before-close: 10
2120
close-issue-message: >
22-
This issue has been automatically closed because we haven't received a
23-
response from the original author 🙈. This automation helps keep the issue
24-
tracker clean from issues that aren't actionable. Please reach out if you
25-
have more information for us! 🙂
21+
This issue has been automatically closed because we didn't hear
22+
anything from the original author after the previous notice.
2623
close-pr-message: >
27-
This PR has been automatically closed because we haven't received a
28-
response from the original author 🙈. This automation helps keep the issue
29-
tracker clean from PRs that aren't actionable. Please reach out if you
30-
have more information for us! 🙂
31-
# don't automatically mark issues/PRs as stale
32-
days-before-stale: -1
24+
This PR has been automatically closed because we didn't hear
25+
anything from the original author after the previous notice.
3326
stale-issue-label: needs-response
27+
stale-issue-message: >
28+
This issue has been automatically marked stale because we haven't
29+
received a response from the original author in a while 🙈. This
30+
automation helps keep the issue tracker clean from issues that are
31+
not actionable. Please reach out if you have more information for us
32+
or you think this issue shouldn't be closed! 🙂 If you don't do so
33+
within 7 days, this issue will be automatically closed.
3434
stale-pr-label: needs-response
35+
stale-pr-message: >
36+
This PR has been automatically marked stale because we haven't
37+
received a response from the original author in a while 🙈. This
38+
automation helps keep the issue tracker clean from issues that are
39+
not actionable. Please reach out if you have more information for us
40+
or you think this issue shouldn't be closed! 🙂 If you don't do so
41+
within 7 days, this PR will be automatically closed.

.github/workflows/release-comments.yml

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,20 @@ name: 📝 Comment on Release
22

33
on:
44
workflow_call:
5-
inputs:
6-
ref:
7-
required: true
8-
type: string
9-
package_version_to_follow:
10-
required: true
11-
type: string
12-
release_branch:
13-
required: true
14-
type: string
155

166
jobs:
177
comment:
18-
name: Comment on Release
8+
name: 📝 Comment on related issues and pull requests
199
if: github.repository == 'remix-run/react-router'
2010
runs-on: ubuntu-latest
2111
steps:
2212
- name: ⬇️ Checkout repo
2313
uses: actions/checkout@v3
24-
25-
- name: ⎔ Setup node
26-
uses: actions/setup-node@v3
2714
with:
28-
node-version-file: ".nvmrc"
29-
cache: "npm"
30-
cache-dependency-path: scripts/release/package-lock.json
31-
32-
- name: 📥 Install deps
33-
run: npm ci
34-
working-directory: ./scripts/release
15+
fetch-depth: 0
3516

36-
- name: 📝 Comment on issues
37-
working-directory: ./scripts/release
38-
run: node -r esbuild-register ./comment.ts
39-
env:
40-
GITHUB_REPOSITORY: ${{ github.repository }}
41-
GITHUB_TOKEN: ${{ github.token }}
42-
VERSION: ${{ inputs.ref }}
43-
DEFAULT_BRANCH: "main"
44-
RELEASE_BRANCH: ${{ inputs.release_branch }}
45-
PACKAGE_VERSION_TO_FOLLOW: ${{ inputs.package_version_to_follow }}
17+
- name: 📝 Comment on related issues and pull requests
18+
uses: mcansh/[email protected]
19+
with:
20+
DIRECTORY_TO_CHECK: "./packages"
21+
PACKAGE_NAME: "react-router"

.github/workflows/release.yml

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

6161
find_package_version:
@@ -80,7 +80,7 @@ jobs:
8080

8181
- id: find_package_version
8282
run: |
83-
package_version=$(node ./scripts/release/find-release-from-changeset.js)
83+
package_version=$(node ./scripts/find-release-from-changeset.js)
8484
echo "package_version=${package_version}" >> $GITHUB_OUTPUT
8585
env:
8686
PACKAGE_VERSION_TO_FOLLOW: "react-router"
@@ -91,7 +91,3 @@ jobs:
9191
if: github.repository == 'remix-run/react-router' && needs.find_package_version.outputs.package_version != ''
9292
needs: [release, find_package_version]
9393
uses: ./.github/workflows/release-comments.yml
94-
with:
95-
ref: refs/tags/react-router@${{ needs.find_package_version.outputs.package_version }}
96-
package_version_to_follow: "react-router"
97-
release_branch: ${{ github.ref_name }}

FAQ.md

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

LICENSE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
MIT License
22

3-
Copyright (c) React Training 2015-2019
4-
Copyright (c) Remix Software 2020-2022
3+
Copyright (c) React Training LLC 2015-2019
4+
Copyright (c) Remix Software Inc. 2020-2021
5+
Copyright (c) Shopify Inc. 2022-2023
56

67
Permission is hereby granted, free of charge, to any person obtaining a copy
78
of this software and associated documentation files (the "Software"), to deal

contributors.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
- elylucas
5858
- emzoumpo
5959
- engpetermwangi
60+
- ericschn
6061
- FilipJirsak
6162
- frontsideair
6263
- fyzhu
@@ -86,10 +87,13 @@
8687
- JaffParker
8788
- jakkku
8889
- JakubDrozd
90+
- jamesrwilliams
8991
- janpaepke
92+
- jasikpark
9093
- jasonpaulos
9194
- jdufresne
9295
- jenseng
96+
- JeraldVin
9397
- JesusTheHun
9498
- jimniels
9599
- jmargeta
@@ -117,8 +121,10 @@
117121
- lordofthecactus
118122
- LordThi
119123
- loun4
124+
- lpaube
120125
- lqze
121126
- lukerSpringTree
127+
- m-dad
122128
- m-shojaei
123129
- machour
124130
- Manc
@@ -156,12 +162,14 @@
156162
- petersendidit
157163
- promet99
158164
- pyitphyoaung
165+
- rimian
159166
- RobHannay
160167
- rtmann
161168
- rubeonline
162169
- ryanflorence
163170
- ryanhiebert
164171
- sanketshah19
172+
- scarf005
165173
- senseibarni
166174
- sergiodxa
167175
- sgalhs

docs/components/link.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ interface LinkProps
2626
}
2727

2828
type To = string | Partial<Path>;
29+
30+
interface Path {
31+
pathname: string;
32+
search: string;
33+
hash: string;
34+
}
2935
```
3036

3137
</details>
@@ -136,6 +142,10 @@ You can access this state value while on the "new-path" route:
136142
let { state } = useLocation();
137143
```
138144

145+
## `reloadDocument`
146+
147+
The `reloadDocument` property can be used to skip client side routing and let the browser handle the transition normally (as if it were an `<a href>`).
148+
139149
[link-native]: ./link-native
140150
[scrollrestoration]: ./scroll-restoration
141151
[history-replace-state]: https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState

docs/components/nav-link.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,8 @@ Adding the `caseSensitive` prop changes the matching logic to make it case sensi
120120

121121
When a `NavLink` is active it will automatically apply `<a aria-current="page">` to the underlying anchor tag. See [aria-current][aria-current] on MDN.
122122

123+
## `reloadDocument`
124+
125+
The `reloadDocument` property can be used to skip client side routing and let the browser handle the transition normally (as if it were an `<a href>`).
126+
123127
[aria-current]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current

docs/components/routes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Whenever the location changes, `<Routes>` looks through all its child routes to
3434
</Routes>
3535
```
3636

37-
[location]: ../hook/location
37+
[location]: ../utils/location
3838
[outlet]: ./outlet
3939
[use-route]: ../hooks/use-routes
4040
[createbrowserrouter]: ../routers/create-browser-router

docs/guides/deferred.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ But it's still sub optimal in most cases (especially if you're code-splitting ro
5757
React Router takes advantage of React 18's Suspense for data fetching using the [`defer` Response][defer response] utility and [`<Await />`][await] component / [`useAsyncValue`][useasyncvalue] hook. By using these APIs, you can solve both of these problems:
5858

5959
1. Your data is no longer on a waterfall: document -> JavaScript -> Lazy Loaded Route & data (in parallel)
60-
2. Your can easily switch between rendering the fallback and waiting for the data
60+
2. Your code can easily switch between rendering the fallback and waiting for the data
6161

6262
Let's take a dive into how to accomplish this.
6363

0 commit comments

Comments
 (0)