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

fix: remove cache and database adaptor flavor enums #109

Merged
merged 2 commits into from
Jan 20, 2021

Conversation

wschurman
Copy link
Member

Why

Follow-up on #108 (comment) and an inline comment indicating that this would eventually just become a string.

This pattern of using a hardcoded enum wasn't flexible enough to support additional third-party/private adaptor implementations and/or multiple adaptors in the same application.

How

Change it to a string and add definition validation to ensure definition is supplied for requested flavor.

Test Plan

Run all tests.

@codecov
Copy link

codecov bot commented Jan 20, 2021

Codecov Report

Merging #109 (ab5ff4c) into master (b7309e1) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #109   +/-   ##
=======================================
  Coverage   94.96%   94.96%           
=======================================
  Files          66       66           
  Lines        1627     1627           
  Branches      195      193    -2     
=======================================
  Hits         1545     1545           
  Misses         80       80           
  Partials        2        2           
Flag Coverage Δ
integration 94.96% <100.00%> (ø)
unittest 94.96% <100.00%> (ø)

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

Impacted Files Coverage Δ
packages/entity-example/src/data.ts 85.71% <ø> (ø)
packages/entity-example/src/entities/NoteEntity.ts 100.00% <ø> (ø)
.../src/__integration-tests__/entities/ChildEntity.ts 100.00% <ø> (ø)
...src/__integration-tests__/entities/ParentEntity.ts 100.00% <ø> (ø)
packages/entity/src/EntityCompanionProvider.ts 100.00% <100.00%> (ø)
...s/testing/createUnitTestEntityCompanionProvider.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7309e1...ab5ff4c. Read the comment docs.

@wschurman wschurman merged commit 72a77f8 into master Jan 20, 2021
@wschurman wschurman deleted the @wschurman/remove-enums branch January 20, 2021 19:49
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.

1 participant