Skip to content

Commit a9f4722

Browse files
committed
fix(core): skip TS support detection via require.extensions
This check was problematic because of Node.js type stripping uses it now too, and it does fail to parse decorators. Related to nodejs/node#57298 (comment)
1 parent 328c809 commit a9f4722

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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)