I hate to even raise this one, but we have a large codebase that even with LLMs will take quite a bit of effort to move onto the esm ecosystem. I've had some success getting bash-tool to work with dynamic imports, but getting it fully working (tests and all) is a bit of a challenge.
It'd make it much easier to experiment with this (and just-bash) if it wasn't blocked on overhauling our monorepo 😅
Totally understand if you don't want to do this, it might make maintenance more trouble than it's worth for you.
(there's a similar ask for just-bash, but asking in one place first)
Activity
2Opened #27 for this — it adds a dual ESM+CJS build using tsup.
exportsuses the canonical per-condition layout with separate types forimport(.d.ts) andrequire(.d.cts).- Verified green across
node10,node16(CJS + ESM), andbundlerwith@arethetypeswrong/cli, and the fullpnpm validate(lint, knip, typecheck, build, 152 tests) passes.
Happy to adjust the approach if you'd prefer raw esbuild to match the just-bash build setup rather than introducing tsup.
Here I'd be happy to do it. For just-bash it seems exceedingly difficult.
just-bash is very large and quite slow without code-splitting which esbuild doesn't support for CJS.