Skip to content

Commit

Permalink
use tsconfig.json as createRequire path
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Collina <hello@matteocollina.com>
  • Loading branch information
mcollina committed Dec 17, 2023
1 parent 5940c6f commit 838da9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 838da9b

Please sign in to comment.