- Inlined files that were previously being loaded as JSON files.
- Upgrades underlying default LRU cache library to fix typescript errors (v6 didn't provide types, but v7 and above do natively).
- Last version (3.4.5) incorrectly published a bad dist output due to buggy CI/CD. This fixes it.
- Updated tests.
- Added lru-cache types into published artifacts.
- Moved test files out of published artifacts and updated some packages.
- Refactored
isBogon
function.
- Fixed
isBogon
empty IP check.
- Allow async LRUCache storage.
- Checking
bogon
IP locally.
- Added
isEU
that checks whether the IP geolocates to a European Union (EU) country. - Added
CountryFlag
that returns emoji and unicode of country's flag. - Added
CountryCurrency
that returns code and symbol of country's currency. - Added
Continent
that returns the continent where IP geolocates.
- Fix error handling for 5xx errors; a slightly more sensible error is now thrown.
- Fixed error handling; 429 errors were not properly being propagated to the user.
- Added a lot more documentation across the board.
- Added
relay
andservice
fields to Privacy typescript definition.
- Added
anycast
andbogon
boolean fields to Core typescript definition.
-
Imports using CommonJS don't have a default anymore. You must import the
IPinfoWrapper
name separately as follows:const { IPinfoWrapper, LruCache } = require("node-ipinfo");
- Add
getMap
function for getting map URL for a list of IPs using https://ipinfo.io/tools/map. - Add
getBatch
function for getting details of IPs in bulk (using 1 request). - Cache keys are now versioned. If you were using the cache directly
before, please ensure you use
IPinfoWrapper.cacheKey
to get the proper cache key given a normal key input. axios
dependency is no longer required.
- Add an optional
timeout
parameter (milliseconds) to constructor.
- Fixed non-ES module imports to include the 'LruCache' object.
- Updates axios version to latest version for security vulnerability fix.
- Update lru-cache version to latest version.