Repository navigation
fix(package): every entry point loads with require() - #29
Merged
Merged
Maple Review Bot / Maple / review
succeeded
Oct 14, 2026 in 2m 0s
Confidence 8/10 · No issues found
🟢 Confidence 8/10 · likely safe to merge
Verified Node's condition matching and require(esm) on a synthetic export map; the CJS consumer's require("effect") line is the one thing I could not exercise here.
quality 100/100 · no findings · tests covered · risk high
Adds a default condition beside import on all 12 export entries so CommonJS callers can require() the ESM entries, and extends the tarball check with a CommonJS consumer. Contained and safe to merge.
- All 12
exportsentries gaindefaultpointing at the same.mjsasimport tests/package-consumer.cjsrequires every entry from the installed export mapcheck-package.tsruns the CommonJS consumer against the packed tarball- README and getting-started document the Node 20.19+/22.12+ floor
What was checked
require()skipsimportand matchesdefault; ran a synthetic package with the same map and it resolveddist/clickhouse.mjs- All 12 entries list
defaultlast; no entry and notypesentry was missed (package.json:36-95) - The CJS consumer fails with the old map, so the new check catches the regression
5bb8bb2 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Loading