Releases: ngrok-oss/gen-x
v0.4.1
Patch Changes
- #27
ad8b4b1Thanks @cody-dot-js! - Preserveexportskey position when updatingpackage.json. Previously, gen-x always deleted and re-appended theexportsfield, moving it to the end of the file on every run. Now, ifexportsalready exists, it is updated in-place so its position relative to other keys is unchanged.
v0.4.0
Minor Changes
- #24
36cbeb4Thanks @cody-dot-js! - Added--watch/-wflag to watch the input directory for file changes and automatically regeneratepackage.json#exports. Config is loaded once at startup, and writes are skipped when exports are unchanged, making it efficient for use across many packages in a monorepo.
v0.3.0
Minor Changes
- #22
fdb1104Thanks @cody-dot-js! - Add--sourceOnlyoption that emits plain source file paths in the exports map, omittingimport,types, and custom condition entries.
v0.2.1
Patch Changes
- #19
57457e0Thanks @cody-dot-js! - Fixed mode transforms incorrectly converting multi-part extensions like.module.cssto-module.css. Export keys now preserve the full extension while transforming only the basename (e.g.,FancyButton.module.css→./fancy-button.module.csswith kebab-case mode)
v0.2.0
Minor Changes
-
#15
16b342bThanks @dependabot! - Improved default include/exclude patterns - now includes CSS, excludes declaration files and common test patterns -
#15
16b342bThanks @dependabot! - Added config file support with TypeScript support and type-safedefineConfighelper. Supports gen-x.config.{ts,js,mjs,cjs,json} or package.json#genx field. Priority: CLI flags > config file > defaults. TypeScript configs are transformed using esbuild for zero-dependency usage. -
#15
16b342bThanks @dependabot! - Added support for CSS files - extensions are preserved in export keys and no types field is generated for asset files -
#15
16b342bThanks @dependabot! - Index files now automatically flatten to their directory path (e.g., index.ts → ".", lib/index.ts → "./lib")
Patch Changes
-
#15
16b342bThanks @dependabot! - Added esbuild as a dependency for TypeScript config file transformation -
#15
16b342bThanks @dependabot! - Fixed absolute paths leaking into package.json exports. Input is now normalized to absolute for filesystem operations, output stays relative -
#15
16b342bThanks @dependabot! - Fixed CLI vs programmatic API defaults inconsistency for better predictable behavior -
#15
16b342bThanks @dependabot! - Added collision detection for duplicate export keys with helpful error messages showing conflicting files -
#15
16b342bThanks @dependabot! - Fixed double globbing performance issue - now uses single glob call with ignore option for better performance -
#15
16b342bThanks @dependabot! - Fixed dry-run output to use JSON.stringify for better readability -
#15
16b342bThanks @dependabot! - Fixed potential duplicate "./" in source paths when srcDir is "." -
#15
16b342bThanks @dependabot! - Added proper error handling for package.json read/parse/write operations with clear error messages -
#15
16b342bThanks @dependabot! - Fixed shared mutable baseExports object causing state leakage across function calls in long-lived processes -
#15
16b342bThanks @dependabot! - Fixed OS-dependent path separators - package.json exports now always use POSIX forward slashes on all platforms
v0.1.2
What's Changed
- update dependencies; fix shebang by @cody-dot-js in #13
Full Changelog: v0.1.1...v0.1.2
v0.1.1
v0.1.0
What's Changed
- update dependencies by @cody-dot-js in #10
- support custom condition exports for supporting live types in a monorepo by @cody-dot-js in #11
Full Changelog: v0.0.6...v0.1.0
v0.0.6
What's Changed
- preserve cross-platform EOF newline when writing package.json by @cody-dot-js in #9
Full Changelog: v0.0.5...v0.0.6
v0.0.5
What's Changed
- change export name generation order of operations: 1. remove ext, 2. apply replace tuples, 3. transform by mode by @cody-dot-js in #8
Full Changelog: v0.0.4...v0.0.5