Change8

remix@3.0.0-beta.10

Breaking Changes
📦 remixView on GitHub →
9 breaking6 features🔧 35 symbols

Summary

This release consolidates changes from multiple beta versions into a single supported prerelease (Beta.10), introducing a new `remix db` workflow, full-stack HMR, and significant API changes for improved structure and functionality.

⚠️ Breaking Changes

  • Legacy package-aligned `remix/*` aliases have been removed in favor of canonical entrypoints. Update imports from `remix/auth-middleware` to `remix/middleware/auth`, `remix/data-table-postgres` to `remix/data-table/postgres`, `remix/fetch-router` to `remix/router`, etc. Middleware now lives under `remix/middleware/*`, database dialects under `remix/data-table/*`, storage adapters under `remix/file-storage/*` and `remix/session-storage/*`, and route definitions from `remix/fetch-router/routes` to `remix/routes`.
  • `createAssetServer()` from `remix/assets` now uses `allowFiles` and `denyFiles` instead of `allow` and `deny` for file path access rules.
  • `remix/cookie` now treats custom `encode` and `decode` functions as the complete cookie value codec. Custom encoded values are signed and serialized as-is instead of being wrapped in Remix's default base64 encoding. The default codec keeps the existing base64-safe representation.
  • Route patterns now use delimiter-bounded params. Params stop at raw `/` and `.`, but not `-`. Ambiguous adjacent captures are now rejected, and matching work is bounded to prevent pathological patterns.
  • Href helpers from `remix/route-pattern/href` and `remix/routes` now take search parameters in a `searchParams` options property instead of as a second positional argument. The options object also accepts a `baseURL`.
  • `remix/middleware/session` now makes session cookies HTTP-only when `httpOnly` is omitted. Set `httpOnly: false` explicitly if client-side JavaScript must read the cookie. `Cookie.httpOnly` from `remix/cookie` now returns `boolean | undefined`.
  • Run tests with `remix test` instead of the removed `remix-test` executable. Move settings from `remix-test.config.ts` or `.js` into the `test` property of `remix.json`.
  • Browser frame resolvers now receive one options object instead of positional `signal` and `target` arguments. The options object contains `signal` and `target`.
  • Replace the removed adapter and migration-runner APIs with a concrete database and its lifecycle methods. Use dialect factories like `createPostgresDatabase()` from `remix/data-table/postgres` instead of `createDatabase()` and `createPostgresDatabaseAdapter()`.

Migration Steps

  1. Update imports from `remix/auth-middleware` to `remix/middleware/auth`, `remix/data-table-postgres` to `remix/data-table/postgres`, `remix/fetch-router` to `remix/router`, etc.
  2. Update `createAssetServer()` calls to use `allowFiles` and `denyFiles` instead of `allow` and `deny`.
  3. If using custom `encode` or `decode` functions in `remix/cookie`, ensure they handle the complete cookie value codec.
  4. Adjust route patterns to use delimiter-bounded params. For patterns like `/:year-:month`, use `/:date` or separate captures.
  5. Update href helper calls to pass search parameters in a `searchParams` options property: `userRoute.href({ id: '123' }, { searchParams: { tab: 'settings' } })`.
  6. If client-side JavaScript needs to read session cookies, set `httpOnly: false` explicitly in `remix/middleware/session`.
  7. Update test commands from `remix-test` to `remix test`.
  8. Move test settings from `remix-test.config.ts` or `.js` to the `test` property in `remix.json`.
  9. Update browser frame resolver calls to pass an options object: `async function resolveFrame(src, options)` where `options` contains `signal` and `target`.
  10. Replace `createDatabase()` and `createPostgresDatabaseAdapter()` with dialect factories like `createPostgresDatabase()` from `remix/data-table/postgres`.
  11. Update migration calls from `migrationRunner.migrate()` to `db.migrate(migrations)` where `db` is obtained from a dialect factory.

✨ New Features

  • Added an `allowPackages` option to `createAssetServer()` from `remix/assets` to serve packages and their dependencies without listing every file.
  • Added a new `remix db` workflow for inspecting migration status, migrating, seeding, wiping, and resetting the current app database. Supports built-in SQLite, PostgreSQL, or MySQL.
  • Added an optional JSONC `remix.json` file for shared `remix db`, `remix test`, and `remix doctor` settings.
  • Added complete `createPostgresDatabase()`, `createMysqlDatabase()`, and `createSqliteDatabase()` factories through `remix/data-table/postgres`, `remix/data-table/mysql`, and `remix/data-table/sqlite`.
  • Includes an integrated full-stack hot module replacement workflow. Run `npm run hmr` to reload server modules and update compatible UI components in place while preserving state.
  • Remix UI navigation now progressively enhances same-origin forms into frame navigations.

Affected Symbols