From 0ef8c55ff7be73df61078df5d0eb367fbacd6a29 Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Wed, 23 Sep 2026 18:00:01 -0400 Subject: [PATCH] Bump required Node version to 22 --- .github/workflows/ci.yml | 7 +++++++ README.md | 4 ++-- package-lock.json | 2 +- package.json | 2 +- src/index.ts | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b87179d..c41e970 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,8 @@ jobs: with: persist-credentials: false - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + with: + node-version: '22' - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: ~/.npm @@ -32,6 +34,9 @@ jobs: branch: ${{ github.head_ref }} test: runs-on: ubuntu-latest + strategy: + matrix: + node-version: ['22', '24'] permissions: contents: read steps: @@ -39,6 +44,8 @@ jobs: with: persist-credentials: false - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + with: + node-version: ${{ matrix.node-version }} - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: ~/.npm diff --git a/README.md b/README.md index 2f2cab1..0142f5b 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ console.log(results) ### Custom fetch function -Node.js version 18 includes a built-in global `fetch` function. When using an older version of Node.js, you can provide a custom fetch function implementation. We recommend the [`undici`][1] package on which Node's built-in fetch is based. +The driver uses the global `fetch` function by default. You can provide a custom fetch function implementation, for example to configure proxies or connection pooling. We recommend the [`undici`][1] package on which Node's built-in fetch is based. [1]: https://github.com/nodejs/undici @@ -107,7 +107,7 @@ const results = await conn.execute('select 1 from dual') console.log(results) ``` -To leverage HTTP/2, you can use the [`fetch-h2`][2] shim. `fetch-h2` also supports Node.js 12+. +To leverage HTTP/2, you can use the [`fetch-h2`][2] shim. [2]: https://www.npmjs.com/package/fetch-h2 diff --git a/package-lock.json b/package-lock.json index 19cc4f7..55afe82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "undici": "^8.3.0" }, "engines": { - "node": ">=16" + "node": ">=22" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package.json b/package.json index 531d8a2..fe22ace 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "dist" ], "engines": { - "node": ">=16" + "node": ">=22" }, "type": "module", "main": "./dist/index.js", diff --git a/src/index.ts b/src/index.ts index 815f00d..ab5b77d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -219,7 +219,7 @@ export class Connection { constructor(config: Config) { this.config = config - this.fetch = config.fetch || fetch! + this.fetch = config.fetch || fetch this.session = null if (config.url) {