Skip to content

Version Packages - #827

Merged
gajus merged 1 commit into
mainfrom
changeset-release/main
Nov 5, 2026
Merged

gajus merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@slonik/pg-driver@49.13.0

Minor Changes

  • #829 bed6b20 Thanks @gajus! - fix: InvalidInputError raised for SQLSTATE 22P02 (invalid text representation) includes the original error as cause, like the other errors that the driver maps.

  • #829 bed6b20 Thanks @gajus! - fix: stream() rejects with the error of a transformRow or transformRowAsync interceptor (e.g. a SchemaValidationError of a result parser). Previously, the error was an unhandled rejection, stream() never settled, and the connection was never released. stream() also waits for the promise returned by the stream handler (e.g. an async function that uses for await). When the consumer of a stream fails, the driver closes the cursor, so that the connection can be used again (e.g. to roll back the transaction).

Patch Changes

  • Updated dependencies []:
    • @slonik/driver@49.13.0
    • @slonik/errors@49.13.0
    • @slonik/sql-tag@49.13.0
    • @slonik/types@49.13.0
    • @slonik/utilities@49.13.0

slonik@49.13.0

Minor Changes

  • #826 4f74b91 Thanks @gajus! - fix: UnexpectedForeignConnectionError is raised only while the transaction is open. Previously, async work that was started inside of a transaction (e.g. a deferred side effect, or a commit / rollback event listener) raised the error for any query that it ran on another connection, even after the transaction had ended. Add runOutsideTransaction(routine) to run queries on other connections while a transaction is open, e.g. await runOutsideTransaction(() => pool.query(auditLogQuery)).

  • #826 4f74b91 Thanks @gajus! - add foreignConnections configuration ("reject" (default) or "allow"), which replaces dangerouslyAllowForeignConnections. dangerouslyAllowForeignConnections: true keeps working as a deprecated alias of foreignConnections: "allow"; foreignConnections takes precedence when both are provided.

  • #829 bed6b20 Thanks @gajus! - fix: oneFirst throws DataIntegrityError (instead of UnexpectedStateError) when the query returns multiple columns, like maybeOneFirst, anyFirst and manyFirst.

  • #829 bed6b20 Thanks @gajus! - remove the values parameter from the types of the query methods (e.g. pool.query(query, values)). The parameter was accepted, but ignored; values are bound using the sql tag.

  • #829 bed6b20 Thanks @gajus! - fix: a query that fails with NotFoundError, DataIntegrityError or SchemaValidationError (e.g. pool.one() that finds no rows) no longer destroys its connection; the connection is returned to the pool. This applies to queries and transactions on the pool. Connections used by pool.connect() are still destroyed when the routine fails.

  • #829 bed6b20 Thanks @gajus! - fix: stream() rejects with the error of a transformRow or transformRowAsync interceptor (e.g. a SchemaValidationError of a result parser). Previously, the error was an unhandled rejection, stream() never settled, and the connection was never released. stream() also waits for the promise returned by the stream handler (e.g. an async function that uses for await). When the consumer of a stream fails, the driver closes the cursor, so that the connection can be used again (e.g. to roll back the transaction).

  • #829 bed6b20 Thanks @gajus! - add the retryLimit option to transaction(), e.g. pool.transaction(handler, { retryLimit: 3 }). Passing the retry limit as the second argument (pool.transaction(handler, 3)) is deprecated. Also fixes pool.transaction() dropping the retry limit when a beforePoolConnection interceptor returns another pool: the options are now passed to that pool.

Patch Changes

  • Updated dependencies [bed6b20, bed6b20]:
    • @slonik/pg-driver@49.13.0
    • @slonik/driver@49.13.0
    • @slonik/errors@49.13.0
    • @slonik/sql-tag@49.13.0
    • @slonik/utilities@49.13.0

slonik-interceptor-field-name-transformation@49.13.0

Minor Changes

  • #828 370c0d3 Thanks @gajus! - improve transformRow performance: rows are copied by a function that is compiled once per set of fields into an object literal, instead of being assembled one property at a time on a null-prototype object (which V8 keeps in slower dictionary mode). Transforming 200,000 rows of 12 fields is ~25x faster, and reading fields of the transformed rows ~12x faster. Rows are now plain objects, and rows whose field names do not need to be transformed are returned as they are. Also fixes reusing the transformation of a different set of fields when field names contain commas, or when test depends on the field type.

@slonik/driver@49.13.0

Patch Changes

  • Updated dependencies []:
    • @slonik/types@49.13.0
    • @slonik/utilities@49.13.0

@slonik/errors@49.13.0

Patch Changes

  • Updated dependencies []:
    • @slonik/types@49.13.0

slonik-sql-tag-raw@49.13.0

Patch Changes

  • Updated dependencies []:
    • @slonik/sql-tag@49.13.0

@slonik/sql-tag@49.13.0

Patch Changes

  • Updated dependencies []:
    • @slonik/errors@49.13.0
    • @slonik/types@49.13.0

@slonik/utilities@49.13.0

Patch Changes

  • Updated dependencies []:
    • @slonik/errors@49.13.0
    • @slonik/types@49.13.0

@slonik/dataloaders@49.13.0

slonik-interceptor-query-cache@49.13.0

slonik-interceptor-query-logging@49.13.0

@slonik/test-ssls@49.13.0

@slonik/types@49.13.0

@slonik/benchmark@49.13.0

Patch Changes

@github-actions
github-actions Bot force-pushed the changeset-release/main branch from 0dfb61c to 1b64c6e Compare November 5, 2026 22:31
@github-actions
github-actions Bot force-pushed the changeset-release/main branch from 1b64c6e to 6bf84ce Compare November 5, 2026 23:41
@gajus
gajus merged commit 3a5d730 into main Nov 5, 2026
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.

1 participant