Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/wet-walls-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@react-router/dev": patch
---

Copy `server.watch` config options from `vite.config.(ts|js)` file to child vite server in development mode.
2 changes: 1 addition & 1 deletion .github/workflows/close-no-repro-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: pnpm/[email protected]

- name: ⎔ Setup node
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
# required for --experimental-strip-types
node-version: 22
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deduplicate-lock-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: pnpm/action-setup@v4

- name: ⎔ Setup node
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: pnpm/action-setup@v4

- name: ⎔ Setup node
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: pnpm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: pnpm/action-setup@v4

- name: ⎔ Setup node
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: pnpm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: pnpm/action-setup@v4

- name: ⎔ Setup node
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: pnpm/action-setup@v4

- name: ⎔ Setup node
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-stage-2-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: pnpm/action-setup@v4

- name: ⎔ Setup node
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: pnpm/action-setup@v4

- name: ⎔ Setup node
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
uses: pnpm/action-setup@v4

- name: ⎔ Setup node
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/shared-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: pnpm/action-setup@v4

- name: ⎔ Setup node
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
cache: "pnpm"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/shared-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
uses: pnpm/action-setup@v4

- name: ⎔ Setup node ${{ matrix.node }}
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
cache: "pnpm"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: pnpm/action-setup@v4

- name: ⎔ Setup node
uses: actions/setup-node@v5
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
cache: pnpm
Expand Down
2 changes: 2 additions & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
- brophdawg11
- btav
- bvangraafeiland
- c0va23
- camthompson
- CanRau
- caprolactam
Expand Down Expand Up @@ -308,6 +309,7 @@
- pawelblaszczyk5
- pcattori
- penx
- peterneave
- petersendidit
- phildl
- phryneas
Expand Down
2 changes: 1 addition & 1 deletion docs/api/data-routers/createHashRouter.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/do
[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.createHashRouter.html)

Create a new [data router](https://api.reactrouter.com/v7/interfaces/react_router.DataRouter.html) that manages the application
path via the URL [`hash`]https://developer.mozilla.org/en-US/docs/Web/API/URL/hash).
path via the URL [`hash`](https://developer.mozilla.org/en-US/docs/Web/API/URL/hash).

## Signature

Expand Down
1 change: 0 additions & 1 deletion integration/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
### Minor Changes

- Unstable Vite support for Node-based Remix apps ([#7590](https://github.com/remix-run/remix/pull/7590))

- `remix build` 👉 `vite build && vite build --ssr`
- `remix dev` 👉 `vite dev`

Expand Down
4 changes: 2 additions & 2 deletions integration/vite-dot-server-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ test.describe("Vite / route / server-only module referenced by client", () => {

` But other route exports in 'app/routes/_index.tsx' depend on '${specifier}'.`,

" See https://remix.run/docs/en/main/guides/vite#splitting-up-client-and-server-code",
" See https://reactrouter.com/explanation/code-splitting#removal-of-server-code",
].forEach(expect(stderr).toMatch);
});
}
Expand Down Expand Up @@ -206,7 +206,7 @@ test.describe("Vite / non-route / server-only module referenced by client", () =

` '${specifier}' imported by 'app/reexport-server-only.ts'`,

" See https://remix.run/docs/en/main/guides/vite#splitting-up-client-and-server-code",
" See https://reactrouter.com/explanation/code-splitting#removal-of-server-code",
].forEach(expect(stderr).toMatch);
});
}
Expand Down
3 changes: 0 additions & 3 deletions packages/react-router-architect/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
- Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))

We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:

