Change8

cli@0.3.0

Breaking Changes
📦 remixView on GitHub →
5 breaking2 features🐛 5 fixes🔧 7 symbols

Summary

This release introduces a major breaking change restructuring how Remix handles route controllers, moving from `app/controllers` to `app/actions` and updating `router.map()` usage. It also updates the default app template and fixes several CLI argument and scaffolding issues.

⚠️ Breaking Changes

  • Remix app scaffolding, `remix doctor`, and `remix routes` now use `app/actions` instead of `app/controllers`. Move existing `app/controllers` content to `app/actions` and consolidate root leaf route actions into `app/actions/controller.tsx`.
  • Root route actions previously in standalone files (e.g., `app/controllers/home.tsx`) must now be moved into the `actions` object of the root controller (`app/actions/controller.tsx`).
  • Nested route maps must now live under directories named for route-map keys, with their corresponding controller files named `controller.tsx` (e.g., `routes.auth` is now owned by `app/actions/auth/controller.tsx`).
  • The way `router.map()` is called has changed: map nested route maps explicitly in `app/router.ts` (e.g., `router.map(routes.auth, authController)`). The root controller only owns direct leaf routes passed to the initial `router.map(routes, rootController)` call.
  • Controller middleware now only applies to direct actions within that controller; middleware no longer cascades across controllers registered for nested route maps. Copy necessary middleware to every controller that requires it.

Migration Steps

  1. Rename the directory `app/controllers` to `app/actions`.
  2. Consolidate root leaf route files from `app/controllers` into the `actions` object within `app/actions/controller.tsx`.
  3. Move route-map ownership for nested routes to directories named after route-map keys (e.g., `app/actions/auth/controller.tsx`).
  4. Update calls to `router.map()` to explicitly map nested route maps in `app/router.ts` (e.g., `router.map(routes.auth, authController)`).
  5. Copy any middleware previously relied upon from one controller to protect another controller to each controller that now needs it.
  6. Remove nested route-map keys and unknown action keys from every controller's `actions` object so it only contains direct leaf route keys for its corresponding `router.map()` call.
  7. Move shared cross-route UI components to `app/ui`.

✨ New Features

  • Updated default `remix new` app template to serve static assets from `public/` and include a Remix favicon.
  • Default `remix new` app template now shares the generated document shell between the starter home page and future routes.

🐛 Bug Fixes

  • Fixed CLI argument parsing so `--` separators function correctly after global options.
  • Fixed CLI so completion help can be requested after a shell name.
  • Fixed `remix test` completions to no longer duplicate `--help` output.
  • Fixed `remix new` to correctly include the template `.gitignore` file from the published CLI package.
  • Simplified default app template asset server configuration to correctly serve package imports through `node_modules` for workspace installs.

Affected Symbols