From 84333619e813e8535a30374437dad3474f52b060 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 2 Jun 2023 18:15:43 +0000 Subject: [PATCH] chore: Update version for release (pre) --- .changeset/pre.json | 23 ++- packages/create-remix/CHANGELOG.md | 7 + packages/create-remix/package.json | 4 +- packages/remix-architect/CHANGELOG.md | 7 + packages/remix-architect/package.json | 4 +- packages/remix-cloudflare-pages/CHANGELOG.md | 7 + packages/remix-cloudflare-pages/package.json | 4 +- .../remix-cloudflare-workers/CHANGELOG.md | 7 + .../remix-cloudflare-workers/package.json | 4 +- packages/remix-cloudflare/CHANGELOG.md | 19 +++ packages/remix-cloudflare/package.json | 4 +- packages/remix-css-bundle/CHANGELOG.md | 7 + packages/remix-css-bundle/package.json | 4 +- packages/remix-deno/CHANGELOG.md | 19 +++ packages/remix-deno/package.json | 4 +- packages/remix-dev/CHANGELOG.md | 146 ++++++++++++++++++ packages/remix-dev/package.json | 8 +- packages/remix-eslint-config/CHANGELOG.md | 16 ++ packages/remix-eslint-config/package.json | 2 +- packages/remix-express/CHANGELOG.md | 7 + packages/remix-express/package.json | 4 +- packages/remix-netlify/CHANGELOG.md | 7 + packages/remix-netlify/package.json | 4 +- packages/remix-node/CHANGELOG.md | 20 +++ packages/remix-node/package.json | 4 +- packages/remix-react/CHANGELOG.md | 52 +++++++ packages/remix-react/package.json | 4 +- packages/remix-serve/CHANGELOG.md | 20 +++ packages/remix-serve/package.json | 6 +- packages/remix-server-runtime/CHANGELOG.md | 82 ++++++++++ packages/remix-server-runtime/package.json | 2 +- packages/remix-testing/CHANGELOG.md | 8 + packages/remix-testing/package.json | 6 +- packages/remix-vercel/CHANGELOG.md | 7 + packages/remix-vercel/package.json | 4 +- packages/remix/package.json | 2 +- 36 files changed, 497 insertions(+), 38 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 38ab3b5bf4d..052298ada51 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -21,5 +21,26 @@ "@remix-run/testing": "1.16.1", "@remix-run/vercel": "1.16.1" }, - "changesets": [] + "changesets": [ + "bubbled-response-cookies", + "css-import-warnings-unstable-dev", + "error-response-resource-route", + "expose-error-headers", + "gorgeous-fireants-fry", + "great-geese-compare", + "handle-error", + "hdr-revalidation-retry", + "headers-args-type", + "lemon-beers-fetch", + "log-server-errors", + "ninety-hornets-brake", + "postcss-cache-regular-stylesheets", + "req-clone-instanceof", + "rude-geese-remain", + "serious-wolves-attend", + "stale-spoons-tie", + "strong-dolphins-tell", + "v2-headers", + "wicked-pandas-give" + ] } diff --git a/packages/create-remix/CHANGELOG.md b/packages/create-remix/CHANGELOG.md index f7513dc107d..1efd52848bc 100644 --- a/packages/create-remix/CHANGELOG.md +++ b/packages/create-remix/CHANGELOG.md @@ -1,5 +1,12 @@ # `create-remix` +## 1.17.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/dev@1.17.0-pre.0` + ## 1.16.1 ### Patch Changes diff --git a/packages/create-remix/package.json b/packages/create-remix/package.json index 81b85b63a3f..0bfd3ce0889 100644 --- a/packages/create-remix/package.json +++ b/packages/create-remix/package.json @@ -1,6 +1,6 @@ { "name": "create-remix", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "Create a new Remix app", "homepage": "https://remix.run", "bugs": { @@ -17,7 +17,7 @@ "create-remix": "dist/cli.js" }, "dependencies": { - "@remix-run/dev": "1.16.1" + "@remix-run/dev": "1.17.0-pre.0" }, "engines": { "node": ">=14" diff --git a/packages/remix-architect/CHANGELOG.md b/packages/remix-architect/CHANGELOG.md index 07eebaf83cc..d5b4451e0ca 100644 --- a/packages/remix-architect/CHANGELOG.md +++ b/packages/remix-architect/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/architect` +## 1.17.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@1.17.0-pre.0` + ## 1.16.1 ### Patch Changes diff --git a/packages/remix-architect/package.json b/packages/remix-architect/package.json index f1d2a6bd356..d97462c1bb1 100644 --- a/packages/remix-architect/package.json +++ b/packages/remix-architect/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/architect", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "Architect server request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -15,7 +15,7 @@ "typings": "dist/index.d.ts", "dependencies": { "@architect/functions": "^5.2.0", - "@remix-run/node": "1.16.1" + "@remix-run/node": "1.17.0-pre.0" }, "devDependencies": { "@types/aws-lambda": "^8.10.82", diff --git a/packages/remix-cloudflare-pages/CHANGELOG.md b/packages/remix-cloudflare-pages/CHANGELOG.md index 75f04e8b122..ca0b0cb2a8f 100644 --- a/packages/remix-cloudflare-pages/CHANGELOG.md +++ b/packages/remix-cloudflare-pages/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/cloudflare-pages` +## 1.17.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/cloudflare@1.17.0-pre.0` + ## 1.16.1 ### Patch Changes diff --git a/packages/remix-cloudflare-pages/package.json b/packages/remix-cloudflare-pages/package.json index d29ea2d1e2a..58b65c74d36 100644 --- a/packages/remix-cloudflare-pages/package.json +++ b/packages/remix-cloudflare-pages/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/cloudflare-pages", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "Cloudflare Pages request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -15,7 +15,7 @@ "typings": "dist/index.d.ts", "module": "dist/esm/index.js", "dependencies": { - "@remix-run/cloudflare": "1.16.1" + "@remix-run/cloudflare": "1.17.0-pre.0" }, "devDependencies": { "@cloudflare/workers-types": "^3.4.0", diff --git a/packages/remix-cloudflare-workers/CHANGELOG.md b/packages/remix-cloudflare-workers/CHANGELOG.md index d1f497aacc3..69658792eb9 100644 --- a/packages/remix-cloudflare-workers/CHANGELOG.md +++ b/packages/remix-cloudflare-workers/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/cloudflare-workers` +## 1.17.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/cloudflare@1.17.0-pre.0` + ## 1.16.1 ### Patch Changes diff --git a/packages/remix-cloudflare-workers/package.json b/packages/remix-cloudflare-workers/package.json index d4922e2047b..1c093a9165b 100644 --- a/packages/remix-cloudflare-workers/package.json +++ b/packages/remix-cloudflare-workers/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/cloudflare-workers", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "Cloudflare worker request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -16,7 +16,7 @@ "module": "dist/esm/index.js", "dependencies": { "@cloudflare/kv-asset-handler": "^0.1.3", - "@remix-run/cloudflare": "1.16.1" + "@remix-run/cloudflare": "1.17.0-pre.0" }, "devDependencies": { "@cloudflare/workers-types": "^3.4.0" diff --git a/packages/remix-cloudflare/CHANGELOG.md b/packages/remix-cloudflare/CHANGELOG.md index 6ce94b66b7a..f24cf52d826 100644 --- a/packages/remix-cloudflare/CHANGELOG.md +++ b/packages/remix-cloudflare/CHANGELOG.md @@ -1,5 +1,24 @@ # `@remix-run/cloudflare` +## 1.17.0-pre.0 + +### Patch Changes + +- Add `HeadersArgs` type to be consistent with loaders/actions/meta and allows for using a `function` declaration in addition to an arrow function expression ([#6247](https://github.com/remix-run/remix/pull/6247)) + + ```tsx + import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno + + export function headers({ loaderHeaders }: HeadersArgs) { + return { + "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback", + }; + } + ``` + +- Updated dependencies: + - `@remix-run/server-runtime@1.17.0-pre.0` + ## 1.16.1 ### Patch Changes diff --git a/packages/remix-cloudflare/package.json b/packages/remix-cloudflare/package.json index d1a70346937..c39f868e9eb 100644 --- a/packages/remix-cloudflare/package.json +++ b/packages/remix-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/cloudflare", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "Cloudflare platform abstractions for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -15,7 +15,7 @@ "typings": "dist/index.d.ts", "dependencies": { "@cloudflare/kv-asset-handler": "^0.1.3", - "@remix-run/server-runtime": "1.16.1" + "@remix-run/server-runtime": "1.17.0-pre.0" }, "devDependencies": { "@cloudflare/workers-types": "^3.4.0" diff --git a/packages/remix-css-bundle/CHANGELOG.md b/packages/remix-css-bundle/CHANGELOG.md index d24a39de612..6ce4b25011a 100644 --- a/packages/remix-css-bundle/CHANGELOG.md +++ b/packages/remix-css-bundle/CHANGELOG.md @@ -1,5 +1,12 @@ # @remix-run/css-bundle +## 1.17.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/dev@1.17.0-pre.0` + ## 1.16.1 ### Patch Changes diff --git a/packages/remix-css-bundle/package.json b/packages/remix-css-bundle/package.json index fb51191eb30..b0c221b0dbb 100644 --- a/packages/remix-css-bundle/package.json +++ b/packages/remix-css-bundle/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/css-bundle", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "CSS bundle href when using CSS bundling features in Remix", "homepage": "https://remix.run", "bugs": { @@ -20,6 +20,6 @@ "./dist/esm/server.js": "./dist/esm/browser.js" }, "dependencies": { - "@remix-run/dev": "1.16.1" + "@remix-run/dev": "1.17.0-pre.0" } } diff --git a/packages/remix-deno/CHANGELOG.md b/packages/remix-deno/CHANGELOG.md index 094965fb1e4..3ddfbd9d5bd 100644 --- a/packages/remix-deno/CHANGELOG.md +++ b/packages/remix-deno/CHANGELOG.md @@ -1,5 +1,24 @@ # `@remix-run/deno` +## 1.17.0-pre.0 + +### Patch Changes + +- Add `HeadersArgs` type to be consistent with loaders/actions/meta and allows for using a `function` declaration in addition to an arrow function expression ([#6247](https://github.com/remix-run/remix/pull/6247)) + + ```tsx + import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno + + export function headers({ loaderHeaders }: HeadersArgs) { + return { + "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback", + }; + } + ``` + +- Updated dependencies: + - `@remix-run/server-runtime@1.17.0-pre.0` + ## 1.16.1 ### Patch Changes diff --git a/packages/remix-deno/package.json b/packages/remix-deno/package.json index d3ca658ebee..cf5ae9af883 100644 --- a/packages/remix-deno/package.json +++ b/packages/remix-deno/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/deno", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "Deno platform abstractions for Remix", "homepage": "https://remix.run", "main": "./index.ts", @@ -15,7 +15,7 @@ "license": "MIT", "sideEffects": false, "dependencies": { - "@remix-run/server-runtime": "1.16.1", + "@remix-run/server-runtime": "1.17.0-pre.0", "mime": "^3.0.0" }, "engines": { diff --git a/packages/remix-dev/CHANGELOG.md b/packages/remix-dev/CHANGELOG.md index ba0a9c8916c..8b0e3bdb863 100644 --- a/packages/remix-dev/CHANGELOG.md +++ b/packages/remix-dev/CHANGELOG.md @@ -1,5 +1,151 @@ # `@remix-run/dev` +## 1.17.0-pre.0 + +### Minor Changes + +- built-in tls support ([#6483](https://github.com/remix-run/remix/pull/6483)) + + 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. + +- Add caching to PostCSS for regular stylesheets ([#6505](https://github.com/remix-run/remix/pull/6505)) +- Reuse dev server port for WebSocket (Live Reload,HMR,HDR) ([#6476](https://github.com/remix-run/remix/pull/6476)) + + 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 ` | + | 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). + +### Patch Changes + +- Fix warnings when importing CSS files with `future.unstable_dev` enabled ([#6506](https://github.com/remix-run/remix/pull/6506)) +- Fix Tailwind performance issue when `postcss.config.js` contains `plugins: { tailwindcss: {} }` and `remix.config.js` contains both `tailwind: true` and `postcss: true`. ([#6468](https://github.com/remix-run/remix/pull/6468)) + + 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: {} }`. + +- Faster server export removal for routes when `unstable_dev` is enabled. ([#6455](https://github.com/remix-run/remix/pull/6455)) + + Also, only render modulepreloads on SSR. + Do not render modulepreloads when hydrated. + +- Add `HeadersArgs` type to be consistent with loaders/actions/meta and allows for using a `function` declaration in addition to an arrow function expression ([#6247](https://github.com/remix-run/remix/pull/6247)) + + ```tsx + import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno + + export function headers({ loaderHeaders }: HeadersArgs) { + return { + "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback", + }; + } + ``` + +- better error message when `remix-serve` is not found ([#6477](https://github.com/remix-run/remix/pull/6477)) +- restore color for app server output ([#6485](https://github.com/remix-run/remix/pull/6485)) +- - Fix route ranking bug with pathless layout route next to a sibling index route ([#4421](https://github.com/remix-run/remix/pull/4421)) + + - 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 + +- fix dev server crashes caused by ungraceful hdr error handling ([#6467](https://github.com/remix-run/remix/pull/6467)) +- Updated dependencies: + - `@remix-run/server-runtime@1.17.0-pre.0` + - `@remix-run/serve@1.17.0-pre.0` + ## 1.16.1 ### Patch Changes diff --git a/packages/remix-dev/package.json b/packages/remix-dev/package.json index ef1bc7f817d..62b0d2f2b6b 100644 --- a/packages/remix-dev/package.json +++ b/packages/remix-dev/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/dev", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "Dev tools and CLI for Remix", "homepage": "https://remix.run", "bugs": { @@ -28,7 +28,7 @@ "@babel/traverse": "^7.21.5", "@babel/types": "^7.21.5", "@npmcli/package-json": "^2.0.0", - "@remix-run/server-runtime": "1.16.1", + "@remix-run/server-runtime": "1.17.0-pre.0", "@vanilla-extract/integration": "^6.2.0", "arg": "^5.0.1", "cacache": "^15.0.5", @@ -73,7 +73,7 @@ "xdm": "^2.0.0" }, "devDependencies": { - "@remix-run/serve": "1.16.1", + "@remix-run/serve": "1.17.0-pre.0", "@types/cacache": "^15.0.0", "@types/gunzip-maybe": "^1.4.0", "@types/inquirer": "^8.2.0", @@ -93,7 +93,7 @@ "type-fest": "^2.16.0" }, "peerDependencies": { - "@remix-run/serve": "^1.16.1" + "@remix-run/serve": "^1.17.0-pre.0" }, "peerDependenciesMeta": { "@remix-run/serve": { diff --git a/packages/remix-eslint-config/CHANGELOG.md b/packages/remix-eslint-config/CHANGELOG.md index cbd066cdf73..10a48b69062 100644 --- a/packages/remix-eslint-config/CHANGELOG.md +++ b/packages/remix-eslint-config/CHANGELOG.md @@ -1,5 +1,21 @@ # `@remix-run/eslint-config` +## 1.17.0-pre.0 + +### Patch Changes + +- Add `HeadersArgs` type to be consistent with loaders/actions/meta and allows for using a `function` declaration in addition to an arrow function expression ([#6247](https://github.com/remix-run/remix/pull/6247)) + + ```tsx + import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno + + export function headers({ loaderHeaders }: HeadersArgs) { + return { + "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback", + }; + } + ``` + ## 1.16.1 ### Patch Changes diff --git a/packages/remix-eslint-config/package.json b/packages/remix-eslint-config/package.json index 85c8831f625..e41d0de1132 100644 --- a/packages/remix-eslint-config/package.json +++ b/packages/remix-eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/eslint-config", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "ESLint configuration for Remix projects", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-express/CHANGELOG.md b/packages/remix-express/CHANGELOG.md index 951368b7205..313d0556a82 100644 --- a/packages/remix-express/CHANGELOG.md +++ b/packages/remix-express/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/express` +## 1.17.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@1.17.0-pre.0` + ## 1.16.1 ### Patch Changes diff --git a/packages/remix-express/package.json b/packages/remix-express/package.json index 12e9f0fd785..59326ee835e 100644 --- a/packages/remix-express/package.json +++ b/packages/remix-express/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/express", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "Express server request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -14,7 +14,7 @@ "main": "dist/index.js", "typings": "dist/index.d.ts", "dependencies": { - "@remix-run/node": "1.16.1" + "@remix-run/node": "1.17.0-pre.0" }, "devDependencies": { "@types/express": "^4.17.9", diff --git a/packages/remix-netlify/CHANGELOG.md b/packages/remix-netlify/CHANGELOG.md index 40d822cac25..6cba9f155d0 100644 --- a/packages/remix-netlify/CHANGELOG.md +++ b/packages/remix-netlify/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/netlify` +## 1.17.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@1.17.0-pre.0` + ## 1.16.1 ### Patch Changes diff --git a/packages/remix-netlify/package.json b/packages/remix-netlify/package.json index 67124f78b03..0c96beac876 100644 --- a/packages/remix-netlify/package.json +++ b/packages/remix-netlify/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/netlify", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "Netlify server request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -14,7 +14,7 @@ "main": "dist/index.js", "typings": "dist/index.d.ts", "dependencies": { - "@remix-run/node": "1.16.1" + "@remix-run/node": "1.17.0-pre.0" }, "devDependencies": { "@netlify/functions": "^1.0.0" diff --git a/packages/remix-node/CHANGELOG.md b/packages/remix-node/CHANGELOG.md index f87a5181551..2daabd3a309 100644 --- a/packages/remix-node/CHANGELOG.md +++ b/packages/remix-node/CHANGELOG.md @@ -1,5 +1,25 @@ # `@remix-run/node` +## 1.17.0-pre.0 + +### Patch Changes + +- Add `HeadersArgs` type to be consistent with loaders/actions/meta and allows for using a `function` declaration in addition to an arrow function expression ([#6247](https://github.com/remix-run/remix/pull/6247)) + + ```tsx + import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno + + export function headers({ loaderHeaders }: HeadersArgs) { + return { + "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback", + }; + } + ``` + +- Fix `request.clone() instanceof Request` returning false. ([#6512](https://github.com/remix-run/remix/pull/6512)) +- Updated dependencies: + - `@remix-run/server-runtime@1.17.0-pre.0` + ## 1.16.1 ### Patch Changes diff --git a/packages/remix-node/package.json b/packages/remix-node/package.json index 9554da7caa9..f0392a11e64 100644 --- a/packages/remix-node/package.json +++ b/packages/remix-node/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/node", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "Node.js platform abstractions for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -17,7 +17,7 @@ "./install.js" ], "dependencies": { - "@remix-run/server-runtime": "1.16.1", + "@remix-run/server-runtime": "1.17.0-pre.0", "@remix-run/web-fetch": "^4.3.4", "@remix-run/web-file": "^3.0.2", "@remix-run/web-stream": "^1.0.3", diff --git a/packages/remix-react/CHANGELOG.md b/packages/remix-react/CHANGELOG.md index eb09f086359..eaa92ada7b6 100644 --- a/packages/remix-react/CHANGELOG.md +++ b/packages/remix-react/CHANGELOG.md @@ -1,5 +1,57 @@ # `@remix-run/react` +## 1.17.0-pre.0 + +### Minor Changes + +- Faster server export removal for routes when `unstable_dev` is enabled. ([#6455](https://github.com/remix-run/remix/pull/6455)) + + Also, only render modulepreloads on SSR. + Do not render modulepreloads when hydrated. + +- Force Typescript to simplify type produced by `Serialize`. ([#6449](https://github.com/remix-run/remix/pull/6449)) + + 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; + // ^? SerializeObject> + + // AFTER + type Simplified = SerializeFrom; + // ^? { hello: string; when: string } + ``` + +- Reuse dev server port for WebSocket (Live Reload,HMR,HDR) ([#6476](https://github.com/remix-run/remix/pull/6476)) + + 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 ` | + | 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). + +### Patch Changes + +- retry HDR revalidations in development mode to aid in 3rd party server race conditions ([#6287](https://github.com/remix-run/remix/pull/6287)) + ## 1.16.1 ### Patch Changes diff --git a/packages/remix-react/package.json b/packages/remix-react/package.json index 9e058cb7261..21885a2b26e 100644 --- a/packages/remix-react/package.json +++ b/packages/remix-react/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/react", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "React DOM bindings for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -20,7 +20,7 @@ "react-router-dom": "6.12.0-pre.1" }, "devDependencies": { - "@remix-run/server-runtime": "1.16.1", + "@remix-run/server-runtime": "1.17.0-pre.0", "@testing-library/jest-dom": "^5.16.2", "@testing-library/react": "^13.3.0", "abort-controller": "^3.0.0", diff --git a/packages/remix-serve/CHANGELOG.md b/packages/remix-serve/CHANGELOG.md index cd18e07c587..7f581cc0981 100644 --- a/packages/remix-serve/CHANGELOG.md +++ b/packages/remix-serve/CHANGELOG.md @@ -1,5 +1,25 @@ # `@remix-run/serve` +## 1.17.0-pre.0 + +### Patch Changes + +- Add `HeadersArgs` type to be consistent with loaders/actions/meta and allows for using a `function` declaration in addition to an arrow function expression ([#6247](https://github.com/remix-run/remix/pull/6247)) + + ```tsx + import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno + + export function headers({ loaderHeaders }: HeadersArgs) { + return { + "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback", + }; + } + ``` + +- Updated dependencies: + - `@remix-run/node@1.17.0-pre.0` + - `@remix-run/express@1.17.0-pre.0` + ## 1.16.1 ### Patch Changes diff --git a/packages/remix-serve/package.json b/packages/remix-serve/package.json index 92a1a5b96d4..9afa8c1d6d6 100644 --- a/packages/remix-serve/package.json +++ b/packages/remix-serve/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/serve", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "Production application server for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -17,8 +17,8 @@ "remix-serve": "dist/cli.js" }, "dependencies": { - "@remix-run/express": "1.16.1", - "@remix-run/node": "1.16.1", + "@remix-run/express": "1.17.0-pre.0", + "@remix-run/node": "1.17.0-pre.0", "compression": "^1.7.4", "express": "^4.17.1", "morgan": "^1.10.0" diff --git a/packages/remix-server-runtime/CHANGELOG.md b/packages/remix-server-runtime/CHANGELOG.md index acb95fb2d9e..6857aa3a98c 100644 --- a/packages/remix-server-runtime/CHANGELOG.md +++ b/packages/remix-server-runtime/CHANGELOG.md @@ -1,5 +1,87 @@ # `@remix-run/server-runtime` +## 1.17.0-pre.0 + +### Minor Changes + +- 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. ([#6425](https://github.com/remix-run/remix/pull/6425)) +- Add optional `handleError` export for custom server-side error processing. This is a new optional export from your `entry.server.tsx` that will be called with any encountered error on the Remix server (loader, action, or render error): ([#6524](https://github.com/remix-run/remix/pull/6524)) + + ```ts + // entry.server.tsx + export function handleError( + error: unknown, + { request, params, context }: DataFunctionArgs + ): void { + if (error instanceof Error) { + sendErrorToBugReportingService(error); + console.error(formatError(error)); + } else { + let unknownError = new Error("Unknown Server Error"); + sendErrorToBugReportingService(unknownError); + console.error(unknownError); + } + } + ``` + +- Force Typescript to simplify type produced by `Serialize`. ([#6449](https://github.com/remix-run/remix/pull/6449)) + + 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; + // ^? SerializeObject> + + // AFTER + type Simplified = SerializeFrom; + // ^? { hello: string; when: string } + ``` + +- 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. ([#6431](https://github.com/remix-run/remix/pull/6431)) +- Reuse dev server port for WebSocket (Live Reload,HMR,HDR) ([#6476](https://github.com/remix-run/remix/pull/6476)) + + 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 ` | + | 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). + +### Patch Changes + +- Automatically include set-cookie headers from bubbled thrown responses ([#6475](https://github.com/remix-run/remix/pull/6475)) +- Properly handle thrown `ErrorResponse` instances inside resource routes ([#6320](https://github.com/remix-run/remix/pull/6320)) +- Add `HeadersArgs` type to be consistent with loaders/actions/meta and allows for using a `function` declaration in addition to an arrow function expression ([#6247](https://github.com/remix-run/remix/pull/6247)) + + ```tsx + import type { HeadersArgs } from "@remix-run/node"; // or cloudflare/deno + + export function headers({ loaderHeaders }: HeadersArgs) { + return { + "x-my-custom-thing": loaderHeaders.get("x-my-custom-thing") || "fallback", + }; + } + ``` + +- Ensure un-sanitized server errors are logged on the server during document requests ([#6495](https://github.com/remix-run/remix/pull/6495)) + ## 1.16.1 ### Patch Changes diff --git a/packages/remix-server-runtime/package.json b/packages/remix-server-runtime/package.json index bfd583f1a99..047e6f9c735 100644 --- a/packages/remix-server-runtime/package.json +++ b/packages/remix-server-runtime/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/server-runtime", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "Server runtime for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-testing/CHANGELOG.md b/packages/remix-testing/CHANGELOG.md index ddb42e61379..5fe2a2064d5 100644 --- a/packages/remix-testing/CHANGELOG.md +++ b/packages/remix-testing/CHANGELOG.md @@ -1,5 +1,13 @@ # `@remix-run/testing` +## 1.17.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/react@1.17.0-pre.0` + - `@remix-run/node@1.17.0-pre.0` + ## 1.16.1 ### Patch Changes diff --git a/packages/remix-testing/package.json b/packages/remix-testing/package.json index 99c457412ab..8240bec2dab 100644 --- a/packages/remix-testing/package.json +++ b/packages/remix-testing/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/testing", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "Testing utilities for Remix apps", "homepage": "https://remix.run", "bugs": { @@ -16,8 +16,8 @@ "typings": "./dist/index.d.ts", "module": "./dist/esm/index.js", "dependencies": { - "@remix-run/node": "1.16.1", - "@remix-run/react": "1.16.1", + "@remix-run/node": "1.17.0-pre.0", + "@remix-run/react": "1.17.0-pre.0", "@remix-run/router": "1.6.3-pre.0", "react-router-dom": "6.12.0-pre.1" }, diff --git a/packages/remix-vercel/CHANGELOG.md b/packages/remix-vercel/CHANGELOG.md index e3c53ee7ec3..ad21c0e2791 100644 --- a/packages/remix-vercel/CHANGELOG.md +++ b/packages/remix-vercel/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/vercel` +## 1.17.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@1.17.0-pre.0` + ## 1.16.1 ### Patch Changes diff --git a/packages/remix-vercel/package.json b/packages/remix-vercel/package.json index 1245941ebce..61a1f3ba441 100644 --- a/packages/remix-vercel/package.json +++ b/packages/remix-vercel/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/vercel", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "Vercel server request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -14,7 +14,7 @@ "main": "dist/index.js", "typings": "dist/index.d.ts", "dependencies": { - "@remix-run/node": "1.16.1" + "@remix-run/node": "1.17.0-pre.0" }, "devDependencies": { "@types/supertest": "^2.0.10", diff --git a/packages/remix/package.json b/packages/remix/package.json index 3eba653d916..af398a53138 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -1,6 +1,6 @@ { "name": "remix", - "version": "1.16.1", + "version": "1.17.0-pre.0", "description": "A framework for building better websites", "homepage": "https://remix.run", "bugs": {