Skip to content

Commit

Permalink
mod.ts: check for appropriate v8 version
Browse files Browse the repository at this point in the history
We run `deno-postgres` for some of our API services. During a recent upgrade we had query failures due to no support for `Promise.withResolvers()`. This change adds a check for at least V8 version 12 where that API was added.
  • Loading branch information
montyanderson committed Feb 8, 2024
1 parent c5f5b2d commit 3497884
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Check for minimum supported V8 runtime version
if(Number(Deno.version.v8.split(".")[0]) < 12) {
throw new Error("deno-postgres requires at least Deno v1.38 including V8 v12 or later.")
}

export { Client } from "./client.ts";
export {
ConnectionError,
Expand Down

0 comments on commit 3497884

Please sign in to comment.