Changelog History
Page 3
-
v5.3.0 Changes
September 05, 2020🚀 This is the changelog for Money v5.3.0 released on September 5th, 2020. For older changelogs please consult the release tag on GitHub
🐛 Bug Fixes
- 🛠 Fix parsing money amounts to use Unicode definition of whitespace (set
[:Zs:]
). Thanks to @Sanjibukai for the report.
✨ Enhancements
- ➕ Add
Money.sum/2
to sum a list ofMoney
, converting them if required.
- 🛠 Fix parsing money amounts to use Unicode definition of whitespace (set
-
v5.2.1 Changes
June 22, 2020🚀 This is the changelog for Money v5.2.1 released on June 23rd, 2020. For older changelogs please consult the release tag on GitHub
✨ Enhancements
🔧 Configure the
Money.Application
supervisor via the arguments toMoney.Application.start/2
and configure defaults inmix.exs
. This permits different restart strategies and names.➕ Add
Money.ExchangeRates.Supervisor.default_supervisor/0
to return the name of the default supervisor which isMoney.Supervisor
🔄 Change
Money.ExchangeRates.Supervisor.stop/0
to becomeMoney.ExchangeRates.Supervisor.stop/{0, 1}
allowing the supervisor name to be passed in. The default isMoney.ExchangeRates.Supervisor.default_supervisor/0
🐛 Bug Fixes
- ➕ Add back the name of the Application supervisor,
Money.Supervisor
. Thanks for the report of the regression to @jeroenvisser101. Fixes #117.
-
v5.2.0 Changes
May 30, 2020🚀 This is the changelog for Money v5.2.0 released on May 30th, 2020. For older changelogs please consult the release tag on GitHub
✨ Enhancements
- ➕ Adds a configuration option
:verify_peer
which is a boolean that determines whether to verify the client certificate for any exchange rate service API call. The default istrue
. This option should not be changed without a very clear understanding of the security implications. This option will remain undocumented but supported for now.
🐛 Bug fixes
- 🛠 Handle expired certificate errors on the exchange rates API service and log them. Thanks to @coladarci. Fixes #116
- ➕ Adds a configuration option
-
v5.1.0 Changes
May 26, 2020🚀 This is the changelog for Money v5.1.0 released on May 26th, 2020. For older changelogs please consult the release tag on GitHub
✨ Enhancements
⚡️ Extract default currency from locale when calling
Money.parse/2
on a money string. The updated docs now say::default_currency
is any valid currency code orfalse
that will used if no currency code, symbol or description is indentified in the parsed string. The default isnil
which means that the default currency associated with the:locale
option will be used. Iffalse
then the currency assocated with the:locale
option will not be used and an error will be returned if there is no currency in the string being parsed.
➕ Add certificate verification for exchange rate retrieval
-
v5.0.2 Changes
April 28, 2020🚀 This is the changelog for Money v5.0.2 released on April 29th, 2020. For older changelogs please consult the release tag on GitHub
🐛 Bug Fixes
- ⚡️ Update the application supervisor spec
-
v5.0.1 Changes
January 27, 2020🚀 This is the changelog for Money v5.0.1 released on January 28th, 2019. For older changelogs please consult the release tag on GitHub
🐛 Bug Fixes
- 📜 Make
nimble_parsec
a required dependency since it is required for parsing money amounts. Thanks to @jonnystoten for the report.
- 📜 Make
-
v5.0.0 Changes
January 21, 2020🚀 This is the changelog for Money v5.0.0 released on January 21st, 2019. For older changelogs please consult the release tag on GitHub
💥 Breaking changes
🚀 Elixir 1.10 introduces semantic sorting for stucts that depends on the availability of a
compare/2
function that returns:lt
,:eq
or:gt
. Therefore in this release ofex_money
the functionscompare/2
andcompare!/2
are swapped withcmp/2
andcmp!/2
in order to conform with this expectation. Nowcompare/2
will return:eq
,:lt
or:gt
. Andcmp/2
return-1
,0
or1
.🗄 Deprecate
Money.reduce/1
in favour ofMoney.normalize/1
to be consistent withDecimal
versions1.9
and later.
🚀 It is believed and tested that
Money
version5.0.0
is compatible with all versions ofDecimal
from1.6
up to the as-yet-unreleased2.0
.👌 Support of Elixir 1.10 Enum sorting
From Elixir verison
1.10.0
, several functions in theEnum
module can use theMoney.compare/2
function to simplify sorting. For example:iex> list = [Money.new(:USD, 100), Money.new(:USD, 200)] [#Money<:USD, 100>, #Money<:USD, 200>] iex> Enum.sort list, Money [#Money<:USD, 100>, #Money<:USD, 200>] iex> Enum.sort list, {:asc, Money} [#Money<:USD, 100>, #Money<:USD, 200>] iex> Enum.sort list, {:desc, Money} [#Money<:USD, 200>, #Money<:USD, 100>]
Note that
Enum.sort/2
will sort money amounts even when the currencies are incompatible. In this case the order of the result is not predictable. It is the developers responsibility to filter the list to compatible currencies prior to sorting. This is a limitation of theEnum.sort/2
implementation.👍 Notes on Decimal version support
- 🗄
ex_money
version5.0.0
is compatible withDecimal
versions from1.6
onwards. InDecimal
version2.0
the same changes tocompare/2
andcmp/2
will occur and inDecimal
version1.9
,Decimal.cmp/2
is deprecated.ex_money
version5.0.0
detects these different versions ofDecimal
and therefore remains compatability withDecimal
back to version1.6
.
-
v4.4.3 Changes
February 22, 2020📦 Backports a requirement to ensure that nimble_parsec is a required dependency. Using ex_money version 5.x is preferred.
🐛 Bug Fixes
-
v4.4.2 Changes
January 02, 2020🚀 This is the changelog for Money v4.4.2 released on January 2nd, 2019. For older changelogs please consult the release tag on GitHub
🐛 Bug Fixes
🗄 Remove calls to
Code.ensure_compiled?/1
since it is deprecated in Elixir 1.10. Use insteadCldr.Config.ensure_compiled?/1
which is added as a private API inCldr
version 2.12.0. This version ofCldr
now becomes the minimum version required.Remove spurious entries in
.dialyzer_ignore_warnings
- no entries are required and dialyzer is happy.
-
v4.4.1 Changes
November 11, 2019🚀 This is the changelog for Money v4.4.1 released on November 10th, 2019. For older changelogs please consult the release tag on GitHub
🐛 Bug Fixes
- 🛠 Fixes money parsing error. Thanks to @Doerge. Closes #112.