Repository navigation
No action required
4.1.0 is additive. No existing method, signature or behaviour changes; ZeroBounceSDK and ZeroBounceWarmup stay public, not open.
Added: protocols for fakes in tests
Both classes now conform to a public protocol with every public API method and the same signatures:
ZeroBounceSDKProtocol(64 methods), adopted byZeroBounceSDKZeroBounceWarmupProtocol(26 methods), adopted byZeroBounceWarmup
final class SignupGate {
let client: any ZeroBounceSDKProtocol
init(client: any ZeroBounceSDKProtocol = ZeroBounceSDK.shared) { self.client = client }
}
// in a test
let gate = SignupGate(client: FakeZeroBounce())Setup (initialize, the base URL setters, shared, setSessionConfiguration) is not on the protocols. Protocols can't declare default arguments, so a protocol extension provides the overloads that leave them out.
The protocols gain a method whenever the SDK adds an API call, in minor releases. Use them for fakes and type annotations; your own conforming types may need new methods on upgrade.
Why 4.1.0
New public types and no breaking changes: a minor release. Live suite before release: 40 passed, 0 failed, 4 skipped.
- feat: protocols for faking ZeroBounceSDK and ZeroBounceWarmup in app tests by @franciscbalint in #22
Full Changelog: v4.0.0...v4.1.0