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

🐛 Better interrupt between multiple versions #4981

Merged
merged 5 commits into from
May 14, 2024
Merged

Conversation

dubzzz
Copy link
Owner

@dubzzz dubzzz commented May 14, 2024

fast-check was badly behaving on cloning method, custom toString and assertions linked to pre when several versions of it were running at the same time.

One of the case for that issue is ES module and CommonJS being mixed in the same test and leading fast-check to be loaded once in ESM and once in CJS.

Another case is that user relies on two versions of fast-check due to a dependency forcing a version that is not the same as the one requested by the user or by another dependency (not the same meaning not compatible semver ranges).

Fixes #4845

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

fast-check was badly behaving on cloning method, custom toString and assertions linked to pre when several versions of it were running at the same time.

One of the case for that issue is ES module and CommonJS being mixed in the same test and leading fast-check to be loaded once in ESM and once in CJS.

Another case is that user relies on two versions of fast-check due to a dependency forcing a version that is not the same as the one requested by the user or by another dependency (not the same meaning not compatible semver ranges).

Fixes #4845
Copy link

codesandbox-ci bot commented May 14, 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 67de4a6:

Sandbox Source
@fast-check/examples Configuration

Copy link
Contributor

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

Copy link
Contributor

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

@dubzzz dubzzz enabled auto-merge (squash) May 14, 2024 07:33
Copy link
Contributor

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

@dubzzz dubzzz merged commit e70aea4 into main May 14, 2024
58 checks passed
@dubzzz dubzzz deleted the interrupt-versions branch May 14, 2024 07:44
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.

Better interrupt CJS-ESM as we provide both in our bundle (Symbol.for switch)
1 participant