Welcome to our latest release of Next.js Supabase Turbo 2.2.0!
This is a large release in the kit, with a focus on upgrading to EsLint v9, the Registry API, and several other improvements. Here are the key changes:
EsLint v9
We've upgraded to EsLint v9 and the flat file format. This is an effort to make sure the Makerkit tooling is up to date with the latest best practices.
Registry API
We're excited to introduce the Registry API, a new feature that provides a type-safe, flexible way to manage multiple implementations of core services in your Makerkit application.
- Type-safe Registry API: A new abstraction that allows you to manage multiple implementations of services (CMS, billing, etc.)
- Lazy Loading: Implementations are loaded only when needed, reducing initial bundle size
- Runtime Configuration: Easily set up and configure implementations after initialization
- Multiple Provider Support: Seamlessly work with multiple providers for the same service
Example Usage
const billingRegistry = createRegistry<BillingImplementation, 'stripe' | 'lemon-squeezy'>();// Register implementationsbillingRegistry .register('stripe', async () => { const { StripeImplementation } = await import('./stripe'); return new StripeImplementation(); }) .register('lemon-squeezy', async () => { const { LemonSqueezyImplementation } = await import('./lemon-squeezy'); return new LemonSqueezyImplementation(); });const stripe = await billingRegistry.get('stripe');
Previously, switching between different implementations required using a switch statement or a series of if-else statements. This made it difficult to add new implementations or remove existing ones without breaking the code.
- Cleaner Architecture: A standardized way to handle multiple implementations
- Better Developer Experience: Full TypeScript support and intuitive API
- Improved Maintainability: Easier to add new implementations and manage existing ones
Several Other Improvements
We also applied some bug fixes and made several other minor improvements to the kit.