You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Encode/Decode SemanticVersion as a single value string
Since SemanticVersion is LosslessStringConvertible, it seems to make more sense for its encoding/decoding strategy to use that to allow it to be serialized more succinctly as a single string value, rather than using the synthesized structured encoding provided by simply declaring Codable conformance. This is also more likely to conform to how such values will be served up by APIs.
This change implements custom init(from:) and encode(to:) methods to provide this behavior, as well as unit tests to verify the behavior.
Note this *is* a breaking change to the encoded format of the structure.
0 commit comments