-
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.
- Loading branch information
Showing
132 changed files
with
2,552 additions
and
784 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/server-runtime": patch | ||
--- | ||
|
||
Automatically include set-cookie headers from bubbled thrown responses |
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 | ||
--- | ||
|
||
Properly handle thrown `ErrorResponse` instances inside resource routes |
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": minor | ||
--- | ||
|
||
Add `errorHeaders` parameter to the leaf `headers()` function to expose headers from thrown responses that bubble up to ancestor route boundaries. If the throwing route contains the boundary, then `errorHeaders` will be the same object as `loaderHeaders`/`actionHeaders` for that route. |
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,7 @@ | ||
--- | ||
"@remix-run/dev": patch | ||
--- | ||
|
||
Fix Tailwind performance issue when `postcss.config.js` contains `plugins: { tailwindcss: {} }` and `remix.config.js` contains both `tailwind: true` and `postcss: true`. | ||
|
||
Note that this was _not_ an issue when the plugin function had been explicitly called, i.e. `plugins: [tailwindcss()]`. Remix avoids adding the Tailwind plugin to PostCSS if it's already present but we were failing to detect when the plugin function hadn't been called — either because the plugin function itself had been passed, i.e. `plugins: [require('tailwindcss')]`, or the plugin config object syntax had been used, i.e. `plugins: { tailwindcss: {} }`. |
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,9 @@ | ||
--- | ||
"@remix-run/react": minor | ||
"@remix-run/dev": patch | ||
--- | ||
|
||
Faster server export removal for routes when `unstable_dev` is enabled. | ||
|
||
Also, only render modulepreloads on SSR. | ||
Do not render modulepreloads when hydrated. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
"@remix-run/server-runtime": minor | ||
"@remix-run/react": minor | ||
--- | ||
|
||
Force Typescript to simplify type produced by `Serialize`. | ||
|
||
As a result, the following types and functions have simplified return types: | ||
|
||
- SerializeFrom | ||
- useLoaderData | ||
- useActionData | ||
- useFetcher | ||
|
||
```ts | ||
type Data = { hello: string; when: Date }; | ||
|
||
// BEFORE | ||
type Unsimplified = SerializeFrom<Data>; | ||
// ^? SerializeObject<UndefinedToOptional<{ hello: string; when: Date }>> | ||
|
||
// AFTER | ||
type Simplified = SerializeFrom<Data>; | ||
// ^? { hello: string; when: string } | ||
``` |
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,89 @@ | ||
--- | ||
"@remix-run/dev": minor | ||
--- | ||
|
||
built-in tls support | ||
|
||
New options: | ||
|
||
- `--tls-key` / `tlsKey`: TLS key | ||
- `--tls-cert` / `tlsCert`: TLS Certificate | ||
|
||
If both TLS options are set, `scheme` defaults to `https` | ||
|
||
## Example | ||
|
||
Install [mkcert](https://github.com/FiloSottile/mkcert) and create a local CA: | ||
|
||
```sh | ||
brew install mkcert | ||
mkcert -install | ||
``` | ||
|
||
Then make sure you inform `node` about your CA certs: | ||
|
||
```sh | ||
export NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem" | ||
``` | ||
|
||
👆 You'll probably want to put that env var in your scripts or `.bashrc`/`.zshrc` | ||
|
||
Now create `key.pem` and `cert.pem`: | ||
|
||
```sh | ||
mkcert -key-file key.pem -cert-file cert.pem localhost | ||
``` | ||
|
||
See `mkcert` docs for more details. | ||
|
||
Finally, pass in the paths to the key and cert via flags: | ||
|
||
```sh | ||
remix dev --tls-key=key.pem --tls-cert=cert.pem | ||
``` | ||
|
||
or via config: | ||
|
||
```js | ||
module.exports = { | ||
future: { | ||
unstable_dev: { | ||
tlsKey: "key.pem", | ||
tlsCert: "cert.pem", | ||
}, | ||
}, | ||
}; | ||
``` | ||
|
||
That's all that's needed to set up the Remix Dev Server with TLS. | ||
|
||
🚨 Make sure to update your app server for TLS as well. | ||
|
||
For example, with `express`: | ||
|
||
```ts | ||
import express from "express"; | ||
import https from "node:https"; | ||
import fs from "node:fs"; | ||
|
||
let app = express(); | ||
|
||
// ...code setting up your express app... | ||
|
||
let appServer = https.createServer( | ||
{ | ||
key: fs.readFileSync("key.pem"), | ||
cert: fs.readFileSync("cert.pem"), | ||
}, | ||
app | ||
); | ||
|
||
appServer.listen(3000, () => { | ||
console.log("Ready on https://localhost:3000"); | ||
}); | ||
``` | ||
|
||
## Known limitations | ||
|
||
`remix-serve` does not yet support TLS. | ||
That means this only works for custom app server using the `-c` flag for now. |
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 | ||
--- | ||
|
||
better error message when `remix-serve` is not found |
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 | ||
--- | ||
|
||
restore color for app server output |
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,9 @@ | ||
--- | ||
"@remix-run/dev": patch | ||
--- | ||
|
||
- Fix route ranking bug with pathless layout route next to a sibling index route | ||
|
||
- Under the hood this is done by removing the trailing slash from all generated `path` values since the number of slash-delimited segments counts towards route ranking so the trailing slash incorrectly increases the score for routes | ||
|
||
- Support sibling pathless layout routes by removing pathless layout routes from the unique route path checks in conventional route generation since they inherently trigger duplicate paths |
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 dev server crashes caused by ungraceful hdr error handling |
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": minor | ||
--- | ||
|
||
Added a new `future.v2_headers` future flag to opt into automatic inheriting of ancestor route `headers` functions so you do not need to export a `headers` function from every possible leaf route if you don't wish to. |
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,23 @@ | ||
--- | ||
"@remix-run/dev": minor | ||
"@remix-run/react": minor | ||
"@remix-run/server-runtime": minor | ||
--- | ||
|
||
Reuse dev server port for WebSocket (Live Reload,HMR,HDR) | ||
|
||
As a result the `webSocketPort`/`--websocket-port` option has been obsoleted. | ||
Additionally, scheme/host/port options for the dev server have been renamed. | ||
|
||
Available options are: | ||
|
||
| Option | flag | config | default | | ||
| ---------- | ------------------ | ---------------- | --------------------------------- | | ||
| Command | `-c` / `--command` | `command` | `remix-serve <server build path>` | | ||
| Scheme | `--scheme` | `scheme` | `http` | | ||
| Host | `--host` | `host` | `localhost` | | ||
| Port | `--port` | `port` | Dynamically chosen open port | | ||
| No restart | `--no-restart` | `restart: false` | `restart: true` | | ||
|
||
Note that scheme/host/port options are for the _dev server_, not your app server. | ||
You probably don't need to use scheme/host/port option if you aren't configuring networking (e.g. for Docker or SSL). |
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.