tshy - TypeScript Hybridizer

JSON →
library 4.1.1 ·javascript
verified May 27, 2026

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.

total hits 11
actors 3 distinct systems
last hit 4d ago AhrefsBot
GPTBot
5
Script
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany · 🇮🇳 India