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

👷(vitest) Move build chain to ESM #4586

Merged
merged 2 commits into from
Jan 2, 2024
Merged

👷(vitest) Move build chain to ESM #4586

merged 2 commits into from
Jan 2, 2024

Conversation

dubzzz
Copy link
Owner

@dubzzz dubzzz commented Jan 2, 2024

The build chain of @fast-check/vitest 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 requirement for this package.

As such we consider it as a breaking change.

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): ...

The build chain of `@fast-check/vitest` 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 requirement for this package.

As such we consider it as a breaking change.
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 47bb817:

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 ✅

Comparison is base (4787474) 93.57% compared to head (47bb817) 93.57%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4586   +/-   ##
=======================================
  Coverage   93.57%   93.57%           
=======================================
  Files         207      207           
  Lines        5011     5011           
  Branches     1367     1367           
=======================================
  Hits         4689     4689           
  Misses        322      322           
Flag Coverage Δ
unit-tests 93.57% <ø> (ø)
unit-tests-18.x-Linux 93.57% <ø> (ø)
unit-tests-20.x-Linux 93.57% <ø> (ø)
unit-tests-latest-Linux 93.57% <ø> (ø)

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 cff61bd into main Jan 2, 2024
69 checks passed
@dubzzz dubzzz deleted the viteest-esm-bc branch January 2, 2024 14:23
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