Migration Guide
All migration instructions are consolidated in a single file:
Covers: v2 → v3, v3 → v4, and v4 → v5.
v4 → v5 highlights
The full details (with before/after snippets) are in MIGRATION.md. The breaking changes most likely to affect your code:
- Plugin registration.
Director.registerAdapter()is removed. Register built-ins via the presets (registerAllPlugins()), author custom adapters with theregisterX()factories, or usepluginRegistry.register()with a hand-builtIPlugin. - Leveled pricing. Catalog price tiers are keyed by
minQuantity(lower bound; base= 0) instead ofmaxQuantity. An automatic, idempotent startup migration converts existing data — but update any code that writes prices to useminQuantity. See Leveled Pricing. - Events. Redis / EventBridge transports must be registered explicitly with
setEmitAdapter(RedisEventEmitter())(no more auto-registration on import). - Auth, admin-ui, dependencies. Stateless JWT auth (set
UNCHAINED_TOKEN_SECRET), runtime admin-ui permissions, and several dependency bumps — see the full guide. - Server wiring.
connect()is async and mounts plugin routes itself;initPluginMiddlewaresand the framework route presets are gone. - Ticketing.
@unchainedshop/ticketingis registered as a plugin (createTicketingPlugin,withTicketing) with its own ticket issuer;setupTicketingand thelib/express.js/lib/fastify.jsconnectors are removed, and the ETH minter no longer applies ticket rules. The Ticketing section of MIGRATION.md walks through custom schemas, templates, reimbursement codes, the provider swap and gate access; see also Event Ticketing.
General Upgrade Process
- Read the migration guide for your target version
- Update dependencies in
package.json - Start the platform - database migrations run automatically on startup of instances with workers enabled (
disableWorker/UNCHAINED_DISABLE_WORKERskip them); a failed migration is logged and startup continues - Update code for any breaking API changes
- Test thoroughly before deploying to production
Getting Help
- GitHub Discussions
- GitHub Issues
- support@unchained.shop for enterprise support