Problem
npm/package.json declares "type": "module" but the check script still uses CommonJS require:
```json
"check": "node -e 'require("./dist/src/index.js").check()'",
```
On Node 20+ this throws ERR_REQUIRE_ESM immediately — npm run check fails before parsing any files.
Likely uncaught so far because nothing in CI invokes check; manifests only when an end user runs the documented smoke-check command after npm install.
Fix
Use import() (works in both CJS and ESM contexts, no --input-type needed):
```json
"check": "node -e 'import("./dist/src/index.js").then(m => m.check())'",
```
Context
Surfaced when modernising vf-parser (apex-dev-tools/vf-parser#8) by mirroring this script line-for-line. Codex flagged it there; fixed in apex-dev-tools/vf-parser@af98f97. Same one-line fix applies here.
Problem
npm/package.jsondeclares"type": "module"but thecheckscript still uses CommonJSrequire:```json
"check": "node -e 'require("./dist/src/index.js").check()'",
```
On Node 20+ this throws
ERR_REQUIRE_ESMimmediately —npm run checkfails before parsing any files.Likely uncaught so far because nothing in CI invokes
check; manifests only when an end user runs the documented smoke-check command afternpm install.Fix
Use
import()(works in both CJS and ESM contexts, no--input-typeneeded):```json
"check": "node -e 'import("./dist/src/index.js").then(m => m.check())'",
```
Context
Surfaced when modernising vf-parser (apex-dev-tools/vf-parser#8) by mirroring this script line-for-line. Codex flagged it there; fixed in apex-dev-tools/vf-parser@af98f97. Same one-line fix applies here.