@k03mad/ip2geo 7.0.1 → 7.0.3

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.
package/.editorconfig CHANGED
@@ -10,3 +10,6 @@ trim_trailing_whitespace = true
10
10
 
11
11
  [*.json]
12
12
  indent_size = 2
13
+
14
+ [*.{yml,yaml}]
15
+ indent_size = 2
@@ -1,10 +1,10 @@
1
1
  version: 2
2
2
  updates:
3
- - package-ecosystem: "npm"
4
- directory: "/"
3
+ - package-ecosystem: npm
4
+ directory: /
5
5
  schedule:
6
- interval: "monthly"
7
- - package-ecosystem: "github-actions"
8
- directory: "/"
6
+ interval: monthly
7
+ - package-ecosystem: github-actions
8
+ directory: /
9
9
  schedule:
10
- interval: "monthly"
10
+ interval: monthly
@@ -10,7 +10,7 @@ on:
10
10
 
11
11
  jobs:
12
12
  lint:
13
- runs-on: ubuntu-latest
13
+ runs-on: ubuntu-22.04
14
14
  steps:
15
15
  - uses: actions/checkout@v4
16
16
  - uses: actions/setup-node@v4
@@ -8,14 +8,27 @@ on:
8
8
  jobs:
9
9
  publish:
10
10
  environment: npm
11
- runs-on: ubuntu-latest
11
+ runs-on: ubuntu-22.04
12
12
  steps:
13
13
  - uses: actions/checkout@v4
14
- - uses: actions/setup-node@v4
14
+ with:
15
+ fetch-depth: 0
16
+
17
+ - uses: tj-actions/changed-files@v42
18
+ id: changed-files
19
+ with:
20
+ files: package.json
21
+
22
+ - if: steps.changed-files.outputs.any_changed == 'true'
23
+ uses: actions/setup-node@v4
15
24
  with:
16
25
  node-version-file: '.nvmrc'
17
26
  registry-url: 'https://registry.npmjs.org'
18
- - run: npm run setup
19
- - run: npm publish
27
+
28
+ - if: steps.changed-files.outputs.any_changed == 'true'
29
+ run: npm run setup
30
+
31
+ - if: steps.changed-files.outputs.any_changed == 'true'
32
+ run: npm publish
20
33
  env:
21
34
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -10,7 +10,7 @@ on:
10
10
 
11
11
  jobs:
12
12
  test:
13
- runs-on: ubuntu-latest
13
+ runs-on: ubuntu-22.04
14
14
  steps:
15
15
  - uses: actions/checkout@v4
16
16
  - uses: actions/setup-node@v4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k03mad/ip2geo",
3
- "version": "7.0.1",
3
+ "version": "7.0.3",
4
4
  "description": "GeoIP library",
5
5
  "maintainers": [
6
6
  "Kirill Molchanov <k03.mad@gmail.com"
@@ -19,14 +19,14 @@
19
19
  "node": ">=20"
20
20
  },
21
21
  "dependencies": {
22
- "@k03mad/request": "5.6.1",
23
- "@k03mad/simple-log": "2.1.1",
22
+ "@k03mad/request": "5.6.2",
23
+ "@k03mad/simple-log": "2.1.2",
24
24
  "chalk": "5.3.0",
25
25
  "debug": "4.3.4"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@k03mad/eslint-config": "20.3.0",
29
- "eslint": "8.56.0",
29
+ "eslint": "8.57.0",
30
30
  "husky": "9.0.11",
31
31
  "mocha": "10.3.0"
32
32
  },
@@ -37,7 +37,8 @@
37
37
  "clean": "npm run clean:modules && npm run clean:eslint:cache",
38
38
  "clean:modules": "rm -rf ./node_modules || true",
39
39
  "clean:eslint:cache": "rm -rf .eslintcache || true",
40
- "setup": "npm run clean && npm i pnpm -g && pnpm i",
40
+ "setup": "npm run clean && npm run setup:pnpm",
41
+ "setup:pnpm": "npm i pnpm -g && pnpm i",
41
42
  "prepare": "husky || true"
42
43
  }
43
44
  }
@@ -15,19 +15,19 @@ export const REQUEST_IPV4 = {
15
15
  };
16
16
 
17
17
  export const REQUEST_IPV4_MAP_OFF_ONLY = {
18
- ip: '1.1.1.1',
19
- continent: 'North America',
20
- continentCode: 'NA',
21
- country: 'United States',
22
- countryCode: 'US',
23
- countryEmoji: '🇺🇸',
24
- region: 'California',
25
- regionCode: 'CA',
26
- city: 'San Jose',
27
- connectionAsn: 13_335,
28
- connectionOrg: 'APNIC and Cloudflare DNS Resolver project',
29
- connectionIsp: 'Cloudflare, Inc.',
30
- connectionDomain: 'cloudflare.com',
18
+ ip: '9.9.9.9',
19
+ continent: 'Europe',
20
+ continentCode: 'EU',
21
+ country: 'Switzerland',
22
+ countryCode: 'CH',
23
+ countryEmoji: '🇨🇭',
24
+ region: 'Zurich',
25
+ regionCode: 'ZH',
26
+ city: 'Zürich',
27
+ connectionAsn: 19_281,
28
+ connectionOrg: 'Quad9',
29
+ connectionIsp: 'Quad9',
30
+ connectionDomain: 'quad9.net',
31
31
  };
32
32
 
33
33
  export const REQUEST_IPV6 = {