@k03mad/ip2geo 11.2.1 β†’ 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.
@@ -14,21 +14,21 @@ jobs:
14
14
  with:
15
15
  fetch-depth: 0
16
16
 
17
- - uses: tj-actions/changed-files@v45
18
- id: changed-files
17
+ - uses: EndBug/version-check@v2
18
+ id: check_pkg_version
19
19
  with:
20
- files: package.json
20
+ diff-search: true
21
21
 
22
- - if: steps.changed-files.outputs.any_changed == 'true'
22
+ - if: steps.check_pkg_version.outputs.changed == 'true'
23
23
  uses: actions/setup-node@v4
24
24
  with:
25
25
  node-version-file: '.nvmrc'
26
26
  registry-url: 'https://registry.npmjs.org'
27
27
 
28
- - if: steps.changed-files.outputs.any_changed == 'true'
28
+ - if: steps.check_pkg_version.outputs.changed == 'true'
29
29
  run: npm run setup
30
30
 
31
- - if: steps.changed-files.outputs.any_changed == 'true'
31
+ - if: steps.check_pkg_version.outputs.changed == 'true'
32
32
  run: npm publish
33
33
  env:
34
34
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -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.1",
3
+ "version": "11.3.0",
4
4
  "description": "GeoIP library",
5
5
  "maintainers": [
6
6
  "Kirill Molchanov <k03.mad@gmail.com"
@@ -19,17 +19,17 @@
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
- "debug": "4.3.7",
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
- "mocha": "10.8.2",
32
+ "mocha": "11.0.1",
33
33
  "npm-run-all": "4.1.5"
34
34
  },
35
35
  "scripts": {
@@ -5,9 +5,9 @@ export const REQUEST_IPV4 = {
5
5
  country: 'United States',
6
6
  countryCode: 'US',
7
7
  countryEmoji: 'πŸ‡ΊπŸ‡Έ',
8
- region: 'Virginia',
9
- regionCode: 'VA',
10
- city: 'Ashburn',
8
+ region: 'California',
9
+ regionCode: 'CA',
10
+ city: 'Mountain View',
11
11
  connectionAsn: 15_169,
12
12
  connectionOrg: 'Google LLC',
13
13
  connectionIsp: 'Google LLC',