Updated DomainEvents to be non-singleton
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.
Codecov Report
Merging #402 (216fceb) into main (2b1339e) will decrease coverage by
0.30%. The diff coverage is30.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 dataPowered by Codecov. Last update 2b1339e...216fceb. Read the comment docs.