What's Changed
Fixed a crash on Node 22 releases older than 22.12.0. yargs 18 is ESM-only, and Node only supports require() of an ES module from 22.12.0 onward, so the hook failed at startup with Error [ERR_REQUIRE_ESM]: require() of ES Module .../yargs/index.mjs not supported on earlier 22.x runtimes even though engines allowed them. yargs is now loaded with a dynamic import(), which works on every supported version. No change to engines, dependencies, or CLI behavior.
If you saw this in CI, the stack trace may have pointed somewhere misleading. Under Dynatrace OneAgent the top frame is at TracingChannel.traceSync (node:diagnostics_channel:315:14), because OneAgent's LD_PRELOAD instrumentation wraps diagnostics_channel — it made the failure look like an APM problem, but it reproduces on Node < 22.12 with no APM involved.
This only became visible in v3.0.2. Before that, the packaging bug fixed in #245 left a dangling executable symlink, so the hook failed earlier with Executable `json-sort` not found and never got far enough to load a module. v3.0.0 had the same ESM dependency; fixing the install surfaced a pre-existing incompatibility rather than introducing one.
Full Changelog: v3.0.2...v3.0.3