Priority 2. Both packages are CommonJS ("type" defaults to commonjs; dredd builds CJS via tsc, dredd-transactions is module.exports). This blocks upgrading ESM-only deps (chai >=5, inquirer >=9, @cucumber/cucumber newer, @apidevtools/swagger-parser).
Scope
- Convert source + build output to ESM (
"type": "module", module/moduleResolution settings, import/export, __dirname/require shims, dynamic require sites).
- Update the ts-node test setup and
.mocharc (dredd uses ts-node CJS today; dredd-transactions is already .mjs).
- Verify the
bin/dredd entrypoint, hook loading (proxyquire), and the Docker build still work.
Large and cross-cutting — do after P1 (typing first makes the conversion safer). Likely several PRs (per package / per concern). Each gated on CI.
Done when
Both packages publish as ESM, the CLI + hooks + Docker image work, and at least one previously-blocked ESM-only dep (e.g. chai 5) is upgraded as proof.
Priority 2. Both packages are CommonJS (
"type"defaults to commonjs; dredd builds CJS via tsc, dredd-transactions ismodule.exports). This blocks upgrading ESM-only deps (chai>=5,inquirer>=9,@cucumber/cucumbernewer,@apidevtools/swagger-parser).Scope
"type": "module",module/moduleResolutionsettings,import/export,__dirname/requireshims, dynamicrequiresites)..mocharc(dredd uses ts-node CJS today; dredd-transactions is already.mjs).bin/dreddentrypoint, hook loading (proxyquire), and the Docker build still work.Large and cross-cutting — do after P1 (typing first makes the conversion safer). Likely several PRs (per package / per concern). Each gated on CI.
Done when
Both packages publish as ESM, the CLI + hooks + Docker image work, and at least one previously-blocked ESM-only dep (e.g. chai 5) is upgraded as proof.