Skip to content

Commit 8bdd772

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into dev
2 parents 9932b01 + 2d83c21 commit 8bdd772

File tree

889 files changed

+61189
-34668
lines changed

Some content is hidden

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

889 files changed

+61189
-34668
lines changed

.changeset/fetcher-reset.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-router": patch
3+
---
4+
5+
[UNSTABLE] Add `fetcher.unstable_reset()` API

.changeset/sixty-tigers-poke.md

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

.changeset/two-mice-grin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-router": patch
3+
---
4+
5+
Handle encoded question mark and hash characters in ancestor splat routes

.eslintignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,18 @@ node_modules/
33
pnpm-lock.yaml
44
/docs/api
55
examples/**/dist/
6+
worker-configuration.d.ts
67
/playground/
78
/playground-local/
9+
integration/helpers/**/dist/
10+
integration/helpers/**/build/
11+
playwright-report/
12+
test-results/
13+
build.utils.d.ts
14+
.wrangler/
15+
.tmp/
16+
.react-router/
17+
.react-router-parcel/
818
packages/**/dist/
919
packages/react-router-dom/server.d.ts
1020
packages/react-router-dom/server.js

.eslintrc

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,78 @@
1818
"env": {
1919
"jest/globals": false
2020
}
21+
},
22+
{
23+
"files": ["packages/react-router-dev/config/default-rsc-entries/*"],
24+
"rules": {
25+
"@typescript-eslint/consistent-type-imports": "off"
26+
}
27+
},
28+
{
29+
// Only apply JSDoc lint rules to files we auto-generate docs for
30+
"files": [
31+
"packages/react-router/lib/components.tsx",
32+
"packages/react-router/lib/hooks.tsx",
33+
"packages/react-router/lib/dom/lib.tsx",
34+
"packages/react-router/lib/dom/ssr/components.tsx",
35+
"packages/react-router/lib/dom/ssr/server.tsx",
36+
"packages/react-router/lib/dom-export/hydrated-router.tsx",
37+
"packages/react-router/lib/dom/server.tsx",
38+
"packages/react-router/lib/router/utils.ts",
39+
"packages/react-router/lib/rsc/browser.tsx",
40+
"packages/react-router/lib/rsc/server.rsc.ts",
41+
"packages/react-router/lib/rsc/server.ssr.tsx",
42+
"packages/react-router/lib/rsc/html-stream/browser.ts",
43+
],
44+
"plugins": ["jsdoc"],
45+
"rules": {
46+
"jsdoc/check-access": "error",
47+
"jsdoc/check-alignment": "error",
48+
"jsdoc/check-param-names": "error",
49+
"jsdoc/check-property-names": "error",
50+
"jsdoc/check-tag-names": [
51+
"error",
52+
{
53+
"definedTags": ["additionalExamples", "category", "mode"]
54+
}
55+
],
56+
"jsdoc/no-defaults": "error",
57+
"jsdoc/no-multi-asterisks": ["error", { "allowWhitespace": true }],
58+
"jsdoc/require-description": "error",
59+
"jsdoc/require-param": ["error", { "enableRootFixer": false }],
60+
"jsdoc/require-param-description": "error",
61+
"jsdoc/require-param-name": "error",
62+
"jsdoc/require-returns": "error",
63+
"jsdoc/require-returns-check": "error",
64+
"jsdoc/require-returns-description": "error",
65+
"jsdoc/sort-tags": [
66+
"error",
67+
{
68+
"tagSequence": [
69+
{
70+
"tags": ["description"]
71+
},
72+
{
73+
"tags": ["example"]
74+
},
75+
{
76+
"tags": ["additionalExamples"]
77+
},
78+
{
79+
"tags": [
80+
"name",
81+
"public",
82+
"private",
83+
"category",
84+
"mode",
85+
"param",
86+
"returns"
87+
]
88+
}
89+
]
90+
}
91+
]
92+
}
2193
}
2294
],
2395
"reportUnusedDisableDirectives": true

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,31 @@ body:
88
value: |
99
Thank you for helping to improve React Router!
1010
11-
## Option 1: Submit a PR with a failing test
11+
Please note that **all** bugs must have a **minimal** and **runnable** reproduction, meaning that it is not just pointing to a deployed site or a branch in your existing application, or showing a small code snippet. For more information, please refer to the [Bug/Issue Process Guidelines](https://github.com/remix-run/react-router/blob/main/GOVERNANCE.md#bugissue-process).
12+
13+
## If you are using **Framework Mode**, you have 2 preferred options
14+
15+
### Option 1 - Create a failing integration test
1216
1317
🏆 The most helpful reproduction is to use our _bug report integration test_ template:
1418
1519
1. [Fork `remix-run/react-router`](https://github.com/remix-run/react-router/fork)
1620
2. Open [`integration/bug-report-test.ts`](https://github.com/remix-run/react-router/blob/dev/integration/bug-report-test.ts) in your editor
17-
3. Follow the instructions and submit a pull request with a failing bug report test!
18-
19-
## Option 2: Continue filling out this form
21+
3. Follow the instructions to create a failing bug report test
22+
4. Link to your forked branch with the failing test in this issue
2023
21-
If you'd rather open a GitHub issue, here are other ways to share a reproduction (ordered from most helpful to least):
24+
### Option 2 - Create a **minimal** reproduction
2225
2326
- 🥇 Link to a [StackBlitz](https://reactrouter.com/new) environment
24-
- 🥈 Link to a GitHub repository
25-
- 🥉 Description of project including template, config files, `package.json` scripts, etc.
27+
- 🥈 Link to a GitHub repository containing a minimal reproduction app
28+
29+
## If you are using **Data** or **Declarative Mode**
30+
31+
Create a **minimal** reproduction
32+
33+
- 🥇 Link to a CodeSandbox repro: [TS](https://codesandbox.io/templates/react-vite-ts) | [JS](https://codesandbox.io/templates/react-vite)
34+
- 🥈 Link to a GitHub repository containing a minimal reproduction app
2635
27-
- type: dropdown
28-
id: mode
29-
attributes:
30-
label: I'm using React Router as a...
31-
description: See https://reactrouter.com/home for explanation
32-
options:
33-
- library
34-
- framework
35-
validations:
36-
required: true
3736
- type: textarea
3837
id: reproduction
3938
attributes:

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ contact_links:
55
about: If you've got an idea for a new feature in React Router, please open a new Discussion with the `Proposals` label
66
- name: 🤔 Usage Question (Github Discussions)
77
url: https://github.com/remix-run/remix/discussions/new?category=q-a
8-
about: Open a Discussion in GitHub wih the `Q&A` label
8+
about: Open a Discussion in GitHub with the `Q&A` label
99
- name: 💬 Remix Discord Channel
1010
url: https://rmx.as/discord
1111
about: Interact with other people using React Router and Remix 📀
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Close a singular pull request that implements a feature that has not
2+
# gone through the Proposal process
3+
# Triggered by adding the `feature-request` label to an issue
4+
5+
name: 🚪 Check Feature PR
6+
7+
on:
8+
pull_request_target:
9+
types: [labeled]
10+
11+
jobs:
12+
close-feature-pr:
13+
name: 🚪 Check Feature PR
14+
if: github.repository == 'remix-run/react-router' && github.event.label.name == 'feature-request'
15+
runs-on: ubuntu-latest
16+
permissions:
17+
pull-requests: write
18+
steps:
19+
- name: ⬇️ Checkout repo
20+
uses: actions/checkout@v5
21+
22+
- name: 🚪 Close PR
23+
env:
24+
GH_TOKEN: ${{ github.token }}
25+
run: |
26+
gh pr comment ${{ github.event.pull_request.number }} -F ./scripts/close-feature-pr.md
27+
gh pr edit ${{ github.event.pull_request.number }} --remove-label ${{ github.event.label.name }}
28+
gh pr close ${{ github.event.pull_request.number }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Close a singular issue without a reproduction
2+
# Triggered by adding the `no-reproduction` label to an issue
3+
4+
name: 🚪 Close issue without a reproduction
5+
6+
on:
7+
issues:
8+
types: [labeled]
9+
10+
jobs:
11+
close-no-repro-issue:
12+
name: 🚪 Close issue
13+
if: github.repository == 'remix-run/react-router' && github.event.label.name == 'no-reproduction'
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: ⬇️ Checkout repo
17+
uses: actions/checkout@v5
18+
19+
- name: 🚪 Close issue
20+
env:
21+
GH_TOKEN: ${{ github.token }}
22+
run: |
23+
gh issue comment ${{ github.event.issue.number }} -F ./scripts/close-no-repro-issue.md
24+
gh issue edit ${{ github.event.issue.number }} --remove-label ${{ github.event.label.name }}
25+
gh issue close ${{ github.event.issue.number }} -r "not planned";
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This is a bulk-close script that was used initially to find and close issues
2+
# without a repro, but moving forward we'll likely use the singular version
3+
# (close-no-repro-issue.yml) on new issues which is driven by a label added to
4+
# the issue
5+
6+
name: 🚪 Close issues without a reproduction
7+
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
dryRun:
12+
type: boolean
13+
description: "Dry Run? (no issues will be closed)"
14+
default: false
15+
16+
concurrency: ${{ github.workflow }}-${{ github.ref }}
17+
18+
jobs:
19+
close-no-repro-issues:
20+
name: 🚪 Close issues
21+
if: github.repository == 'remix-run/react-router'
22+
runs-on: ubuntu-latest
23+
env:
24+
CI: "true"
25+
GH_TOKEN: ${{ github.token }}
26+
steps:
27+
- name: ⬇️ Checkout repo
28+
uses: actions/checkout@v5
29+
30+
- name: 📦 Setup pnpm
31+
uses: pnpm/[email protected]
32+
33+
- name: ⎔ Setup node
34+
uses: actions/setup-node@v5
35+
with:
36+
# required for --experimental-strip-types
37+
node-version: 22
38+
cache: "pnpm"
39+
40+
- name: 📥 Install deps
41+
run: pnpm install --frozen-lockfile
42+
43+
- name: 🚪 Close Issues (Dry Run)
44+
if: ${{ inputs.dryRun }}
45+
run: node --experimental-strip-types ./scripts/close-no-repro-issues.ts --dryRun
46+
47+
- name: 🚪 Close Issues
48+
if: ${{ ! inputs.dryRun }}
49+
run: node --experimental-strip-types ./scripts/close-no-repro-issues.ts

0 commit comments

Comments
 (0)