Skip to content

Commit 3efdcd0

Browse files
authored
fix(core): skip TS support detection via require.extensions (#6488)
This check was problematic because of Node.js type stripping uses it now too, and it does fail to parse decorators. It was already removed from v7, but since the type stripping will be backported to Node.js 22, I am removing it from v6 too, otherwise things break when executing the compiled code. Related to nodejs/node#57298 (comment)
1 parent 328c809 commit 3efdcd0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/core/src/utils/Utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -801,8 +801,7 @@ export class Utils {
801801
|| !!process.env.VITEST // check if vitest is used
802802
|| !!process.versions.bun // check if bun is used
803803
|| process.argv.slice(1).some(arg => arg.includes('ts-node')) // registering ts-node runner
804-
|| process.execArgv.some(arg => arg === 'ts-node/esm') // check for ts-node/esm module loader
805-
|| (require.extensions && !!require.extensions['.ts']); // check if the extension is registered
804+
|| process.execArgv.some(arg => arg === 'ts-node/esm'); // check for ts-node/esm module loader
806805
}
807806

808807
/**

0 commit comments

Comments
 (0)