Change8

remix@3.0.0-beta.6

Breaking Changes
📦 remixView on GitHub →
10 breaking5 features🔧 19 symbols

Summary

This release introduces significant breaking changes to Remix's API, including updated import paths, changes to asset server configuration, and modifications in route pattern handling. It also adds a new `remix db` workflow, integrated HMR, and enhanced form navigation.

⚠️ Breaking Changes

  • Legacy package-aligned `remix/*` aliases have been removed. Update imports to use canonical entrypoints like `remix/middleware/auth`, `remix/data-table/postgres`, `remix/router`, etc.
  • `createAssetServer()` from `remix/assets` now uses `allowFiles` and `denyFiles` instead of `allow` and `deny` for file path access rules.
  • Custom `encode` and `decode` functions in `remix/cookie` are now treated as the complete cookie value codec. Custom encoded values are signed and serialized as-is, without Remix's default base64 encoding. The default codec retains base64-safe representation.
  • Route patterns now use delimiter-bounded params. Params stop at raw `/` and `.`, but not `-`. Ambiguous adjacent captures are rejected, and matching work is bounded.
  • Href helpers from `remix/route-pattern/href` and `remix/routes` now take search parameters in a `searchParams` options property. The options object also accepts a `baseURL`.
  • `remix/middleware/session` now makes session cookies HTTP-only by default when `httpOnly` is omitted. Set `httpOnly: false` explicitly if client-side JavaScript needs to read the cookie. `Cookie.httpOnly` 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`.
  • The programmatic `runRemixTest()` API from `remix/test/cli` now accepts typed runner options instead of raw command-line arguments.
  • Browser frame resolvers now receive one options object instead of positional `signal` and `target` arguments. Destructure `signal` and `target` from the options object.
  • Replace the removed adapter and migration-runner APIs with a concrete database and its lifecycle methods. Use dialect factories like `createPostgresDatabase()` and call methods like `db.migrate(migrations)` instead of `migrationRunner.migrate()`.

Migration Steps

  1. Update imports from legacy `remix/*` aliases to canonical entrypoints (e.g., `import { requireAuth } from 'remix/middleware/auth'`).
  2. Update `createAssetServer()` calls to use `allowFiles` and `denyFiles` instead of `allow` and `deny`.
  3. If using custom `encode`/`decode` in `remix/cookie`, be aware they now form the complete codec.
  4. Review route patterns for delimiter-bounded params. Adjust patterns like `/:year-:month` to `/:date` or separate captures.
  5. Update href generation calls to pass search parameters in a `searchParams` options property (e.g., `userRoute.href({ id: '123' }, { searchParams: { tab: 'settings' } })`).
  6. If session cookies need to be accessible by client-side JavaScript, explicitly set `httpOnly: false` in `remix/middleware/session`.
  7. Migrate test configurations from `remix-test.config.ts` or `.js` to the `test` property in `remix.json`.
  8. Update programmatic test runner calls using `runRemixTest()` to pass typed runner options.
  9. Update browser frame resolver signatures to accept a single options object and destructure `signal` and `target`.
  10. Replace database adapter and migration-runner APIs with concrete database factories (e.g., `createPostgresDatabase`) and their lifecycle methods (e.g., `db.migrate(migrations)`).

✨ New Features

  • Added an `allowPackages` option to `createAssetServer()` for serving packages and their dependencies without listing every file.
  • Added a new `remix db` workflow for inspecting migration status, migrating, seeding, wiping, and resetting the app database. Configure built-in SQLite, PostgreSQL, or MySQL databases in `remix.json`.
  • Added complete `createPostgresDatabase()`, `createMysqlDatabase()`, and `createSqliteDatabase()` factories through `remix/data-table/postgres`, `remix/data-table/mysql`, and `remix/data-table/sqlite`.
  • Added an integrated full-stack hot module replacement (HMR) workflow. Run `npm run hmr` to reload server modules and update UI components in place while preserving state.
  • Remix UI navigation now progressively enhances same-origin forms into frame navigations. Forms support `rmx-target`, `rmx-document`, and `rmx-history="push|replace"`.

Affected Symbols