From 67fb4ffd9edabbc5be0e9fc5820e14ff93fc68d5 Mon Sep 17 00:00:00 2001 From: Martijn Imhoff Date: Wed, 6 Nov 2024 15:39:17 +0100 Subject: [PATCH 1/2] fix: `util.isError` API is deprecated --- lib/error.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/error.js b/lib/error.js index 1795dbfe..add99cbb 100644 --- a/lib/error.js +++ b/lib/error.js @@ -405,7 +405,7 @@ function LibrdKafkaError(e) { this.origin = 'kafka'; } Error.captureStackTrace(this, this.constructor); - } else if (!util.isError(e)) { + } else if (!(Object.prototype.toString(e) === "[object Error]" || e instanceof Error)) { // This is the better way this.message = e.message; this.code = e.code; From 58ac27b2c7c4c3c67ffd54dbe8269cb7e54bcfb3 Mon Sep 17 00:00:00 2001 From: Martijn Imhoff Date: Wed, 6 Nov 2024 15:41:08 +0100 Subject: [PATCH 2/2] fix: add node 22 to build --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7a5534f2..f4030e26 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,7 @@ jobs: build: strategy: matrix: - node: [16, 18, 20, 21] + node: [16, 18, 20, 22] os: [ubuntu-22.04] include: # single mac test due to minute multipliers