@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.
- package/.github/workflows/publish.yml +1 -1
- package/.oxfmtrc.json +9 -1
- package/.vscode/settings.json +1 -0
- package/app/helpers/cache.js +2 -2
- package/app/helpers/utils.js +1 -3
- package/package.json +5 -5
- package/tests/helpers/path.js +1 -1
- package/tests/shared/fs.js +1 -3
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
|
}
|
package/.vscode/settings.json
CHANGED
package/app/helpers/cache.js
CHANGED
|
@@ -25,7 +25,7 @@ const outputKeys = [
|
|
|
25
25
|
];
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* @param {
|
|
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) {
|
package/app/helpers/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k03mad/ip2geo",
|
|
3
|
-
"version": "19.
|
|
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.
|
|
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.
|
|
30
|
+
"@k03mad/oxlint-config": "0.8.1",
|
|
31
31
|
"husky": "9.1.7",
|
|
32
32
|
"mocha": "11.7.5",
|
|
33
|
-
"oxfmt": "0.
|
|
34
|
-
"oxlint": "1.
|
|
33
|
+
"oxfmt": "0.49.0",
|
|
34
|
+
"oxlint": "1.64.0"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
37
|
"node": ">=24"
|
package/tests/helpers/path.js
CHANGED
package/tests/shared/fs.js
CHANGED
|
@@ -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});
|