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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider separating the arbitrary system to a separate package so we can use it just for data generation #3527

Open
CMCDragonkai opened this issue Dec 29, 2022 · 2 comments

Comments

@CMCDragonkai
Copy link

馃挕 Idea

I'm thinking of using the arbitrary system as a very powerful fake data generator for some database work. But it doesn't involve any js based testing.

Motivation

Would be nice to just import the code necessary for arbitraries instead of bringing all the other utilities for testing.

Example

import arbitraries from 'fast-check-arbitraries`
@dubzzz
Copy link
Owner

dubzzz commented Jan 1, 2023

Splitting fast-check into sub-packages was initially the motivation guiding us to adopt a monorepo approach but it came with an extra maintenance cost:

  • more release notes to write
  • harder to make sure versions are compatible together
  • higher risks of duplicated packages on client's side with high risk for symbols and co (used internally for various stuff)

But benefits are low. Actually, basic tree shaking already offers such capabilities without the overhead on package side. Only requirement on fast-check's side being to be tree shakeable (not yet the case). But if we start being tree shakeable it should solve most of the issues.

@dubzzz
Copy link
Owner

dubzzz commented Jan 1, 2023

To make my answer clearer: tree shaking will probably be a first step, then split will probably happen but the exact split will require a deep thinking given the possible additional costs it might bring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants