Comparing version 1.12.0 to 1.13.0
@@ -11,2 +11,3 @@ import chalk from 'chalk'; | ||
import preventVerbatimModuleSyntax from './prevent-verbatim-module-syntax.js'; | ||
import readTypescriptConfig from './read-typescript-config.js'; | ||
const { dialects = ['esm', 'commonjs'], esmDialects = [], commonjsDialects = [], exclude = [], } = config; | ||
@@ -32,3 +33,3 @@ const relativeExclude = exclude.map(e => `../${e}`); | ||
}; | ||
const build = { | ||
const build = () => ({ | ||
extends: config.project === undefined | ||
@@ -38,8 +39,10 @@ ? '../tsconfig.json' | ||
compilerOptions: { | ||
target: readTypescriptConfig().options.target === undefined | ||
? 'es2022' | ||
: undefined, | ||
rootDir: '../src', | ||
target: 'es2022', | ||
module: 'nodenext', | ||
moduleResolution: 'nodenext', | ||
}, | ||
}; | ||
}); | ||
const commonjs = (dialect) => { | ||
@@ -97,3 +100,3 @@ const exclude = [...relativeExclude, '../src/**/*.mts']; | ||
} | ||
writeConfig('build', build); | ||
writeConfig('build', build()); | ||
if (dialects.includes('commonjs')) { | ||
@@ -100,0 +103,0 @@ writeConfig('commonjs', commonjs('cjs')); |
{ | ||
"name": "tshy", | ||
"version": "1.12.0", | ||
"version": "1.13.0", | ||
"description": "TypeScript HYbridizer - Hybrid (CommonJS/ESM) TypeScript node package builder", | ||
@@ -5,0 +5,0 @@ "author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)", |
@@ -704,3 +704,3 @@ # tshy - TypeScript HYbridizer | ||
cause annoying errors otherwise. | ||
- `target` - will be set to `es2022` | ||
- `target` - will be set to `es2022` if not specified | ||
- `module` - will be set to `NodeNext` | ||
@@ -707,0 +707,0 @@ - `moduleResolution` - will be set to `NodeNext` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
178027
1383