Skip to content

Bump kysely#42

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/kysely-0.x
Open

Bump kysely#42
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/kysely-0.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Mar 17, 2026

This PR contains the following updates:

Package Type Update Change OpenSSF
kysely (source) devDependencies minor 0.28.110.29.2 OpenSSF Scorecard

Release Notes

kysely-org/kysely (kysely)

v0.29.2: 0.29.2

Compare Source

Hey 👋

A small batch of bug fixes. Please report any issues. 🤞😰🤞

🚀 Features

🐞 Bugfixes

📖 Documentation

📦 CICD & Tooling

⚠️ Breaking Changes

🐤 New Contributors

What's Changed

Full Changelog: kysely-org/kysely@v0.29.1...v0.29.2

v0.29.1: 0.29.1

Compare Source

Hey 👋

A small batch of bug fixes. Please report any issues. 🤞😰🤞

🚀 Features

🐞 Bugfixes

📖 Documentation

📦 CICD & Tooling

⚠️ Breaking Changes

🐤 New Contributors

What's Changed

Full Changelog: kysely-org/kysely@v0.29.0...v0.29.1

v0.29.0: 0.29.0

Compare Source

Hey 👋

This one's a banger! 💥 💥 💥

We got $pickTables, $omitTables compile-time helpers to narrow the world view of downstream queries, cutting down on compilation complexity/time while at it!

const results = await db
  .$pickTables<'person' | 'pet'>() // <----- now `DB` is only { person: {...}, pet: {...} } for following methods.
  .selectFrom('person')
  .innerJoin('pet', 'pet.owner_id', 'person.id')
  .selectAll()
  .execute()

const results = await db
  .$omitTables<'toy'>() // <----- now `DB` doesn't have a "toy" table description for following methods.
  .selectFrom('person')
  .innerJoin('pet', 'pet.owner_id', 'person.id')
  .selectAll()
  .execute()

We got a new ReadonlyKysely<DB> helper type that turns your instance into a compile-time readonly instance!

import { Kysely } from 'kysely'
import type { ReadonlyKysely } from 'kysely/readonly'

export const db = new Kysely<Database>({...}) as never as ReadonlyKysely<Database>

db.selectFrom('person').selectAll() // no problem.
db.selectNoFrom(sql`now()`.as('now')) // no problem.

db.deleteFrom('person') // compilation error + deprecation!
db.insertInto('person').values({...}) // compilation error + deprecation!
db.mergeInto('person')...  // compilation error + deprecation!
db.updateTable('person').set('first_name', 'Timmy') // compilation error + deprecation!
sql`...`.execute(db) // compilation error!
// etc. etc.

We got a brand new PGlite dialect. With it comes a new supportsMultipleConnections adapter flag that uses a new centralized connection mutex when false - should help simplify all SQLite dialects out here!

import { PGlite } from '@&#8203;electric-sql/pglite'
import { Kysely, PGliteDialect } from 'kysely'

const db = new Kysely<DB>({
  // ...
  dialect: new PGliteDialect({
    pglite: new PGlite(),
  }),
  // ...
})

We got $narrowType supporting nested narrowing and discriminated unions!

db.selectFrom('person_metadata')
  .select(['discriminatedUnionProfile']) 
  // output type inferred as:
  //
  // {
  //   discriminatedUnionProfile: {
  //     auth:
  //       | { type: 'token'; token: string }
  //       | { type: 'session'; session_id: string }
  //     tags: string[]
  //   }
  // }[]
  .$narrowType<{ discriminatedUnionProfile: { auth: { type: 'token' } } }>()
  // output type narrowed to:
  // 
  // {
  //   discriminatedUnionProfile: {
  //     auth: { type: 'token'; token: string }
  //     tags: string[]
  //   }
  // }[]
  .execute()

We got web standards driven query cancellation support. Pass an abort signal to execute* methods and similar. Pick between different inflight query abort strategies - ignore the query, cancel it on the database side or even kill the session on the database side.

  import { Kysely, PostgresDialect } from 'kysely'
  import { Client, ... } from 'pg'

  const db = new Kysely<Database>({
    dialect: new PostgresDialect({
      // ...
      controlClient: Client, // optional, for out-of-pool connections for database side query aborts.
      // ...
    })
  })

  const options = { signal: AbortSignal.timeout(3_000) } // throw abort/timeout errors and ignore query reuslts

  query.execute(options)
  query.stream(options)
  sql`...`.execute(db, options)
  db.executeQuery(compiledQuery, options)
  // etc. etc.

  query.execute({ ...options, inflightQueryAbortStrategy: 'cancel query' }) // also cancel query database side
  query.execute({ ...options, inflightQueryAbortStrategy: 'kill session' }) // also kill session database side

