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

👷(jest) Move build chain to ESM #5165

Merged
merged 2 commits into from
Jul 26, 2024
Merged

👷(jest) Move build chain to ESM #5165

merged 2 commits into from
Jul 26, 2024

Conversation

dubzzz
Copy link
Owner

@dubzzz dubzzz commented Jul 26, 2024

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

  • The name of my PR follows gitmoji specification
  • My PR references one of several related issues (if any)
    • New features or breaking changes must come with an associated Issue or Discussion
    • My PR does not add any new dependency without an associated Issue or Discussion
  • My PR includes bumps details, please run yarn bump and flag the impacts properly
  • My PR adds relevant tests and they would have failed without my PR (when applicable)

Advanced

  • Category: ⚠️ Minor breaking change
  • Impacts: Honestly none expected!

**⚠️ 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.
@dubzzz dubzzz enabled auto-merge (squash) July 26, 2024 22:44
Copy link

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

Sandbox Source
@fast-check/examples Configuration

Copy link
Contributor

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

@dubzzz dubzzz disabled auto-merge July 26, 2024 22:51
@dubzzz dubzzz enabled auto-merge (squash) July 26, 2024 22:52
Copy link

codecov bot commented Jul 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@           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 Coverage Δ
unit-tests 94.80% <ø> (ø)
unit-tests-18.x-Linux 94.80% <ø> (ø)
unit-tests-20.x-Linux 94.80% <ø> (ø)
unit-tests-22.x-Linux 94.80% <ø> (ø)
unit-tests-latest-Linux 94.80% <ø> (ø)

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 dubzzz merged commit a2c42f1 into main Jul 26, 2024
61 checks passed
@dubzzz dubzzz deleted the jest-build-chain branch July 26, 2024 22:57
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.

1 participant