From 838da9bd35a2db4611f11c5de12e4f2facf88ffc Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Sun, 17 Dec 2023 10:17:53 +0100 Subject: [PATCH] use tsconfig.json as createRequire path Signed-off-by: Matteo Collina --- lib/run.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/run.js b/lib/run.js index ad84180..38bfdef 100644 --- a/lib/run.js +++ b/lib/run.js @@ -25,7 +25,7 @@ export default async function runWithTypeScript (config) { let tscPath if (tsconfigPath) { - const _require = createRequire(cwd) + const _require = createRequire(tsconfigPath) const typescriptPathCWD = _require.resolve('typescript') tscPath = join(typescriptPathCWD, '..', '..', 'bin', 'tsc') if (tscPath) { diff --git a/package.json b/package.json index f9c3e4b..1c69301 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "borp", - "version": "0.4.0", + "version": "0.4.1", "type": "module", "description": "node:test wrapper with TypeScript support", "main": "borp.js",