Major Changes
-
5b28e79:
@unional/createutilsis now ESM-only.The package declares
"type": "module"and ships a singleexportsmap with no
requirecondition, sorequire('@unional/createutils')no longer resolves. The
dual CommonJS (lib/) and ESM (libm/) outputs are gone; there is one ESM build
inlib/, andmain,module,jsnext:mainandtypingshave been dropped in
favour ofexportsandtypes.Migration:
- Import the package from an ESM module:
import { initGitRepo } from '@unional/createutils'.
Consumers should set"type": "module"in their ownpackage.json, or use
.mjs/.mtsfiles. - From a CommonJS module that cannot be converted, use a dynamic import:
const { initGitRepo } = await import('@unional/createutils'). - Deep imports into
libm/must be repointed atlib/. Only the package root is
exported, so paths outside theexportsmap are no longer reachable. - TypeScript consumers need
"module"/"moduleResolution"set tonode16,
nodenext, orbundler. Under a CommonJS compilation the import now fails with
TS1479.
- Import the package from an ESM module:
Patch Changes
-
591bbf5: Declare a supported Node range:
^20.19.0 || ^22.13.0 || >=24.Every version in that range has unflagged
require(esm), so a CommonJS consumer's
require()of this now-ESM-only package resolves rather than throwingERR_REQUIRE_ESM.
Node 18 (EOL April 2025) and Node 20.0–20.18 are excluded becauserequire()hard-fails there.