v0.97.0
Breaking Changes 🚨
-
.snaplet/config.jsonnew "adapter" key: We changed the way we detect the adapter/dialect that you're using for generating your Seed Client for better integrations.
The adapter is now persisted to.snaplet/config.json.You can run
npx @snaplet/seed initagain which should update your.snaplet/config.jsonfile with the adapter you're using.If you want to do it manually, you can add the
adapterkey to your.snaplet/config.jsonfile. -
Deeper Prisma integration: When using Prisma adapter, we now parse your prisma.schema and automatically reflect your model and field names in the generated Seed Client.
To apply this change, regenerate your Seed Client using
npx @snaplet/seed sync. -
Snaplet AI for better data: We've improved our AI workflow to provide the best data for your seeds. It also means that the data generated might be different from the previous versions.
New Features 🎉
- MySQL support 🐬: We now support MySQL databases! You can use the
mysql2adapter to connect to your database. - Global connect strategy: You can now pass a
connectoption when creating the Seed Client to automatically connect all generated data to the global store.const seed = await createSeedClient({ connect: true }) await seed.users(x => x(2)) // all the posts will be connected to the previously created users in the seed.$store await seed.posts(x => x(2))
Improvements 🛠️
- Optional login: Login is now optional, you can use
@snaplet/seedwithout an account in Snaplet Cloud.
{ // possible values: "prisma" | "postgres" | "pg" | "better-sqlite3" | "mysql2" "adapter": "prisma" }