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

✨ Implement arbitrary for ulid #4020

Merged
merged 4 commits into from Jul 4, 2023

Conversation

vecerek
Copy link
Contributor

@vecerek vecerek commented Jul 2, 2023

Implements #4009

Adds arbitrary for ulid, according to the ulid spec.

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

@vecerek vecerek requested a review from dubzzz as a code owner July 2, 2023 10:46
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 2, 2023

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 4d82303:

Sandbox Source
Vanilla Configuration
@fast-check/examples Configuration

@vecerek vecerek force-pushed the avecerek-add-ulid-support branch 2 times, most recently from 72e62cc to 3d82849 Compare July 2, 2023 12:03
Copy link
Owner

@dubzzz dubzzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just did a quick pass on the PR from my mobile and it looks good. I'll just re-read it before approving. Thank you so much for this contribution.

@codecov
Copy link

codecov bot commented Jul 3, 2023

Codecov Report

Merging #4020 (5cdda2a) into main (a6c40ca) will decrease coverage by 0.01%.
The diff coverage is 93.33%.

❗ Current head 5cdda2a differs from pull request most recent head 4d82303. Consider uploading reports for the commit 4d82303 to get more accurate results

@@            Coverage Diff             @@
##             main    #4020      +/-   ##
==========================================
- Coverage   94.61%   94.60%   -0.01%     
==========================================
  Files         209      211       +2     
  Lines        5848     5893      +45     
  Branches     1344     1351       +7     
==========================================
+ Hits         5533     5575      +42     
- Misses        299      302       +3     
  Partials       16       16              
Flag Coverage Δ
unit-tests 94.60% <93.33%> (-0.01%) ⬇️
unit-tests-14.x-Linux 94.60% <93.33%> (-0.01%) ⬇️
unit-tests-16.x-Linux 94.60% <93.33%> (-0.01%) ⬇️
unit-tests-18.x-Linux 94.58% <93.33%> (-0.03%) ⬇️
unit-tests-latest-Linux 94.60% <93.33%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/fast-check/src/arbitrary/ulid.ts 92.85% <92.85%> (ø)
...arbitrary/_internals/mappers/UintToBase32String.ts 93.10% <93.10%> (ø)
packages/fast-check/src/fast-check-default.ts 100.00% <100.00%> (ø)

@vecerek
Copy link
Contributor Author

vecerek commented Jul 3, 2023

@dubzzz would you like me to address the formatting/linting issues and the requirement to declare the version bump? I may need some guidance with the latter.

@dubzzz
Copy link
Owner

dubzzz commented Jul 3, 2023

For the first one, you have to run:

yarn format

For the bumps (declare minor on fast-check and mark all others as unchanged):

yarn version:bump

@vecerek vecerek force-pushed the avecerek-add-ulid-support branch from 3d82849 to 7bac901 Compare July 3, 2023 11:45
@vecerek
Copy link
Contributor Author

vecerek commented Jul 3, 2023

Thanks for the help, @dubzzz. I believe I addressed all the outstanding issues now 🙂

Copy link
Owner

@dubzzz dubzzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two minor comments. We should also add the doc part for ulid and the no regression e2e test

@vecerek vecerek force-pushed the avecerek-add-ulid-support branch from 7bac901 to 6bc3395 Compare July 4, 2023 17:13
@vecerek
Copy link
Contributor Author

vecerek commented Jul 4, 2023

@dubzzz I've generated the jest snapshot covering ulids for the regression tests, and added some web documentation, as well. Let me know what you think.

dubzzz
dubzzz previously approved these changes Jul 4, 2023
Copy link
Owner

@dubzzz dubzzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect. Thanks for the contribution. I'll just recheck one last time from a computer but it seems perfect

@vecerek
Copy link
Contributor Author

vecerek commented Jul 4, 2023

@dubzzz I had to run yarn workspace fast-check update:examples. I wasn't aware examples were auto-generated but it seems obvious in retrospect 😄

Copy link
Owner

@dubzzz dubzzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect 👍

@dubzzz dubzzz changed the title Implement arbitrary for ulid ✨ Implement arbitrary for ulid Jul 4, 2023
@dubzzz dubzzz enabled auto-merge (squash) July 4, 2023 21:42
@dubzzz dubzzz disabled auto-merge July 4, 2023 21:42
@dubzzz dubzzz enabled auto-merge (squash) July 4, 2023 21:42
@dubzzz
Copy link
Owner

dubzzz commented Jul 4, 2023

Will be merged in a few minutes. Just waiting the tests to run. I'll try to release it soon

@dubzzz dubzzz merged commit d7b97d9 into dubzzz:main Jul 4, 2023
56 checks passed
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.

None yet

2 participants