Skip to content

Releases: peek-travel/swift-currency

SwiftCurrency 0.6.1

04 Apr 05:25
a7daee9
Compare
Choose a tag to compare
SwiftCurrency 0.6.1 Pre-release
Pre-release

API Docs are always available at peek-travel.github.io/swift-currency

Minor

  • Added Cocoapods Support (#38)

SwiftCurrency 0.6.0

08 Mar 00:58
9a7a30d
Compare
Choose a tag to compare
SwiftCurrency 0.6.0 Pre-release
Pre-release

API Docs are always available at peek-travel.github.io/swift-currency

Major

  • Currency localization is now easier to use with localizedString methods on AnyCurrency that reflect the String interpolation API (#34)
    • The String interpolation methods (localize:forLocale:nilDescription:) and (localize:withFormatter:nilDescription:) have had their 2nd parameters renamed to for: and with: respectively.

Misc

  • A usage doc is now available that gives an overview of many aspects of the library (#35)

Currency 0.5.0

29 Feb 05:03
cf39c18
Compare
Choose a tag to compare
Currency 0.5.0 Pre-release
Pre-release

API Docs are always available at peek-travel.github.io/swift-currency

Major

  • CurrencyMint has been refactored to be more flexible for 3rd party currencies (#21)

Currency 0.4.1

29 Feb 03:42
cecf3a7
Compare
Choose a tag to compare
Currency 0.4.1 Pre-release
Pre-release

API Docs are always available at peek-travel.github.io/swift-currency

Minor

  • Add CustomLeafReflectable conformance to AnyCurrency (#31)
  • The XTS (Test) currency has been added (#32)

Patch

  • The performance of * and / operations on currencies has been improved by 50% (#30)
  • Change XXX (No currency transaction) currency minor units from 2 to 0 (#33)
    • This is considered a bugfix, as ISO 4217 does not specify any "exponent" (minorUnits) value for XXX, so we are arbitrarily choosing 0.

Currency 0.4.0

23 Feb 22:33
cfc56f8
Compare
Choose a tag to compare
Currency 0.4.0 Pre-release
Pre-release

API Docs are always available at peek-travel.github.io/swift-currency

Major

  • The protocol hierarchy implementation of AnyCurrency and CurrencyProtocol has been reimplemented to resolve incorrect Swift semantics (#25)
    • The most notable breaking changes are to initializers:
      • init(minorUnits) is now generic on BinaryInteger
      • init(_:) is now failable and requires the amount: label
    • The inverseAmount computed property is now a method named negated()
    • Arithmetic is now only possible between instances of currencies
  • Localization through String Interpolation now requires the localize: prefix (#25)
    • e.g. "\(localize: JPY(300))"

Minor

  • The XXX (No Currency Transaction) currency has been added (#20)

Patch

  • Fixed #17 by making the init(_:) failable to handle .nan values (#25)

Misc

  • API documentation is now available for each latest release (#26)
  • The project now has several maturity benchmarks
    • Code coverage (#19)
    • Linux unit testing (#24)
    • macOS unit testing for Swift 5.2 (#27)
    • Code Climate ratings (#28)

Currency 0.3.1

22 Jan 04:18
Compare
Choose a tag to compare
Currency 0.3.1 Pre-release
Pre-release

Minor

  • CurrencyMint now has methods for looking up a Currency Type, rather than just an instance.

Currency 0.3.0

21 Jan 06:14
ac44099
Compare
Choose a tag to compare
Currency 0.3.0 Pre-release
Pre-release

Major

  • AnyCurrency storage is now "minorUnits" 44425d8
    • AnyCurrency now uses Int64 "minorUnits" as the underlying storage instead of Foundation.Decimal "exactAmount"
    • AnyCurrency.roundedAmount is now amount
    • AnyCurrency.init(minorUnits:) is now .init(exactly:)
      • This is now required by the AnyCurrency protocol
  • _CurrencyImplementation has been renamed and made public as CurrencyProtocol d4fcba8
    • This is the protocol to reference as a generic constraint, while AnyCurrency can be used as a type-erased existential

Minor

  • AnyCurrency now has a "minorUnits" property 44425d8
  • AnyCurrency now has two methods for distribution algorithms 46f75f0
    • distributedEvenly(intoParts:)
    • distributedProportionally(between:)
  • AnyCurrency now has an inverse computed property for getting the opposite signed value 46f75f0
  • Sequences with AnyCurrency elements now has a inlined mapping sum(_:) overload b898bb4

Patch

  • The Currency module should now be able to be embedded in iOS apps 46aa110
  • sum and sum(where:) should now property be O(n) and inlinable for more performance 71285fe

Misc

  • Tests are now run against Swift 5 in addition to 5.1

Currency 0.2.0

15 Jan 22:06
Compare
Choose a tag to compare
Currency 0.2.0 Pre-release
Pre-release

Major

  • Money was renamed to AnyCurrency
    • The currency property was renamed to metadata

Minor

  • AnyCurrency now has a static property named metadata as well
    • Any type that conforms to both AnyCurrency and CurrencyMetadata will have this requirement met by default
  • Sequence types with AnyCurrency elements now have a sum() and sum(where:) method for aggregating values

Misc

  • Carthage is now supported as a dependency manager

Currency 0.1.1: Carthage Support

15 Jan 00:43
Compare
Choose a tag to compare
Pre-release
Add support for Carthage installation

Motivation:

While SPM is the preferred method for pulling in Swift-only libraries, it's support and capabilities are still sometimes short compared to other dependency managers such as Carthage.

Modifications:

- Add shared Xcode project scheme and file.
- Add github action to verify Carthage builds fine
- Rename `swift.yml` workflow to `tests.yml` to properly break up different github action workflows

Result:

Developers should now be able to use either SPM or Carthage to install swift-currency

0.1.0: Merge pull request #1 from peek-travel/initial-implementation

13 Jan 18:03
bfba7b1
Compare
Choose a tag to compare
Initial implementation