vigetlabs / microcosm

Flux with actions at center stage. Write optimistic updates, cancel requests, and track changes with ease.
http://code.viget.com/microcosm/
MIT License
487 stars 29 forks source link

Repos and Forks can not add multiple domains for the same key #435

Closed nhunzaker closed 6 years ago

nhunzaker commented 6 years ago

This commit removes the ability to add multiple domains for the same key. This allows us to:

  1. Remove the meta-domain
  2. Remove the ADD_DOMAIN lifecycle action
  3. Avoid merging data to avoid "spilling" keys

Breaking changes

  1. Microcosms can no longer implement register(). This was intended to make it easier to build a Microcosm, but it is never used in real-world apps™️ and is problematic for future work.
  2. Forks can not add domains on top of parents
  3. Microcosms can not add multiple domains for the same key

Fixes https://github.com/vigetlabs/microcosm/issues/427.

codecov-io commented 6 years ago

Codecov Report

Merging #435 into master will decrease coverage by 0.35%. The diff coverage is 96.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #435      +/-   ##
==========================================
- Coverage   74.37%   74.02%   -0.36%     
==========================================
  Files          45       44       -1     
  Lines        1362     1359       -3     
  Branches      250      253       +3     
==========================================
- Hits         1013     1006       -7     
- Misses        288      293       +5     
+ Partials       61       60       -1
Impacted Files Coverage Δ
packages/microcosm/src/get-registration.js 100% <ø> (ø) :arrow_up:
packages/microcosm/src/utils.js 100% <ø> (ø) :arrow_up:
packages/microcosm/src/addons/indexing.js 0% <0%> (ø) :arrow_up:
packages/microcosm/src/action.js 100% <100%> (ø) :arrow_up:
packages/microcosm/src/microcosm.js 100% <100%> (ø) :arrow_up:
packages/microcosm/src/lifecycle.js 100% <100%> (ø) :arrow_up:
packages/microcosm/src/domain-engine.js 100% <100%> (ø) :arrow_up:
packages/microcosm/src/history.js 100% <100%> (ø) :arrow_up:
packages/microcosm/src/addons/action-queue.js 80% <0%> (-20%) :arrow_down:
packages/microcosm/src/addons/action-button.js 96.87% <0%> (-3.13%) :arrow_down:

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 71bf30d...b999424. Read the comment docs.