Skip to content

4.0.0

Compare
Choose a tag to compare
@Jeehut Jeehut released this 23 Mar 03:48
· 33 commits to main since this release

Added

  • New DocC-based documentation hosted on Swift Package Index
  • Extensively improved documentation for all types & functions, including usage examples
  • README now showcases the apps most of the code was extracted from (& is used in)
  • New "Extensions" DocC article highlighting the most used extension properties & functions
  • New "New Types" DocC article highlighting the most used type additions & global functions
  • New CaseIterable extension properties allCasesPrefixedByNil and allCasesSuffixedByNil
  • New Duration extensions adding minute/hour/days/weeks, conversion to a TimeInterval and more
  • New Float extension analogous to the existing Double extension for rounded values
  • New SymmetricKey extension making conversion to/from base64 encoded String easier
  • New AutoConforming typealias that adds Codable, Hashable, and Sendable conformance in one go
  • New Debouncer type making debouncing for search input in SwiftUI easy
  • New GregorianDay type for storing just the day part of a Date without time
  • New GreogorianTimeOfDay type for storing just the time part of a Date without the day
  • New OperatingSystem type with a OS typealias to specify different values based on the current OS

Changed

  • Big documentation clean-up & improvements
  • The minimum Swift version was bumped from 5.1 to 5.9 (Xcode 14.2+)

Deprecated

  • The HandyRegex type and all its functions are now marked as deprecated. A removal is not planned anytime soon as long as NSRegularExpression API is around. But I encourage you to migrate to Swifts new and very own Regex type.

Removed

  • The Unowned and Weak wrapper types were removed without substitution
  • Any dependency managers except Swift Package Manager were dropped (e.g. CocoaPods)
  • README no longer serves as the documentation, the docs are moved over to the Swift Package Index (see README)
  • Some APIs that are no longer needed because Swift has a comparable alternative were removed with a fix-it

Fixes

  • Unit tests & CI setup

Migrating from 3.x

This release is a breaking change.

If you were using Unowned or Weak, you can find & copy their implementation to your project from the old release here.

If you were using Regex, note that you will get errors because it was renamed to HandyRegex. But fix-its could not be provided because Swift now has its own Regex type. So you need to rename uses of Regex to HandyRegex manually.

Some more APIs were renamed or removed in favor of a new Swift feature that should be preferred. Fix-its are provided for all these cases. Most APIs remain unchanged but have much better documentation now. 🎉