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: mutation validator and trigger cyclic import structure #118

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

wschurman
Copy link
Member

Why

Similar to #89 and #93, we need to do the same for validators and triggers in case those import entities themselves.

I tried rethinking this whole thing and just making the companion definition a function (static getCompanionDefinition(): () => EntityCompanionDefinition) but it made things less clean to define (had to remove top-level consts containing companion definitions to reap benefits) and made things less composable (because consts are no longer possible, can't be shared).

How

Make the params functions similar to other PR examples above.

Test Plan

Run all tests.

@codecov
Copy link

codecov bot commented Mar 23, 2021

Codecov Report

Merging #118 (59e779f) into master (3ce961d) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #118   +/-   ##
=======================================
  Coverage   95.08%   95.08%           
=======================================
  Files          67       67           
  Lines        1689     1689           
  Branches      202      202           
=======================================
  Hits         1606     1606           
  Misses         81       81           
  Partials        2        2           
Flag Coverage Δ
integration 95.08% <100.00%> (ø)
unittest 95.08% <100.00%> (ø)

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

Impacted Files Coverage Δ
packages/entity/src/EntityCompanionProvider.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 3ce961d...59e779f. Read the comment docs.

@wschurman wschurman merged commit b11dbc0 into master Mar 23, 2021
@wschurman wschurman deleted the @wschurman/funcs-for-validators-triggers branch March 23, 2021 20:08
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