diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c40838..067541a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,10 @@ ## CHANGELOG -* Version **[1.0.0](#100_110)** (Swift 3.x) and **[1.1.0](#100_110)** (Swift 4.x) +* Version **[1.2.0](#120)** (Swift 4) +* Version **[1.1.0](#110)** (first Swift 4) +* Version **[1.0.1](#101)** (latest for Swift 3) +* Version **[1.0.0](#100)** * Version **[0.9.9](#099)** * Version **[0.9.7](#097)** * Version **[0.9.4](#094)** @@ -12,14 +15,48 @@ * Version **[0.9.2](#092)** * Version **[0.9.1](#091)** - + -## Hydra 1.0.0 (for Swift 3) & 1.1.0 (for Swift 4) +## Hydra 1.2.0 (Swift 4) +--- +- **Release Date**: 2017-10-27 +- **Download Version for Swift 4**: [Download 1.2.0](https://github.com/malcommac/Hydra/releases/tag/1.2.0) + +- [#54](https://github.com/malcommac/Hydra/pull/54) Fixed an issue when compiling Hydra for macOS, tvOS and watchOS + + + +## Hydra 1.1.0 (first for Swift 4) --- - **Release Date**: 2017-09-04 - **Download Version for Swift 3**: [Download 1.0.0](https://github.com/malcommac/Hydra/releases/tag/1.0.0) - **Download Version for Swift 4**: [Download 1.1.0](https://github.com/malcommac/Hydra/releases/tag/1.1.0) +- [#44](https://github.com/malcommac/Hydra/pull/44) Resolved a compatibility issue with `await` under iOS 11 or later. +- [#45](https://github.com/malcommac/Hydra/pull/45) Added support for cancellable promises inside the `await` operator. +- [#46](https://github.com/malcommac/Hydra/pull/46) Resolved an issue where `timeout` operator keep a Promise alive even if it resolves correctly before it expires. +- [#48](https://github.com/malcommac/Hydra/pull/48) Resolved a memory leaks with cancellable promises. +- [#49](https://github.com/malcommac/Hydra/pull/49) Replaced with `(Void)` with `()` to fix warnings with Swift 4 and XCode 9 + + + + +## Hydra 1.0.1 (latest for Swift 3) +--- +- **Release Date**: 2017-10-27 +- **Download Version for Swift 3**: [Download 1.0.1](https://github.com/malcommac/Hydra/releases/tag/1.0.1) + +- [#51](https://github.com/malcommac/Hydra/pull/51) Fixed an when compiling using Chartage +- [#52](https://github.com/malcommac/Hydra/pull/45) Fixed an issue when compiling Hydra for macOS, tvOS and watchOS + + + + +## Hydra 1.0.0 +--- +- **Release Date**: 2017-09-04 +- **Download Version for Swift 3**: [Download 1.0.0](https://github.com/malcommac/Hydra/releases/tag/1.0.0) + - [#45](https://github.com/malcommac/Hydra/pull/45) Added support for cancellable promises inside the `await` operator. - [#46](https://github.com/malcommac/Hydra/pull/46) Resolved an issue where `timeout` operator keep a Promise alive even if it resolves correctly before it expires. - [#44](https://github.com/malcommac/Hydra/pull/44) Resolved a compatibility issue with `await` under iOS 11 or later. diff --git a/Hydra.xcodeproj/project.pbxproj b/Hydra.xcodeproj/project.pbxproj index 15e4057..0202594 100644 --- a/Hydra.xcodeproj/project.pbxproj +++ b/Hydra.xcodeproj/project.pbxproj @@ -104,6 +104,9 @@ 37ACBBA61F55FD7D003E92AC /* DispatchTimerWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37ACBBA31F55FD7D003E92AC /* DispatchTimerWrapper.swift */; }; 37ACBBA71F55FD7D003E92AC /* DispatchTimerWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37ACBBA31F55FD7D003E92AC /* DispatchTimerWrapper.swift */; }; 52D6D9871BEFF229002C0205 /* Hydra.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52D6D97C1BEFF229002C0205 /* Hydra.framework */; }; + 64FDEBF41FA25AF8005FBC55 /* Promise+Cancel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37843A5B1F12238A0071989E /* Promise+Cancel.swift */; }; + 64FDEBF51FA25AF8005FBC55 /* Promise+Cancel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37843A5B1F12238A0071989E /* Promise+Cancel.swift */; }; + 64FDEBF61FA25AF8005FBC55 /* Promise+Cancel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37843A5B1F12238A0071989E /* Promise+Cancel.swift */; }; 8933C78E1EB5B82C000D00A4 /* HydraTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8933C7891EB5B82A000D00A4 /* HydraTests.swift */; }; 8933C78F1EB5B82C000D00A4 /* HydraTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8933C7891EB5B82A000D00A4 /* HydraTests.swift */; }; 8933C7901EB5B82D000D00A4 /* HydraTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8933C7891EB5B82A000D00A4 /* HydraTests.swift */; }; @@ -731,6 +734,7 @@ 37ACAE081F0FB4A800ED284A /* Promise+Map.swift in Sources */, 37ACADF41F0FB4A800ED284A /* Promise+Any.swift in Sources */, 37ACBBA61F55FD7D003E92AC /* DispatchTimerWrapper.swift in Sources */, + 64FDEBF51FA25AF8005FBC55 /* Promise+Cancel.swift in Sources */, 37ACADF01F0FB4A800ED284A /* Promise+Always.swift in Sources */, 37ACAE041F0FB4A800ED284A /* Promise+Defer.swift in Sources */, 37ACAE181F0FB4A800ED284A /* Promise+Reduce.swift in Sources */, @@ -760,6 +764,7 @@ 37ACAE091F0FB4A800ED284A /* Promise+Map.swift in Sources */, 37ACADF51F0FB4A800ED284A /* Promise+Any.swift in Sources */, 37ACBBA71F55FD7D003E92AC /* DispatchTimerWrapper.swift in Sources */, + 64FDEBF61FA25AF8005FBC55 /* Promise+Cancel.swift in Sources */, 37ACADF11F0FB4A800ED284A /* Promise+Always.swift in Sources */, 37ACAE051F0FB4A800ED284A /* Promise+Defer.swift in Sources */, 37ACAE191F0FB4A800ED284A /* Promise+Reduce.swift in Sources */, @@ -789,6 +794,7 @@ 37ACAE071F0FB4A800ED284A /* Promise+Map.swift in Sources */, 37ACADF31F0FB4A800ED284A /* Promise+Any.swift in Sources */, 37ACBBA51F55FD7D003E92AC /* DispatchTimerWrapper.swift in Sources */, + 64FDEBF41FA25AF8005FBC55 /* Promise+Cancel.swift in Sources */, 37ACADEF1F0FB4A800ED284A /* Promise+Always.swift in Sources */, 37ACAE031F0FB4A800ED284A /* Promise+Defer.swift in Sources */, 37ACAE171F0FB4A800ED284A /* Promise+Reduce.swift in Sources */, diff --git a/HydraAsync.podspec b/HydraAsync.podspec index dceda69..aeb9206 100644 --- a/HydraAsync.podspec +++ b/HydraAsync.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'HydraAsync' - spec.version = '1.1.0' + spec.version = '1.2.0' spec.summary = 'Promises & Await: Write better async in Swift' spec.homepage = 'https://github.com/malcommac/Hydra' spec.license = { :type => 'MIT', :file => 'LICENSE' } diff --git a/Package.swift b/Package.swift index 6686a63..6d6243f 100644 --- a/Package.swift +++ b/Package.swift @@ -1,5 +1,14 @@ +// swift-tools-version:4.0 import PackageDescription let package = Package( - name: "Hydra" + name: "Hydra", + products: [ + .library(name: "Hydra", targets: ["Hydra"]) + ], + targets: [ + .target(name: "Hydra", dependencies: []), + .testTarget(name: "HydraTests", dependencies: ["Hydra"]) + ], + swiftLanguageVersions: [4] ) diff --git a/README.md b/README.md index 13c856d..a0c47cc 100644 --- a/README.md +++ b/README.md @@ -5,37 +5,46 @@ [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![CI Status](https://travis-ci.org/malcommac/HydraAsync.svg)](https://travis-ci.org/malcommac/HydraAsync) [![Version](https://img.shields.io/cocoapods/v/HydraAsync.svg?style=flat)](http://cocoadocs.org/docsets/HydraAsync) [![License](https://img.shields.io/cocoapods/l/HydraAsync.svg?style=flat)](http://cocoadocs.org/docsets/HydraAsync) [![Platform](https://img.shields.io/cocoapods/p/HydraAsync.svg?style=flat)](http://cocoadocs.org/docsets/HydraAsync)

