@k03mad/ip2geo 19.0.0 → 19.2.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.
@@ -17,7 +17,7 @@ jobs:
17
17
  with:
18
18
  fetch-depth: 0
19
19
 
20
- - uses: EndBug/version-check@v2
20
+ - uses: EndBug/version-check@v3
21
21
  id: check_pkg_version
22
22
  with:
23
23
  diff-search: true
package/.oxfmtrc.json CHANGED
@@ -5,6 +5,9 @@
5
5
  "arrowParens": "avoid",
6
6
  "bracketSpacing": false,
7
7
  "quoteProps": "consistent",
8
+ "jsdoc": {
9
+ "lineWrappingStyle": "balance"
10
+ },
8
11
  "sortImports": {
9
12
  "groups": [
10
13
  ["builtin"],
@@ -18,10 +21,15 @@
18
21
  "tabWidth": 2,
19
22
  "trailingComma": "none",
20
23
  "overrides": [
24
+ {
25
+ "files": ["*.js"],
26
+ "options": {
27
+ "tabWidth": 4
28
+ }
29
+ },
21
30
  {
22
31
  "files": ["*.js", "*.ts"],
23
32
  "options": {
24
- "tabWidth": 4,
25
33
  "trailingComma": "all"
26
34
  }
27
35
  }
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "oxc.fmt.configPath": ".oxfmtrc.json",
3
+ "oxc.fixKind": "safe_fix",
3
4
  "editor.formatOnSave": true,
4
5
  "editor.defaultFormatter": "oxc.oxc-vscode",
5
6
  "editor.codeActionsOnSave": {
@@ -25,7 +25,7 @@ const outputKeys = [
25
25
  ];
26
26
 
27
27
  /**
28
- * @param {Array<string>} dataArr
28
+ * @param {string[]} dataArr
29
29
  * @returns {object}
30
30
  */
31
31
  export const collectOutputData = dataArr => {
@@ -124,7 +124,7 @@ export const writeToFsCache = async (
124
124
  * @param {string} ip
125
125
  * @param {Map} cacheMap
126
126
  * @param {number} cacheMapMaxEntries
127
- * @returns {object|undefined}
127
+ * @returns {object | undefined}
128
128
  */
129
129
  export const readFromMapCache = (ip, cacheMap, cacheMapMaxEntries) => {
130
130
  if (cacheMapMaxEntries > 0) {
@@ -1,4 +1,2 @@
1
- /**
2
- * @param {Array} arr
3
- */
1
+ /** @param {Array} arr */
4
2
  export const getArrayDups = arr => arr.filter((e, i, a) => a.indexOf(e) !== i);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k03mad/ip2geo",
3
- "version": "19.0.0",
3
+ "version": "19.2.0",
4
4
  "description": "GeoIP library",
5
5
  "license": "MIT",
6
6
  "maintainers": [
@@ -21,17 +21,17 @@
21
21
  "prepare": "husky || true"
22
22
  },
23
23
  "dependencies": {
24
- "@k03mad/request": "15.0.0",
24
+ "@k03mad/request": "15.2.0",
25
25
  "chalk": "5.6.2",
26
26
  "debug": "4.4.3",
27
27
  "is-ip": "5.0.1"
28
28
  },
29
29
  "devDependencies": {
30
- "@k03mad/oxlint-config": "0.5.0",
30
+ "@k03mad/oxlint-config": "0.8.1",
31
31
  "husky": "9.1.7",
32
32
  "mocha": "11.7.5",
33
- "oxfmt": "0.43.0",
34
- "oxlint": "1.58.0"
33
+ "oxfmt": "0.49.0",
34
+ "oxlint": "1.64.0"
35
35
  },
36
36
  "engines": {
37
37
  "node": ">=24"
@@ -1,7 +1,7 @@
1
1
  import path from 'node:path';
2
2
 
3
3
  /**
4
- * @param {string} file import.meta.url
4
+ * @param {string} file Import.meta.url
5
5
  * @returns {string}
6
6
  */
7
7
  export const getCurrentFilename = file => path.basename(file, '.js');
@@ -9,9 +9,7 @@ import {
9
9
  DEFAULT_CACHE_FILE_SEPARATOR,
10
10
  } from '../../app/api.js';
11
11
 
12
- /**
13
- * @param {string} cacheDir
14
- */
12
+ /** @param {string} cacheDir */
15
13
  export const removeCacheFolder = async (cacheDir = DEFAULT_CACHE_FILE_DIR) => {
16
14
  try {
17
15
  await fs.rm(cacheDir, {recursive: true, force: true});