Comparing version 1.0.0-0 to 1.0.0-1
@@ -43,3 +43,3 @@ import chalk from 'chalk'; | ||
setFolderDialect('.tshy-build-tmp/commonjs', 'commonjs'); | ||
console.error(chalk.cyan.bold('built commonjs'), res); | ||
console.error(chalk.cyan.bold('built commonjs')); | ||
// apply polyfills | ||
@@ -46,0 +46,0 @@ for (const [f, t] of polyfills.entries()) { |
@@ -28,3 +28,3 @@ import { relative, resolve } from 'node:path/posix'; | ||
: dialects.includes('commonjs') | ||
? `./dist/commonjs/${relative(resolve('./src'), resolve(polyfills.get(req) || req)).replace(/\.(m?)tsx?$/, '.$1js')}` | ||
? `./dist/commonjs/${relative(resolve('./src'), resolve(polyfills.get(req) || req)).replace(/\.(c?)tsx?$/, '.$1js')}` | ||
: undefined; | ||
@@ -31,0 +31,0 @@ } |
// the modules like -cjs.cts that override a module at .ts | ||
import chalk from 'chalk'; | ||
import sources from './sources.js'; | ||
import chalk from 'chalk'; | ||
const getPolyfills = (sources) => new Map([...sources] | ||
.filter(f => f.endsWith('-cjs.cts') && | ||
sources.has(f.replace(/-cjs\.cts$/, '.ts'))) | ||
(sources.has(f.replace(/-cjs\.cts$/, '.ts')) || | ||
sources.has(f.replace(/-cjs\.cts$/, '.tsx')))) | ||
.map(f => [f, f.replace(/-cjs\.cts$/, '.ts')])); | ||
@@ -8,0 +9,0 @@ const polyfills = getPolyfills(sources); |
{ | ||
"name": "tshy", | ||
"version": "1.0.0-0", | ||
"version": "1.0.0-1", | ||
"description": "TypeScript HYbridizer - Hybrid (CommonJS/ESM) TypeScript node package builder", | ||
@@ -9,2 +9,5 @@ "author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)", | ||
"bin": "./dist/esm/index.js", | ||
"files": [ | ||
"dist" | ||
], | ||
"dependencies": { | ||
@@ -24,3 +27,3 @@ "chalk": "^5.3.0", | ||
"presnap": "npm run prepare", | ||
"format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache", | ||
"format": "prettier --write . --ignore-path ./.prettierignore --cache", | ||
"typedoc": "typedoc" | ||
@@ -42,2 +45,3 @@ }, | ||
"@types/node": "^20.6.0", | ||
"prettier": "^2.8.8", | ||
"typedoc": "^0.25.1" | ||
@@ -44,0 +48,0 @@ }, |
@@ -21,5 +21,3 @@ # tshy - TypeScript HYbridizer | ||
{ | ||
"files": [ | ||
"dist" | ||
], | ||
"files": ["dist"], | ||
"scripts": { | ||
@@ -111,6 +109,3 @@ "prepare": "tshy" | ||
"tshy": { | ||
"dialects": [ | ||
"esm", | ||
"commonjs" | ||
] | ||
"dialects": ["esm", "commonjs"] | ||
} | ||
@@ -211,11 +206,11 @@ } | ||
* `include` - will be overridden based on build, best omitted | ||
* `exclude` - will be overridden based on build, best omitted | ||
* compilerOptions: | ||
* `outDir` - will be overridden based on build, best omitted | ||
* `rootDir` - will be set to `./src` in the build, can only | ||
cause annoying errors otherwise. | ||
* `target` - will be set to `es2022` | ||
* `module` - will be set to `NodeNext` | ||
* `moduleResolution` - will be set to `NodeNext` | ||
- `include` - will be overridden based on build, best omitted | ||
- `exclude` - will be overridden based on build, best omitted | ||
- compilerOptions: | ||
- `outDir` - will be overridden based on build, best omitted | ||
- `rootDir` - will be set to `./src` in the build, can only | ||
cause annoying errors otherwise. | ||
- `target` - will be set to `es2022` | ||
- `module` - will be set to `NodeNext` | ||
- `moduleResolution` - will be set to `NodeNext` | ||
@@ -222,0 +217,0 @@ If you don't have a `tsconfig.json` file, then one will be |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
1
57862
3
59
441
231