diff --git a/package.json b/package.json index a05eecdfc..3e93525e3 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "through2": "^4.0.0", "ts-node": "^10.9.1", "tstyche": "^6.0.2", - "typescript": "~5.9.2", + "typescript": "~6.0.2", "winston": "^3.7.2" }, "dependencies": { diff --git a/test/fixtures/ts/transpile.cjs b/test/fixtures/ts/transpile.cjs index 6c2af6783..bf9eb1c5c 100755 --- a/test/fixtures/ts/transpile.cjs +++ b/test/fixtures/ts/transpile.cjs @@ -7,7 +7,7 @@ const existsSync = fs.existsSync const stat = fs.promises.stat // Hardcoded parameters -const esVersions = ['es5', 'es6', 'es2017', 'esnext'] +const esVersions = ['es6', 'es2017', 'esnext'] const filesToTranspile = ['to-file-transport.ts'] async function transpile () { @@ -23,8 +23,8 @@ async function transpile () { const shouldTranspile = !existsSync(targetFileName) || (await stat(targetFileName)).mtimeMs < sourceStat.mtimeMs if (shouldTranspile) { - await execa('tsc', ['--target', esVersion, '--module', 'commonjs', sourceFileName]) - await execa('mv', [intermediateFileName, targetFileName]) + await execa('tsc', [ '--ignoreConfig', '--types', 'node', '--target', esVersion, '--module', 'commonjs', sourceFileName ]) + await execa('mv', [ intermediateFileName, targetFileName ]) } } } diff --git a/tsconfig.json b/tsconfig.json index 0718ee17a..01c340df1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,15 @@ { "compilerOptions": { - "target": "es6", - "lib": [ "es2015", "dom" ], - "module": "commonjs", + "target": "es2022", + "lib": ["es2022"], + "module": "node16", + "moduleResolution": "node16", "noEmit": true, "strict": true, - "esModuleInterop": true + "types": ["node"] }, "exclude": [ - "./test/types/**/*.tst.*", + "./test/types/**/*", "./*.d.ts" ] -} +} \ No newline at end of file