- [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
- [`createContext`](https://reactrouter.com/api/utils/createContext)
- `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
Expand Down Expand Up @@ -263,7 +262,6 @@
### Major Changes

- For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837))

- `createCookie`
- `createCookieSessionStorage`
- `createMemorySessionStorage`
Expand All @@ -272,7 +270,6 @@
For consumers running older versions of Node, the `installGlobals` function from `@remix-run/node` has been updated to define `globalThis.crypto`, using [Node's `require('node:crypto').webcrypto` implementation.](https://nodejs.org/api/webcrypto.html)

Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:

- `createCookieFactory`
- `createSessionStorageFactory`
- `createCookieSessionStorageFactory`
Expand Down
3 changes: 0 additions & 3 deletions packages/react-router-cloudflare/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
- Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))

We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:

- [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
- [`createContext`](https://reactrouter.com/api/utils/createContext)
- `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
Expand Down Expand Up @@ -234,7 +233,6 @@

- For Remix consumers migrating to React Router, all exports from `@remix-run/cloudflare-pages` are now provided for React Router consumers in the `@react-router/cloudflare` package. There is no longer a separate package for Cloudflare Pages. ([#11801](https://github.com/remix-run/react-router/pull/11801))
- For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837))

- `createCookie`
- `createCookieSessionStorage`
- `createMemorySessionStorage`
Expand All @@ -243,7 +241,6 @@
For consumers running older versions of Node, the `installGlobals` function from `@remix-run/node` has been updated to define `globalThis.crypto`, using [Node's `require('node:crypto').webcrypto` implementation.](https://nodejs.org/api/webcrypto.html)

Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:

- `createCookieFactory`
- `createSessionStorageFactory`
- `createCookieSessionStorageFactory`
Expand Down
8 changes: 0 additions & 8 deletions packages/react-router-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@
- Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))

We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:

- [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
- [`createContext`](https://reactrouter.com/api/utils/createContext)
- `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
Expand Down Expand Up @@ -899,7 +898,6 @@
```

This initial implementation targets type inference for:

- `Params` : Path parameters from your routing config in `routes.ts` including file-based routing
- `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module
- `ActionData` : Action data from `action` and/or `clientAction` within your route module
Expand All @@ -914,7 +912,6 @@
```

Check out our docs for more:

- [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety)
- [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety)

Expand Down Expand Up @@ -1114,7 +1111,6 @@
- Vite: Provide `Unstable_ServerBundlesFunction` and `Unstable_VitePluginConfig` types ([#8654](https://github.com/remix-run/remix/pull/8654))

- Vite: add `--sourcemapClient` and `--sourcemapServer` flags to `remix vite:build` ([#8613](https://github.com/remix-run/remix/pull/8613))

- `--sourcemapClient`

- `--sourcemapClient=inline`
Expand Down Expand Up @@ -1451,7 +1447,6 @@
- Add support for `clientLoader`/`clientAction`/`HydrateFallback` route exports ([RFC](https://github.com/remix-run/remix/discussions/7634)) ([#8173](https://github.com/remix-run/remix/pull/8173))

Remix now supports loaders/actions that run on the client (in addition to, or instead of the loader/action that runs on the server). While we still recommend server loaders/actions for the majority of your data needs in a Remix app - these provide some levers you can pull for more advanced use-cases such as:

- Leveraging a data source local to the browser (i.e., `localStorage`)
- Managing a client-side cache of server data (like `IndexedDB`)
- Bypassing the Remix server in a BFF setup and hitting your API directly from the browser
Expand Down Expand Up @@ -1855,7 +1850,6 @@
- Output esbuild metafiles for bundle analysis ([#6772](https://github.com/remix-run/remix/pull/6772))

Written to server build directory (`build/` by default):

- `metafile.css.json`
- `metafile.js.json` (browser JS)
- `metafile.server.json` (server JS)
Expand Down Expand Up @@ -1953,7 +1947,6 @@
- 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

Expand Down Expand Up @@ -2224,7 +2217,6 @@
```

The dev server will:

- force `NODE_ENV=development` and warn you if it was previously set to something else
- rebuild your app whenever your Remix app code changes
- restart your app server whenever rebuilds succeed
Expand Down
6 changes: 3 additions & 3 deletions packages/react-router-dev/vite/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,7 @@ export const reactRouterVitePlugin: ReactRouterVitePlugin = () => {
cacheDir: "node_modules/.vite-child-compiler",
mode: viteConfig.mode,
server: {
watch: viteConfig.command === "build" ? null : undefined,
watch: viteConfig.command === "build" ? null : viteConfig.server.watch,
preTransformRequests: false,
hmr: false,
},
Expand Down Expand Up @@ -2084,7 +2084,7 @@ export const reactRouterVitePlugin: ReactRouterVitePlugin = () => {
"",
` But other route exports in '${importerShort}' depend on '${id}'.`,
"",
" See https://remix.run/docs/en/main/guides/vite#splitting-up-client-and-server-code",
" See https://reactrouter.com/explanation/code-splitting#removal-of-server-code",
"",
].join("\n"),
);
Expand All @@ -2096,7 +2096,7 @@ export const reactRouterVitePlugin: ReactRouterVitePlugin = () => {
"",
` '${id}' imported by '${importerShort}'`,
"",
" See https://remix.run/docs/en/main/guides/vite#splitting-up-client-and-server-code",
" See https://reactrouter.com/explanation/code-splitting#removal-of-server-code",
"",
].join("\n"),
);
Expand Down
1 change: 0 additions & 1 deletion packages/react-router-express/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
- Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))

We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:

- [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
- [`createContext`](https://reactrouter.com/api/utils/createContext)
- `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-fs-routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { normalizeSlashes } from "./normalizeSlashes";
/**
* Creates route config from the file system using a convention that matches
* [Remix v2's route file
* naming](https://remix.run/docs/en/v2/file-conventions/routes-files), for use
* naming](https://v2.remix.run/docs/file-conventions/routes), for use
* within `routes.ts`.
*/
export async function flatRoutes(
Expand Down
5 changes: 0 additions & 5 deletions packages/react-router-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
- Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))

We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:

- [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
- [`createContext`](https://reactrouter.com/api/utils/createContext)
- `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
Expand Down Expand Up @@ -236,7 +235,6 @@
- Remove single fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))

- For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837))

- `createCookie`
- `createCookieSessionStorage`
- `createMemorySessionStorage`
Expand All @@ -245,7 +243,6 @@
For consumers running older versions of Node, the `installGlobals` function from `@remix-run/node` has been updated to define `globalThis.crypto`, using [Node's `require('node:crypto').webcrypto` implementation.](https://nodejs.org/api/webcrypto.html)

Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:

- `createCookieFactory`
- `createSessionStorageFactory`
- `createCookieSessionStorageFactory`
Expand Down Expand Up @@ -653,12 +650,10 @@
- Introduces the `defer()` API from `@remix-run/router` with support for server-rendering and HTTP streaming. This utility allows you to defer values returned from `loader` functions by returning promises instead of resolved values. This has been refered to as _"sending a promise over the wire"_. ([#4920](https://github.com/remix-run/remix/pull/4920))

Informational Resources:

- <https://gist.github.com/jacob-ebey/9bde9546c1aafaa6bc8c242054b1be26>
- <https://github.com/remix-run/remix/blob/main/decisions/0004-streaming-apis.md>

Documentation Resources (better docs specific to Remix are in the works):

- <https://reactrouter.com/en/main/utils/defer>
- <https://reactrouter.com/en/main/components/await>
- <https://reactrouter.com/en/main/hooks/use-async-value>
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-node/sessions/fileStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface FileSessionStorageOptions {
* The advantage of using this instead of cookie session storage is that
* files may contain much more data than cookies.
*
* @see https://remix.run/utils/sessions#createfilesessionstorage-node
* @see https://api.reactrouter.com/v7/functions/_react_router_node.createFileSessionStorage
*/
export function createFileSessionStorage<Data = SessionData, FlashData = Data>({
cookie,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-remix-routes-option-adapter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type { DefineRoutesFunction, DefineRouteFunction };

/**
* Adapts routes defined using [Remix's `routes` config
* option](https://remix.run/docs/en/v2/file-conventions/vite-config#routes) to
* option](https://v2.remix.run/docs/file-conventions/vite-config#routes) to
* React Router's config format, for use within `routes.ts`.
*/
export async function remixRoutesOptionAdapter(
Expand Down
2 changes: 0 additions & 2 deletions packages/react-router-serve/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -654,12 +654,10 @@
- Introduces the `defer()` API from `@remix-run/router` with support for server-rendering and HTTP streaming. This utility allows you to defer values returned from `loader` functions by returning promises instead of resolved values. This has been refered to as _"sending a promise over the wire"_. ([#4920](https://github.com/remix-run/remix/pull/4920))

Informational Resources:

- <https://gist.github.com/jacob-ebey/9bde9546c1aafaa6bc8c242054b1be26>
- <https://github.com/remix-run/remix/blob/main/decisions/0004-streaming-apis.md>

Documentation Resources (better docs specific to Remix are in the works):

- <https://reactrouter.com/en/main/utils/defer>
- <https://reactrouter.com/en/main/components/await>
- <https://reactrouter.com/en/main/hooks/use-async-value>
Expand Down
Loading