Skip to content

Commit 0c2e088

Browse files
committed
upgrade to v3.5.1
1 parent fdf8b9f commit 0c2e088

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 3.5.1
4+
5+
- Inlined files that were previously being loaded as JSON files.
6+
37
## 3.5.0
48

59
- Upgrades underlying default LRU cache library to fix typescript errors (v6

src/ipinfoWrapper.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
countriesFlags,
77
countries,
88
euCountries
9-
} from "../config/utils"
9+
} from "../config/utils";
1010
import Cache from "./cache/cache";
1111
import LruCache from "./cache/lruCache";
1212
import ApiLimitError from "./errors/apiLimitError";
@@ -26,7 +26,7 @@ import {
2626
import VERSION from "./version";
2727

2828
const clientUserAgent = `IPinfoClient/nodejs/${VERSION}`;
29-
const countryFlagURL = "https://cdn.ipinfo.io/static/images/countries-flags/"
29+
const countryFlagURL = "https://cdn.ipinfo.io/static/images/countries-flags/";
3030

3131
export default class IPinfoWrapper {
3232
private token: string;
@@ -120,8 +120,10 @@ export default class IPinfoWrapper {
120120
this.countries[ipinfo.countryCode];
121121
ipinfo.countryFlag =
122122
this.countriesFlags[ipinfo.countryCode];
123-
ipinfo.countryFlagURL =
124-
countryFlagURL + ipinfo.countryCode + ".svg"
123+
ipinfo.countryFlagURL =
124+
countryFlagURL +
125+
ipinfo.countryCode +
126+
".svg";
125127
ipinfo.countryCurrency =
126128
this.countriesCurrencies[
127129
ipinfo.countryCode
@@ -415,7 +417,9 @@ export default class IPinfoWrapper {
415417
// filter out URLs already cached.
416418
const lookupUrls: string[] = [];
417419
for (const url of urls) {
418-
const cachedUrl = await this.cache.get(IPinfoWrapper.cacheKey(url));
420+
const cachedUrl = await this.cache.get(
421+
IPinfoWrapper.cacheKey(url)
422+
);
419423
if (cachedUrl) {
420424
result[url] = cachedUrl;
421425
} else {
@@ -508,7 +512,7 @@ export default class IPinfoWrapper {
508512
}
509513

510514
private isBogon(ip: string): boolean {
511-
if (ip != '') {
515+
if (ip != "") {
512516
for (var network of BOGON_NETWORKS) {
513517
if (isInSubnet(ip, network)) {
514518
return true;

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
const VERSION = "3.5.0";
1+
const VERSION = "3.5.1";
22

33
export default VERSION;

test-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"author": "",
1010
"license": "ISC",
1111
"dependencies": {
12-
"node-ipinfo": "3.5.0",
12+
"node-ipinfo": "3.5.1",
1313
"typescript": "^4.4.2"
1414
}
1515
}

0 commit comments

Comments
 (0)