Skip to content

Commit d43609c

Browse files
committed
Merge branch 'dev' into markdalgleish/rsc-meta-links-export
2 parents 3c36872 + 16a60c2 commit d43609c

File tree

25 files changed

+1618
-117
lines changed

25 files changed

+1618
-117
lines changed

.changeset/bright-bats-wave.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+
Fix usage of optional path segments in nested routes defined using absolute paths

.changeset/eleven-humans-smell.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+
Fix optional static segment matching in `matchPath`

.changeset/fresh-brooms-trade.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+
Fix prerendering when a `basename` is set with `ssr:false`

.github/workflows/close-feature-pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
name: 🚪 Check Feature PR
1414
if: github.repository == 'remix-run/react-router' && github.event.label.name == 'feature-request'
1515
runs-on: ubuntu-latest
16+
permissions:
17+
pull-requests: write
1618
steps:
1719
- name: ⬇️ Checkout repo
1820
uses: actions/checkout@v4

contributors.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@
212212
- KubasuIvanSakwa
213213
- KutnerUri
214214
- kylegirard
215+
- LadyTsukiko
215216
- landisdesign
216217
- latin-1
217218
- lazybean
@@ -349,6 +350,7 @@
349350
- SirDaev
350351
- SkayuX
351352
- skratchdot
353+
- skrhlm
352354
- smff
353355
- smithki
354356
- soartec-lab

integration/helpers/cloudflare-dev-proxy-template/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"react-router": "workspace:*"
2020
},
2121
"devDependencies": {
22-
"@cloudflare/workers-types": "^4.20250317.0",
22+
"@cloudflare/workers-types": "^4.20250803.0",
2323
"@react-router/dev": "workspace:*",
2424
"@react-router/fs-routes": "workspace:*",
2525
"@react-router/remix-routes-option-adapter": "workspace:*",

integration/helpers/create-fixture.ts

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -158,16 +158,15 @@ export async function createFixture(init: FixtureInit, mode?: ServerMode) {
158158
prerender: init.prerender,
159159
requestDocument(href: string) {
160160
let file = new URL(href, "test://test").pathname + "/index.html";
161-
let mainPath = path.join(projectDir, "build", "client", file);
162-
let fallbackPath = path.join(
163-
projectDir,
164-
"build",
165-
"client",
166-
"__spa-fallback.html",
167-
);
161+
let clientDir = path.join(projectDir, "build", "client");
162+
let mainPath = path.join(clientDir, file);
163+
let fallbackPath = path.join(clientDir, "__spa-fallback.html");
164+
let fallbackPath2 = path.join(clientDir, "index.html");
168165
let html = existsSync(mainPath)
169166
? readFileSync(mainPath)
170-
: readFileSync(fallbackPath);
167+
: existsSync(fallbackPath)
168+
? readFileSync(fallbackPath)
169+
: readFileSync(fallbackPath2);
171170
return new Response(html, {
172171
headers: {
173172
"Content-Type": "text/html",
@@ -344,11 +343,18 @@ export async function createAppFixture(fixture: Fixture, mode?: ServerMode) {
344343
);
345344
app.get("*", (req, res, next) => {
346345
let dir = path.join(fixture.projectDir, "build", "client");
347-
let file = req.path.endsWith(".data")
348-
? req.path
349-
: req.path + "/index.html";
350-
if (file.endsWith(".html") && !existsSync(path.join(dir, file))) {
351-
file = "__spa-fallback.html";
346+
let file;
347+
if (req.path.endsWith(".data")) {
348+
file = req.path;
349+
} else {
350+
let mainPath = req.path + "/index.html";
351+
let fallbackPath = "__spa-fallback.html";
352+
let fallbackPath2 = "index.html";
353+
file = existsSync(mainPath)
354+
? mainPath
355+
: existsSync(fallbackPath)
356+
? fallbackPath
357+
: fallbackPath2;
352358
}
353359
let filePath = path.join(dir, file);
354360
if (existsSync(filePath)) {

0 commit comments

Comments
 (0)