dubzzz / fast-check

Property based testing framework for JavaScript (like QuickCheck) written in TypeScript
https://fast-check.dev/
MIT License
4.28k stars 178 forks source link

👷(jest) Move build chain to ESM #5165

Closed dubzzz closed 1 month ago

dubzzz commented 1 month ago

Description first opened as #4590

⚠️ Minor breaking change

The build chain of @fast-check/jest 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. But it was already a need for this package due to its dependencies.

As such we consider it as a breaking change.

ChecklistDon't delete this checklist and make sure you do the following before opening the PR

Advanced

codesandbox-ci[bot] commented 1 month ago

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 e36dfd222f81d45df15ab33a0bc5837531263188:

Sandbox Source
@fast-check/examples Configuration
github-actions[bot] commented 1 month ago

👋 A preview of the new documentation is available at: http://66a427f176df8d7a5a5a270b--dubzzz-fast-check.netlify.app

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.80%. Comparing base (231ffae) to head (e36dfd2). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #5165 +/- ## ======================================= Coverage 94.80% 94.80% ======================================= Files 230 230 Lines 9260 9260 Branches 2715 2714 -1 ======================================= Hits 8779 8779 Misses 481 481 ``` | [Flag](https://app.codecov.io/gh/dubzzz/fast-check/pull/5165/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN) | Coverage Δ | | |---|---|---| | [unit-tests](https://app.codecov.io/gh/dubzzz/fast-check/pull/5165/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN) | `94.80% <ø> (ø)` | | | [unit-tests-18.x-Linux](https://app.codecov.io/gh/dubzzz/fast-check/pull/5165/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN) | `94.80% <ø> (ø)` | | | [unit-tests-20.x-Linux](https://app.codecov.io/gh/dubzzz/fast-check/pull/5165/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN) | `94.80% <ø> (ø)` | | | [unit-tests-22.x-Linux](https://app.codecov.io/gh/dubzzz/fast-check/pull/5165/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN) | `94.80% <ø> (ø)` | | | [unit-tests-latest-Linux](https://app.codecov.io/gh/dubzzz/fast-check/pull/5165/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN) | `94.80% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.