Skip to content

feat(javascript): emit ESM instead of CJS#4159

Merged
lidavidm merged 1 commit intoapache:mainfrom
kentkwu:use-esm-instead-of-cjs
Mar 30, 2026
Merged

feat(javascript): emit ESM instead of CJS#4159
lidavidm merged 1 commit intoapache:mainfrom
kentkwu:use-esm-instead-of-cjs

Conversation

@kentkwu
Copy link
Copy Markdown
Contributor

@kentkwu kentkwu commented Mar 30, 2026

Summary

  • Switch package output from CommonJS to ESM
  • Add "type": "module" to package.json
  • Generate napi-rs binding with --esm flag
  • Update tsconfig to module: "nodenext", target: "ES2022"

Because we require Node.js >= 22, we can emit ESM instead of CJS. apache-arrow ships dual CJS/ESM. Emitting ESM exclusively removes a class of compatibility issues where users import one and require the other.

@lidavidm lidavidm merged commit 54bbe24 into apache:main Mar 30, 2026
13 checks passed
@lidavidm lidavidm added this to the ADBC Libraries 23 milestone Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants