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

πŸ‘· Move build chain to ESM #4592

Open
wants to merge 16 commits into
base: next-3_15_0
Choose a base branch
from

Conversation

dubzzz
Copy link
Owner

@dubzzz dubzzz commented Jan 2, 2024

⚠️ Minor breaking change

The build chain of fast-check has been CommonJS-based since day 1. With ESM moving forward in the ecosystem, it's time to move ourselves to the new standard and adapt our build chains to ESM.

Unfortunately it may have some subtle impacts on our users as our package will not be a CJS one offering a ESM fallback anymore. I will rather be the opposite: an ESM package with a fallback to CJS. It implies that we moved ESM related files closer to the root of the package (we could have kept them in esm/) and moved the CJS ones further in the file structure (we had to move them).

Another subtle impact is that it would impose our users to run at least Node β‰₯12.17.0.

As such we consider it as a breaking change. On its own it should not be a huge problem for most of the users but given it changes our minimal requirement let's put it into the next major release.

Category:

  • ✨ Introduce new features
  • πŸ“ Add or update documentation
  • βœ… Add or update tests
  • πŸ› Fix a bug
  • 🏷️ Add or update types
  • ⚑️ Improve performance
  • Other(s): ...

Potential impacts:

  • Generated values
  • Shrink values
  • Performance
  • Typings
  • Other(s): ...

**⚠️ Minor breaking change**

The build chain of `fast-check` has been CommonJS-based since day 1. With ESM moving forward in the ecosystem, it's time to move ourselves to the new standard and adapt our build chains to ESM.

Unfortunately it may have some subtle impacts on our users as our package will not be a CJS one offering a ESM fallback anymore. I will rather be the opposite: an ESM package with a fallback to CJS. It implies that we moved ESM related files closer to the root of the package (we could have kept them in esm/) and moved the CJS ones further in the file structure (we had to move them).

Another subtle impact is that it would impose our users to run at least Node β‰₯12.17.0.

As such we consider it as a breaking change. On its own it should not be a huge problem for most of the users but given it changes our minimal requirement let's put it into the next major release.
Copy link

codesandbox-ci bot commented Jan 2, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 6e55fac:

Sandbox Source
@fast-check/examples Configuration

Copy link

codecov bot commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 93.39%. Comparing base (f125086) to head (c7e81cc).

❗ Current head c7e81cc differs from pull request most recent head 6e55fac. Consider uploading reports for the commit 6e55fac to get more accurate results

Additional details and impacted files
@@               Coverage Diff               @@
##           next-3_15_0    #4592      +/-   ##
===============================================
- Coverage        93.39%   93.39%   -0.01%     
===============================================
  Files              207      207              
  Lines             5013     5009       -4     
  Branches          1353     1352       -1     
===============================================
- Hits              4682     4678       -4     
  Misses             331      331              
Flag Coverage Ξ”
unit-tests 93.39% <ΓΈ> (-0.01%) ⬇️
unit-tests-18.x-Linux 93.39% <ΓΈ> (-0.01%) ⬇️
unit-tests-20.x-Linux ?
unit-tests-latest-Linux ?

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.

@dubzzz
Copy link
Owner Author

dubzzz commented Feb 19, 2024

🟒 e2e
πŸ”΄ units/arbitrary (73/135 spec files still failing)
🟒 units/check
🟒 units/random
🟒 units/stream
🟒 unit/stubs
🟒 unit/utils

@dubzzz
Copy link
Owner Author

dubzzz commented Mar 12, 2024

No valid jest.requireActual for now. I'll jest.requireActual on the CJS bundle even if not ideal, and I'll move to the new behaviour provided by Jest once ready.

Updated status at jestjs/jest#9430

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant