From 3497884f36e80c2263ededcb1aba01d653d7ca55 Mon Sep 17 00:00:00 2001 From: Monty Anderson Date: Thu, 8 Feb 2024 14:35:24 +0100 Subject: [PATCH 1/2] `mod.ts`: check for appropriate v8 version 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. --- mod.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mod.ts b/mod.ts index b0bac8ac..63546519 100644 --- a/mod.ts +++ b/mod.ts @@ -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, From 49368fdd680ede8d890c32912c801693ed724c24 Mon Sep 17 00:00:00 2001 From: Monty Anderson Date: Mon, 12 Feb 2024 08:28:59 -0800 Subject: [PATCH 2/2] Update mod.ts Co-authored-by: Asher Gomez --- mod.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod.ts b/mod.ts index 63546519..9e667df8 100644 --- a/mod.ts +++ b/mod.ts @@ -1,5 +1,5 @@ // Check for minimum supported V8 runtime version -if(Number(Deno.version.v8.split(".")[0]) < 12) { +if(Deno.version.deno >= 1.38) { throw new Error("deno-postgres requires at least Deno v1.38 including V8 v12 or later.") }