diff --git a/.changeset/pre.json b/.changeset/pre.json index a6d359b7167..889a75ee14e 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -20,5 +20,24 @@ "@remix-run/server-runtime": "2.5.1", "@remix-run/testing": "2.5.1" }, - "changesets": [] + "changesets": [ + "bright-days-brush", + "curly-camels-applaud", + "cyan-dingos-care", + "fast-dodos-yell", + "fluffy-dots-grin", + "great-mice-march", + "green-baboons-punch", + "ninety-baboons-leave", + "ninety-turtles-explode", + "quiet-adults-drum", + "silver-crews-arrive", + "tender-cherries-taste", + "thin-falcons-give", + "thin-rings-eat", + "thirty-coins-give", + "throw-abort-reason", + "two-pumpkins-vanish", + "wild-readers-drive" + ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index 339cc0fe165..4e156d238aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,62 +13,68 @@ We manage release notes in this file instead of the paginated Github Releases Pa Table of Contents - [Remix Releases](#remix-releases) - - [v2.5.1](#v251) + - [v2.6.0](#v260) + - [Unstable Vite Plugin updates](#unstable-vite-plugin-updates) + - [Minor Changes](#minor-changes) - [Patch Changes](#patch-changes) - [Updated Dependencies](#updated-dependencies) - [Changes by Package](#changes-by-package) + - [v2.5.1](#v251) + - [Patch Changes](#patch-changes-1) + - [Updated Dependencies](#updated-dependencies-1) + - [Changes by Package](#changes-by-package-1) - [v2.5.0](#v250) - [What's Changed](#whats-changed) - [SPA Mode (unstable)](#spa-mode-unstable) - [Server Bundles (unstable)](#server-bundles-unstable) - - [Minor Changes](#minor-changes) - - [Patch Changes](#patch-changes-1) - - [Updated Dependencies](#updated-dependencies-1) - - [Changes by Package](#changes-by-package-1) - - [v2.4.1](#v241) + - [Minor Changes](#minor-changes-1) - [Patch Changes](#patch-changes-2) - [Updated Dependencies](#updated-dependencies-2) - [Changes by Package](#changes-by-package-2) + - [v2.4.1](#v241) + - [Patch Changes](#patch-changes-3) + - [Updated Dependencies](#updated-dependencies-3) + - [Changes by Package](#changes-by-package-3) - [v2.4.0](#v240) - [What's Changed](#whats-changed-1) - [Client Data](#client-data) - [`future.v3_relativeSplatPath`](#futurev3_relativesplatpath) - [Vite Updates (Unstable)](#vite-updates-unstable) - - [Minor Changes](#minor-changes-1) - - [Patch Changes](#patch-changes-3) - - [Updated Dependencies](#updated-dependencies-3) - - [Changes by Package](#changes-by-package-3) - - [v2.3.1](#v231) + - [Minor Changes](#minor-changes-2) - [Patch Changes](#patch-changes-4) - [Updated Dependencies](#updated-dependencies-4) - [Changes by Package](#changes-by-package-4) + - [v2.3.1](#v231) + - [Patch Changes](#patch-changes-5) + - [Updated Dependencies](#updated-dependencies-5) + - [Changes by Package](#changes-by-package-5) - [v2.3.0](#v230) - [What's Changed](#whats-changed-2) - [Stabilized `useBlocker`](#stabilized-useblocker) - [`unstable_flushSync` API](#unstable_flushsync-api) - - [Minor Changes](#minor-changes-2) - - [Patch Changes](#patch-changes-5) - - [Updated Dependencies](#updated-dependencies-5) - - [Changes by Package](#changes-by-package-5) + - [Minor Changes](#minor-changes-3) + - [Patch Changes](#patch-changes-6) + - [Updated Dependencies](#updated-dependencies-6) + - [Changes by Package](#changes-by-package-6) - [v2.2.0](#v220) - [What's Changed](#whats-changed-3) - [Vite!](#vite) - [New Fetcher APIs](#new-fetcher-apis) - [Persistence Future Flag](#persistence-future-flag) - - [Minor Changes](#minor-changes-3) - - [Patch Changes](#patch-changes-6) - - [Updated Dependencies](#updated-dependencies-6) - - [Changes by Package](#changes-by-package-6) - - [v2.1.0](#v210) - - [What's Changed](#whats-changed-4) - - [View Transitions](#view-transitions) - - [Stable `createRemixStub`](#stable-createremixstub) - [Minor Changes](#minor-changes-4) - [Patch Changes](#patch-changes-7) - [Updated Dependencies](#updated-dependencies-7) - [Changes by Package](#changes-by-package-7) - - [v2.0.1](#v201) + - [v2.1.0](#v210) + - [What's Changed](#whats-changed-4) + - [View Transitions](#view-transitions) + - [Stable `createRemixStub`](#stable-createremixstub) + - [Minor Changes](#minor-changes-5) - [Patch Changes](#patch-changes-8) + - [Updated Dependencies](#updated-dependencies-8) + - [Changes by Package](#changes-by-package-8) + - [v2.0.1](#v201) + - [Patch Changes](#patch-changes-9) - [Changes by Package 🔗](#changes-by-package-) - [v2.0.0](#v200) - [Breaking Changes](#breaking-changes) @@ -80,8 +86,8 @@ We manage release notes in this file instead of the paginated Github Releases Pa - [Breaking Type Changes](#breaking-type-changes) - [New Features](#new-features) - [Other Notable Changes](#other-notable-changes) - - [Updated Dependencies](#updated-dependencies-8) - - [Changes by Package](#changes-by-package-8) + - [Updated Dependencies](#updated-dependencies-9) + - [Changes by Package](#changes-by-package-9) @@ -129,6 +135,171 @@ Date: YYYY-MM-DD --> +## v2.6.0 + +Date: 2024-01-31 + +### Unstable Vite Plugin updates + +As we continue moving towards stabilizing the Vite plugin, we've introduced a few breaking changes tp the unstable Vite plugin in this release. Please read the `@remix-run/dev` changes below closely and update your app accordingly if you'v opted into using the Vite plugin. + +We've also removed the `unstable_` prefix from the `serverBundles` option as we're now confident in the API. ([#8596](https://github.com/remix-run/remix/pull/8596)) + +🎉 And last, but certainly not least - we've added much anticipated Cloudflare support in [#8531](https://github.com/remix-run/remix/pull/8531)! To get started with Cloudflare, you can use the `unstable-vite-cloudflare` template: + + ```shellscript nonumber + npx create-remix@latest --template remix-run/remix/templates/unstable-vite-cloudflare + ``` + +For more information, please refer to the docs at [Future > Vite > Cloudflare](https://remix.run/docs/future/vite#cloudflare) and [Future > Vite > Migrating > Migrating Cloudflare Functions](https://remix.run/docs/future/vite#migrating-cloudflare-functions). + +### Minor Changes + +- `@remix-run/server-runtime` - Add `future.v3_throwAbortReason` flag to throw `request.signal.reason` when a request is aborted instead of an `Error` such as `new Error("query() call aborted: GET /path")` ([#8251](https://github.com/remix-run/remix/pull/8251)) + +### Patch Changes + +- `@remix-run/server-runtime` - Unwrap thrown `Response`'s from `entry.server` into `ErrorResponse`s and preserve the status code ([#8577](https://github.com/remix-run/remix/pull/8577)) +- `@remix-run/dev` - Vite: Add `manifest` option to Vite plugin to enable writing a `.remix/manifest.json` file to the build directory ([#8575](https://github.com/remix-run/remix/pull/8575)) + - ⚠️ **This is a breaking change for consumers of the Vite plugin's "server bundles" feature** + - The `build/server/bundles.json` file has been superseded by the more general `build/.remix/manifest.json` + - While the old server bundles manifest was always written to disk when generating server bundles, the build manifest file must be explicitly enabled via the `manifest` option +- `@remix-run/dev` - Vite: Rely on Vite plugin ordering ([#8627](https://github.com/remix-run/remix/pull/8627)) + + - ⚠️ **This is a breaking change for projects using the unstable Vite plugin** + - The Remix plugin expects to process JavaScript or TypeScript files, so any transpilation from other languages must be done first. + - For example, that means putting the MDX plugin _before_ the Remix plugin: + + ```diff + import mdx from "@mdx-js/rollup"; + import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { defineConfig } from "vite"; + + export default defineConfig({ + plugins: [ + + mdx(), + remix() + - mdx(), + ], + }); + ``` + + - Previously, the Remix plugin misused `enforce: "post"` from Vite's plugin API to ensure that it ran last + - However, this caused other unforeseen issues + - Instead, we now rely on standard Vite semantics for plugin ordering + - The official [Vite React SWC plugin](https://github.com/vitejs/vite-plugin-react-swc/blob/main/src/index.ts#L97-L116) also relies on plugin ordering for MDX + +- `@remix-run/dev` - Vite: Remove interop with ``, rely on `` instead ([#8636](https://github.com/remix-run/remix/pull/8636)) + + - ⚠️ **This is a breaking change for projects using the unstable Vite plugin** + - Vite provides a robust client-side runtime for development features like HMR, making the `` component obsolete + - In fact, having a separate dev scripts component was causing issues with script execution order + - To work around this, the Remix Vite plugin used to override `` into a bespoke implementation that was compatible with Vite + - Instead of all this indirection, now the Remix Vite plugin instructs the `` component to automatically include Vite's client-side runtime and other dev-only scripts + - To adopt this change, you can remove the LiveReload component from your `root.tsx` component: + + ```diff + import { + - LiveReload, + Outlet, + Scripts, + } + + export default function App() { + return ( + + + + + + + - + + + ) + } + ``` + +- `@remix-run/dev` - Vite: Only write Vite manifest files if `build.manifest` is enabled within the Vite config ([#8599](https://github.com/remix-run/remix/pull/8599)) + + - ⚠️ **This is a breaking change for consumers of Vite's `manifest.json` files** + - To explicitly enable generation of Vite manifest files, you must set `build.manifest` to `true` in your Vite config: + + ```ts + export default defineConfig({ + build: { manifest: true }, + // ... + }); + ``` + +- `@remix-run/dev` - Vite: Add new `buildDirectory` option with a default value of `"build"` ([#8575](https://github.com/remix-run/remix/pull/8575)) + + - ⚠️ **This is a breaking change for consumers of the Vite plugin that were using the `assetsBuildDirectory` and `serverBuildDirectory` options** + - This replaces the old `assetsBuildDirectory` and `serverBuildDirectory` options which defaulted to `"build/client"` and `"build/server"` respectively + - The Remix Vite plugin now builds into a single directory containing `client` and `server` directories + - If you've customized your build output directories, you'll need to migrate to the new `buildDirectory` option, e.g.: + + ```diff + import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { defineConfig } from "vite"; + + export default defineConfig({ + plugins: [ + remix({ + - serverBuildDirectory: "dist/server", + - assetsBuildDirectory: "dist/client", + + buildDirectory: "dist", + }) + ], + }); + ``` + +- `@remix-run/dev` - Vite: Write Vite manifest files to `build/.vite` directory rather than being nested within `build/client` and `build/server` directories ([#8599](https://github.com/remix-run/remix/pull/8599)) + - ⚠️ **This is a breaking change for consumers of Vite's `manifest.json` files** + - Vite manifest files are now written to the Remix build directory + - Since all Vite manifests are now in the same directory, they're no longer named `manifest.json` + - Instead, they're named `build/.vite/client-manifest.json` and `build/.vite/server-manifest.json`, or `build/.vite/server-{BUNDLE_ID}-manifest.json` when using server bundles +- `@remix-run/dev` - Vite: Remove `unstable` prefix from `serverBundles` option ([#8596](https://github.com/remix-run/remix/pull/8596)) +- `@remix-run/dev` - Vite: Add `--sourcemapClient` and `--sourcemapServer` flags to `remix vite:build` ([#8613](https://github.com/remix-run/remix/pull/8613)) + - `--sourcemapClient`, `--sourcemapClient=inline`, or `--sourcemapClient=hidden` + - `--sourcemapServer`, `--sourcemapServer=inline`, or `--sourcemapServer=hidden` + - See https://vitejs.dev/config/build-options.html#build-sourcemap +- `@remix-run/dev` - Vite: Validate IDs returned from the `serverBundles` function to ensure they only contain alphanumeric characters, hyphens and underscores ([#8598](https://github.com/remix-run/remix/pull/8598)) +- `@remix-run/dev` - Vite: Fix "could not fast refresh" false alarm ([#8580](https://github.com/remix-run/remix/pull/8580)) + - HMR is already functioning correctly but was incorrectly logging that it "could not fast refresh" on internal client routes + - Now internal client routes correctly register Remix exports like `meta` for fast refresh, which removes the false alarm. +- `@remix-run/dev` - Vite: Cloudflare Pages support ([#8531](https://github.com/remix-run/remix/pull/8531)) +- `@remix-run/dev` - Vite: Remove undocumented backwards compatibility layer for Vite v4 ([#8581](https://github.com/remix-run/remix/pull/8581)) +- `@remix-run/dev` - Vite: Add `presets` option to ease integration with different platforms and tools ([#8514](https://github.com/remix-run/remix/pull/8514)) +- `@remix-run/dev` - Vite: Add `buildEnd` hook ([#8620](https://github.com/remix-run/remix/pull/8620)) +- `@remix-run/dev` - Vite: Add `mode` field into generated server build ([#8539](https://github.com/remix-run/remix/pull/8539)) +- `@remix-run/dev` - Vite: Reduce network calls for route modules during HMR ([#8591](https://github.com/remix-run/remix/pull/8591)) + +### Updated Dependencies + +- [`react-router-dom@6.22.0`](https://github.com/remix-run/react-router/releases/tag/react-router%406.22.0) +- [`@remix-run/router@1.15.0`](https://github.com/remix-run/react-router/blob/main/packages/router/CHANGELOG.md#1150) + +### Changes by Package + +- [`create-remix`](https://github.com/remix-run/remix/blob/remix%402.6.0/packages/create-remix/CHANGELOG.md#260) +- [`@remix-run/architect`](https://github.com/remix-run/remix/blob/remix%402.6.0/packages/remix-architect/CHANGELOG.md#260) +- [`@remix-run/cloudflare`](https://github.com/remix-run/remix/blob/remix%402.6.0/packages/remix-cloudflare/CHANGELOG.md#260) +- [`@remix-run/cloudflare-pages`](https://github.com/remix-run/remix/blob/remix%402.6.0/packages/remix-cloudflare-pages/CHANGELOG.md#260) +- [`@remix-run/cloudflare-workers`](https://github.com/remix-run/remix/blob/remix%402.6.0/packages/remix-cloudflare-workers/CHANGELOG.md#260) +- [`@remix-run/css-bundle`](https://github.com/remix-run/remix/blob/remix%402.6.0/packages/remix-css-bundle/CHANGELOG.md#260) +- [`@remix-run/deno`](https://github.com/remix-run/remix/blob/remix%402.6.0/packages/remix-deno/CHANGELOG.md#260) +- [`@remix-run/dev`](https://github.com/remix-run/remix/blob/remix%402.6.0/packages/remix-dev/CHANGELOG.md#260) +- [`@remix-run/eslint-config`](https://github.com/remix-run/remix/blob/remix%402.6.0/packages/remix-eslint-config/CHANGELOG.md#260) +- [`@remix-run/express`](https://github.com/remix-run/remix/blob/remix%402.6.0/packages/remix-express/CHANGELOG.md#260) +- [`@remix-run/node`](https://github.com/remix-run/remix/blob/remix%402.6.0/packages/remix-node/CHANGELOG.md#260) +- [`@remix-run/react`](https://github.com/remix-run/remix/blob/remix%402.6.0/packages/remix-react/CHANGELOG.md#260) +- [`@remix-run/serve`](https://github.com/remix-run/remix/blob/remix%402.6.0/packages/remix-serve/CHANGELOG.md#260) +- [`@remix-run/server-runtime`](https://github.com/remix-run/remix/blob/remix%402.6.0/packages/remix-server-runtime/CHANGELOG.md#260) +- [`@remix-run/testing`](https://github.com/remix-run/remix/blob/remix%402.6.0/packages/remix-testing/CHANGELOG.md#260) + +**Full Changelog**: [`v2.5.1...v2.6.0`](https://github.com/remix-run/remix/compare/remix@2.5.1...remix@2.6.0) + ## v2.5.1 Date: 2024-01-18 @@ -293,7 +464,7 @@ Date: 2023-12-22 - `@remix-run/dev`: Vite - Remove `unstable_viteServerBuildModuleId` in favor of manually referencing virtual module name `"virtual:remix/server-build"` ([#8264](https://github.com/remix-run/remix/pull/8264)) - - **This is a breaking change for projects using the unstable Vite plugin with a custom server.** + - ⚠️ **This is a breaking change for projects using the unstable Vite plugin with a custom server** - This change was made to avoid issues where `@remix-run/dev` could be inadvertently required in your server's production dependencies. - Instead, you should manually write the virtual module name `"virtual:remix/server-build"` when calling `ssrLoadModule` in development. @@ -433,7 +604,7 @@ Remix now enforces strict route exports, and will will throw an error if you hav - `@remix-run/dev`: Vite: fix access to default `entry.{client,server}.tsx` within `pnpm` workspaces on Windows ([#8057](https://github.com/remix-run/remix/pull/8057)) - `@remix-run/dev`: Remove `unstable_createViteServer` and `unstable_loadViteServerBuild` which were only minimal wrappers around Vite's `createServer` and `ssrLoadModule` functions when using a custom server ([#8120](https://github.com/remix-run/remix/pull/8120)) - - ⚠️ **This is a breaking change for projects using the unstable Vite plugin with a custom server.** + - ⚠️ **This is a breaking change for projects using the unstable Vite plugin with a custom server** - Instead, we now provide `unstable_viteServerBuildModuleId` so that custom servers interact with Vite directly rather than via Remix APIs, for example: ```diff @@ -488,7 +659,7 @@ Remix now enforces strict route exports, and will will throw an error if you hav - Disable `server.preTransformRequests` in Vite child compiler since it's only used to process route modules - `@remix-run/dev`: Remove automatic global Node polyfill installation from the built-in Vite dev server and instead allow explicit opt-in ([#8119](https://github.com/remix-run/remix/pull/8119)) - - ⚠️ **This is a breaking change for projects using the unstable Vite plugin without a custom server.** + - ⚠️ **This is a breaking change for projects using the unstable Vite plugin without a custom server** - If you're not using a custom server, you should call `installGlobals` in your Vite config instead. ```diff diff --git a/packages/create-remix/CHANGELOG.md b/packages/create-remix/CHANGELOG.md index 4b32819f2a4..7895b58c360 100644 --- a/packages/create-remix/CHANGELOG.md +++ b/packages/create-remix/CHANGELOG.md @@ -1,5 +1,7 @@ # `create-remix` +## 2.6.0-pre.0 + ## 2.5.1 ### Patch Changes diff --git a/packages/create-remix/package.json b/packages/create-remix/package.json index b6fe15246a9..9c03c2a8374 100644 --- a/packages/create-remix/package.json +++ b/packages/create-remix/package.json @@ -1,6 +1,6 @@ { "name": "create-remix", - "version": "2.5.1", + "version": "2.6.0-pre.0", "description": "Create a new Remix app", "homepage": "https://remix.run", "bugs": { diff --git a/packages/remix-architect/CHANGELOG.md b/packages/remix-architect/CHANGELOG.md index ad0cf40042b..cd86473fc2a 100644 --- a/packages/remix-architect/CHANGELOG.md +++ b/packages/remix-architect/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/architect` +## 2.6.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@2.6.0-pre.0` + ## 2.5.1 ### Patch Changes diff --git a/packages/remix-architect/package.json b/packages/remix-architect/package.json index 27b24c5d498..03978dcabbb 100644 --- a/packages/remix-architect/package.json +++ b/packages/remix-architect/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/architect", - "version": "2.5.1", + "version": "2.6.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": "2.5.1", + "@remix-run/node": "2.6.0-pre.0", "@types/aws-lambda": "^8.10.82" }, "devDependencies": { diff --git a/packages/remix-cloudflare-pages/CHANGELOG.md b/packages/remix-cloudflare-pages/CHANGELOG.md index 4150b9be2fb..5674716b921 100644 --- a/packages/remix-cloudflare-pages/CHANGELOG.md +++ b/packages/remix-cloudflare-pages/CHANGELOG.md @@ -1,5 +1,23 @@ # `@remix-run/cloudflare-pages` +## 2.6.0-pre.0 + +### Patch Changes + +- Vite: Cloudflare Pages support ([#8531](https://github.com/remix-run/remix/pull/8531)) + + To get started with Cloudflare, you can use the [`unstable-vite-cloudflare`][template-vite-cloudflare] template: + + ```shellscript nonumber + npx create-remix@latest --template remix-run/remix/templates/unstable-vite-cloudflare + ``` + + Or read the new docs at [Future > Vite > Cloudflare](https://remix.run/docs/en/main/future/vite#cloudflare) and + [Future > Vite > Migrating > Migrating Cloudflare Functions](https://remix.run/docs/en/main/future/vite#migrating-cloudflare-functions). + +- Updated dependencies: + - `@remix-run/cloudflare@2.6.0-pre.0` + ## 2.5.1 ### Patch Changes diff --git a/packages/remix-cloudflare-pages/package.json b/packages/remix-cloudflare-pages/package.json index 28d0fea07ef..97a692da688 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": "2.5.1", + "version": "2.6.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": "2.5.1" + "@remix-run/cloudflare": "2.6.0-pre.0" }, "devDependencies": { "@cloudflare/workers-types": "^4.20230518.0", diff --git a/packages/remix-cloudflare-workers/CHANGELOG.md b/packages/remix-cloudflare-workers/CHANGELOG.md index 8a80884814a..07c91372a0b 100644 --- a/packages/remix-cloudflare-workers/CHANGELOG.md +++ b/packages/remix-cloudflare-workers/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/cloudflare-workers` +## 2.6.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/cloudflare@2.6.0-pre.0` + ## 2.5.1 ### Patch Changes diff --git a/packages/remix-cloudflare-workers/package.json b/packages/remix-cloudflare-workers/package.json index 4cd000dedd5..58ab1d43eef 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": "2.5.1", + "version": "2.6.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": "2.5.1" + "@remix-run/cloudflare": "2.6.0-pre.0" }, "devDependencies": { "@cloudflare/workers-types": "^4.20230518.0", diff --git a/packages/remix-cloudflare/CHANGELOG.md b/packages/remix-cloudflare/CHANGELOG.md index c944faf6f5e..204425c30fd 100644 --- a/packages/remix-cloudflare/CHANGELOG.md +++ b/packages/remix-cloudflare/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/cloudflare` +## 2.6.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/server-runtime@2.6.0-pre.0` + ## 2.5.1 ### Patch Changes diff --git a/packages/remix-cloudflare/package.json b/packages/remix-cloudflare/package.json index c3278a2532f..30d3faa60b6 100644 --- a/packages/remix-cloudflare/package.json +++ b/packages/remix-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/cloudflare", - "version": "2.5.1", + "version": "2.6.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": "2.5.1" + "@remix-run/server-runtime": "2.6.0-pre.0" }, "devDependencies": { "@cloudflare/workers-types": "^4.20230518.0", diff --git a/packages/remix-css-bundle/CHANGELOG.md b/packages/remix-css-bundle/CHANGELOG.md index afbb8896a00..bacf6b15237 100644 --- a/packages/remix-css-bundle/CHANGELOG.md +++ b/packages/remix-css-bundle/CHANGELOG.md @@ -1,5 +1,7 @@ # @remix-run/css-bundle +## 2.6.0-pre.0 + ## 2.5.1 No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/remix/blob/main/CHANGELOG.md) for an overview of all changes in v2.5.1. diff --git a/packages/remix-css-bundle/package.json b/packages/remix-css-bundle/package.json index 4684cce877d..7f456d2f68f 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": "2.5.1", + "version": "2.6.0-pre.0", "description": "CSS bundle href when using CSS bundling features in Remix", "homepage": "https://remix.run", "bugs": { diff --git a/packages/remix-deno/CHANGELOG.md b/packages/remix-deno/CHANGELOG.md index ca86bcbc1af..7652f43a85d 100644 --- a/packages/remix-deno/CHANGELOG.md +++ b/packages/remix-deno/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/deno` +## 2.6.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/server-runtime@2.6.0-pre.0` + ## 2.5.1 ### Patch Changes diff --git a/packages/remix-deno/package.json b/packages/remix-deno/package.json index b2659631fcb..ccbb1f9b689 100644 --- a/packages/remix-deno/package.json +++ b/packages/remix-deno/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/deno", - "version": "2.5.1", + "version": "2.6.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": "2.5.1", + "@remix-run/server-runtime": "2.6.0-pre.0", "mime": "^3.0.0" }, "peerDependencies": { diff --git a/packages/remix-dev/CHANGELOG.md b/packages/remix-dev/CHANGELOG.md index 5a16c2be3ca..243e44e8270 100644 --- a/packages/remix-dev/CHANGELOG.md +++ b/packages/remix-dev/CHANGELOG.md @@ -1,5 +1,163 @@ # `@remix-run/dev` +## 2.6.0-pre.0 + +### Minor Changes + +- Add `future.v3_throwAbortReason` flag to throw `request.signal.reason` when a request is aborted instead of an `Error` such as `new Error("query() call aborted: GET /path")` ([#8251](https://github.com/remix-run/remix/pull/8251)) + +### Patch Changes + +- Vite: Add `manifest` option to Vite plugin to enable writing a `.remix/manifest.json` file to the build directory ([#8575](https://github.com/remix-run/remix/pull/8575)) + + **This is a breaking change for consumers of the Vite plugin's "server bundles" feature.** + + The `build/server/bundles.json` file has been superseded by the more general `build/.remix/manifest.json`. While the old server bundles manifest was always written to disk when generating server bundles, the build manifest file must be explicitly enabled via the `manifest` option. + +- Vite: add `--sourcemapClient` and `--sourcemapServer` flags to `remix vite:build` ([#8613](https://github.com/remix-run/remix/pull/8613)) + + - `--sourcemapClient` + - `--sourcemapClient=inline` + - `--sourcemapClient=hidden` + + - `--sourcemapServer` + - `--sourcemapServer=inline` + - `--sourcemapServer=hidden` + + See https://vitejs.dev/config/build-options.html#build-sourcemap + +- Vite: Validate IDs returned from the `serverBundles` function to ensure they only contain alphanumeric characters, hyphens and underscores ([#8598](https://github.com/remix-run/remix/pull/8598)) +- Vite: fix "could not fast refresh" false alarm ([#8580](https://github.com/remix-run/remix/pull/8580)) + + HMR is already functioning correctly but was incorrectly logging that it "could not fast refresh" on internal client routes. + Now internal client routes correctly register Remix exports like `meta` for fast refresh, + which removes the false alarm. + +- Vite: Cloudflare Pages support ([#8531](https://github.com/remix-run/remix/pull/8531)) + + To get started with Cloudflare, you can use the [`unstable-vite-cloudflare`][template-vite-cloudflare] template: + + ```shellscript nonumber + npx create-remix@latest --template remix-run/remix/templates/unstable-vite-cloudflare + ``` + + Or read the new docs at [Future > Vite > Cloudflare](https://remix.run/docs/en/main/future/vite#cloudflare) and + [Future > Vite > Migrating > Migrating Cloudflare Functions](https://remix.run/docs/en/main/future/vite#migrating-cloudflare-functions). + +- Vite: Remove undocumented backwards compatibility layer for Vite v4 ([#8581](https://github.com/remix-run/remix/pull/8581)) +- Vite: rely on Vite plugin ordering ([#8627](https://github.com/remix-run/remix/pull/8627)) + + **This is a breaking change for projects using the unstable Vite plugin.** + + The Remix plugin expects to process JavaScript or TypeScript files, so any transpilation from other languages must be done first. + For example, that means putting the MDX plugin _before_ the Remix plugin: + + ```diff + import mdx from "@mdx-js/rollup"; + import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { defineConfig } from "vite"; + + export default defineConfig({ + plugins: [ + + mdx(), + remix() + - mdx(), + ], + }); + ``` + + Previously, the Remix plugin misused `enforce: "post"` from Vite's plugin API to ensure that it ran last. + However, this caused other unforeseen issues. + Instead, we now rely on standard Vite semantics for plugin ordering. + + The official [Vite React SWC plugin](https://github.com/vitejs/vite-plugin-react-swc/blob/main/src/index.ts#L97-L116) also relies on plugin ordering for MDX. + +- Vite: Add `presets` option to ease integration with different platforms and tools. ([#8514](https://github.com/remix-run/remix/pull/8514)) +- Vite: Remove interop with ``, rely on `` instead ([#8636](https://github.com/remix-run/remix/pull/8636)) + + **This is a breaking change for projects using the unstable Vite plugin.** + + Vite provides a robust client-side runtime for development features like HMR, + making the `` component obsolete. + + In fact, having a separate dev scripts component was causing issues with script execution order. + To work around this, the Remix Vite plugin used to override `` into a bespoke + implementation that was compatible with Vite. + + Instead of all this indirection, now the Remix Vite plugin instructs the `` component + to automatically include Vite's client-side runtime and other dev-only scripts. + + ```diff + import { + - LiveReload, + Outlet, + Scripts, + } + + export default function App() { + return ( + + + + + + + - + + + ) + } + ``` + +- Vite: Add `buildEnd` hook ([#8620](https://github.com/remix-run/remix/pull/8620)) +- Vite: Add `mode` field into generated server build ([#8539](https://github.com/remix-run/remix/pull/8539)) +- Vite: Only write Vite manifest files if `build.manifest` is enabled within the Vite config ([#8599](https://github.com/remix-run/remix/pull/8599)) + + **This is a breaking change for consumers of Vite's `manifest.json` files.** + + To explicitly enable generation of Vite manifest files, you must set `build.manifest` to `true` in your Vite config. + + ```ts + export default defineConfig({ + build: { manifest: true }, + // ... + }); + ``` + +- Vite: reduce network calls for route modules during HMR ([#8591](https://github.com/remix-run/remix/pull/8591)) +- Vite: Add new `buildDirectory` option with a default value of `"build"`. This replaces the old `assetsBuildDirectory` and `serverBuildDirectory` options which defaulted to `"build/client"` and `"build/server"` respectively. ([#8575](https://github.com/remix-run/remix/pull/8575)) + + **This is a breaking change for consumers of the Vite plugin that were using the `assetsBuildDirectory` and `serverBuildDirectory` options.** + + The Remix Vite plugin now builds into a single directory containing `client` and `server` directories. If you've customized your build output directories, you'll need to migrate to the new `buildDirectory` option, e.g. + + ```diff + import { unstable_vitePlugin as remix } from "@remix-run/dev"; + import { defineConfig } from "vite"; + + export default defineConfig({ + plugins: [ + remix({ + - serverBuildDirectory: "dist/server", + - assetsBuildDirectory: "dist/client", + + buildDirectory: "dist", + }) + ], + }); + ``` + +- Vite: Remove `unstable` prefix from `serverBundles` option. ([#8596](https://github.com/remix-run/remix/pull/8596)) +- Vite: Write Vite manifest files to `build/.vite` directory rather than being nested within `build/client` and `build/server` directories. ([#8599](https://github.com/remix-run/remix/pull/8599)) + + **This is a breaking change for consumers of Vite's `manifest.json` files.** + + Vite manifest files are now written to the Remix build directory. Since all Vite manifests are now in the same directory, they're no longer named `manifest.json`. Instead, they're named `build/.vite/client-manifest.json` and `build/.vite/server-manifest.json`, or `build/.vite/server-{BUNDLE_ID}-manifest.json` when using server bundles. + +- Updated dependencies: + - `@remix-run/server-runtime@2.6.0-pre.0` + - `@remix-run/node@2.6.0-pre.0` + - `@remix-run/serve@2.6.0-pre.0` + ## 2.5.1 ### Patch Changes diff --git a/packages/remix-dev/package.json b/packages/remix-dev/package.json index dd4ca1e9a74..d3299fa651c 100644 --- a/packages/remix-dev/package.json +++ b/packages/remix-dev/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/dev", - "version": "2.5.1", + "version": "2.6.0-pre.0", "description": "Dev tools and CLI for Remix", "homepage": "https://remix.run", "bugs": { @@ -28,9 +28,9 @@ "@babel/types": "^7.22.5", "@mdx-js/mdx": "^2.3.0", "@npmcli/package-json": "^4.0.1", - "@remix-run/node": "2.5.1", + "@remix-run/node": "2.6.0-pre.0", "@remix-run/router": "1.15.0-pre.0", - "@remix-run/server-runtime": "2.5.1", + "@remix-run/server-runtime": "2.6.0-pre.0", "@types/mdx": "^2.0.5", "@vanilla-extract/integration": "^6.2.0", "arg": "^5.0.1", @@ -73,7 +73,7 @@ "ws": "^7.4.5" }, "devDependencies": { - "@remix-run/serve": "2.5.1", + "@remix-run/serve": "2.6.0-pre.0", "@types/cacache": "^17.0.0", "@types/cross-spawn": "^6.0.2", "@types/gunzip-maybe": "^1.4.0", @@ -95,7 +95,7 @@ "wrangler": "^3.24.0" }, "peerDependencies": { - "@remix-run/serve": "^2.5.1", + "@remix-run/serve": "^2.6.0-pre.0", "typescript": "^5.1.0", "vite": "^5.0.0", "wrangler": "^3.24.0" diff --git a/packages/remix-eslint-config/CHANGELOG.md b/packages/remix-eslint-config/CHANGELOG.md index 71425320d4a..a4536d5f791 100644 --- a/packages/remix-eslint-config/CHANGELOG.md +++ b/packages/remix-eslint-config/CHANGELOG.md @@ -1,5 +1,7 @@ # `@remix-run/eslint-config` +## 2.6.0-pre.0 + ## 2.5.1 No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/remix/blob/main/CHANGELOG.md) for an overview of all changes in v2.5.1. diff --git a/packages/remix-eslint-config/package.json b/packages/remix-eslint-config/package.json index 58562d85c21..e0b9537a0a6 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": "2.5.1", + "version": "2.6.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 2f83a48a6ee..4e53f3b6d36 100644 --- a/packages/remix-express/CHANGELOG.md +++ b/packages/remix-express/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/express` +## 2.6.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@2.6.0-pre.0` + ## 2.5.1 ### Patch Changes diff --git a/packages/remix-express/package.json b/packages/remix-express/package.json index ad1e7aa2d56..c046dad3016 100644 --- a/packages/remix-express/package.json +++ b/packages/remix-express/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/express", - "version": "2.5.1", + "version": "2.6.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": "2.5.1" + "@remix-run/node": "2.6.0-pre.0" }, "devDependencies": { "@types/express": "^4.17.9", diff --git a/packages/remix-node/CHANGELOG.md b/packages/remix-node/CHANGELOG.md index 5e91d2c2a95..114902d3c69 100644 --- a/packages/remix-node/CHANGELOG.md +++ b/packages/remix-node/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/node` +## 2.6.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/server-runtime@2.6.0-pre.0` + ## 2.5.1 ### Patch Changes diff --git a/packages/remix-node/package.json b/packages/remix-node/package.json index 002fc4a2ca2..78a9487738d 100644 --- a/packages/remix-node/package.json +++ b/packages/remix-node/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/node", - "version": "2.5.1", + "version": "2.6.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": "2.5.1", + "@remix-run/server-runtime": "2.6.0-pre.0", "@remix-run/web-fetch": "^4.4.2", "@remix-run/web-file": "^3.1.0", "@remix-run/web-stream": "^1.1.0", diff --git a/packages/remix-react/CHANGELOG.md b/packages/remix-react/CHANGELOG.md index 70111846f53..405e1214196 100644 --- a/packages/remix-react/CHANGELOG.md +++ b/packages/remix-react/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/react` +## 2.6.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/server-runtime@2.6.0-pre.0` + ## 2.5.1 ### Patch Changes diff --git a/packages/remix-react/package.json b/packages/remix-react/package.json index 7c8d09a1782..f8b253c8530 100644 --- a/packages/remix-react/package.json +++ b/packages/remix-react/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/react", - "version": "2.5.1", + "version": "2.6.0-pre.0", "description": "React DOM bindings for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -17,7 +17,7 @@ "module": "dist/esm/index.js", "dependencies": { "@remix-run/router": "1.15.0-pre.0", - "@remix-run/server-runtime": "2.5.1", + "@remix-run/server-runtime": "2.6.0-pre.0", "react-router": "6.22.0-pre.0", "react-router-dom": "6.22.0-pre.0" }, diff --git a/packages/remix-serve/CHANGELOG.md b/packages/remix-serve/CHANGELOG.md index add36bfff4c..4707b9a3c0a 100644 --- a/packages/remix-serve/CHANGELOG.md +++ b/packages/remix-serve/CHANGELOG.md @@ -1,5 +1,13 @@ # `@remix-run/serve` +## 2.6.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@2.6.0-pre.0` + - `@remix-run/express@2.6.0-pre.0` + ## 2.5.1 ### Patch Changes diff --git a/packages/remix-serve/package.json b/packages/remix-serve/package.json index 93957d67d5b..e56c6416553 100644 --- a/packages/remix-serve/package.json +++ b/packages/remix-serve/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/serve", - "version": "2.5.1", + "version": "2.6.0-pre.0", "description": "Production application server for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" @@ -15,8 +15,8 @@ "remix-serve": "dist/cli.js" }, "dependencies": { - "@remix-run/express": "2.5.1", - "@remix-run/node": "2.5.1", + "@remix-run/express": "2.6.0-pre.0", + "@remix-run/node": "2.6.0-pre.0", "chokidar": "^3.5.3", "compression": "^1.7.4", "express": "^4.17.1", diff --git a/packages/remix-server-runtime/CHANGELOG.md b/packages/remix-server-runtime/CHANGELOG.md index 162d50ab83c..1127116ed5e 100644 --- a/packages/remix-server-runtime/CHANGELOG.md +++ b/packages/remix-server-runtime/CHANGELOG.md @@ -1,5 +1,26 @@ # `@remix-run/server-runtime` +## 2.6.0-pre.0 + +### Minor Changes + +- Add `future.v3_throwAbortReason` flag to throw `request.signal.reason` when a request is aborted instead of an `Error` such as `new Error("query() call aborted: GET /path")` ([#8251](https://github.com/remix-run/remix/pull/8251)) + +### Patch Changes + +- Vite: Cloudflare Pages support ([#8531](https://github.com/remix-run/remix/pull/8531)) + + To get started with Cloudflare, you can use the [`unstable-vite-cloudflare`][template-vite-cloudflare] template: + + ```shellscript nonumber + npx create-remix@latest --template remix-run/remix/templates/unstable-vite-cloudflare + ``` + + Or read the new docs at [Future > Vite > Cloudflare](https://remix.run/docs/en/main/future/vite#cloudflare) and + [Future > Vite > Migrating > Migrating Cloudflare Functions](https://remix.run/docs/en/main/future/vite#migrating-cloudflare-functions). + +- Unwrap thrown `Response`'s from `entry.server` into `ErrorResponse`s and preserve the status code ([#8577](https://github.com/remix-run/remix/pull/8577)) + ## 2.5.1 No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/remix/blob/main/CHANGELOG.md) for an overview of all changes in v2.5.1. diff --git a/packages/remix-server-runtime/package.json b/packages/remix-server-runtime/package.json index 1ade96e08b3..18ffddd37ec 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": "2.5.1", + "version": "2.6.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 20f317f14c8..08a4b4a0125 100644 --- a/packages/remix-testing/CHANGELOG.md +++ b/packages/remix-testing/CHANGELOG.md @@ -1,5 +1,13 @@ # `@remix-run/testing` +## 2.6.0-pre.0 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@2.6.0-pre.0` + - `@remix-run/react@2.6.0-pre.0` + ## 2.5.1 ### Patch Changes diff --git a/packages/remix-testing/package.json b/packages/remix-testing/package.json index 369ff9d5b37..6149c51378d 100644 --- a/packages/remix-testing/package.json +++ b/packages/remix-testing/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/testing", - "version": "2.5.1", + "version": "2.6.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": "2.5.1", - "@remix-run/react": "2.5.1", + "@remix-run/node": "2.6.0-pre.0", + "@remix-run/react": "2.6.0-pre.0", "@remix-run/router": "1.15.0-pre.0", "react-router-dom": "6.22.0-pre.0" }, diff --git a/packages/remix/package.json b/packages/remix/package.json index bc0ef50fe0f..f6cc1ab69cc 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -1,6 +1,6 @@ { "name": "remix", - "version": "2.5.1", + "version": "2.6.0-pre.0", "description": "A framework for building better websites", "homepage": "https://remix.run", "bugs": {