Skip to content
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

Change package type to module (ESM) #395

Merged
merged 1 commit into from
Jan 10, 2024
Merged

Change package type to module (ESM) #395

merged 1 commit into from
Jan 10, 2024

Conversation

aduth
Copy link
Member

@aduth aduth commented Jan 5, 2024

🛠 Summary of changes

Changes package to use ES Modules as the default module type.

This avoids the need for using .mjs extensions, and may eventually enable future revisions avoiding a build step altogether, shipping the original source files without Babel preprocessing.

As mentioned in the included CHANGELOG, this should not have an impact on downstream projects, possible thanks to support for package.json exports allowing a CommonJS to resolve the require-based distribution.

📜 Testing Plan

Verify tests pass:

make test
make lint

Observe that built output via npm run build:pkg includes expected require or import semantics in build/cjs and build/esm files respectively.

@aduth aduth merged commit 39f657e into main Jan 10, 2024
2 checks passed
@aduth aduth deleted the aduth-esm-default branch January 10, 2024 16:41
@aduth aduth mentioned this pull request Jan 10, 2024
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.

None yet

2 participants