Members icon indicating copy to clipboard operation
Members copied to clipboard

Updated DomainEvents to be non-singleton

Open allouis opened this issue 3 years ago • 1 comments

refs https://github.com/TryGhost/Team/issues/1438

Use this package as a singleton runs into issues when multiple packages are depending on it. If we have multiple versions of this package in use by dependencies, those using different version will be unable to communicate, rendering this package essentially useless.

We're making a breaking change here, rather than just updating Ghost to pass down the instance, as that will help us find missed packages easier, as renovate will let us know.

As this is a breaking change to the interface, this will be a major version bump.

allouis avatar May 24 '22 13:05 allouis

Codecov Report

Merging #402 (216fceb) into main (2b1339e) will decrease coverage by 0.30%. The diff coverage is 30.43%.

@@            Coverage Diff             @@
##             main     #402      +/-   ##
==========================================
- Coverage   28.85%   28.55%   -0.31%     
==========================================
  Files          72       72              
  Lines        9152     9109      -43     
  Branches      375      370       -5     
==========================================
- Hits         2641     2601      -40     
+ Misses       6508     6505       -3     
  Partials        3        3              
Impacted Files Coverage Δ
packages/member-analytics-service/index.js 0.00% <0.00%> (ø)
...kages/member-analytics-service/lib/EventHandler.js 0.00% <0.00%> (ø)
.../members-analytics-ingress/lib/EventsController.js 0.00% <0.00%> (ø)
packages/offers/index.js 0.00% <0.00%> (ø)
packages/offers/lib/application/OfferRepository.js 0.00% <0.00%> (ø)
packages/payments/lib/payments.js 0.00% <0.00%> (ø)
packages/stripe/lib/WebhookController.js 0.00% <0.00%> (ø)
packages/members-api/lib/repositories/member.js 9.83% <80.00%> (+0.39%) :arrow_up:
packages/domain-events/lib/DomainEvents.js 100.00% <100.00%> (ø)
...s/verification-trigger/lib/verification-trigger.js 97.35% <100.00%> (+0.01%) :arrow_up:
... and 6 more

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 2b1339e...216fceb. Read the comment docs.

codecov-commenter avatar May 26 '22 09:05 codecov-commenter