Migrating to 2.0
Migrating to 2.0
All @xenterprises/nuxt-x-* layers currently ride the hardening line — the published 0.x npm series (nuxt-x-marketing is on 1.x). During this phase breaking changes are allowed, but they are batched into minor releases (never patches) and each one is recorded here. Once every layer is green against the stable-release spec, the program owner cuts a coordinated 2.0.0 across all layers at once — strict semver applies from 2.0 onward.
Versions were realigned to the npm published line on 2026-07-27 — the repo 1.x series was never published, so version numbers continue from npm's last published minors. The coordinated 2.0 cut still happens later by owner decision.
This page collects every breaking note to date. Each entry has a one-line migration pointer; the linked layer section has the full details.
nuxt-x-app
Section: nuxt-x-app
useXCrudv2 factory API — CRUD calls go through the factory:useXCrud<User>('users').all()for lists,.read(id)for detail,.create()for forms. The legacycrud.fetch(params)is gone — assigncrud.filters.valueand/or callcrud.refresh()instead. v2 also addscache,staleTime,optimistic,retry,retryDelay,updateMethod,searchDebounce,errorMessagesoptions,invalidateCache()on.all(), and staticuseXCrud.clearCache(). See useXCrud.useXCrudv3 (v0.6.0) — additive, NOT breaking. v3 adds opt-in options on top of the unchanged v2 chainable factory: server-sidepagination(page/perPage/setPage()), cachescope(string orRef) with staticuseXCrud.clearScope(),sortStyle: 'params' | 'dash', optimisticcreate()(temp-id insert → replace/rollback), 422fieldErrorsextraction, request cancellation (last-issued-wins), and auth-token injection via$getAuthToken(per-callheaderswin). Existing v2 call sites (useXCrud(ep).all()/.read(id)/.create()) work unchanged — no migration needed. See useXCrud.XACrudTableremoved (v0.4) — useXATable+useXCrudinstead. See XATable.useXQueryInvalidationremoved — use Nuxt'sclearNuxtData()/refreshNuxtData().useAppLayoutremoved — useuseXNavigation.
nuxt-x-app-admin
Section: nuxt-x-app-admin
- Requires
@xenterprises/nuxt-x-app@^0.6.0(was^0.5.1) — upgrade the base layer first. useXCrudv2 factory migration (v0.3.0) — crud objects returned byuseXAdmin*composables are now v2 list instances (useXCrud(endpoint).all()); replacecrud.fetch(params)withcrud.filters.value+crud.refresh(), and useuseXCrud(endpoint).read(id)for detail mode. Any consumer touching crud return shapes directly must update.- Layer is now SPA (v0.3.0) — the layer sets
ssr: false, so consumers inherit client-only rendering. Override withssr: truein yournuxt.config.tsto opt back into SSR. x.app.apiUrlnow defaults to/api(v0.3.0, was unset) —useXCrudlist fetches move from/admin/*to/api/admin/*, matching the documented backend contract. Consumers who pointed a backend at the old/admin/*paths must setNUXT_PUBLIC_X_APP_API_URL(e.g. to the empty path) or move their routes. Direct$fetchcalls in composables/components also honorx.app.apiUrl(v0.3.0); the default/apiis unchanged, so consumers who never set the var are unaffected.
nuxt-x-app-formkit
Section: nuxt-x-app-formkit
XFormModal/XFormSlideslot-hijack fix (v0.2.1) —unplugin-formkitpreviously injected its provider inside the overlay and hijacked the internal#contentslot, so the modal/slideover rendered an empty shell. If your overlays render empty, update to>=0.2.1— no markup change required.
nuxt-x-marketing
Section: nuxt-x-marketing
- Blog moved from Builder.io to Nuxt Content — consumers that relied on
NUXT_PUBLIC_BUILDERIO_KEY+ Builder models must migrate posts tocontent/blog/*.mdand install the Content peers (@nuxt/content,better-sqlite3). - Consumers must define their own
content.config.tsblog collection — Nuxt Content v3 resolves a collection'ssourceagainst the layer that defines it, so the layer's defaultblogcollection can never see your posts. Re-declare the collection in your owncontent.config.tsto bind it to your content dir.
nuxt-x-auth-better
Section: nuxt-x-auth-better
xAuth.tokensapp-config block anduseCookieStorageutil removed (v0.5.0) — Better Auth manages its own cookies. Drop any consumer code referencingxAuth.tokensor importing the oldcookieStorageutil.
nuxt-x-affiliate
Section: nuxt-x-affiliate
- Component folder consolidation
X/AF/→XAF/(next minor) — auto-import names (XAFBanner,XAFDashboard, …) are unchanged; only consumers deep-importing component file paths need to update their import paths.
nuxt-x-restaurants
Section: nuxt-x-restaurants
- No intentional public-API breaks upgrading from 0.9.x — re-run typecheck after upgrading, and prefer peers
@xenterprises/nuxt-x-marketing@^1.1.1and@xenterprises/nuxt-x-cards@^0.2.2(or higher).
Upgrade checklist
- Pin all
@xenterprises/*layers to the latest published minor and read the entries above for each layer you extend. - Re-run
typecheck,lint, and your test suite after upgrading. - When the coordinated 2.0.0 is announced, upgrade all layers together — mixed 1.x/2.x combinations are not supported.