We got SafeNullComparisonPlugin to flip (in)equality operators to is and is not when right hand side argument is null.

import { Kysely, SafeNullComparisonPlugin } from 'kysely'

const db = new Kysely<DB>({
  // ...
  plugins: [new SafeNullComparisonPlugin()],
  // ...
})

db.selectFrom('pet')
  .where('name', '=', null) // outputs: "name" is null
  .where('owner_id', '!=', null) // outputs: "owner_id" is not null
  .selectAll()

We got a new shouldParse(value, path) option in ParseJSONResultsPlugin for granular control of what gets JSON.parse'd and what stays a string using JSON paths.

import { JSONParseResultsPlugin } from 'kysely'

db.selectFrom('person')
  .select((eb) => jsonArrayFrom(
	  eb.selectFrom('pet')
      .where('pet.owner_id', '=', 'person.id')
 	    .selectAll()
  ).as('pets'))
  .withPlugin(new JSONParseResultsPlugin({ 
    shouldParse: (_value, path) => {
      // parse only the pets array
      if (path.endsWith('."pets"')) {
        return true
      }
    
      return false
    } 
  }))
🚀 Features
PostgreSQL 🐘 / MySQL 🐬
PostgreSQL 🐘 / MSSQL 🥅
PostgreSQL 🐘
MySQL 🐬
MSSQL 🥅
PGlite 🟨
🐞 Bugfixes
📖 Documentation
📦 CICD & Tooling
⚠️ Breaking Changes
  • Migrator, FileMigrationProvider and other migration related things are now exported from 'kysely/migration'. Importing from 'kysely' will provide an informative error message at compilation time.

    -import { Migrator, FileMigrationProvider } from 'kysely'
    +import { Migrator, FileMigrationProvider } from 'kysely/migration'
  • Minimum TypeScript version is now 5.4. Versions 5.3 and older will get a very aggressive compilation error.

  • The library no longer ships CommonJS files. Use a Node.js version that supports require(esm), or use dynamic imports. ES Modules files have moved from /dist/esm/ to /dist/.

  • TypeScript build target was bumped to 'es2023'.

  • sql.value and sql.literal were removed after spending a long time in deprecation. Use sql.val and sql.lit instead.

  • db.executeQuery's queryId 2nd argument has been replaced with options?: AbortableQueryOptions after spending a long time in deprecation.

  • QueryResult.numUpdatedOrDeletedRows has been removed after spending a long time in deprecation. Dialects that use it need to be updated to use QueryResult.numAffectedRows instead.

  • UniqueConstraintNode.columns widened from ReadonlyArray<ColumnNode> to ReadonlyArray<OperationNode>.

  • ExpressionBuilder.withSchema has been removed after spending a long time in deprecation.

  • DatabaseIntrospector.getMetadata has been removed after spending a long time in deprecation. Use DatabaseIntrospector.getTables instead.

  • MssqlDialectConfig.Tedious.resetConnectionOnRelease has been removed after spending a long time in deprecation. Use MssqlDialectConfig.resetConnectionsOnRelease instead.

  • MssqlDialectConfig.Tarn.options.validateConnections has been removed after spending a long time in deprecation. Use MssqlDialectConfig.validateConnections instead.

  • InsertQueryNode.ignore has been removed after spending a long time in deprecation. Use InsertQueryNode.orAction instead.

  • PrimaryConstraintNode has been removed after spending a long time in deprecation. Use PrimaryKeyConstraintNode instead.

  • DropTablexNodeParams has been removed after spending a long time in deprecation. Use DropTableNodeParams instead.

🐤 New Contributors

Full Changelog: kysely-org/kysely@v0.28.17...v0.29.0

v0.28.17: 0.28.17

Compare Source

Hey 👋

A small batch of bug fixes. Please report any issues. 🤞😰🤞

0.29 is right around the corner. Try the latest RC version!

🚀 Features

🐞 Bugfixes

  • fix: further harden JSON path .key(...) and .at(...) against SQL injections and exfiltrations. by @​igalklebanov in #​1804

📖 Documentation

📦 CICD & Tooling

⚠️ Breaking Changes

🐤 New Contributors

What's Changed

Full Changelog: kysely-org/kysely@v0.28.16...v0.28.17

v0.28.16: 0.28.16

Compare Source

Hey 👋

A small batch of bug fixes. Please report any issues. 🤞😰🤞

0.29 is getting closer btw. 🌶️

🚀 Features