Love your async code again with Hydra
-Made with ♥ in pure Swift 3.x+, no dependencies, lightweight & fully portable +Made with ♥ in pure Swift 3.x/4.x, no dependencies, lightweight & fully portable

★★ Star our github repository to help us! ★★

Created by Daniele Margutti (@danielemargutti)

+## Swift 3 and Swift 4 Compatibility + +* **Swift 4.x**: Latest is 1.2.0 (`pod 'HydraAsync'`) +* **Swift 3.x**: Latest is 1.0.1 - Latest compatible version is 1.0.1 Download here. If you are using CocoaPods be sure to fix the release (`pod 'HydraAsync', '~> 1.0.1'`) + # Hydra -Hydra is full-featured lightweight library which allows you to write better async code in Swift 3+. It's partially based on [JavaScript A+](https://promisesaplus.com) specs and also implements modern construct like `await` (as seen in [Async/Await specification in ES8 (ECMAScript 2017)](https://github.com/tc39/ecmascript-asyncawait) or C#) which allows you to write async code in sync manner. +Hydra is full-featured lightweight library which allows you to write better async code in Swift 3.x/4.x. It's partially based on [JavaScript A+](https://promisesaplus.com) specs and also implements modern construct like `await` (as seen in [Async/Await specification in ES8 (ECMAScript 2017)](https://github.com/tc39/ecmascript-asyncawait) or C#) which allows you to write async code in sync manner. Hydra supports all sexiest operators like `always`, `validate`, `timeout`, `retry`, `all`, `any`, `pass`, `recover`, `map`, `zip`, `defer` and `retry`. Starts writing better async code with Hydra! ## Internals A more detailed look at how Hydra works can be found in [ARCHITECTURE](https://github.com/malcommac/Hydra/blob/master/ARCHITECTURE.md) file or on [Medium](https://medium.com/@danielemargutti/hydra-promises-swift-c6319f6a6209). -## You also may like +## OTHER LIBRARIES YOU MAY LIKE -Do you like `Hydra`? I'm also working on several other opensource libraries. +I'm also working on several other projects you may like. +Take a look below: -Take a look here: +

