This repository was archived by the owner on Aug 2, 2024. It is now read-only.
Releases: spring-media/PiedPiper
Releases · spring-media/PiedPiper
Swift Package Manager Support
Breaking Changes
- Xcode 11.5+ required
New Features
- Swift Package Manager Support
Swift 5 Migration
Merge pull request #22 from spring-media/feature/Swift5 MIgrate to Swift5
Swift 4
Swift 3
Swift 2.3
Breaking changes
PiedPiperis now compiled with Swift 2.3mergehas been deprecated, please usemergeAllinstead
New features
- Added
mergeSometo aSequenceTypeofFutures to collapse a list ofFutures into a single one and succeeds even if some of theFutures fail (contrast tomerge) - Added
allto aSequenceTypeofFutures to collapse a list ofFutures into a single one that succeeds when all of the elements of the sequence succeed, and fails when one of the element fails (it's similar tomergebut it doesn't bring the results with it). - Added
snoozetoFuturein order to delay the result of aFuture(either success or failure) by a given time - Added
timeouttoFuturein order to set a deadline for the result of aFutureafter which it will automatically fail - Added
firstCompletedto aSequenceTypeofFutures to get the result of the firstFuturethat completes and ignore the others. - Added a
retryglobal function to retry a givenFuture(generated through a provided closure) a certain number of times every given interval
Independence day
Breaking changes
- The codebase has been migrated to Swift 2.2
Promisenow has only an emptyinit. If you used one of the convenienceinit(withvalue:, witherror:or withvalue:error:), they now moved toFuture.
New features
- Adds
valueanderrorproperties toResult - Added a way to initialize
Futures through closures - It's now possible to
mapFutures through:- a simple transformation closure
- a closure that
throws
- It's now possible to
flatMapFutures through:- a closure that returns an
Optional - a closure that returns another
Future - a closure that returns a
Result
- a closure that returns an
- It's now possible to
filterFutures through:- a simple condition closure
- a closure that returns a
Future<Bool>
- It's now possible to
reduceaSequenceTypeofFutures into a newFuturethrough acombineclosure - It's now possible to
zipaFuturewith either anotherFutureor with aResult - Added
mergeto aSequenceTypeofFutures to collapse a list ofFutures into a single one - Added
traversetoSequenceTypeto generate a list ofFutures through a given closure andmergethem together - Added
recovertoFutureso that it's possible to provide a default value theFuturecan use instead of failing - It's now possible to
mapResults through:- a simple transformation closure
- a closure that
throws
- It's now possible to
flatMapResults through:- a closure that returns an
Optional - a closure that returns a
Future - a closure that returns another
Result
- a closure that returns an
- It's now possible to
filterResults through a simple condition closure - Added
mimictoResult