warframe-nexus-query 2.3.0 → 2.3.2
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/index.js +2 -3
- package/lib/market/v2/utils/cache.js +4 -4
- package/package.json +12 -6
- package/lib/market/v2/.eslintrc.json +0 -6
package/index.js
CHANGED
|
@@ -64,7 +64,6 @@ export default class PriceCheckQuerier {
|
|
|
64
64
|
if (!query) {
|
|
65
65
|
throw new Error('This funtcion requires a query to be provided');
|
|
66
66
|
}
|
|
67
|
-
// eslint-disable-next-line no-param-reassign
|
|
68
67
|
platform = this.settings.lookupAlias(platform.toLowerCase());
|
|
69
68
|
|
|
70
69
|
const ranks = normalizePriceCheckRanks(options);
|
|
@@ -89,7 +88,7 @@ export default class PriceCheckQuerier {
|
|
|
89
88
|
})
|
|
90
89
|
);
|
|
91
90
|
attachments = rankResults.flat();
|
|
92
|
-
} catch
|
|
91
|
+
} catch {
|
|
93
92
|
this.logger.error(`Couldn't process ${query} on warframe.market... time out.`);
|
|
94
93
|
}
|
|
95
94
|
} else {
|
|
@@ -158,7 +157,7 @@ export default class PriceCheckQuerier {
|
|
|
158
157
|
files.map(async (file) => {
|
|
159
158
|
try {
|
|
160
159
|
await unlink(join(global.__basedir, 'tmp', file));
|
|
161
|
-
} catch
|
|
160
|
+
} catch {
|
|
162
161
|
allSuccess = false;
|
|
163
162
|
this.logger.debug(`Couldn't delete ${file}`);
|
|
164
163
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { create } from 'flat-cache';
|
|
2
2
|
|
|
3
3
|
import { API_BASE_URL, VERSION_CHECK_INTERVAL, CACHE_TTL } from '../constants.js';
|
|
4
4
|
|
|
@@ -24,7 +24,7 @@ export default class VersionedCache {
|
|
|
24
24
|
|
|
25
25
|
// Initialize persistent cache
|
|
26
26
|
if (persistent) {
|
|
27
|
-
this.#persistentCache =
|
|
27
|
+
this.#persistentCache = create({ cacheId });
|
|
28
28
|
this.#loadFromDisk();
|
|
29
29
|
} else {
|
|
30
30
|
this.#persistentCache = undefined;
|
|
@@ -191,7 +191,7 @@ export default class VersionedCache {
|
|
|
191
191
|
const serverVersion = currentVersions.data?.collections?.[collection];
|
|
192
192
|
|
|
193
193
|
return serverVersion && cachedVersion !== serverVersion;
|
|
194
|
-
} catch
|
|
194
|
+
} catch {
|
|
195
195
|
// If version check fails, don't force refresh
|
|
196
196
|
return false;
|
|
197
197
|
}
|
|
@@ -254,7 +254,7 @@ export default class VersionedCache {
|
|
|
254
254
|
if (this.#persistentCache) {
|
|
255
255
|
this.#persistentCache.destroy();
|
|
256
256
|
// Recreate the cache file (creates new empty cache)
|
|
257
|
-
this.#persistentCache =
|
|
257
|
+
this.#persistentCache = create({ cacheId: this.#cacheId });
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "warframe-nexus-query",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "Query prices form nexus-stats.com and warframe.market.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"warframe",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"coverage": "npm test && c8 report --reporter=text-lcov | npx coveralls",
|
|
36
36
|
"lint": "eslint index.js lib/ test/",
|
|
37
37
|
"lint:fix": "eslint index.js lib/ test/ --fix",
|
|
38
|
-
"prepare": "husky
|
|
38
|
+
"prepare": "husky",
|
|
39
39
|
"test": "c8 mocha"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
@@ -47,19 +47,25 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@commitlint/cli": "^21.0.1",
|
|
49
49
|
"@commitlint/config-conventional": "^21.0.1",
|
|
50
|
+
"@stylistic/eslint-plugin": "^5.10.0",
|
|
50
51
|
"@types/json-query": "^2.2.0",
|
|
51
|
-
"@wfcd/eslint-config": "^1.6.1",
|
|
52
52
|
"c8": "^11.0.0",
|
|
53
53
|
"chai": "^6.0.1",
|
|
54
|
+
"eslint": "^10.6.0",
|
|
55
|
+
"eslint-config-prettier": "^10.1.8",
|
|
56
|
+
"eslint-plugin-import-x": "^4.17.1",
|
|
57
|
+
"eslint-plugin-no-null": "^1.0.2",
|
|
58
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
59
|
+
"eslint-stylistic-airbnb": "^3.2.0",
|
|
60
|
+
"globals": "^17.7.0",
|
|
54
61
|
"husky": "^9.0.11",
|
|
55
|
-
"install-peerdeps": "^3.0.3",
|
|
56
62
|
"lint-staged": "^17.0.5",
|
|
57
63
|
"mocha": "^11.0.1",
|
|
58
64
|
"prettier": "^3.2.5"
|
|
59
65
|
},
|
|
60
66
|
"engines": {
|
|
61
|
-
"node": ">=
|
|
62
|
-
"npm": ">=
|
|
67
|
+
"node": ">=24",
|
|
68
|
+
"npm": ">=11"
|
|
63
69
|
},
|
|
64
70
|
"publishConfig": {
|
|
65
71
|
"provenance": true
|