Skip to content

v4.0.0

Compare
Choose a tag to compare
@sindresorhus sindresorhus released this 18 Apr 07:51

Important

If you use Swift Package Manager, you need to set the build setting “Other Linker Flags” to -weak_framework Combine to work around this Xcode bug.

Breaking

  • Get rid of Defaults.OptionalKey b2fdee2
    • Migrate:
 extension Defaults.Keys {
-	static let name = OptionalKey<Double>("name")
+	static let name = Key<Double?>("name")
 }
  • Remove the .old and .new options for Defaults.observe 8376ca7
    • They're now the default. There was no good reason to not specify them and it was easy to leave them out by accident and then getting the incorrect .newValue/.oldValue.
  • Rename DefaultsObservation to Defaults.Observation 31b56ce

Improvements

Fixes

  • Defaults.reset() now works with keys of different types, but it's limited to 10 keys because of Swift generics limitations 15c096d

v3.1.1...v4.0.0