gajus/slonik (slonik)
### [`v41.1.0`](https://togithub.com/gajus/slonik/compare/v41.0.1...v41.1.0)
[Compare Source](https://togithub.com/gajus/slonik/compare/v41.0.1...v41.1.0)
### [`v41.0.1`](https://togithub.com/gajus/slonik/releases/tag/v41.0.1)
[Compare Source](https://togithub.com/gajus/slonik/compare/v41.0.0...v41.0.1)
The fix is in this commit: https://github.com/gajus/slonik/commit/0e83bc14817936eb409bd36d099a4615d69914fb
It shows how simultaneously releasing and ending the pool could have resulted in termination sequence proceeding without waiting for release sequence to complete. The symptom of this would have been an error that complains about an attempt to use a terminated backend.
Shoutout to [@mikeroelens](https://togithub.com/mikeroelens) for going above and beyond to chase down the root of the issue and suggest a fix and context that led to replicating the mysterious behavior. 🥳
### [`v41.0.0`](https://togithub.com/gajus/slonik/releases/tag/v41.0.0)
[Compare Source](https://togithub.com/gajus/slonik/compare/v40.2.6...v41.0.0)
New Slonik behavior means that you can no longer accidentally run a non-transaction query inside of a transaction.
If you receive an error `UnexpectedForeignConnectionError`, then you are trying to execute a query using a connection that is not associated with the transaction. This error is thrown to prevent accidental unsafe transaction handling, e.g.
connection.transaction(async (transactionConnection) => {
await connection.query(sql.typeAlias('void')`INSERT INTO foo (bar) VALUES ('baz')`);
});
In this example, the query is executed using the `connection` that is not associated with the transaction. This is unsafe because the query is not part of the transaction and will not be rolled back if the transaction is aborted.
This behavior is achieved using AsyncLocalContext.
### [`v40.2.6`](https://togithub.com/gajus/slonik/compare/v40.2.5...v40.2.6)
[Compare Source](https://togithub.com/gajus/slonik/compare/v40.2.5...v40.2.6)
### [`v40.2.5`](https://togithub.com/gajus/slonik/compare/v40.2.4...v40.2.5)
[Compare Source](https://togithub.com/gajus/slonik/compare/v40.2.4...v40.2.5)
### [`v40.2.4`](https://togithub.com/gajus/slonik/compare/v40.2.3...v40.2.4)
[Compare Source](https://togithub.com/gajus/slonik/compare/v40.2.3...v40.2.4)
### [`v40.2.3`](https://togithub.com/gajus/slonik/compare/v40.2.2...v40.2.3)
[Compare Source](https://togithub.com/gajus/slonik/compare/v40.2.2...v40.2.3)
### [`v40.2.2`](https://togithub.com/gajus/slonik/compare/v40.2.1...v40.2.2)
[Compare Source](https://togithub.com/gajus/slonik/compare/v40.2.1...v40.2.2)
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), 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 has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
^40.2.1
->^41.0.0
Release Notes
gajus/slonik (slonik)
### [`v41.1.0`](https://togithub.com/gajus/slonik/compare/v41.0.1...v41.1.0) [Compare Source](https://togithub.com/gajus/slonik/compare/v41.0.1...v41.1.0) ### [`v41.0.1`](https://togithub.com/gajus/slonik/releases/tag/v41.0.1) [Compare Source](https://togithub.com/gajus/slonik/compare/v41.0.0...v41.0.1) The fix is in this commit: https://github.com/gajus/slonik/commit/0e83bc14817936eb409bd36d099a4615d69914fb It shows how simultaneously releasing and ending the pool could have resulted in termination sequence proceeding without waiting for release sequence to complete. The symptom of this would have been an error that complains about an attempt to use a terminated backend. Shoutout to [@mikeroelens](https://togithub.com/mikeroelens) for going above and beyond to chase down the root of the issue and suggest a fix and context that led to replicating the mysterious behavior. 🥳 ### [`v41.0.0`](https://togithub.com/gajus/slonik/releases/tag/v41.0.0) [Compare Source](https://togithub.com/gajus/slonik/compare/v40.2.6...v41.0.0) New Slonik behavior means that you can no longer accidentally run a non-transaction query inside of a transaction. If you receive an error `UnexpectedForeignConnectionError`, then you are trying to execute a query using a connection that is not associated with the transaction. This error is thrown to prevent accidental unsafe transaction handling, e.g. connection.transaction(async (transactionConnection) => { await connection.query(sql.typeAlias('void')`INSERT INTO foo (bar) VALUES ('baz')`); }); In this example, the query is executed using the `connection` that is not associated with the transaction. This is unsafe because the query is not part of the transaction and will not be rolled back if the transaction is aborted. This behavior is achieved using AsyncLocalContext. ### [`v40.2.6`](https://togithub.com/gajus/slonik/compare/v40.2.5...v40.2.6) [Compare Source](https://togithub.com/gajus/slonik/compare/v40.2.5...v40.2.6) ### [`v40.2.5`](https://togithub.com/gajus/slonik/compare/v40.2.4...v40.2.5) [Compare Source](https://togithub.com/gajus/slonik/compare/v40.2.4...v40.2.5) ### [`v40.2.4`](https://togithub.com/gajus/slonik/compare/v40.2.3...v40.2.4) [Compare Source](https://togithub.com/gajus/slonik/compare/v40.2.3...v40.2.4) ### [`v40.2.3`](https://togithub.com/gajus/slonik/compare/v40.2.2...v40.2.3) [Compare Source](https://togithub.com/gajus/slonik/compare/v40.2.2...v40.2.3) ### [`v40.2.2`](https://togithub.com/gajus/slonik/compare/v40.2.1...v40.2.2) [Compare Source](https://togithub.com/gajus/slonik/compare/v40.2.1...v40.2.2)Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), 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.
This PR has been generated by Mend Renovate. View repository job log here.