This repository has been 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
PiedPiper
is now compiled with Swift 2.3merge
has been deprecated, please usemergeAll
instead
New features
- Added
mergeSome
to aSequenceType
ofFuture
s to collapse a list ofFuture
s into a single one and succeeds even if some of theFuture
s fail (contrast tomerge
) - Added
all
to aSequenceType
ofFuture
s to collapse a list ofFuture
s 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 tomerge
but it doesn't bring the results with it). - Added
snooze
toFuture
in order to delay the result of aFuture
(either success or failure) by a given time - Added
timeout
toFuture
in order to set a deadline for the result of aFuture
after which it will automatically fail - Added
firstCompleted
to aSequenceType
ofFuture
s to get the result of the firstFuture
that completes and ignore the others. - Added a
retry
global 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
Promise
now has only an emptyinit
. If you used one of the convenienceinit
(withvalue:
, witherror:
or withvalue:error:
), they now moved toFuture
.
New features
- Adds
value
anderror
properties toResult
- Added a way to initialize
Future
s through closures - It's now possible to
map
Future
s through:- a simple transformation closure
- a closure that
throws
- It's now possible to
flatMap
Future
s 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
filter
Future
s through:- a simple condition closure
- a closure that returns a
Future<Bool>
- It's now possible to
reduce
aSequenceType
ofFuture
s into a newFuture
through acombine
closure - It's now possible to
zip
aFuture
with either anotherFuture
or with aResult
- Added
merge
to aSequenceType
ofFuture
s to collapse a list ofFuture
s into a single one - Added
traverse
toSequenceType
to generate a list ofFuture
s through a given closure andmerge
them together - Added
recover
toFuture
so that it's possible to provide a default value theFuture
can use instead of failing - It's now possible to
map
Result
s through:- a simple transformation closure
- a closure that
throws
- It's now possible to
flatMap
Result
s 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
filter
Result
s through a simple condition closure - Added
mimic
toResult