Skip to content

Conversation

@nicknovitski
Copy link
Member

@nicknovitski nicknovitski commented Jun 27, 2025

I marked this change as breaking because CJS modules running on node versions less than v20.19.0 will need to add the option --experimental-require-module in order to require() the package.

CJS modules on v20.19.0 or greater can require() it by default, and ES modules on node versions 18+ can of course import other ES modules without trouble.

Jest's support for ESM is lacking, so for simplicity this also changes the test suite to use Node's built-in test runner and typescript support, and jest's expect package.

@codecov
Copy link

codecov bot commented Jun 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (bb728f5) to head (31f926e).

Additional details and impacted files
@@            Coverage Diff             @@
##              main      #198    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files            2         2            
  Lines          168       473   +305     
  Branches        33        40     +7     
==========================================
+ Hits           168       473   +305     
Flag Coverage Δ
node_20 ?
node_24 100.00% <100.00%> (?)
node_25 100.00% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cian
Copy link

cian commented Sep 29, 2025

@nicknovitski - is this stale, or might this change still get made? I'm seeing some downstream issues that I can work around, but would be nice if this did go in.

@nicknovitski
Copy link
Member Author

@nicknovitski - is this stale, or might this change still get made? I'm seeing some downstream issues that I can work around, but would be nice if this did go in.

I still intend to make this change. Sorry for the delay!

@nicknovitski nicknovitski force-pushed the esm branch 2 times, most recently from aa062b3 to b772de3 Compare November 18, 2025 17:36
@nicknovitski nicknovitski force-pushed the esm branch 7 times, most recently from f717625 to daedf29 Compare November 26, 2025 01:20
@nicknovitski nicknovitski marked this pull request as ready for review November 26, 2025 01:24
@nicknovitski nicknovitski requested a review from a team as a code owner November 26, 2025 01:24
@nicknovitski nicknovitski requested review from douglowder and removed request for a team November 26, 2025 01:24
Jest's support for ESM is lacking, so for simplicity this also changes
the test suite to use Node's built-in test runner and typescript
support, and jest's `expect` package.

This change is breaking because any non-ESM consuming packages must now
have minumum Node version of 20.19.0.
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.

3 participants