@k03mad/ip2geo 11.2.2 → 11.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -173,13 +173,13 @@ export const pruneCache = async (cacheDir, cacheFileSeparator, cacheFileNewline)
173
173
  ]);
174
174
 
175
175
  const firstIp = data
176
- .split(cacheFileNewline)
177
- .find(Boolean)
178
- .split(cacheFileSeparator)[0];
176
+ ?.split(cacheFileNewline)
177
+ ?.find(Boolean)
178
+ ?.split(cacheFileSeparator)[0];
179
179
 
180
180
  if (
181
181
  stat.isDirectory()
182
- || !isIP(firstIp)
182
+ || !isIP(firstIp || '')
183
183
  ) {
184
184
  throw new Error(`Folder has subfolders or files without IPs, wrong cache folder arg?\n${fullFilePath}`);
185
185
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k03mad/ip2geo",
3
- "version": "11.2.2",
3
+ "version": "11.3.0",
4
4
  "description": "GeoIP library",
5
5
  "maintainers": [
6
6
  "Kirill Molchanov <k03.mad@gmail.com"
@@ -19,15 +19,15 @@
19
19
  "node": ">=22"
20
20
  },
21
21
  "dependencies": {
22
- "@k03mad/request": "7.6.0",
23
- "@k03mad/simple-log": "5.1.0",
22
+ "@k03mad/request": "7.6.1",
23
+ "@k03mad/simple-log": "5.1.1",
24
24
  "chalk": "5.3.0",
25
25
  "debug": "4.4.0",
26
26
  "is-ip": "5.0.1"
27
27
  },
28
28
  "devDependencies": {
29
- "@k03mad/eslint-config": "28.0.0",
30
- "eslint": "9.16.0",
29
+ "@k03mad/eslint-config": "28.1.0",
30
+ "eslint": "9.17.0",
31
31
  "husky": "9.1.7",
32
32
  "mocha": "11.0.1",
33
33
  "npm-run-all": "4.1.5"