Packages

kysely

0.29.9 · 12 Nov 2026MIT32M / weekRepositoryHomepagenpmAtom feed

Your version

0.17.0

17 Feb 2022Where it was published

0.29.9 is the newest release of 0.17.x.

Security

Release note

Breaking changes

db.raw has been replaced with the sql template tag. sql is a free function that can be used with or without a Kysely instance.

See the docs for detailed instructions. Here's how you'd replace the most common use cases of the old db.raw:

import { sql } from 'kysely'

// old
db.raw('select first_name from person where id = ?', [id])

// new
sql`select first_name from person where id = ${id}`
import { sql } from 'kysely'

// old
db.raw('select ?? from person', ['first_name'])

// new
sql`select ${sql.ref('first_name')} from person`
import { sql } from 'kysely'

// old
const result = await db.raw('select first_name from person where id = ?', [id]).execute()

// new
const result = await sql`select first_name from person where id = ${id}`.execute(db)

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.