๐๏ธ Breaking changes
Lyra v0.4.0 introduces a few breaking changes. This guide will help you migrate your codebase.
๐๏ธ How to upgrade
Upgrading Lyra is as simple as updating the version in your package.json file:
๐๏ธ Components
Lyra v0.4.0 introduces a new way to customize and interact with the library core. The new components system allows you to customize the library behavior by replacing the default components with your own.
๐๏ธ Async methods
With v0.3.1 and below, Lyra methods were synchronous. This meant that you could use them like this:
๐๏ธ CommonJS imports
Lyra now ships ESM modules by default. This allows us to move faster when providing new features and bug fixes, as well as using the "exports" field in package.json to provide a better developer experience.
๐๏ธ Default IDs
With version v0.3.1 and below, Lyra would generate a random ID for each document you inserted. This was a good default, but it didn't allow you to use your own IDs.
๐๏ธ Simplified Imports
Before v0.4.0, Lyra was available both as a CommonJS and an ESM module. This meant that you could import Lyra in two different ways:
๐๏ธ Using TypeScript
Lyra is written in TypeScript and generates type definitions for the library via tsc.