-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into logan/bump-esbuild-auto-jsx-transform
- Loading branch information
Showing
34 changed files
with
425 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@remix-run/dev": minor | ||
--- | ||
|
||
Added support for importing `.zip` files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
"remix": minor | ||
"@remix-run/cloudflare": minor | ||
"@remix-run/deno": minor | ||
"@remix-run/node": minor | ||
"@remix-run/react": minor | ||
"@remix-run/serve": minor | ||
"@remix-run/server-runtime": minor | ||
--- | ||
|
||
Each runtime package (@remix-run/cloudflare,@remix-run/deno,@remix-run/node) now exports `SerializeFrom`, which is used to | ||
infer the JSON-serialized return type of loaders and actions. | ||
|
||
Example: | ||
|
||
```ts | ||
type MyLoaderData = SerializeFrom<typeof loader>; | ||
type MyActionData = SerializeFrom<typeof action>; | ||
``` | ||
|
||
This is what `useLoaderData<typeof loader>` and `useActionData<typeof action>` use under-the-hood. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@remix-run/dev": patch | ||
--- | ||
|
||
Add support for importing avif and zip files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@remix-run/dev": patch | ||
--- | ||
|
||
Fix import -> require conversion of the convert-to-js migration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
"remix": minor | ||
"@remix-run/serve": minor | ||
"@remix-run/server-runtime": minor | ||
--- | ||
|
||
`MetaFunction` type can now infer `data` and `parentsData` types from loaders | ||
|
||
For example, if this meta function is for `/sales/customers/$customerId`: | ||
|
||
```ts | ||
// app/root.tsx | ||
const loader = () => { | ||
return json({ hello: "world" } as const); | ||
}; | ||
export type Loader = typeof loader; | ||
|
||
// app/routes/sales.tsx | ||
const loader = () => { | ||
return json({ salesCount: 1074 }); | ||
}; | ||
export type Loader = typeof loader; | ||
|
||
// app/routes/sales/customers.tsx | ||
const loader = () => { | ||
return json({ customerCount: 74 }); | ||
}; | ||
export type Loader = typeof loader; | ||
|
||
// app/routes/sales/customers/$customersId.tsx | ||
import type { Loader as RootLoader } from "../../../root"; | ||
import type { Loader as SalesLoader } from "../../sales"; | ||
import type { Loader as CustomersLoader } from "../../sales/customers"; | ||
|
||
const loader = () => { | ||
return json({ name: "Customer name" }); | ||
}; | ||
|
||
const meta: MetaFunction< | ||
typeof loader, | ||
{ | ||
root: RootLoader; | ||
"routes/sales": SalesLoader; | ||
"routes/sales/customers": CustomersLoader; | ||
} | ||
> = ({ data, parentsData }) => { | ||
const { name } = data; | ||
// ^? string | ||
const { customerCount } = parentsData["routes/sales/customers"]; | ||
// ^? number | ||
const { salesCount } = parentsData["routes/sales"]; | ||
// ^? number | ||
const { hello } = parentsData["root"]; | ||
// ^? "world" | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@remix-run/server-runtime": patch | ||
--- | ||
|
||
Make the loadContext parameter not optional so that augmenting AppLoadContext does not require checking if the context is undefined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@remix-run/node": patch | ||
--- | ||
|
||
Fix fileStorage session delete so it doesn't destroy the entire session directory when destroying an empty file session. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.