{"_id":"tshy","_rev":"287233","name":"tshy","description":"TypeScript HYbridizer - Hybrid (CommonJS/ESM) TypeScript node package builder","dist-tags":{"latest":"1.2.2"},"maintainers":[{"name":"isaacs","email":""}],"time":{"modified":"2023-10-06T06:10:28.000Z","created":"2023-09-11T23:52:11.672Z","1.2.2":"2023-09-27T05:44:25.686Z","1.2.1":"2023-09-26T06:04:31.737Z","1.2.0":"2023-09-26T05:58:28.496Z","1.1.1":"2023-09-18T16:08:41.744Z","1.1.0":"2023-09-17T19:20:32.655Z","1.0.0":"2023-09-14T21:14:58.612Z","1.0.0-3":"2023-09-13T15:00:11.353Z","1.0.0-2":"2023-09-13T03:45:20.389Z","1.0.0-1":"2023-09-12T04:41:07.234Z","1.0.0-0":"2023-09-11T23:52:11.672Z"},"users":{},"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"repository":{"type":"git","url":"git+https://github.com/isaacs/tshy.git"},"versions":{"1.2.2":{"name":"tshy","version":"1.2.2","description":"TypeScript HYbridizer - Hybrid (CommonJS/ESM) TypeScript node package builder","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","type":"module","bin":{"tshy":"dist/esm/index.js"},"dependencies":{"chalk":"^5.3.0","foreground-child":"^3.1.1","mkdirp":"^3.0.1","resolve-import":"^1.4.1","rimraf":"^5.0.1","sync-content":"^1.0.2","typescript":"5.2","walk-up-path":"^3.0.1"},"scripts":{"postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tsc -p .tshy/esm.json && bash scripts/fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","format":"prettier --write . --ignore-path ./.prettierignore --cache","typedoc":"typedoc","test":"tap","snap":"tap"},"tap":{"coverage-map":"map.js"},"engines":{"node":"16 >=16.17 || 18 >=18.16.0 || >=20.6.1"},"repository":{"type":"git","url":"git+https://github.com/isaacs/tshy.git"},"keywords":["typescript","tsc","hybrid","esm","commonjs","build"],"devDependencies":{"@types/node":"^20.6.0","prettier":"^2.8.8","tap":"^18.0.3","typedoc":"^0.25.1"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"dialects":["esm"],"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"}}},"_id":"tshy@1.2.2","gitHead":"ad79324687e69443f46fa40f59d6b14ef7ac570f","bugs":{"url":"https://github.com/isaacs/tshy/issues"},"homepage":"https://github.com/isaacs/tshy#readme","_nodeVersion":"20.7.0","_npmVersion":"10.1.0","dist":{"shasum":"d7c45ecb66de47e80ff4b3f5e8678dc8df548f67","size":29530,"noattachment":false,"key":"/tshy/-/tshy-1.2.2.tgz","tarball":"http://name.csiicloud.com:7001/tshy/download/tshy-1.2.2.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tshy_1.2.2_1695793465377_0.03115374447795527"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-27T05:44:25.686Z","publish_time":1695793465686,"_source_registry_name":"default","_cnpm_publish_time":1695793465686},"1.2.1":{"name":"tshy","version":"1.2.1","description":"TypeScript HYbridizer - Hybrid (CommonJS/ESM) TypeScript node package builder","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","type":"module","bin":{"tshy":"dist/esm/index.js"},"dependencies":{"chalk":"^5.3.0","foreground-child":"^3.1.1","mkdirp":"^3.0.1","resolve-import":"^1.4.1","rimraf":"^5.0.1","sync-content":"^1.0.2","typescript":"5.2","walk-up-path":"^3.0.1"},"scripts":{"postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tsc -p .tshy/esm.json && bash scripts/fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","format":"prettier --write . --ignore-path ./.prettierignore --cache","typedoc":"typedoc","test":"tap","snap":"tap"},"tap":{"coverage-map":"map.js"},"engines":{"node":"16 >=16.17 || 18 >=18.16.0 || >=20.6.1"},"repository":{"type":"git","url":"git+https://github.com/isaacs/tshy.git"},"keywords":["typescript","tsc","hybrid","esm","commonjs","build"],"devDependencies":{"@types/node":"^20.6.0","prettier":"^2.8.8","tap":"^18.0.3","typedoc":"^0.25.1"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"dialects":["esm"],"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"}}},"_id":"tshy@1.2.1","gitHead":"6ddeb550124f8398893e132451b98f9919c7d8c5","bugs":{"url":"https://github.com/isaacs/tshy/issues"},"homepage":"https://github.com/isaacs/tshy#readme","_nodeVersion":"20.7.0","_npmVersion":"10.1.0","dist":{"shasum":"a9fb9172a17012c5d08bcd485c56ddeb45754768","size":29557,"noattachment":false,"key":"/tshy/-/tshy-1.2.1.tgz","tarball":"http://name.csiicloud.com:7001/tshy/download/tshy-1.2.1.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tshy_1.2.1_1695708271458_0.641224960219626"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-26T06:04:31.737Z","publish_time":1695708271737,"_source_registry_name":"default","_cnpm_publish_time":1695708271737},"1.2.0":{"name":"tshy","version":"1.2.0","description":"TypeScript HYbridizer - Hybrid (CommonJS/ESM) TypeScript node package builder","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","type":"module","bin":{"tshy":"dist/esm/index.js"},"dependencies":{"chalk":"^5.3.0","foreground-child":"^3.1.1","mkdirp":"^3.0.1","resolve-import":"^1.4.1","rimraf":"^5.0.1","sync-content":"^1.0.2","typescript":"5.2","walk-up-path":"^3.0.1"},"scripts":{"postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tsc -p .tshy/esm.json && bash scripts/fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","format":"prettier --write . --ignore-path ./.prettierignore --cache","typedoc":"typedoc","test":"tap","snap":"tap"},"tap":{"coverage-map":"map.js"},"engines":{"node":"16 >=16.17 || 18 >=18.16.0 || >=20.6.1"},"repository":{"type":"git","url":"git+https://github.com/isaacs/tshy.git"},"keywords":["typescript","tsc","hybrid","esm","commonjs","build"],"devDependencies":{"@types/node":"^20.6.0","prettier":"^2.8.8","tap":"^18.0.3","typedoc":"^0.25.1"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"dialects":["esm"],"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"}}},"_id":"tshy@1.2.0","gitHead":"d46056809617128811e1984e2a469f63048196c6","bugs":{"url":"https://github.com/isaacs/tshy/issues"},"homepage":"https://github.com/isaacs/tshy#readme","_nodeVersion":"20.7.0","_npmVersion":"10.1.0","dist":{"shasum":"fa555e69d5d8c7486e6985e43eb955ea003f6728","size":29485,"noattachment":false,"key":"/tshy/-/tshy-1.2.0.tgz","tarball":"http://name.csiicloud.com:7001/tshy/download/tshy-1.2.0.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tshy_1.2.0_1695707908227_0.48531105110749295"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-26T05:58:28.496Z","publish_time":1695707908496,"_source_registry_name":"default","_cnpm_publish_time":1695707908496},"1.1.1":{"name":"tshy","version":"1.1.1","description":"TypeScript HYbridizer - Hybrid (CommonJS/ESM) TypeScript node package builder","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","type":"module","bin":{"tshy":"dist/esm/index.js"},"dependencies":{"chalk":"^5.3.0","foreground-child":"^3.1.1","mkdirp":"^3.0.1","resolve-import":"^1.4.1","rimraf":"^5.0.1","sync-content":"^1.0.2","typescript":"5.2","walk-up-path":"^3.0.1"},"scripts":{"postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tsc -p .tshy/esm.json && bash scripts/fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","format":"prettier --write . --ignore-path ./.prettierignore --cache","typedoc":"typedoc","test":"tap","snap":"tap"},"tap":{"coverage-map":"map.js"},"engines":{"node":"16 >=16.17 || 18 >=18.16.0 || >=20.6.1"},"repository":{"type":"git","url":"git+https://github.com/isaacs/tshy.git"},"keywords":["typescript","tsc","hybrid","esm","commonjs","build"],"devDependencies":{"@types/node":"^20.6.0","prettier":"^2.8.8","tap":"^18.0.3","typedoc":"^0.25.1"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"dialects":["esm"],"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"}}},"_id":"tshy@1.1.1","gitHead":"6ae32d1239e85f89f89cd351682964b3fcb2c64d","bugs":{"url":"https://github.com/isaacs/tshy/issues"},"homepage":"https://github.com/isaacs/tshy#readme","_nodeVersion":"20.6.1","_npmVersion":"9.8.1","dist":{"shasum":"e71cd28aae58650609417943ed64838d6b7ef055","size":27939,"noattachment":false,"key":"/tshy/-/tshy-1.1.1.tgz","tarball":"http://name.csiicloud.com:7001/tshy/download/tshy-1.1.1.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tshy_1.1.1_1695053321515_0.5227169750418974"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-18T16:08:41.744Z","publish_time":1695053321744,"_source_registry_name":"default","_cnpm_publish_time":1695053321744},"1.1.0":{"name":"tshy","version":"1.1.0","description":"TypeScript HYbridizer - Hybrid (CommonJS/ESM) TypeScript node package builder","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","type":"module","bin":{"tshy":"dist/esm/index.js"},"dependencies":{"chalk":"^5.3.0","foreground-child":"^3.1.1","mkdirp":"^3.0.1","resolve-import":"^1.4.1","rimraf":"^5.0.1","sync-content":"^1.0.2","typescript":"5.2"},"scripts":{"postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tsc -p .tshy/esm.json && bash scripts/fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","format":"prettier --write . --ignore-path ./.prettierignore --cache","typedoc":"typedoc","test":"tap","snap":"tap"},"tap":{"coverage-map":"map.js"},"engines":{"node":"16 >=16.17 || 18 >=18.16.0 || >=20.6.1"},"repository":{"type":"git","url":"git+https://github.com/isaacs/tshy.git"},"keywords":["typescript","tsc","hybrid","esm","commonjs","build"],"devDependencies":{"@types/node":"^20.6.0","prettier":"^2.8.8","tap":"^18.0.3","typedoc":"^0.25.1"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"dialects":["esm"],"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"}}},"_id":"tshy@1.1.0","gitHead":"3fe09cf10cb46c1ed971dddded7baaec47ac7036","bugs":{"url":"https://github.com/isaacs/tshy/issues"},"homepage":"https://github.com/isaacs/tshy#readme","_nodeVersion":"20.6.1","_npmVersion":"9.8.1","dist":{"shasum":"83f5cd2ad4ce67d3e143e67318978da3448babca","size":26983,"noattachment":false,"key":"/tshy/-/tshy-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/tshy/download/tshy-1.1.0.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tshy_1.1.0_1694978432423_0.8849284908164099"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-17T19:20:32.655Z","publish_time":1694978432655,"_source_registry_name":"default","_cnpm_publish_time":1694978432655},"1.0.0":{"name":"tshy","version":"1.0.0","description":"TypeScript HYbridizer - Hybrid (CommonJS/ESM) TypeScript node package builder","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","type":"module","bin":{"tshy":"dist/esm/index.js"},"dependencies":{"chalk":"^5.3.0","foreground-child":"^3.1.1","mkdirp":"^3.0.1","rimraf":"^5.0.1","sync-content":"^1.0.2","typescript":"5.2"},"scripts":{"postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tsc -p tsconfig/esm.json && bash scripts/fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","format":"prettier --write . --ignore-path ./.prettierignore --cache","typedoc":"typedoc","test":"tap","snap":"tap"},"tap":{"coverage-map":"map.js"},"engines":{"node":"16 >=16.17 || 18 >=18.16.0 || >=20.6.1"},"repository":{"type":"git","url":"git+https://github.com/isaacs/tshy.git"},"keywords":["typescript","tsc","hybrid","esm","commonjs","build"],"devDependencies":{"@types/node":"^20.6.0","prettier":"^2.8.8","tap":"^18.0.0-26","typedoc":"^0.25.1"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"dialects":["esm"],"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"}}},"_id":"tshy@1.0.0","gitHead":"57a9baa91facde89bb413bd792e507845241014b","bugs":{"url":"https://github.com/isaacs/tshy/issues"},"homepage":"https://github.com/isaacs/tshy#readme","_nodeVersion":"18.16.0","_npmVersion":"9.8.1","dist":{"shasum":"78057fa296a2b683e476faac19069a100111e656","size":21043,"noattachment":false,"key":"/tshy/-/tshy-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/tshy/download/tshy-1.0.0.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tshy_1.0.0_1694726098354_0.2536814009970889"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-14T21:14:58.612Z","publish_time":1694726098612,"_source_registry_name":"default","_cnpm_publish_time":1694726098612},"1.0.0-3":{"name":"tshy","version":"1.0.0-3","description":"TypeScript HYbridizer - Hybrid (CommonJS/ESM) TypeScript node package builder","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","type":"module","bin":{"tshy":"dist/esm/index.js"},"dependencies":{"chalk":"^5.3.0","foreground-child":"^3.1.1","mkdirp":"^3.0.1","rimraf":"^5.0.1","sync-content":"^1.0.2","typescript":"5.2"},"scripts":{"postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tsc -p tsconfig/esm.json && bash scripts/fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","format":"prettier --write . --ignore-path ./.prettierignore --cache","typedoc":"typedoc"},"engines":{"node":"16 >=16.17 || 18 >=18.16.0 || >=20.6.1"},"repository":{"type":"git","url":"git+https://github.com/isaacs/tshy.git"},"keywords":["typescript","tsc","hybrid","esm","commonjs","build"],"devDependencies":{"@types/node":"^20.6.0","prettier":"^2.8.8","typedoc":"^0.25.1"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"dialects":["esm"],"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"}}},"_id":"tshy@1.0.0-3","gitHead":"63066aa37030c41f77434d4dbf375b82a54b80c4","bugs":{"url":"https://github.com/isaacs/tshy/issues"},"homepage":"https://github.com/isaacs/tshy#readme","_nodeVersion":"18.16.0","_npmVersion":"9.8.1","dist":{"shasum":"4a95d8d5dbf5303e061a3fdc8d1af48ff9340e40","size":18709,"noattachment":false,"key":"/tshy/-/tshy-1.0.0-3.tgz","tarball":"http://name.csiicloud.com:7001/tshy/download/tshy-1.0.0-3.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tshy_1.0.0-3_1694617210993_0.2846305085600347"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-13T15:00:11.353Z","publish_time":1694617211353,"_source_registry_name":"default","_cnpm_publish_time":1694617211353},"1.0.0-2":{"name":"tshy","version":"1.0.0-2","description":"TypeScript HYbridizer - Hybrid (CommonJS/ESM) TypeScript node package builder","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","type":"module","bin":{"tshy":"dist/esm/index.js"},"dependencies":{"chalk":"^5.3.0","foreground-child":"^3.1.1","mkdirp":"^3.0.1","rimraf":"^5.0.1","sync-content":"^1.0.2","typescript":"5.2"},"scripts":{"postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tsc -p tsconfig/esm.json && bash scripts/fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","format":"prettier --write . --ignore-path ./.prettierignore --cache","typedoc":"typedoc"},"engines":{"node":"16 >=16.17 || 18 >=18.16.0 || >=20.6.1"},"repository":{"type":"git","url":"git+https://github.com/isaacs/tshy.git"},"keywords":["typescript","tsc","hybrid","esm","commonjs","build"],"devDependencies":{"@types/node":"^20.6.0","prettier":"^2.8.8","typedoc":"^0.25.1"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"dialects":["esm"],"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"}}},"_id":"tshy@1.0.0-2","gitHead":"3146b89123a9fe769dde0cc74a76b2ea6c689efc","bugs":{"url":"https://github.com/isaacs/tshy/issues"},"homepage":"https://github.com/isaacs/tshy#readme","_nodeVersion":"18.16.0","_npmVersion":"9.8.1","dist":{"shasum":"922c7d6a902d94800de70313eeeba27b10be8f2d","size":17412,"noattachment":false,"key":"/tshy/-/tshy-1.0.0-2.tgz","tarball":"http://name.csiicloud.com:7001/tshy/download/tshy-1.0.0-2.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tshy_1.0.0-2_1694576720210_0.9785544528185242"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-13T03:45:20.389Z","publish_time":1694576720389,"_source_registry_name":"default","_cnpm_publish_time":1694576720389},"1.0.0-1":{"name":"tshy","version":"1.0.0-1","description":"TypeScript HYbridizer - Hybrid (CommonJS/ESM) TypeScript node package builder","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","type":"module","bin":{"tshy":"dist/esm/index.js"},"dependencies":{"chalk":"^5.3.0","foreground-child":"^3.1.1","mkdirp":"^3.0.1","rimraf":"^5.0.1","sync-content":"^1.0.2","typescript":"5.2"},"scripts":{"postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tsc -p tsconfig/esm.json && bash scripts/fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","format":"prettier --write . --ignore-path ./.prettierignore --cache","typedoc":"typedoc"},"engines":{"node":"16 >=16.17 || 18 >=18.16.0 || >=20.6.1"},"repository":{"type":"git","url":"git+https://github.com/isaacs/tshy.git"},"keywords":["typescript","tsc","hybrid","esm","commonjs","build"],"devDependencies":{"@types/node":"^20.6.0","prettier":"^2.8.8","typedoc":"^0.25.1"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"dialects":["esm"],"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"}}},"_id":"tshy@1.0.0-1","gitHead":"57a2704a2011204e48499aa20b22ee4e992beca2","bugs":{"url":"https://github.com/isaacs/tshy/issues"},"homepage":"https://github.com/isaacs/tshy#readme","_nodeVersion":"18.16.0","_npmVersion":"9.8.1","dist":{"shasum":"55fd0e2e2945f2bca6a8aa40537a23f9086649bf","size":16182,"noattachment":false,"key":"/tshy/-/tshy-1.0.0-1.tgz","tarball":"http://name.csiicloud.com:7001/tshy/download/tshy-1.0.0-1.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tshy_1.0.0-1_1694493667034_0.22645830213692308"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-12T04:41:07.234Z","publish_time":1694493667234,"_source_registry_name":"default","_cnpm_publish_time":1694493667234},"1.0.0-0":{"name":"tshy","version":"1.0.0-0","description":"TypeScript HYbridizer - Hybrid (CommonJS/ESM) TypeScript node package builder","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"https://izs.me"},"license":"BlueOak-1.0.0","type":"module","bin":{"tshy":"dist/esm/index.js"},"dependencies":{"chalk":"^5.3.0","foreground-child":"^3.1.1","mkdirp":"^3.0.1","rimraf":"^5.0.1","sync-content":"^1.0.2","typescript":"5.2"},"scripts":{"postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","prepare":"tsc -p tsconfig/esm.json && bash scripts/fixup.sh","pretest":"npm run prepare","presnap":"npm run prepare","format":"prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache","typedoc":"typedoc"},"engines":{"node":"16 >=16.17 || 18 >=18.16.0 || >=20.6.1"},"repository":{"type":"git","url":"git+https://github.com/isaacs/tshy.git"},"keywords":["typescript","tsc","hybrid","esm","commonjs","build"],"devDependencies":{"@types/node":"^20.6.0","typedoc":"^0.25.1"},"prettier":{"semi":false,"printWidth":70,"tabWidth":2,"useTabs":false,"singleQuote":true,"jsxSingleQuote":false,"bracketSameLine":true,"arrowParens":"avoid","endOfLine":"lf"},"tshy":{"dialects":["esm"],"exports":{"./package.json":"./package.json",".":"./src/index.ts"}},"exports":{"./package.json":"./package.json",".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"}}},"_id":"tshy@1.0.0-0","gitHead":"050d7270a12967ea441bfc38aa123f867fe51f9b","bugs":{"url":"https://github.com/isaacs/tshy/issues"},"homepage":"https://github.com/isaacs/tshy#readme","_nodeVersion":"18.16.0","_npmVersion":"9.8.1","dist":{"shasum":"45bc1d75bda7c62cb6904e789a6355fd08dc130b","size":65293,"noattachment":false,"key":"/tshy/-/tshy-1.0.0-0.tgz","tarball":"http://name.csiicloud.com:7001/tshy/download/tshy-1.0.0-0.tgz"},"_npmUser":{"name":"isaacs","email":"i@izs.me"},"directories":{},"maintainers":[{"name":"isaacs","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tshy_1.0.0-0_1694476331433_0.4639202748461291"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-11T23:52:11.672Z","publish_time":1694476331672,"_source_registry_name":"default","_cnpm_publish_time":1694476331672}},"readme":"# tshy - TypeScript HYbridizer\n\nHybrid (CommonJS/ESM) TypeScript node package builder. Write\nmodules that Just Work in ESM and CommonJS, in easy mode.\n\nThis tool manages the `exports` in your package.json file, and\nbuilds your TypeScript program using `tsc` 5.2, emitting both ESM\nand CommonJS variants, [providing the full strength of\nTypeScript’s checking for both output\nformats](https://twitter.com/atcb/status/1702069237710479608).\n\n## USAGE\n\nInstall tshy:\n\n```\nnpm i -D tshy\n```\n\nPut this in your package.json to use it with the default configs:\n\n```json\n{\n  \"files\": [\"dist\"],\n  \"scripts\": {\n    \"prepare\": \"tshy\"\n  }\n}\n```\n\nPut your source code in `./src`.\n\nThe built files will end up in `./dist/esm` (ESM) and\n`./dist/commonjs` (CommonJS).\n\nYour `exports` will be edited to reflect the correct module entry\npoints.\n\n## Configuration\n\nMostly, this just uses opinionated convention, and so there is\nvery little to configure.\n\nSource must be in `./src`. Builds are in `./dist/commonjs` for\nCommonJS and `./dist/esm` for ESM.\n\nThere is very little configuration for this. The only thing to\ndecide is the exported paths. If you have a `./index.ts` file,\nthen that will be listed as the main `\".\"` export by default.\n\n### `exports`\n\nYou can set other entry points by putting this in your\n`package.json` file:\n\n```json\n{\n  \"tshy\": {\n    \"exports\": {\n      \"./foo\": \"./src/foo.ts\",\n      \"./bar\": \"./src/bar.ts\",\n      \".\": \"./src/something-other-than-index.ts\",\n      \"./package.json\": \"./package.json\"\n    }\n  }\n}\n```\n\nAny exports pointing to files in `./src` will be updated to their\nappropriate build target locations, like:\n\n```json\n{\n  \"exports\": {\n    \"./foo\": {\n      \"import\": {\n        \"types\": \"./dist/esm/foo.d.ts\",\n        \"default\": \"./dist/esm/foo.js\"\n      },\n      \"require\": {\n        \"types\": \"./dist/commonjs/foo.d.ts\",\n        \"default\": \"./dist/commonjs/foo.js\"\n      }\n    }\n  }\n}\n```\n\nAny exports that are not within `./src` will not be built, and\ncan be anything supported by package.json `exports`, as they will\njust be passed through as-is.\n\n```json\n{\n  \"tshy\": {\n    \"exports\": {\n      \".\": \"./src/my-built-module.ts\",\n      \"./package.json\": \"./package.json\"\n      \"./thing\": {\n        \"import\": \"./lib/thing.mjs\",\n        \"require\": \"./lib/thing.cjs\",\n        \"types\": \"./lib/thing.d.ts\"\n      },\n      \"./arraystyle\": [\n        { \"import\": \"./no-op.js\" },\n        { \"browser\": \"./browser-thing.js\" },\n        { \"require\": [{ \"types\": \"./using-require.d.ts\" }, \"./using-require.js\"]},\n        { \"types\": \"./blah.d.ts\" },\n        \"./etc.js\"\n      ]\n    }\n  }\n}\n```\n\n### Making Noise\n\nOn failure, all logs will be printed.\n\nTo print error logs and a `success!` message at the end, set\n`TSHY_VERBOSE=1` in the environment.\n\nTo print debugging and other extra information, set\n`TSHY_VERBOSE=2` in the environment.\n\n### Selecting Dialects\n\nYou can tell tshy which dialect you're building for by setting\nthe `dialects` config to an array of strings:\n\n```json\n{\n  \"tshy\": {\n    \"dialects\": [\"esm\", \"commonjs\"]\n  }\n}\n```\n\nThe default is `[\"esm\", \"commonjs\"]` (ie, both of them). If you\nset it to just one, then only that dialect will be built and\nexported.\n\n### Suppressing the self-link\n\nSee below about **Local Package `exports`** for an explanation of\nwhat this is.\n\nSuppress the symlink to the project folder into a `node_modules`\nfolder in `dist` and `src` by doing this:\n\n```json\n{\n  \"tshy\": {\n    \"selfLink\": false\n  }\n}\n```\n\n### Old Style Exports\n\nVersions of node prior to 12.10.0 (published in early to mid\n2016) did not have support for `exports` as a means for defining\npackage entry points.\n\nBy default, tshy deletes the `main` field, rather than maintain\nthis affordance for versions of node that met their end of life\nlong ago. However, some tools still rely on `main` and have not\nbeen updated to read the package entry points via `exports`.\n\n**Warning: this will likely cause incorrect types to be loaded in\nsome scenarios.**\n\nUse with extreme caution. It's almost always better to _not_\ndefine top-level `main` and `types` fields if you are shipping a\nhybrid module. Users will need to update their `module` and\n`moduleResolution` tsconfigs appropriately. **That is a good\nthing, and will save them future headaches.**\n\nYou can tell tshy to export a top-level `main` and `types` field\nby setting `main` to `true`.\n\nIf the `commonjs` dialect is not built, or if a `\".\"` export is\nnot created, or if the `\".\"` export does not support the\n`commonjs` dialect, then the build will fail.\n\nFor example, this config:\n\n```json\n{\n  \"tshy\": {\n    \"exports\": {\n      \".\": \"./src/index.ts\"\n    },\n    \"main\": true\n  }\n}\n```\n\nwill produce:\n\n```json\n{\n  \"main\": \"./dist/commonjs/index.js\",\n  \"types\": \"./dist/commonjs/index.d.ts\",\n  \"type\": \"module\",\n  \"exports\": {\n    \".\": {\n      \"require\": {\n        \"types\": \"./dist/commonjs/index.d.ts\",\n        \"default\": \"./dist/commonjs/index.js\"\n      },\n      \"import\": {\n        \"types\": \"./dist/esm/index.d.ts\",\n        \"default\": \"./dist/esm/index.js\"\n      }\n    }\n  }\n}\n```\n\n## CommonJS Dialect Polyfills\n\nSometimes you have to do something in different ways depending on\nthe JS dialect in use. For example, maybe you have to use\n`import.meta.url` in ESM, but polyfill with\n`pathToFileURL(__filename)` in CommonJS.\n\nTo do this, create a polyfill file with the CommonJS code in\n`<name>-cjs.cts`. (The `cts` extension matters.)\n\n```js\n// src/source-dir-cjs.cts\n//     ^^^^^^^^^^--------- matching name\n//               ^^^^----- \"-cjs\" tag\n//                   ^^^^- \".cts\" filename suffix\n// this one has a -cjs.cts suffix, so it will override the\n// module at src/source-dir.ts in the CJS build,\n// and be excluded from the esm build.\nimport { pathToFileURL } from 'node:url'\n//@ts-ignore - Have to ignore because TSC thinks this is ESM\nexport const sourceDir = pathToFileURL(__dirname)\n```\n\nThen put the \"real\" ESM code in `<name>.ts` (not `.mts`!)\n\nYou will generally have to `//@ts-ignore` a bunch of stuff to get\nthe CommonJS build to ignore it, so it's best to keep the\npolyfill surface as small as possible.\n\n```js\n// src/source-dir.ts\n// This is the ESM version of the module\n//@ts-ignore\nexport const sourceDir = new URL('.', import.meta.url)\n```\n\nThen in your code, you can just `import { sourceDir } from\n'./source-dir.js'` and it'll work in both builds.\n\n## Excluding from a build using `.cts` and `.mts` files\n\nFiles named `*.mts` will be excluded from the CommonJS build.\n\nFiles named `*.cts` will be excluded from the ESM build.\n\nIf you need to do something one way for CommonJS and another way for\nesm, use the \"Dialect Switching\" trick, with the ESM code living\nin `src/<whatever>.ts` and the CommonJS polyfill living in\n`src/<whatever>-cjs.cts`.\n\n## Atomic Builds\n\nCode is built in `./.tshy-build-tmp` and then copied over only if\nthe build succeeds. This makes it work in monorepo cases where\nyou may have packages that depend on one another and are all\nbeing built in parallel (as long as they've been built one time,\nof course).\n\n## Exports Management\n\nThe `exports` field in your package.json file will be updated\nbased on the `tshy.exports` configuration, as described above.\n\nIf you don't provide that config, then the default is:\n\n```json\n{\n  \"tshy\": {\n    \"exports\": {\n      \".\": \"./src/index.ts\",\n      \"./package.json\": \"./package.json\"\n    }\n  }\n}\n```\n\n## TSConfigs\n\nPut whatever configuration you want in `tsconfig.json`, with the\nfollowing caveats:\n\n- `include` - will be overridden based on build, best omitted\n- `exclude` - will be overridden based on build, best omitted\n- compilerOptions:\n  - `outDir` - will be overridden based on build, best omitted\n  - `rootDir` - will be set to `./src` in the build, can only\n    cause annoying errors otherwise.\n  - `target` - will be set to `es2022`\n  - `module` - will be set to `NodeNext`\n  - `moduleResolution` - will be set to `NodeNext`\n\nIf you don't have a `tsconfig.json` file, then one will be\nprovided for you.\n\nThen the `tsconfig.json` file will be used as the default project\nfor code hints in VSCode, neovim, tests, etc.\n\n## `src/package.json`\n\nAs of TypeScript 5.2, the only way to emit JavaScript to ESM or\ncjs, and also import packages using node-style `\"exports\"`-aware\nmodule resolution, is to set the `type` field in the\n`package.json` file closest to the TypeScript source code.\n\nDuring the build, `tshy` will create a file at `src/package.json`\nfor this purpose, and then delete it afterwards. If that file\nexists and _wasn't_ put there by `tshy`, then it will be\ndestroyed.\n\n## Package `#imports`\n\nIf you use `\"imports\"` in your package.json, then tshy will set\n`scripts.preinstall` to set up some symbolic links to make it\nwork. This just means you can't use `scripts.preinstall` for\nanything else if you use `\"imports\"`.\n\n<details>\n<summary>tl;dr explanation</summary>\n\nThe `\"imports\"` field in package.json allows you to set local\npackage imports, which have the same kind of conditional import\nlogic as `\"exports\"`. This is especially useful when you have a\nvendored dependency with `require` and `import` variants, modules\nthat have to be bundled in different ways for different\nenvironments, or different dependencies for different\nenvironments.\n\nThese package imports are _always_ resolved against the nearest\n`package.json` file, and tshy uses generated package.json files\nto set the module dialect to `\"type\":\"module\"` in `dist/esm` and\n`\"type\":\"commonjs\"` in `dist/commonjs`, and it swaps the\n`src/package.json` file between this during the `tsc` builds.\n\nFurthermore, local package imports may not be relative files\noutside the package folder. They may only be local files within\nthe local package, or dependencies resolved in `node_modules`.\n\nTo support this, tshy copies the `imports` field from the\nproject's package.json into these dialect-setting generated\npackage.json files, and creates symlinks into the appropriate\nplaces so that they resolve to the same files on disk.\n\nBecause symlinks may not be included in npm packages (and even if\nthey are included, they won't be unpacked at install time), the\nsymlinks it places in `./dist` wouldn't do much good. In order to\nwork around _this_ restriction, tshy creates a node program at\n`dist/.tshy-link-imports.mjs`, which generates the symlinks at\ninstall time via the `preinstall` script.\n\n</details>\n\n## Local Package `exports`\n\nIn order to facilitate local package exports, tshy will create a\nsymlink to the current package temporarily in\n`./src/node_modules` and permanently in `./dist/node_modules`.\n\nIf you rely on this feature, you may need to add a `paths`\nsection to your `tsconfig.json` so that you don't get nagged\nconstantly by your editor about missing type references.\n\nYou can suppress the self-linking by putting this config in\n`package.json` but be advised this means that you won't be able\nto import from local package exports:\n\n```json\n{\n  \"tshy\": {\n    \"selfLink\": false\n  }\n}\n```\n\n<details>\n<summary>tl;dr explanation</summary>\n\nSimilar to local module imports, Node supports importing the\n`exports` of the current package as if it was a dependency of\nitself. The generated `package.json` files mess with this similar\nto `imports`, but it's much easier to work around.\n\nFor example, if you had this in your package.json:\n\n```json\n{\n  \"name\": \"@my/package\",\n  \"exports\": {\n    \"./foo\": {\n      \"import\": \"./lib/foo.mjs\",\n      \"require\": \"./lib/foo.cjs\"\n    }\n  }\n}\n```\n\nThen any module in the package could do\n`import('@my/package/foo')` or `require('@my/package/foo')` to\npull in the appropriate file.\n\nIn order to make this wort, tshy links the current project\ndirectory into `./src/node_modules/<pkgname>` during the builds,\nand removes the link afterwards, so that TypeScript knows what\nthose things refer to.\n\nThe link is also created in the `dist` folder, but it's only\nrelevant if your tests load the code from `./dist` rather than\nfrom `./src`. In the install, there's no need to re-create this\nlink, because the package will be in a `node_modules` folder\nalready.\n\nIf you use this feature, you can put something like this in your\n`tsconfig.json` file so that your editor knows what those things\nrefer to:\n\n```json\n{\n  \"compilerOptions\": {\n    \"paths\": {\n      \"@my/package/foo\": [\"./src/foo.js\"],\n      \"@my/package/bar\": [\"./src/bar.js\"]\n    }\n  }\n}\n```\n\nNote the `.js` extension, rather than `.ts`. Add this for each\nsubmodule path that you use in this way, or use a wildcard if you\nprefer, though this might result in failing to catch errors if\nyou use a submodule identifier that isn't actually exported:\n\n```json\n{\n  \"compilerOptions\": {\n    \"paths\": {\n      \"@my/package/*\": [\"./src/*.js\"]\n    }\n  }\n}\n```\n\n</details>\n","_attachments":{},"homepage":"https://github.com/isaacs/tshy#readme","bugs":{"url":"https://github.com/isaacs/tshy/issues"},"license":"BlueOak-1.0.0"}