From b56de63e15c23a310cee2d548242a365ef61eca3 Mon Sep 17 00:00:00 2001 From: Nikolay Vitkov Date: Thu, 25 Sep 2025 19:22:49 +0200 Subject: [PATCH] chore: unblock uses with Deno and Bun --- src/index.ts | 4 +++- tsconfig.json | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index cf6b3310f..ad88b7d32 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,7 +6,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -const [major, minor] = process.version.substring(1).split('.').map(Number); +import {version} from 'node:process'; + +const [major, minor] = version.substring(1).split('.').map(Number); if (major < 22 || (major === 22 && minor < 12)) { console.error( diff --git a/tsconfig.json b/tsconfig.json index f3f15c966..5a6f084e2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,8 +8,8 @@ "ESNext.Iterator", "ESNext.Collection" ], - "module": "nodenext", - "moduleResolution": "nodenext", + "module": "esnext", + "moduleResolution": "bundler", "outDir": "./build", "rootDir": ".", "strict": true,