-
-
Notifications
You must be signed in to change notification settings - Fork 200
🗑️ Mark as deprecated most of char and string arbitraries #5233
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
Conversation
|
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 048f09f:
|
|
👋 A preview of the new documentation is available at: http://66c8d397f02c1bf06d16b818--dubzzz-fast-check.netlify.app |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5233 +/- ##
=======================================
Coverage 95.32% 95.32%
=======================================
Files 234 234
Lines 10414 10414
Branches 2774 2774
=======================================
Hits 9927 9927
Misses 487 487
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Waiting for yarnpkg/berry#6461 |
|
|
👋 A preview of the new documentation is available at: http://66c98ff69d7767a033ca991f--dubzzz-fast-check.netlify.app |
Description
This PR deprecates all our past arbitraries of single characters. We recommend to replace them by arbitraries on strings with
minLengthandmaxLengthboth set to1.This PR also deprecates all string arbitraries except
string,base64String,stringMatchingandmixedCase. All the deprecated arbitraries could now be expressed usingfc.stringwith a specificunit. Here are our recommended migration paths:asciiStringcan be replaced byfc.string({ unit: 'binary-ascii' })(identical behavior).unicodeStringdoes not have direct equivalent in the recommended world, we either recommend you to build a custom unit arbitrary (see 1 below) or to rely on existing units provided byfc.string. Depending on what you wanted to achieve when selectingfc.unicodeyou may go for either'grapheme'and related or'binary'and related. On our side, we rather recommend to rely on'grapheme'and related builders as they better fit with the definition of what is a grapheme from an Unicode point of view.string16bitsdoes not have direct equivalent in the recommended world (you may read the text written above forunicodeStringfor more recommendations). See 2 below for an exact conversion.fullUnicodeStringcan be replaced byfc.string({ unit: 'binary' })(identical behavior), that said we rather recommend you to go forfc.string({ unit: 'grapheme' })orfc.string({ unit: 'grapheme-composite' }).hexaStringdoes not have direct equivalent in the recommended world. See 3 below for an exact conversion.(1) Converting
unicodeStringtostring:(2) Converting
string16bitstostring:(3) Converting
hexaStringtostring:Checklist — Don't delete this checklist and make sure you do the following before opening the PR
yarn bumpand flag the impacts properlyAdvanced