Skip to content

Commit ab91ebf

Browse files
committed
Merge branch 'main' into markdalgleish/compression-middleware
2 parents 32d78cf + 15ff0fe commit ab91ebf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+3261
-2458
lines changed

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
- **TypeScript**: Strict mode, ESNext target, ES2022 modules, bundler resolution, verbatimModuleSyntax
2828
- **Comments**: Only add non-JSDoc comments when the code is doing something surprising or non-obvious
2929

30+
## Test Structure
31+
32+
- **No loops or conditionals in test suites**: Do not use `for` loops or conditional statements (`if`, `switch`, etc.) to generate test cases within `describe()` blocks. This breaks the Node.js test runner's ability to run individual tests via IDE features (like clicking test icons in the sidebar).
33+
3034
## Demos
3135

3236
- All demo servers should use port **44100** for consistency across the monorepo

demos/bookstore/app/account.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { RouteHandlers } from '@remix-run/fetch-router'
2-
import { redirect } from '@remix-run/fetch-router/response-helpers'
2+
import { createRedirectResponse as redirect } from '@remix-run/response/redirect'
33

44
import { routes } from '../routes.ts'
55
import { Layout } from './layout.tsx'

demos/bookstore/app/admin.books.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { RouteHandlers } from '@remix-run/fetch-router'
2-
import { redirect } from '@remix-run/fetch-router/response-helpers'
2+
import { createRedirectResponse as redirect } from '@remix-run/response/redirect'
33

44
import { routes } from '../routes.ts'
55
import { getAllBooks, getBookById, createBook, updateBook, deleteBook } from './models/books.ts'

demos/bookstore/app/admin.users.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { RouteHandlers } from '@remix-run/fetch-router'
2-
import { redirect } from '@remix-run/fetch-router/response-helpers'
2+
import { createRedirectResponse as redirect } from '@remix-run/response/redirect'
33

44
import { routes } from '../routes.ts'
55
import { getAllUsers, getUserById, updateUser, deleteUser } from './models/users.ts'

demos/bookstore/app/auth.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { RouteHandlers } from '@remix-run/fetch-router'
2-
import { redirect } from '@remix-run/fetch-router/response-helpers'
2+
import { createRedirectResponse as redirect } from '@remix-run/response/redirect'
33

44
import { routes } from '../routes.ts'
55
import {

demos/bookstore/app/cart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { RouteHandlers } from '@remix-run/fetch-router'
2-
import { redirect } from '@remix-run/fetch-router/response-helpers'
2+
import { createRedirectResponse as redirect } from '@remix-run/response/redirect'
33

44
import { routes } from '../routes.ts'
55

demos/bookstore/app/checkout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { RouteHandlers } from '@remix-run/fetch-router'
2-
import { redirect } from '@remix-run/fetch-router/response-helpers'
2+
import { createRedirectResponse as redirect } from '@remix-run/response/redirect'
33

44
import { routes } from '../routes.ts'
55
import { requireAuth } from './middleware/auth.ts'

demos/bookstore/app/middleware/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Middleware, Route } from '@remix-run/fetch-router'
2-
import { redirect } from '@remix-run/fetch-router/response-helpers'
2+
import { createRedirectResponse as redirect } from '@remix-run/response/redirect'
33

44
import { routes } from '../../routes.ts'
55
import { getUserById } from '../models/users.ts'

demos/bookstore/app/uploads.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as res from '@remix-run/fetch-router/response-helpers'
21
import type { BuildRouteHandler } from '@remix-run/fetch-router'
2+
import { createFileResponse as sendFile } from '@remix-run/response/file'
33

44
import type { routes } from '../routes.ts'
55
import { uploadsStorage } from './utils/uploads.ts'
@@ -14,7 +14,7 @@ export let uploadsHandler: BuildRouteHandler<'GET', typeof routes.uploads> = asy
1414
return new Response('File not found', { status: 404 })
1515
}
1616

17-
return res.file(file, request, {
17+
return sendFile(file, request, {
1818
cacheControl: 'public, max-age=31536000',
1919
})
2020
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { Remix } from '@remix-run/dom'
22
import { renderToStream } from '@remix-run/dom/server'
3-
import { html } from '@remix-run/fetch-router/response-helpers'
3+
import { createHtmlResponse } from '@remix-run/response/html'
44

55
import { resolveFrame } from './frame.tsx'
66

77
export function render(element: Remix.RemixElement, init?: ResponseInit) {
8-
return html(renderToStream(element, { resolveFrame }), init)
8+
return createHtmlResponse(renderToStream(element, { resolveFrame }), init)
99
}

0 commit comments

Comments
 (0)