🐞 Bugfixes

  • fix: FilterObject allows any defined value when query context has no tables (TB is never). by @​igalklebanov in #​1791

📖 Documentation

📦 CICD & Tooling

⚠️ Breaking Changes

🐤 New Contributors

What's Changed

Full Changelog: kysely-org/kysely@v0.28.15...v0.28.16

v0.28.15: 0.28.15

Compare Source

Hey 👋

The introduction of dehydration in JSON functions/helpers caused an unexpected bug for consumers that have some columns defined as '${number}', e.g. '1' | '2' (also when wrapped in ColumnType or similar). Such columns, when participating in a JSON function/helper would dehydrate to number instead of staying as string.

Why dehydrate numeric strings to numbers in the first place? Select types in kysely describe the data after underlying driver's (e.g. pg) data transformation. Some drivers transform numeric columns to strings to be safe. When these columns participate in JSON functions, they lose original column data types - drivers don't know they need to transform to string - they return as-is.

This release introduces a special helper type that wraps your column type definition and tells kysely to NOT dehydrate it in JSON functions/helpers.

import type { NonDehydrateable } from 'kysely'

interface Database {
  my_table: {
    a_column: '1' | '2' | '3', // dehydrates to `number`
    another_column: NonDehydrateable<'1' | '2' | '3'>, // stays `'1' | '2' | '3'`
    column_too: NonDehydrateable<ColumnType<'1' | '2' | '3'>> // stays `'1' | '2' | '3'`
  }
}

🚀 Features

  • feat: add NonDehydrateable<T> to allow opt-out from dehydration in JSON functions/helpers. by @​igalklebanov in #​1697

🐞 Bugfixes

PostgreSQL 🐘

📖 Documentation

📦 CICD & Tooling

⚠️ Breaking Changes

🐤 New Contributors

Full Changelog: kysely-org/kysely@v0.28.14...v0.28.15

v0.28.14: 0.28.14

Compare Source

Hey 👋

A small batch of bug fixes. Please report any issues. 🤞😰🤞

🚀 Features

🐞 Bugfixes

MySQL 🐬

📖 Documentation

📦 CICD & Tooling

⚠️ Breaking Changes

🐤 New Contributors

Full Changelog: kysely-org/kysely@v0.28.13...v0.28.14

v0.28.13: 0.28.13

Compare Source

Hey 👋

A small batch of bug fixes. Please report any issues. 🤞😰🤞

🚀 Features

🐞 Bugfixes

  • fix: missing sideEffects: false in root package.json resulting in bigger bundles in various bundlers. by @​igalklebanov in #​1746
  • fix: Insertable allows non-objects when a table has no required columns. by @​igalklebanov in #​1747
PostgreSQL 🐘

📖 Documentation

📦 CICD & Tooling

⚠️ Breaking Changes

🐤 New Contributors

Full Changelog: kysely-org/kysely@v0.28.12...v0.28.13

v0.28.12: 0.28.12

Compare Source

Hey 👋

A small batch of bug fixes. Please report any issues. 🤞😰🤞

🚀 Features

🐞 Bugfixes

MySQL 🐬

📖 Documentation

📦 CICD & Tooling

⚠️ Breaking Changes

🐤 New Contributors

Full Changelog: kysely-org/kysely@v0.28.11...v0.28.12


Configuration

📅 Schedule: (in timezone America/Sao_Paulo)

  • Branch creation
    • Between 12:00 AM and 03:59 AM (* 0-3 * * *)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Mar 17, 2026

  • tsfga-node-kysely-example

    npm i https://pkg.pr.new/emfga/tsfga/@tsfga/core@42
    
    npm i https://pkg.pr.new/emfga/tsfga/@tsfga/kysely@42
    

commit: 3f2ed6b

@renovate renovate Bot force-pushed the renovate/kysely-0.x branch 2 times, most recently from 0986355 to 1f18109 Compare March 23, 2026 13:08
@renovate renovate Bot force-pushed the renovate/kysely-0.x branch from 1f18109 to 60da6ae Compare April 3, 2026 05:23
@renovate renovate Bot force-pushed the renovate/kysely-0.x branch from 60da6ae to b3bc724 Compare April 13, 2026 18:36
@renovate renovate Bot force-pushed the renovate/kysely-0.x branch 2 times, most recently from 4e17987 to 2cb2899 Compare May 12, 2026 00:49
@renovate renovate Bot force-pushed the renovate/kysely-0.x branch from 2cb2899 to c85d785 Compare May 18, 2026 23:55
@renovate renovate Bot force-pushed the renovate/kysely-0.x branch from c85d785 to 3f2ed6b Compare May 19, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants