unstale

npm / kysely

kysely

What changed in kysely 0.28 to 0.29, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

26 breaking7 security3 deprecations26 new APIs and options2 performance4 behavior and defaults1 tooling33 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

kysely 0.2974 changes

Breaking changes 23

  • PGlite 0.5.15+ commits that roll back aborted transactions now throw AbortedTransactionError, matching PostgreSQL behavior.

    0.29.9release notes

  • at() no longer accepts a second type argument for the output type; use $castTo<T>() to override it.

    0.28.20, 0.29.9release notesrelease notes

  • key() no longer accepts a second type argument for the output type; use $castTo<T>() to override it.

    0.28.20, 0.29.9release notesrelease notes

  • Executed migrations with an invalid timestamp now fail with "corrupted migrations" instead of being sorted arbitrarily.

    0.29.9release notes

  • Commits that PostgreSQL turns into rollbacks now throw AbortedTransactionError; controlled transactions are marked rolled back and release their connection, so a subsequent rollback().execute() safely succeeds without another rollback.

    0.28.19, 0.29.8release notesrelease notes

  • The library no longer ships CommonJS files; use a Node.js version supporting require(esm) or dynamic imports.

    0.29.0release notes

  • Removed; use DatabaseIntrospector.getTables instead.

    0.29.0release notes

  • The second queryId argument has been replaced with options?: AbortableQueryOptions.

    0.29.0release notes

  • ES Modules files have moved from /dist/esm/ to /dist/.

    0.29.0release notes

  • Removed after a long deprecation; use DropTableNodeParams instead.

    0.29.0release notes

  • Removed after a long deprecation.

    0.29.0release notes

  • Removed after a long deprecation; use InsertQueryNode.orAction instead.

    0.29.0release notes

  • Migration exports have been removed from the root entry point; import them from kysely/migration instead.

    0.29.0release notes

  • Migration APIs are exposed from this entry point; importing migration exports from the root package now produces a compilation-time error.

    0.29.0release notes

  • Replaces the removed MssqlDialectConfig.Tedious.resetConnectionOnRelease configuration key.

    0.29.0release notes

  • Replaces the removed MssqlDialectConfig.Tarn.options.validateConnections configuration key.

    0.29.0release notes

  • Adds a compile-time helper that removes selected table descriptions from the database type for following queries.

    0.29.0release notes

  • Adds a compile-time helper that narrows the database type for following queries to the selected tables, reducing compilation complexity and time.

    0.29.0release notes

  • Removed after a long deprecation; use PrimaryKeyConstraintNode instead.

    0.29.0release notes

  • Removed; dialects that used it need to use QueryResult.numAffectedRows instead.

    0.29.0release notes

  • Removed after a long deprecation; use sql.lit instead.

    0.29.0release notes

  • Removed after a long deprecation; use sql.val instead.

    0.29.0release notes

  • The minimum supported TypeScript version is now 5.4; versions 5.3 and older produce a compilation error.

    0.29.0release notes

Security 2

Deprecations 3

  • Create and add index column and columns functions now accept expressions; their expression functions are deprecated.

    0.29.0release notes

  • The create and add index expression functions are deprecated; use their column and columns functions, which now allow expressions.

    0.29.0release notes

  • Deprecated in favor of $pickTables, $omitTables and $extendTables.

    0.29.0release notes

New APIs and options 24

  • Adds addIndex to CreateTableBuilder for MySQL.

    0.29.0release notes

  • Adds PostgreSQL alter type query support.

    0.29.0release notes

  • Adds an optional Postgres dialect control client for out-of-pool connections used for database-side query aborts.

    0.29.0release notes

  • Adds MSSQL datetime2 data type support.

    0.29.0release notes

  • Adds support for IF EXISTS when dropping a column in PostgreSQL and MSSQL.

    0.29.0release notes

  • Adds elseRef to eb.case().

    0.29.0release notes

  • Adds a helper to extend the tables available in the database type.

    0.29.0release notes

  • Allows overriding the file import function.

    0.29.0release notes

  • Introspection now supports PostgreSQL and MySQL foreign tables.

    0.29.0release notes

  • Selects how an in-flight query is aborted: ignore it, cancel it on the database side, or kill the database session.

    0.29.0release notes

  • Adds the ability to disable transactions in migration methods.

    0.29.0release notes

  • Allows passing transactions to Migrator.

    0.29.0release notes

  • Adds a shouldParse(value, path) option to control which values are parsed as JSON and which remain strings, using JSON paths.

    0.29.0release notes

  • Adds a dialect for PGlite.

    0.29.0release notes

  • Adds a helper type for a compile-time readonly Kysely instance; write operations and executing SQL through the instance produce compilation errors.

    0.29.0release notes

  • Adds a plugin that changes equality and inequality comparisons with a null right-hand argument to is and is not.

    0.29.0release notes

  • Supports dropping multiple types and cascade.

    0.29.0release notes

  • Pass an abort signal to execute methods and similar APIs to abort or time out queries and ignore their results.

    0.29.0release notes

  • Adds an adapter flag; when false, a centralized connection mutex is used.

    0.29.0release notes

  • Adds support for dropping temporary tables using the temporary() modifier.

    0.29.0release notes

  • Adds thenRef to eb.case.

    0.29.0release notes

  • MySQL unique constraints now allow expressions.

    0.29.0release notes

  • Adds whenRef(lhs, op, rhs) to eb.case.

    0.29.0release notes

  • Adds with(name, query).

    0.29.0release notes

Behavior and default changes 3

  • Supports narrowing by deep object keys.

    0.29.0release notes

  • Supports nested narrowing and discriminated unions.

    0.29.0release notes

  • The type widened from ReadonlyArray<ColumnNode> to ReadonlyArray<OperationNode>.

    0.29.0release notes

Tooling 1

Fixes and other changes 18

  • Inline key()/at() JSON path references now infer correctly instead of inferring unknown.

    0.28.20, 0.29.9release notesrelease notes

  • The migrator reads the latest recorded timestamp under the migration lock and records each new migration at max(now, latest + 1ms), preventing clock jumps from creating out-of-order timestamps.

    0.29.9release notes

  • Fixed crashes on for ... of and json_agg/to_json tables in subqueries.

    0.28.20, 0.29.9release notesrelease notes

  • PostgreSQL clients whose rollback fails are discarded instead of returned to the pool for reuse.

    0.28.19, 0.29.8release notesrelease notes

  • Commit, rollback, and savepoint commands wait for ongoing queries and streams to finish, preventing commands from racing with them.

    0.29.7release notes

  • Transaction handles now share completion state.

    0.28.18, 0.29.7release notesrelease notes

  • A failed begin now releases the transaction connection.

    0.28.18, 0.29.7release notesrelease notes

  • A failed rollback releases the connection and marks the transaction as rolled back.

    0.28.18, 0.29.7release notesrelease notes

  • The client is released if it is destroyed while acquiring a connection.

    0.28.18, 0.29.7release notesrelease notes

  • The where clause in doUpdateSet now allows immutable columns.

    0.29.6release notes

  • Fixes infinite type-check recursion.

    0.28.18, 0.29.5release notesrelease notes

  • PostgreSQL passwords are now passed to the control client.

    0.29.4release notes

  • Returning clauses in SQLite delete queries no longer appear after order by and limit.

    0.29.4release notes

  • Fixed PostgreSQL and MSSQL migrations not running exclusively when disableTransactions is true.

    0.29.3release notes

  • Fixes mishandling of branded types.

    0.29.2release notes

  • Fixed a regression in piping plugins' result transformations.

    0.29.1release notes

  • Wraps object keys in quotes when parsing JSON results.

    0.29.0release notes

  • Explicit undefined is now allowed in Updateable when exactOptionalPropertyTypes is enabled.

    0.28.18, 0.29.0release notesrelease notes

kysely 0.2828 changes

Breaking changes 3

  • Commit, rollback, and savepoint commands wait for ongoing queries and streams to finish; active streams must be closed or exhausted before awaiting these commands.

    0.28.18release notes

  • PostgreSQL and MSSQL migrations use session-level locks, including when disableTransactions is true. PostgreSQL migrations through PgBouncer transaction pooling need a direct connection, session pooling, or custom migration locking.

    0.28.18release notes

  • Prevents re-use of a finished transaction outside its callback.

    0.28.11release notes

Security 5

  • JSON path key access is further hardened against SQL injections and exfiltrations.

    0.28.17release notes

  • Kysely: JSON-path traversal injection via unsanitized path-leg metacharacters in JSONPathBuilder.key() / .at()

    0.28.17security advisoryrelease notes

  • Kysely has a MySQL SQL Injection via Backslash Escape Bypass in non-type-safe usage of JSON path keys.

    0.28.14security advisory

  • Kysely has a MySQL SQL Injection via Insufficient Backslash Escaping in sql.lit(string) usage or similar methods that append string literal values into the compiled SQL strings

    0.28.14security advisoryrelease notes

  • Fixes an injection vulnerability in eb.ref(col, '->$').key(key).

    0.28.12release notessecurity advisory

New APIs and options 2

  • Adds NonDehydrateable<T> to opt out of dehydration in JSON functions and helpers, preserving numeric-string column types.

    0.28.15release notes

  • Added as a type export.

    0.28.10release notes

Performance 2

  • Table metadata parsing is optimized.

    0.28.18release notes

  • Result processing in the PostgreSQL introspector is no longer unnecessarily slow.

    0.28.15release notes

Behavior and default changes 1

  • The where predicate now allows immutable columns and uses column select types, including for columns that cannot be updated.

    0.28.18release notes

Fixes and other changes 15

  • The migrator records timestamps in increasing order across clock jumps and rejects executed migrations with invalid timestamps.

    0.28.20release notes

  • SQLite DELETE queries now output RETURNING before ORDER BY and LIMIT.

    0.28.18release notes

  • FilterObject allows any defined value when the query context has no tables (TB is never).

    0.28.16release notes

  • Allows non-objects when a table has no required columns.

    0.28.13release notes

  • Ensures the ON COMMIT clause is output when using .as(query) in CREATE TABLE queries.

    0.28.13release notes

  • Adds sideEffects: false to the root package.json, preventing bigger bundles in various bundlers.

    0.28.13release notes

  • Updates types for mysql2 support.

    0.28.12release notes

  • Fixes generated SQLite update queries so returning comes before order by.

    0.28.11release notes

  • Fixed compilation errors when composite.

    0.28.10release notes

  • Fixed attempts to create a custom migration schema when it already exists, which failed on dialects that don't support if not exists.

    0.28.10release notes

  • Fixed compilation errors when composite: true.

    0.28.10release notes

  • Fixed compilation errors when composite for PostgreSQL and SQLite.

    0.28.10release notes

  • Fixed compilation errors when composite.

    0.28.10release notes

  • withSchema now applies to delete query using clauses.

    0.28.9release notes

  • withSchema no longer adds a schema to for update, share, key share, or no key share table clauses, avoiding database errors.

    0.28.9release notes