You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DatabaseError was only exported in pg@8.10 so that should be the minimum allowed dependency version.
With older pg (as I happened to have, unfortunately) this leads to cryptic messages instead of database errors:
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
TypeError: Right-hand side of 'instanceof' is not an object
at then (file:///.../node_modules/.pnpm/pqb@0.11.29/node_modules/pqb/src/queryMethods/then.ts:161:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Expected
pg is listed either as a peer dependency or a direct dependency of pqb, with a proper semver. I am not sure what's best so didn't create a PR.
The text was updated successfully, but these errors were encountered:
It's because I thought to support other postgres libraries in the future, but as it is only pg for now, it makes sense to add it as a direct dependency.
My bad, it's 8.6 indeed. I had a project with ^8.4.2 which was updated from 7.x in Oct 2020. I believe the versions wouldn't conflict due to how pnpm manages deps. Then they would have been deduped to the more recent version on the next pnpm dedupe.
Problem
pg
is not listed as a dependency ofpqb
, but internallypqb
depends on it:orchid-orm/packages/qb/pqb/src/queryMethods/then.ts
Line 155 in cda17fe
DatabaseError
was only exported in pg@8.10 so that should be the minimum allowed dependency version.With older
pg
(as I happened to have, unfortunately) this leads to cryptic messages instead of database errors:Expected
pg
is listed either as a peer dependency or a direct dependency ofpqb
, with a proper semver. I am not sure what's best so didn't create a PR.The text was updated successfully, but these errors were encountered: