Skip to content

Commit cef3e66

Browse files
committed
Merge branch 'dev' into pedro/vite-plugin-react
2 parents 268e2d9 + 45c7552 commit cef3e66

File tree

319 files changed

+5449
-1771
lines changed

Some content is hidden

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

319 files changed

+5449
-1771
lines changed

.changeset/five-planets-grin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@remix-run/dev": patch
3+
---
4+
5+
Fix `dest already exists` error when running `remix vite:build`

.changeset/happy-ladybugs-smoke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@remix-run/react": patch
3+
---
4+
5+
Add `undefined` to `useActionData` type override

.changeset/heavy-steaks-remember.md

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

.changeset/hot-suits-jam.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@remix-run/dev": patch
3+
---
4+
5+
Vite: Fix issue resolving critical CSS during development when route files are located outside of the app directory.

.changeset/nasty-pandas-accept.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@remix-run/dev": patch
3+
---
4+
5+
Remove `@remix-run/node` from Vite plugin's `optimizeDeps.include` list since it was unnecessary and resulted in Vite warnings when not depending on this package.

.changeset/nasty-vans-brake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@remix-run/react": patch
3+
---
4+
5+
Allow a nonce to be set on single fetch stream transfer inline scripts

.changeset/rare-dodos-push.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@remix-run/server-runtime": patch
3+
---
4+
5+
Don't log thrown response stubs via `handleError` in Single Fetch

.changeset/rich-spoons-draw.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@remix-run/server-runtime": patch
3+
---
4+
5+
Automatically wrap resource route naked object returns in `json()` for back-compat in v2 (and log deprecation warning)

.changeset/rotten-geckos-yawn.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
"@remix-run/cloudflare": patch
3+
"@remix-run/deno": patch
4+
"@remix-run/node": patch
5+
"@remix-run/react": patch
6+
"@remix-run/server-runtime": patch
7+
---
8+
9+
Typesafety for single-fetch: defineLoader, defineClientLoader, defineAction, defineClientAction
10+
11+
`defineLoader` and `defineAction` are helpers for authoring `loader`s and `action`s.
12+
They are identity functions; they don't modify your loader or action at runtime.
13+
Rather, they exist solely for typesafety by providing types for args and by ensuring valid return types.
14+
15+
```ts
16+
export let loader = defineLoader(({ request }) => {
17+
// ^? Request
18+
return { a: 1, b: () => 2 };
19+
// ^ type error: `b` is not serializable
20+
});
21+
```
22+
23+
Note that `defineLoader` and `defineAction` are not technically necessary for defining loaders and actions if you aren't concerned with typesafety:
24+
25+
```ts
26+
// this totally works! and typechecking is happy too!
27+
export let loader = () => {
28+
return { a: 1 };
29+
};
30+
```
31+
32+
This means that you can opt-in to `defineLoader` incrementally, one loader at a time.
33+
34+
You can return custom responses via the `json`/`defer` utilities, but doing so will revert back to the old JSON-based typesafety mechanism:
35+
36+
```ts
37+
let loader1 = () => {
38+
return { a: 1, b: new Date() };
39+
};
40+
let data1 = useLoaderData<typeof loader1>();
41+
// ^? {a: number, b: Date}
42+
43+
let loader2 = () => {
44+
return json({ a: 1, b: new Date() }); // this opts-out of turbo-stream
45+
};
46+
let data2 = useLoaderData<typeof loader2>();
47+
// ^? JsonifyObject<{a: number, b: Date}> which is really {a: number, b: string}
48+
```
49+
50+
You can also continue to return totally custom responses with `Response` though this continues to be outside of the typesystem since the built-in `Response` type is not generic

.changeset/shy-buttons-buy.md

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

.changeset/single-fetch-client-loaders.md

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

.changeset/single-fetch-spa-mode.md

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

.changeset/single-fetch.md

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

.changeset/slimy-shrimps-roll.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@remix-run/dev": patch
3+
---
4+
5+
Clean up redundant `?client-route=1` imports in development

.changeset/slow-peaches-matter.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@remix-run/server-runtime": patch
3+
---
4+
5+
Pass `response` stub to resource route handlerså when single fetch is enabled

.changeset/tame-otters-clap.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@remix-run/dev": patch
3+
---
4+
5+
Ensure Babel config files are not referenced when applying the `react-refresh` Babel transform within the Remix Vite plugin

.github/workflows/test-full.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
uses: ./.github/workflows/shared-test-integration.yml
4646
with:
4747
os: "ubuntu-latest"
48-
node_version: '[18, "20.5.1"]'
48+
node_version: "[18, 20]"
4949
browser: '["chromium", "firefox"]'
5050

5151
integration-windows:
@@ -54,7 +54,7 @@ jobs:
5454
uses: ./.github/workflows/shared-test-integration.yml
5555
with:
5656
os: "windows-latest"
57-
node_version: '[18, "20.5.1"]'
57+
node_version: "[18, 20]"
5858
browser: '["msedge"]'
5959

6060
integration-macos:
@@ -63,5 +63,5 @@ jobs:
6363
uses: ./.github/workflows/shared-test-integration.yml
6464
with:
6565
os: "macos-latest"
66-
node_version: '[18, "20.5.1"]'
66+
node_version: "[18, 20]"
6767
browser: '["webkit"]'

.github/workflows/test-pr-ubuntu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ jobs:
2727
uses: ./.github/workflows/shared-test-unit.yml
2828
with:
2929
os: "ubuntu-latest"
30-
node_version: '["20.5.1"]'
30+
node_version: "[20]"
3131

3232
integration-chromium:
3333
name: "👀 Integration Test"
3434
if: github.repository == 'remix-run/remix'
3535
uses: ./.github/workflows/shared-test-integration.yml
3636
with:
3737
os: "ubuntu-latest"
38-
node_version: '["20.5.1"]'
38+
node_version: "[20]"
3939
browser: '["chromium"]'

.github/workflows/test-pr-windows-macos.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
uses: ./.github/workflows/shared-test-unit.yml
2121
with:
2222
os: "windows-latest"
23-
node_version: '["20.5.1"]'
23+
node_version: "[20]"
2424

2525
integration-firefox:
2626
name: "👀 Integration Test"
2727
if: github.repository == 'remix-run/remix'
2828
uses: ./.github/workflows/shared-test-integration.yml
2929
with:
3030
os: "ubuntu-latest"
31-
node_version: '["20.5.1"]'
31+
node_version: "[20]"
3232
browser: '["firefox"]'
3333

3434
integration-msedge:
@@ -37,7 +37,7 @@ jobs:
3737
uses: ./.github/workflows/shared-test-integration.yml
3838
with:
3939
os: "windows-latest"
40-
node_version: '["20.5.1"]'
40+
node_version: "[20]"
4141
browser: '["msedge"]'
4242

4343
integration-webkit:
@@ -46,5 +46,5 @@ jobs:
4646
uses: ./.github/workflows/shared-test-integration.yml
4747
with:
4848
os: "macos-latest"
49-
node_version: '["20.5.1"]'
49+
node_version: "[20]"
5050
browser: '["webkit"]'

0 commit comments

Comments
 (0)