Skip to content

chore(npm): update dependency kysely-postgres-js to v5 - #266

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

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/kysely-postgres-js-5.x

Conversation

@renovate

@renovate renovate Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
kysely-postgres-js (source) ^3.0.0 → ^5.0.0 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

kysely-org/kysely-postgres-js (kysely-postgres-js)

v5.1.0

Compare Source

Hey 👋

Postgres.js 4 is out, and this release lets you install it alongside the dialect without peer dependency warnings. The postgres peer range is now >= 3.4.0 < 5, and the test suite runs against both 3.x and 4.x on every Node.js and Bun version we support.

Nothing changed in the dialect itself; everything it relies on behaves the same on 4. Postgres.js 4 does change a few things for your own queries though, such as letting the server decide parameter types by default, so have a look at its release notes when upgrading.

What's Changed

Full Changelog: kysely-org/kysely-postgres-js@v5.0.2...v5.1.0

v5.0.2

Compare Source

Hey 👋

This patch brings the dialect in line with Kysely 0.29.8's transaction fixes for PostgreSQL.

Commits that PostgreSQL answers with ROLLBACK, because an earlier statement error left the transaction aborted, now reject with Kysely's AbortedTransactionError instead of resolving as if committed. This requires kysely >= 0.29.8; on older versions the behavior is unchanged.

A failed rollback, for example on a connection that died mid-transaction, now rejects with its own error. On kysely >= 0.29.8 it previously threw a TypeError from the inherited core driver and hid the real cause.

What's Changed

Full Changelog: kysely-org/kysely-postgres-js@v5.0.1...v5.0.2

v5.0.1

Compare Source

Hey 👋

This patch fixes a regression introduced in v5.0.0 that prevented parameterless raw SQL batches, such as multiple SET LOCAL statements, from running through this dialect.

Parameterless raw and schema queries now use postgres.js's unsafe() defaults. Query-builder SELECT, INSERT, UPDATE, DELETE, and MERGE queries, plus any query with parameters, retain prepared execution. Instance-level postgres({ prepare: false }) remains respected.

What's Changed

Full Changelog: kysely-org/kysely-postgres-js@v5.0.0...v5.0.1

v5.0.0

Compare Source

Hey 👋

This release fixes a misalignment of expectations in the dialect's driver with how people normally use postgres and it's defaults which caused all queries to not use prepared statements and always re-plan.

Now, this dialect prepares everything under the hood, but still respects prepare: false in postgres instance. This should somewhat speed up your recurring queries.

What's Changed

Full Changelog: kysely-org/kysely-postgres-js@v4.0.0...v5.0.0

v4.0.0

Compare Source

Hey 👋

Long time no see!

We got query cancellation now. ⏱️

We ship ESM only now. 🪶

What's Changed

New Contributors

Full Changelog: kysely-org/kysely-postgres-js@v3.0.0...v4.0.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • "before 9am on tuesday"
  • Automerge
    • At any time (no schedule defined)

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

♻ Rebasing: Whenever PR becomes conflicted, 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.

@futo-kritika

futo-kritika Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Re-runViewConfidence Score: 3/5

[High risk] The reported P1 stands: v5 turns on prepared statements by default, and with postgres 3.4.8 that can accumulate prepared plans on long-lived reserved connections that are never recycled. The risk rests on a two-major jump in the database dialect that every service's queries run through, plus the ESM-only change and the raised Node requirement, which the review checked and found compatible. The lockfile resolves 5.0.1, not the 5.1.0 in the title.

Not approved: confidence 3/5 is below the threshold of 4

Findings

Summary

Upgrades kysely-postgres-js from 3.0.0 to locked version 5.0.1.

  • The lockfile selects 5.0.1 for yucca-api, yucca-admin-api, and yucca-metrics-worker, despite the title naming 5.1.0.
  • Upstream v5 enables prepared execution for these services’ query-builder queries by default.
Review context · 7 sources · 3/5 commands · 1 overlapping pull request

Reviews (1) · Last reviewed commit: "chore(npm): update dependency kysely-pos..." · openai/gpt-6.1-sol · $0.20

Comment thread pnpm-workspace.yaml
kysely: 0.29.5
kysely-pglite-dialect: ^1.4.0
kysely-postgres-js: ^3.0.0
kysely-postgres-js: ^5.0.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Disable prepared statements until connection lifetime eviction works · performance

For long-running API instances processing different repository-list lengths, this upgrade introduces persistent prepared-plan accumulation. RepositoryRepository.getByIds and reparent (packages/yucca-api/src/repositories/repository.repository.ts:100–105) generate distinct SQL for each IN list length, and all three database factories leave preparation enabled. Version 5 now explicitly prepares these queries. The locked postgres 3.4.8 caches each prepared statement, but its lifetime timer's end() does not terminate a reserved connection; the dialect reserves every connection, and releasing it returns it to the pool without completing that termination. Thus connections whose lifetime expires while reserved retain their plans instead of being recycled, increasing database memory over the service lifetime. This exact interaction is documented in upstream kysely-postgres-js issue #468 and is also present in the inspected 3.4.8 source.

Suggested fix

Set prepare: false in the postgres client defaults in all three packages/yucca-{api,admin-api,metrics-worker}/src/utils/database.ts factories before adopting v5, until the reserved-connection lifetime issue is fixed in the selected postgres version.

Prompt for a coding agent
In packages/yucca-api/src/utils/database.ts, packages/yucca-admin-api/src/utils/database.ts, and packages/yucca-metrics-worker/src/utils/database.ts, add `prepare: false,` to the options passed to postgres(), before the existing spread of caller options. Add a brief comment referencing kysely-org/kysely-postgres-js#468 explaining that preparation stays disabled until postgres reserved connections honor max_lifetime. Keep the dependency upgrade.

@github-actions

Copy link
Copy Markdown

@renovate renovate Bot changed the title chore(npm): update dependency kysely-postgres-js (3.0.0 → 5.1.0) chore(npm): update dependency kysely-postgres-js to v5 Nov 17, 2026

This branch was previously deployed

1 inactive deployment
docs-preview — 2cd15bc4 Deployed Nov 17, 2026 by renovate[bot] via Deploy #259
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants