Releases: elixir-geolix/mmdb2_decoder
Releases · elixir-geolix/mmdb2_decoder
v3.0.1
v3.0.0
- Backwards incompatible changes
- Lookup options are now only accepted in map format
- Trying to lookup an IPv6 address in an IPv4-only database will now return an
{:error, :ipv6_lookup_in_ipv4_database}tuple instead of anil(not found) result. If the IP address is in the IPv6-to-IPv4-Mapping range (::ffff:0:0/96) the lookup will still be done using the mapped IPv4 address
v2.1.0
-
Enhancements
- Lookup options can now be passed as a map instead of a keyword list
-
Bug fixes
- Decoding
:pointervalues with a 32 bit offset should now work as expected - Raising from
lookup!/4et al. is now behaving as expected with aRuntimeError
- Decoding
-
Soft deprecations (no warnings)
- Using a keyword list for lookup options is discouraged in favour of passing a map that does not need to be converted internally
v2.0.0
-
Enhancements
- The data at a specific pointer position can be retrieved
- The pointer an IP has can be retrieved
-
Backwards incompatible changes
- Database entries of the type
data cache containernow return:cache_container(was:cache) - Database entries of the type
end markernow return:end_marker(was:end) - Minimum required elixir version is now
~> 1.7 - New decoding defaults are now active:
double_prevision: nilfloat_precision: nilmap_keys: :strings- As a result the database descriptions in
MMDB2Decoder.Metadataare now always a map with binary keys instead of atom keys
- As a result the database descriptions in
MMDB2Decoder.Data.decode/3is now private
- Database entries of the type
v1.1.0
-
Enhancements
- Maps can be decoded with a custom key type by passing
:map_keysin the options oflookup/5- default is
:atoms(keeping current behaviour, usesString.to_atom/1) :atoms!usesString.to_existing_atom/1:stringsto perform no conversion (future default)
- default is
- Precision for
:doubledata can be defined by passing:double_precisionin the options oflookup/5- default is
8(keeping current behaviour) nilwill deactivate rounding (future default)
- default is
- Precision for
:floatdata can be defined by passing:float_precisionin the options oflookup/5- default is
4(keeping current behaviour) nilwill deactivate rounding (future default)
- default is
- Maps can be decoded with a custom key type by passing
-
Bug fixes
- Max values for
:doubleand:floatdatatypes (magic'Inf'string in Perl) should now properly decode
- Max values for
-
Deprecations
- The function
MMDB2Decoder.Data.value/2is no longer documented as it should not be called directly. It will be made fully private in the next major release
- The function
v1.0.1
- Bug fixes
- Encountering an invalid node count in a database will result in
{:error, :invalid_node_count}being returned instead of raising an unexpectedArgumentError - Return typespecs for
MMDB2Decoder.lookup/4and dependent functions now include the possiblenilreturn
- Encountering an invalid node count in a database will result in
v1.0.0
-
Enhancements
- All public lookup functions are now always returning either
{:ok, term}or{:error, term}. Bothlookup!/4andpipe_lookup!/2are available to get only the lookup result or raise in case of an error
- All public lookup functions are now always returning either
-
Backwards incompatible changes
- Minimum required elixir version is now
~> 1.5
- Minimum required elixir version is now