Get Started

Upgrading

Move an app to new @frigear-nu releases with one command, and work through what it cannot change for you.

What you'll have afterwards:

  • Every @frigear-nu/* package of your workspace on the same, current release.
  • The code changes of the breaking releases in between, made or listed with where to make them.
  • A database migration for the schema changes.

Frigear packages are still below 1.0, so a minor release can break things. Upgrade them together, not one at a time: they share build-time state and their releases are tested against each other.

Prerequisites

A pnpm workspace with a Frigear app, as Installation creates, and a clean git status, so you can review the upgrade as one diff.

Run the upgrade

From anywhere in the workspace:

pnpx @frigear-nu/cli@latest upgrade --dry-run

The dry run prints the report and changes nothing. When the version table looks right, run it for real:

pnpx @frigear-nu/cli@latest upgrade

The command:

  1. moves every @frigear-nu/* pin to the latest release: package.json files and the catalog, overrides and minimumReleaseAgeExclude entries of pnpm-workspace.yaml, keeping each range's operator;
  2. rewrites code where a change is mechanical, such as a route that moved;
  3. writes frigear-upgrade.md at the workspace root, a checklist of everything else;
  4. runs pnpm install.

Pass package names to upgrade only some packages (upgrade auth users), or --to auth@0.6.1 to stop at a version. All the options are in the CLI reference.

pnpx caches what @latest resolved to for a day. If it answers Unknown command upgrade, it ran an older CLI: name the version (pnpx @frigear-nu/cli@0.2.1 upgrade, see npm view @frigear-nu/cli version).

The install runs nuxt prepare, which fails while the report still has items that break the build, such as admin.settings.roles. The command then says so and stops: work through the report and run pnpm install again. It also warns when the lockfile ends up with two versions of one @frigear-nu package, which the modules do not support. Usually the lockfile kept an old entry (a loose optional peer such as >=0.0.1): pnpm dedupe removes it. If the warning stays, something pins the old version; raise that range or add the overrides entry it prints. The same goes for libraries the modules share with the app (zod, h3, vue, drizzle-orm, ...): when an app pins one lower than the modules need ("zod": "^4.6.5" next to modules on ^4.6.7), pnpm installs two copies of one major and the Nitro build can ship a broken one (Cannot find module …/.output/server/node_modules/zod/v4/index.js at boot). Raise the app's range to the version the command prints.

patchedDependencies of a bumped package move with it, and the patch file is renamed to the new version. The report lists them: check that each patch still applies, and drop it when the release already has the change.

Work through the report

Each section of the report is one breaking change, with its package, the release that made it and a docs link. A line with a file and line number is code to change; a line without one is a step for the whole app.

Most of the work since 0.4 is the move to permissions: checks become authorize(event, permission, record?), roles grant permissions, and hooks become authorization:before or policies. Migrate to the permission model is the full mapping. Choosing the permission names is yours: the command lists each place, but never guesses.

Then:

pnpm db:generate   # in every app with a database; commit the migration
pnpm lint && pnpm typecheck && pnpm test && pnpm build

Delete frigear-upgrade.md once every box is ticked, or keep it in the pull request description.

Breaking changes by release

What the command handles for each release. Rewritten means it changes the code; listed means it shows you where.

ReleaseChangeThe command
auth 0.1.4/api/auth/tokens → /api/auth/me/tokens, /api/auth/webauthn/credentials → /api/auth/me/passkeys, /api/_bootstrap → /api/auth/bootstrap, logout is POST /api/auth/logoutRewritten; logout links listed (they must POST)
users 1.1.4PATCH /api/users/me, PUT /api/users/me/email, PUT /api/users/me/password replace the POST routesRewritten; check the HTTP method
admin 0.1.3, account 0.1.3Admin* components and AccountHeaderRight removedListed
auth 0.3.0auth provides $api and useApi(): an app plugin that also provides api fails every SSR page with Cannot redefine property: $apiLists app plugins providing api and app useApi composables
auth 0.4.0Sessions are sealed with NUXT_APP_SECRET; every user signs in again once; users.sessionVersion is newAdds NUXT_APP_SECRET= next to NUXT_SESSION_PASSWORD in the .env.example of apps with server sessions; lists runtimeConfig.session.password
menu 0.3.0, mcp 0.4.0Items and MCP definitions take permissionListed
admin 0.4.0, account 0.5.0admin.settings.roles, documents[].roles → permission (build error)Listed from nuxt.config
auth 0.5.0Scopes, staff guards and requireUser(event, { scopes }) removed; authentication.scopes ignored; tokens must be minted againListed
authorization 0.5.0Abilities, bouncer, rbac and the old role options removed; <Can ability> gone; users.role is copied once and never read again; roles add up with defaultRolesListed, including nuxt.config options, reads and writes of user.role, role helpers (effectiveRole), admin allowlists and session mappers
users 3.0.0users:admin:* hooks and helpers removed; listing users needs users:list; roles move to authorization_user_rolesListed; verify the data with the SQL in the migration guide
auth 0.6.0defineAccess, registerAccess and the typed PermissionNothing to do: addPermission still works
events 0.6.0With the hub of @frigear-nu/dashboard, pages.tickets: true is /dashboard/tickets, in the hub's dashboard menu; /account/tickets redirects thereLists hard-coded /account/tickets links, and tickets: true in apps with the dashboard (set '/account/tickets' to keep it in the account)
oauth-server 0.9.0With the hub of @frigear-nu/dashboard, pages.applications: true is /dashboard/apps, in the hub's dashboard menu; /account/applications redirects thereLists hard-coded /account/applications links, and applications: true in apps with the dashboard (set '/account/applications' to keep it in the account)
mcp 0.6.0With @frigear-nu/oauth-server installed, /mcp is an OAuth resource: a request without any credential gets 401 with a WWW-Authenticate challenge instead of an empty tool list, and a refused bearer token 401 invalid_token instead of an empty listNothing to do; mcpModules.oauth: { requireAuth: false } keeps anonymous tool lists, mcpModules.oauth: false turns sign-in for MCP clients off
module-kit 1.4.0, ui 0.3.0, auth 0.7.0Bootstrap providers are preload providers: registerBootstrapProvider → registerPreloadProvider (scope → area), getBootstrapProviders → getPreloadProviders, #bootstrap/providers → #preload/providers, loadBootstrap → loadPreload, resetBootstrap → resetPreload; /api/auth/bootstrap?scope=<scope> → /api/<area>/preload, served by the area's owner (servePreloadArea); the route no longer authenticates, so providers check the callerRewritten; uses of the old route and defineBootstrapRegistry listed
teams 0.2.0Projects are their own records (projects, project_members with lead/member, project_teams), with /admin/projects, /projects and the /api/admin/projects and /api/projects routes. The shipped project ladder (PROJECT_TEAM_KIND), team_contributions and the /api/admin/teams/:id/contributions routes, useTeamContributionActions, the public DTO's contributors/workingOn (now projects) and public.teams.multipleSections are removedLists uses of the removed names and routes, and kind: 'project' in nuxt.config; the app's migration has to copy project teams into projects (see Projects), and project images are uploaded again
account 0.7.0The documents page is gone: settings.pages.documents, settings.documents and /account/documents removed (build error); files for signed-in users live in DocumentsRemoves both options from nuxt.config and lists the files they named and links to /account/documents; upload the files through /admin/documents

Nuxt 4.7 and Nitro v3

The modules support Nuxt 4.7 on both Nitro majors. Upgrade nuxt together with the @frigear-nu/* packages: on Nuxt 4.7, a @frigear-nu/module-kit from 1.3.5 or earlier no longer gives the server code of its modules auto-imports, and their routes fail with useRuntimeConfig is not defined (or another auto-import). pnpm dedupe afterwards, so one copy of module-kit is left.

Nuxt builds the server with Nitro v2 (nitropack) unless the app lists nitro in its dependencies:

pnpm add nitro

The modules still use the h3 v1 API, which Nuxt's nitroLegacy layer keeps working on Nitro v3. It is on by default on Nuxt 4, so leave it on: nitroLegacy: false and future.compatibilityVersion: 5 are not supported yet. Remove nitro to go back to Nitro v2.

Next steps

Copyright © 2026