dubzzz / fast-check

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

⚡️ Faster initialization of globals by dropping `typeof` checks #5212

Closed dubzzz closed 1 month ago

dubzzz commented 1 month ago

Description

⚠️ Minor breaking change

In the past we used to checks for typeof Type when initializing our globals (the globals protecting fast-check from poisoning). It used to be done because some of them only appeared starting at Node >8. With our minimal target version being bumped to at least 10.5.0 we can safely stop having these checks and save some precious time during tests (for our users).

This change forces us to move minimal requirements to at least 10.5.0.

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 44b3581f0230bb505223e9fdf33f9eb20ade106d:

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

👋 A preview of the new documentation is available at: http://66bb0da4a9b1dbd333f8c9f6--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.59%. Comparing base (b6e23bc) to head (d52b0f4). Report is 3 commits behind head on next-3_21_0.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## next-3_21_0 #5212 +/- ## =============================================== - Coverage 94.60% 94.59% -0.01% =============================================== Files 229 228 -1 Lines 9285 9269 -16 Branches 2716 2694 -22 =============================================== - Hits 8784 8768 -16 Misses 501 501 ``` | [Flag](https://app.codecov.io/gh/dubzzz/fast-check/pull/5212/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/5212/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN) | `94.59% <100.00%> (-0.01%)` | :arrow_down: | | [unit-tests-18.x-Linux](https://app.codecov.io/gh/dubzzz/fast-check/pull/5212/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN) | `94.59% <100.00%> (-0.01%)` | :arrow_down: | | [unit-tests-20.x-Linux](https://app.codecov.io/gh/dubzzz/fast-check/pull/5212/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN) | `94.59% <100.00%> (-0.01%)` | :arrow_down: | | [unit-tests-22.x-Linux](https://app.codecov.io/gh/dubzzz/fast-check/pull/5212/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN) | `94.59% <100.00%> (-0.01%)` | :arrow_down: | | [unit-tests-latest-Linux](https://app.codecov.io/gh/dubzzz/fast-check/pull/5212/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Nicolas+DUBIEN) | `94.59% <100.00%> (-0.01%)` | :arrow_down: | 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.

github-actions[bot] commented 1 month ago

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

dubzzz commented 1 month ago

Could maybe be 10.4.0 instead of 10.5.0 for the minimal supported version of Node