Commit Graph

5 Commits

Author SHA1 Message Date
Hannah Wolfe
6161f94910
Updated to use assert/strict everywhere (#17047)
refs: https://github.com/TryGhost/Toolbox/issues/595

We're rolling out new rules around the node assert library, the first of which is enforcing the use of assert/strict. This means we don't need to use the strict version of methods, as the standard version will work that way by default.

This caught some gotchas in our existing usage of assert where the lack of strict mode had unexpected results:
- Url matching needs to be done on `url.href` see aa58b354a4
- Null and undefined are not the same thing,  there were a few cases of this being confused
- Particularly questionable changes in [PostExporter tests](c1a468744b) tracked [here](https://github.com/TryGhost/Team/issues/3505).
- A typo see eaac9c293a

Moving forward, using assert strict should help us to catch unexpected behaviour, particularly around nulls and undefineds during implementation.
2023-06-21 09:56:59 +01:00
Fabien "egg" O'Carroll
9736d942e1 Unsubscribed Members from newsletters when their email is suppressed
refs https://github.com/TryGhost/Team/issues/2367

This ensures that a Member is not considered subscribed to any emails, so that
counts for newsletter recipients are correct. Eventually we will filter members
on their email suppression status but this is not implemented yet.
2022-12-08 13:02:36 +07:00
Fabien "egg" O'Carroll
dd256f3517 Fixed lint for @tryghost/email-suppression-list 2022-11-18 15:06:56 +07:00
Fabien "egg" O'Carroll
9add72ebb1 Fixed tests for @tryghost/email-suppression-list
These were missing and caused the build to fail
2022-11-18 14:59:06 +07:00
Fabien "egg" O'Carroll
22fe3ec88b Added @tryghost/email-suppression-list package
refs https://github.com/TryGhost/Team/issues/2267

This package contains definitions for the public interface of the
email suppression list as well as an abstract implementation.
2022-11-18 14:06:11 +07:00