{"library":"tshy","type":"library","category":null,"description":"tshy (TypeScript Hybridizer) is a build tool designed to create hybrid npm packages that support both CommonJS (CJS) and ECMAScript Modules (ESM) simultaneously, primarily for Node.js environments. The current stable version is 4.1.1. It maintains an active development pace, with updates often aligning with new TypeScript releases. It differentiates itself by building the source code twice, once for ESM and once for CJS, using `tsc` (TypeScript compiler) versions 5.2+ (v4 defaults to TypeScript 6). It automatically manages the `exports` field in `package.json` to correctly point to the respective module entry points. Unlike some tools that attempt to mitigate the 'Dual Package Hazard,' tshy acknowledges it as an inherent aspect of Node.js module resolution and provides guidance on how package authors can handle potential duplicate module loading scenarios by leveraging global state rather than relying on strict singleton behavior within the module graph.","language":"javascript","status":"active","version":"4.1.1","tags":["javascript","typescript","tsc","hybrid","esm","commonjs","build"],"last_verified":"Wed May 27","install":[{"cmd":"npm install tshy","imports":["n/a (tshy is executed as a command-line tool, typically via npm scripts)"]},{"cmd":"yarn add tshy","imports":[]},{"cmd":"pnpm add tshy","imports":[]}],"homepage":"https://npmjs.com/package/tshy","github":"https://github.com/isaacs/tshy","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/tshy","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/tshy/compatibility"}}