Releases: FlineDev/HandySwift
Releases · FlineDev/HandySwift
4.4.0
Added
- Complete
RESTClientnetworking solution with automatic retry, plugin system, and smart rate limiting LogRequestPluginandLogResponsePluginfor OSLog structured logging (iOS/macOS/tvOS/watchOS apps)PrintRequestPluginandPrintResponsePluginfor console logging (server-side Swift/Vapor)JSONEncoder.snakeCaseandJSONDecoder.snakeCaseconvenience extensionschunks(ofSize:)function to Collection extension
Changed
GregorianTimeOfDayrenamed toGregorianTime(with deprecation typealias)
Full Changelog: 4.3.0...4.4.0
4.3.0
- Adds
mapKeysfunction toDictionarytype. - Migrates to Swift 6 for full concurrency checking. (Stay on version
4.2.0if you are still using Xcode 15.)
Full Changelog: 4.2.0...4.3.0
4.2.0
Added
- New String extension function
tokenized(locale:)for creating search terms (learn more) - New String extension function
matchesTokenizedPrefixes(in:locale:)for convenient fuzzy search (learn more)
4.1.0
Added
- New
advanced/reversed(byMonths:)andadvanced/reversed(byYears:)forGregorianDay - New
startOfMonth(timeZone:)andstartOfYear(timeZone:)functions onGregorianDay - Added more tests to ensure some of the newer functionality continues to work in the future
Changed
- Properties of
GregorianDayandGregorianTimeOfDayare now variable & the types conform toWithable
Fixed
- Fixed conversion of
TimeIntervalintoDurationfor fractional seconds - Fixed a build error when using
delay(by:)due to ambiguity caused by an overload
4.0.1
4.0.0
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
CaseIterableextension propertiesallCasesPrefixedByNilandallCasesSuffixedByNil - New
Durationextensions adding minute/hour/days/weeks, conversion to aTimeIntervaland more - New
Floatextension analogous to the existingDoubleextension for rounded values - New
SymmetricKeyextension making conversion to/from base64 encoded String easier - New
AutoConformingtypealias that addsCodable,Hashable, andSendableconformance in one go - New
Debouncertype making debouncing for search input in SwiftUI easy - New
GregorianDaytype for storing just the day part of aDatewithout time - New
GreogorianTimeOfDaytype for storing just the time part of aDatewithout the day - New
OperatingSystemtype with aOStypealias 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
HandyRegextype and all its functions are now marked as deprecated. A removal is not planned anytime soon as long asNSRegularExpressionAPI is around. But I encourage you to migrate to Swifts new and very ownRegextype.
Removed
- The
UnownedandWeakwrapper 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. 🎉
3.4.0
Added
- Added new convenience
encrypt(key:)anddecrypt(key:)functions toStringtype for platforms supportingCryptoKit. Uses AES.GCM algorithm for encryption.
Author: Cihat Gündüz
3.3.0
Added
- Added
round(fractionDigits:rule:)&rounded(fractionDigits:rule:)methods toDoubletype.
Author: Cihat Gündüz
3.2.1
Changed
Withabledoesn't require an emptyinit()method anymore. Instead, it can be combined with any initializer. If you used theFoo { $0.bar = 5 }type of initializer, you will need to add().withbehind the type like so:Foo().with { $0.bar = 5 }.
Issue: #49 | PR: #50 | Author: Cihat Gündüz- Improved with new
removeAllmethod, conformance toBidirectionalCollection,ExpressibleByArrayLiteraland removal ofnewElementlabel on `insert.
Author: Cihat Gündüz
Fixed
- Made all functions accept throwing closures to allow wider usage cases for helper functions like
.timesetc.
Author: Cihat Gündüz
3.2.0
Added
- New
DivisibleArithmeticprotocol which easily extendsaverage()to Collections ofDouble,FloatandCGFloat.
Issue: #36 | PR: #38 | Author: David Knothe - Make most of the API
@inlinablefor increased real-time performance.
Issue: #40 | PR: #43 | Author: David Knothe
Changed
- Allow
Int.init?(randomBelow:)to use an arbitrary RandomNumberGenerator (instead of just the system one).
PR: #44 | Author: David Knothe