🧰 Case paths extends the key path hierarchy to enum cases.
optionalValue.is(\Wrapped.Cases.case)
would return true
for non-matching cases due to an optional promotion bug (https://github.com/pointfreeco/swift-case-paths/pull/157).Full Changelog: https://github.com/pointfreeco/swift-case-paths/compare/1.3.2...1.3.3
@CasePathable
enum (thanks @djangovanderheijden, https://github.com/pointfreeco/swift-case-paths/pull/154).Full Changelog: https://github.com/pointfreeco/swift-case-paths/compare/1.3.1...1.3.2
\.never
case path autocomplete now shows a warning on non-@CasePathable
enums to help call out that enums are expected to be case-pathable for their cases to be accessible via key path syntax (https://github.com/pointfreeco/swift-case-paths/pull/153).@CasePathable
now preserves documentation for each generated case path (https://github.com/pointfreeco/swift-case-paths/pull/153).Full Changelog: https://github.com/pointfreeco/swift-case-paths/compare/1.3.0...1.3.1
Full Changelog: https://github.com/pointfreeco/swift-case-paths/compare/1.2.4...1.3.0
@CasePathable
can now be applied to enums in public
extensions (https://github.com/pointfreeco/swift-case-paths/pull/149).@CasePathable
can now be applied to enums with @available
annotations (https://github.com/pointfreeco/swift-case-paths/pull/149).Full Changelog: https://github.com/pointfreeco/swift-case-paths/compare/1.2.3...1.2.4
Full Changelog: https://github.com/pointfreeco/swift-case-paths/compare/1.2.2...1.2.3
PartialCaseKeyPath.callAsFunction
no longer fails to embed values that are already wrapped in Any
(https://github.com/pointfreeco/swift-case-paths/pull/145).Full Changelog: https://github.com/pointfreeco/swift-case-paths/compare/1.2.1...1.2.2
Enum.optionalCase(nil).is(\.optionalCase)
would return false
due to optional promotion introduced in 1.2.0 (thanks @Ryu0118, https://github.com/pointfreeco/swift-case-paths/pull/142).Full Changelog: https://github.com/pointfreeco/swift-case-paths/compare/1.2.0...1.2.1
some
cases (https://github.com/pointfreeco/swift-case-paths/pull/139; https://github.com/pointfreeco/swift-case-paths/pull/140; https://github.com/pointfreeco/swift-case-paths/pull/141).Full Changelog: https://github.com/pointfreeco/swift-case-paths/compare/1.1.3...1.2.0
CasePathable.is
can now accept partial case key paths (thanks @lukeredpath, https://github.com/pointfreeco/swift-case-paths/pull/134).Full Changelog: https://github.com/pointfreeco/swift-case-paths/compare/1.1.2...1.1.3