-* **[SwiftDate](https://github.com/malcommac/SwiftDate)** - Date & Timezone management in Swift -* **[SwiftLocation](https://github.com/malcommac/SwiftLocation)** - CoreLocation and Beacon Monitoring on steroid! -* **[SwiftRichString](https://github.com/malcommac/SwiftRichString)** - Elegant and painless attributed string in Swift -* **[SwiftScanner](https://github.com/malcommac/SwiftScanner)** - String scanner in pure Swift with full unicode support -* **[SwiftSimplify](https://github.com/malcommac/SwiftSimplify)** - Tiny high-performance Swift Polyline Simplification Library -* **[SwiftMsgPack](https://github.com/malcommac/SwiftMsgPack)** - MsgPack Encoder/Decoder in Swift +| Library | Description | +|-----------------|--------------------------------------------------| +| [**SwiftDate**](https://github.com/malcommac/SwiftDate) | The best way to manage date/timezones in Swift | +| [**Hydra**](https://github.com/malcommac/Hydra) | Write better async code: async/await & promises | +| [**Flow**](https://github.com/malcommac/Flow) | A new declarative approach to table managment. Forget datasource & delegates. | +| [**SwiftRichString**](https://github.com/malcommac/SwiftRichString) | Elegant & Painless NSAttributedString in Swift | +| [**SwiftLocation**](https://github.com/malcommac/SwiftLocation) | Efficient location manager | +| [**SwiftMsgPack**](https://github.com/malcommac/SwiftMsgPack) | Fast/efficient msgPack encoder/decoder | +

## Current Release (Swift 3 and 4 releases) Latest releases are: -- **Swift 4.x**: From (>=) **1.1.0** [Download here](https://github.com/malcommac/Hydra/releases/tag/1.1.0). -- **Swift 3.x**: Latest release is **1.0.0** [Download here](https://github.com/malcommac/Hydra/releases/tag/1.0.0). +* **Swift 4.x**: Latest is 1.2.0 (`pod 'HydraAsync'`) [Download here](https://github.com/malcommac/Hydra/releases/tag/1.2.0). +* **Swift 3.x**: Latest is 1.0.1 (`pod 'HydraAsync', '~> 1.0.1'`) [Download here](https://github.com/malcommac/Hydra/releases/tag/1.0.1). A complete list of changes for each release is available in the [CHANGELOG](CHANGELOG.md) file. @@ -584,10 +593,10 @@ all(op_1.void,op_2.void,op_3.void).then { _ in ## Installation -You can install Swiftline using CocoaPods, carthage and Swift package manager +You can install Hydra using CocoaPods, Carthage and Swift package manager -- **Swift 3.x**: Up to 1.0.0 ([Direct Download](https://github.com/malcommac/Hydra/releases/tag/1.0.0)) -- **Swift 4.x**: Starting from 1.1.0 ([Direct Download](https://github.com/malcommac/Hydra/releases/tag/1.1.0)) +- **Swift 3.x**: Latest compatible is 1.0.1 `pod 'HydraAsync', ~> '1.0.1'` +- **Swift 4.x**: 1.1.0 or later `pod 'HydraAsync'` ### CocoaPods use_frameworks! @@ -597,7 +606,7 @@ You can install Swiftline using CocoaPods, carthage and Swift package manager github 'malcommac/Hydra' ### Swift Package Manager -Add swiftline as dependency in your `Package.swift` +Add Hydra as dependency in your `Package.swift` ``` import PackageDescription @@ -615,7 +624,7 @@ Add swiftline as dependency in your `Package.swift` Current version is compatible with: -* Swift 4 (>= 1.1.0) or Swift 3.x (Up to 1.0.0) +* Swift 4 (>= 1.1.0) or Swift 3.x (Up to 1.0.1) * iOS 8.0 or later * tvOS 9.0 or later * macOS 10.10 or later