npm kysely-ctl 0.13.0
v0.13.0 - migrator/seeder factory, lazy resources, sql module.

latest releases: 0.19.0, 0.18.0, 0.17.0...
3 months ago

Hey 👋

NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR. NEW MINOR.

New features:

  • kysely sql <query> and kysely sql (interactive sql querying) were added. Use the resolved Kysely instance to query your database with some raw SQL in the terminal.

  • resources such as dialectConfig, dialect (instance), kysely, provider can now be passed as callbacks - for lazy instantiation. This is nice for environment-specific configuration.

  • a destroyOnExit option was added to allow not destroying the resolved Kysely instance and possible underlying pools/connections.

Breaking changes:

migrator and seeder can only be passed as callbacks of shape:

-migrator: new Migrator({ db: new Kysely(...), ... })
+migrator: (db) => new Migrator({ db, ... })

-seeder: new Seeder({ db: new Kysely(...), ... })
+seeder: (db) => new Seeder({ db, ... })

This change is done to promote the usage of the resolved Kysely instance (from dialect or kysely props) when instantiating a Migrator or Seeder. Why? because otherwise you might end up with code that destroys the wrong Kysely instance, and doesn't exit.

Thanks to @lourd for raising the issue and providing the first necessary changes.

Full Changelog: v0.12.2...v0.13.0

Don't miss a new kysely-ctl release

NewReleases is sending notifications on new releases.