Releases: peek-travel/swift-currency
Releases · peek-travel/swift-currency
SwiftCurrency 0.6.1
API Docs are always available at peek-travel.github.io/swift-currency
Minor
- Added Cocoapods Support (#38)
SwiftCurrency 0.6.0
API Docs are always available at peek-travel.github.io/swift-currency
Major
- Currency localization is now easier to use with
localizedString
methods onAnyCurrency
that reflect the String interpolation API (#34)- The String interpolation methods
(localize:forLocale:nilDescription:)
and(localize:withFormatter:nilDescription:)
have had their 2nd parameters renamed tofor:
andwith:
respectively.
- The String interpolation methods
Misc
Currency 0.5.0
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
API Docs are always available at peek-travel.github.io/swift-currency
Minor
- Add
CustomLeafReflectable
conformance toAnyCurrency
(#31) - The
XTS
(Test) currency has been added (#32)
Patch
Currency 0.4.0
API Docs are always available at peek-travel.github.io/swift-currency
Major
- The protocol hierarchy implementation of
AnyCurrency
andCurrencyProtocol
has been reimplemented to resolve incorrect Swift semantics (#25)- The most notable breaking changes are to initializers:
init(minorUnits)
is now generic onBinaryInteger
init(_:)
is now failable and requires theamount:
label
- The
inverseAmount
computed property is now a method namednegated()
- Arithmetic is now only possible between instances of currencies
- The most notable breaking changes are to initializers:
- Localization through String Interpolation now requires the
localize:
prefix (#25)- e.g.
"\(localize: JPY(300))"
- e.g.
Minor
- The
XXX
(No Currency Transaction) currency has been added (#20)
Patch
Misc
Currency 0.3.1
Minor
CurrencyMint
now has methods for looking up a Currency Type, rather than just an instance.
Currency 0.3.0
Major
AnyCurrency
storage is now "minorUnits" 44425d8AnyCurrency
now usesInt64
"minorUnits" as the underlying storage instead ofFoundation.Decimal
"exactAmount"AnyCurrency.roundedAmount
is nowamount
AnyCurrency.init(minorUnits:)
is now.init(exactly:)
- This is now required by the
AnyCurrency
protocol
- This is now required by the
_CurrencyImplementation
has been renamed and made public asCurrencyProtocol
d4fcba8- This is the protocol to reference as a generic constraint, while
AnyCurrency
can be used as a type-erased existential
- This is the protocol to reference as a generic constraint, while
Minor
AnyCurrency
now has a "minorUnits" property 44425d8AnyCurrency
now has two methods for distribution algorithms 46f75f0distributedEvenly(intoParts:)
distributedProportionally(between:)
AnyCurrency
now has aninverse
computed property for getting the opposite signed value 46f75f0- Sequences with
AnyCurrency
elements now has a inlined mappingsum(_:)
overload b898bb4
Patch
- The
Currency
module should now be able to be embedded in iOS apps 46aa110 sum
andsum(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
Major
Money
was renamed toAnyCurrency
- The
currency
property was renamed tometadata
- The
Minor
AnyCurrency
now has a static property namedmetadata
as well- Any type that conforms to both
AnyCurrency
andCurrencyMetadata
will have this requirement met by default
- Any type that conforms to both
Sequence
types withAnyCurrency
elements now have asum()
andsum(where:)
method for aggregating values
Misc
- Carthage is now supported as a dependency manager
Currency 0.1.1: Carthage Support
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
Initial implementation