Peek-Travel/swift-currency breaking changes

swift

20 curated breaking changes across major versions of Peek-Travel/swift-currency. Use this as a migration checklist before bumping dependencies.

20
changes
Breaking changes by transition
  • 0.6.1 \u2192 0.7.0breaking

    The minimum Swift version is now 5.7

  • 0.6.1 \u2192 0.7.0breaking

    The package has been renamed to `swift-currency`

  • 0.6.1 \u2192 0.7.0breaking

    `CurrencyProcotol` and `AnyCurrency` have been removed and replaced with an almost drop-in replacement of `CurrencyValue`

  • 0.6.1 \u2192 0.7.0breaking

    The biggest change is from `minorUnits` being the stored property to `exactAmount`

  • 0.6.1 \u2192 0.7.0breaking

    `CurrencyMetadata` has been renamed to `CurrencyDescriptor`

  • 0.5.0 \u2192 0.6.0breaking

    Currency localization is now easier to use with `localizedString` methods on `AnyCurrency` that reflect the String interpolation API (#34)

  • 0.5.0 \u2192 0.6.0breaking

    The String interpolation methods `(localize:forLocale:nilDescription:)` and `(localize:withFormatter:nilDescription:)` have had their 2nd parameters renamed to `for:` and `with:` respectively.

  • 0.4.1 \u2192 0.5.0breaking

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

  • 0.3.1 \u2192 0.4.0breaking

    The protocol hierarchy implementation of `AnyCurrency` and `CurrencyProtocol` has been reimplemented to resolve incorrect Swift semantics (#25)

  • 0.3.1 \u2192 0.4.0breaking

    The most notable breaking changes are to initializers:

  • 0.3.1 \u2192 0.4.0breaking

    `init(minorUnits)` is now generic on `BinaryInteger`

  • 0.3.1 \u2192 0.4.0breaking

    `init(_:)` is now failable and requires the `amount:` label

  • 0.3.1 \u2192 0.4.0breaking

    The `inverseAmount` computed property is now a method named `negated()`

  • 0.2.0 \u2192 0.3.0breaking

    `AnyCurrency` storage is now "minorUnits" https://github.com/peek-travel/swift-currency/commit/44425d8fee78044797419525cf25b19860e7b7d8

  • 0.2.0 \u2192 0.3.0breaking

    `AnyCurrency` now uses `Int64` "minorUnits" as the underlying storage instead of `Foundation.Decimal` "exactAmount"

  • 0.2.0 \u2192 0.3.0breaking

    `AnyCurrency.roundedAmount` is now `amount`

  • 0.2.0 \u2192 0.3.0breaking

    `AnyCurrency.init(minorUnits:)` is now `.init(exactly:)`

  • 0.2.0 \u2192 0.3.0breaking

    This is now required by the `AnyCurrency` protocol

  • 0.1.1 \u2192 0.2.0breaking

    `Money` was renamed to `AnyCurrency`

  • 0.1.1 \u2192 0.2.0breaking

    The `currency` property was renamed to `metadata`

API access

Get this data programmatically \u2014 free, no authentication.

curl https://depscope.dev/api/breaking/swift/Peek-Travel/swift-currency
Peek-Travel/swift-currency breaking changes — Swift migration guide | DepScope