Skip to content
Merged
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
197 changes: 106 additions & 91 deletions CHANGELOG.md

Large diffs are not rendered by default.

31 changes: 3 additions & 28 deletions docs/start/framework/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,37 +81,12 @@ The containerized application can be deployed to any platform that supports Dock

### Vercel

```
npx create-react-router@latest --template remix-run/react-router-templates/vercel
```

- Server Rendering
- Tailwind CSS

### Cloudflare Workers w/ D1

```
npx create-react-router@latest --template remix-run/react-router-templates/cloudflare-d1
```

- Server Rendering
- D1 Database with Drizzle ORM
- Tailwind CSS
Vercel maintains their own template for React Router. Checkout the [Vercel Guide](https://vercel.com/templates/react-router/react-router-boilerplate) for more information.

### Cloudflare Workers

```
npx create-react-router@latest --template remix-run/react-router-templates/cloudflare
```

- Server Rendering
- Tailwind CSS
Cloudflare maintains their own template for React Router. Checkout the [Cloudflare Guide](https://developers.cloudflare.com/workers/framework-guides/web-apps/react-router/) for more information.

### Netlify

```
npx create-react-router@latest --template remix-run/react-router-templates/netlify
```

- Server Rendering
- Tailwind CSS
Netlify maintains their own template for React Router. Checkout the [Netlify Guide](https://docs.netlify.com/build/frameworks/framework-setup-guides/react-router/) for more information.
4 changes: 2 additions & 2 deletions integration/error-boundary-v2-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ test.describe("ErrorBoundary", () => {
await waitForAndAssert(
page,
app,
"#parent-error",
"Unable to decode turbo-stream response",
"#parent-error-response",
"500 CDN Error!",
);
});
});
Expand Down
6 changes: 3 additions & 3 deletions integration/error-data-request-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ test.describe("ErrorBoundary", () => {
let { status, headers, data } =
await fixture.requestSingleFetchData("/_root.data");
expect(status).toBe(200);
expect(headers.has("X-Remix-Error")).toBe(false);
expect(headers.has("X-Remix-Response")).toBe(true);
expect(data).toEqual({});
});

Expand All @@ -122,7 +122,7 @@ test.describe("ErrorBoundary", () => {
},
);
expect(status).toBe(405);
expect(headers.has("X-Remix-Error")).toBe(false);
expect(headers.has("X-Remix-Response")).toBe(true);
expect(data).toEqual({
error: new ErrorResponseImpl(
405,
Expand Down Expand Up @@ -153,7 +153,7 @@ test.describe("ErrorBoundary", () => {
"/i/match/nothing.data",
);
expect(status).toBe(404);
expect(headers.has("X-Remix-Error")).toBe(false);
expect(headers.has("X-Remix-Response")).toBe(true);
expect(data).toEqual({
root: {
error: new ErrorResponseImpl(
Expand Down
2 changes: 2 additions & 0 deletions packages/create-react-router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# `create-react-router`

## 7.9.3

## 7.9.2

_No changes_
Expand Down
2 changes: 1 addition & 1 deletion packages/create-react-router/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-react-router",
"version": "7.9.2",
"version": "7.9.3",
"description": "Create a new React Router app",
"homepage": "https://reactrouter.com",
"bugs": {
Expand Down
8 changes: 8 additions & 0 deletions packages/react-router-architect/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# `@react-router/architect`

## 7.9.3

### Patch Changes

- Updated dependencies:
- `react-router@7.9.3`
- `@react-router/node@7.9.3`

## 7.9.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-architect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-router/architect",
"version": "7.9.2",
"version": "7.9.3",
"description": "Architect server request handler for React Router",
"bugs": {
"url": "https://github.com/remix-run/react-router/issues"
Expand Down
7 changes: 7 additions & 0 deletions packages/react-router-cloudflare/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `@react-router/cloudflare`

## 7.9.3

### Patch Changes

- Updated dependencies:
- `react-router@7.9.3`

## 7.9.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-cloudflare/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-router/cloudflare",
"version": "7.9.2",
"version": "7.9.3",
"description": "Cloudflare platform abstractions for React Router",
"bugs": {
"url": "https://github.com/remix-run/react-router/issues"
Expand Down
9 changes: 9 additions & 0 deletions packages/react-router-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# `@react-router/dev`

## 7.9.3

### Patch Changes

- Updated dependencies:
- `react-router@7.9.3`
- `@react-router/node@7.9.3`
- `@react-router/serve@7.9.3`

## 7.9.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-dev/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-router/dev",
"version": "7.9.2",
"version": "7.9.3",
"description": "Dev tools and CLI for React Router",
"homepage": "https://reactrouter.com",
"bugs": {
Expand Down
7 changes: 7 additions & 0 deletions packages/react-router-dom/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# react-router-dom

## 7.9.3

### Patch Changes

- Updated dependencies:
- `react-router@7.9.3`

## 7.9.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-dom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-router-dom",
"version": "7.9.2",
"version": "7.9.3",
"description": "Declarative routing for React web applications",
"keywords": [
"react",
Expand Down
8 changes: 8 additions & 0 deletions packages/react-router-express/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# `@react-router/express`

## 7.9.3

### Patch Changes

- Updated dependencies:
- `react-router@7.9.3`
- `@react-router/node@7.9.3`

## 7.9.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-express/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-router/express",
"version": "7.9.2",
"version": "7.9.3",
"description": "Express server request handler for React Router",
"bugs": {
"url": "https://github.com/remix-run/react-router/issues"
Expand Down
7 changes: 7 additions & 0 deletions packages/react-router-fs-routes/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `@react-router/fs-routes`

## 7.9.3

### Patch Changes

- Updated dependencies:
- `@react-router/dev@7.9.3`

## 7.9.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-fs-routes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-router/fs-routes",
"version": "7.9.2",
"version": "7.9.3",
"description": "File system routing conventions for React Router, for use within routes.ts",
"bugs": {
"url": "https://github.com/remix-run/react-router/issues"
Expand Down
7 changes: 7 additions & 0 deletions packages/react-router-node/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `@react-router/node`

## 7.9.3

### Patch Changes

- Updated dependencies:
- `react-router@7.9.3`

## 7.9.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-router/node",
"version": "7.9.2",
"version": "7.9.3",
"description": "Node.js platform abstractions for React Router",
"bugs": {
"url": "https://github.com/remix-run/react-router/issues"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `@react-router/remix-config-routes-adapter`

## 7.9.3

### Patch Changes

- Updated dependencies:
- `@react-router/dev@7.9.3`

## 7.9.2

### Patch Changes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-router/remix-routes-option-adapter",
"version": "7.9.2",
"version": "7.9.3",
"description": "Adapter for Remix's \"routes\" config option, for use within routes.ts",
"bugs": {
"url": "https://github.com/remix-run/react-router/issues"
Expand Down
9 changes: 9 additions & 0 deletions packages/react-router-serve/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# `@react-router/serve`

## 7.9.3

### Patch Changes

- Updated dependencies:
- `react-router@7.9.3`
- `@react-router/node@7.9.3`
- `@react-router/express@7.9.3`

## 7.9.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-serve/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-router/serve",
"version": "7.9.2",
"version": "7.9.3",
"description": "Production application server for React Router",
"bugs": {
"url": "https://github.com/remix-run/react-router/issues"
Expand Down
9 changes: 9 additions & 0 deletions packages/react-router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# `react-router`

## 7.9.3

### Patch Changes

- Do not try to use `turbo-stream` to decode CDN errors that never reached the server ([#14385](https://github.com/remix-run/react-router/pull/14385))
- We used to do this but lost this check with the adoption of single fetch

- Fix Data Mode regression causing a 404 during initial load in when `middleware` exists without any `loader` functions ([#14393](https://github.com/remix-run/react-router/pull/14393))

## 7.9.2

### Patch Changes
Expand Down
56 changes: 56 additions & 0 deletions packages/react-router/__tests__/router/context-middleware-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,62 @@ describe("context/middleware", () => {
]);
});

it("runs middleware on initialization even if no loaders exist", async () => {
let snapshot;
router = createRouter({
history: createMemoryHistory(),
routes: [
{
path: "/",
middleware: [
async ({ context }, next) => {
await next();
// Grab a snapshot at the end of the upwards middleware chain
snapshot = context.get(orderContext);
},
getOrderMiddleware(orderContext, "a"),
getOrderMiddleware(orderContext, "b"),
],
children: [
{
index: true,
middleware: [
getOrderMiddleware(orderContext, "c"),
getOrderMiddleware(orderContext, "d"),
],
},
],
},
],
});
let initPromise = new Promise((r) => {
let unsub = router.subscribe((state) => {
if (state.initialized) {
unsub();
r(undefined);
}
});
});
await router.initialize();
await initPromise;
expect(router.state).toMatchObject({
initialized: true,
location: { pathname: "/" },
navigation: { state: "idle" },
errors: null,
});
expect(snapshot).toEqual([
"a middleware - before next()",
"b middleware - before next()",
"c middleware - before next()",
"d middleware - before next()",
"d middleware - after next()",
"c middleware - after next()",
"b middleware - after next()",
"a middleware - after next()",
]);
});

it("runs middleware even if no loaders exist", async () => {
let snapshot;
router = createRouter({
Expand Down
Loading