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

feat: Use uuid v7 in stub database adapter #234

Merged
merged 1 commit into from
Jun 3, 2024
Merged

Conversation

Josh-McFarlin
Copy link
Contributor

Why

Since developers may use UUID v7 for the id field of entities, we should set the default id field in the stub database adapter to v7 since its format is backwards compatible with v4.

How

  • Added uuidv7 package
  • Replaced uuid v4 function with v7 function for stub database adapter

Test Plan

Run new uuidv7 test case in packages/entity/src/utils/testing/__tests__/StubDatabaseAdapter-test.ts

Copy link

codecov bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (af495a9) to head (7358048).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #234   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           69        69           
  Lines         1892      1892           
  Branches       265       265           
=========================================
  Hits          1892      1892           
Flag Coverage Δ
integration 100.00% <100.00%> (ø)
unittest 100.00% <100.00%> (ø)

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.

@Josh-McFarlin Josh-McFarlin merged commit 1e8ea64 into main Jun 3, 2024
3 checks passed
@Josh-McFarlin Josh-McFarlin deleted the stub-db-uuidv7 branch June 3, 2024 21:15
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.

2 participants