Skip to content

Update to use ES Modules #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 14, 2025
Merged

Update to use ES Modules #79

merged 9 commits into from
Aug 14, 2025

Conversation

pwrightcertinia
Copy link
Contributor

@pwrightcertinia pwrightcertinia commented Aug 14, 2025

With recent versions of Node.js, it's possible to use ES module packages in projects of either module type.

From changelog:

  • (BREAKING) Updated to ES Module format. Node 20/22, TypeScript 5.9 support require(esm).
    • Increased min node version to 20.
    • antlr4 has been temporarily patched to fix module resolution of the type declaration files.
    • TS ESM projects not using "module": "node20" or above may produce type errors (without skipLibCheck).

The patch to antlr4 is not perfect, since they use a .d.cts file as the root. Can't add a modules variant as the package.json would need editing and patch-package doesn't support that. The patch is distributed with the package.

@pwrightcertinia pwrightcertinia merged commit eea293f into main Aug 14, 2025
1 check passed
@pwrightcertinia pwrightcertinia deleted the esm-update branch August 14, 2025 10:34
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.

1 participant