Skip to content

Commit 12cb43c

Browse files
authoredMar 12, 2025··
Upgrade to lru-cache 11.0.2 (#663)
* Upgrade to lru-cache 11.0.2 * Fix version
1 parent 3f26657 commit 12cb43c

File tree

4 files changed

+15
-26
lines changed

4 files changed

+15
-26
lines changed
 

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@types/topojson-client": "3.1.5",
3636
"chroma-js": "2.4.2",
3737
"lodash": "^4.17.21",
38-
"lru-cache": "^4.1.5",
38+
"lru-cache": "11.0.2",
3939
"maplibre-gl": "5.1.1",
4040
"semver": "7.7.1",
4141
"topojson-client": "^3.1.0"
@@ -52,7 +52,7 @@
5252
"@types/eslint__js": "8.42.3",
5353
"@types/jest": "29.5.14",
5454
"@types/lodash": "4.17.16",
55-
"@types/lru-cache": "5.1.1",
55+
"@types/lru-cache": "7.10.10",
5656
"@types/node": "22.13.10",
5757
"@types/semver": "7.5.8",
5858
"@types/topojson-specification": "1.0.5",

‎src/ems_client.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import semverMinor from 'semver/functions/minor';
1717
import { format as formatUrl, parse as parseUrl, UrlObject } from 'url';
1818
import { toAbsoluteUrl } from './utils';
1919
import { ParsedUrlQueryInput } from 'querystring';
20-
import LRUCache from 'lru-cache';
20+
import { LRUCache } from 'lru-cache';
2121

2222
const REST_API_REGEX = /\d{4}-\d{2}-\d{2}/;
2323
export const LATEST_API_URL_PATH = 'latest';
@@ -429,7 +429,7 @@ export class EMSClient {
429429
}
430430

431431
private _invalidateSettings(): void {
432-
this._cache.reset();
432+
this._cache.clear();
433433
this._getMainCatalog = _.once(async (): Promise<EmsCatalogManifest> => {
434434
const services = [];
435435
if (this._tileApiUrl) {

‎tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"compilerOptions": {
33
/* Basic Options */
44
// "incremental": true, /* Enable incremental compilation */
5-
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
5+
"target": "ES2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
66
"module": "commonjs",
77
"resolveJsonModule": true, /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
88
// "lib": [], /* Specify library files to be included in the compilation. */

‎yarn.lock

+10-21
Original file line numberDiff line numberDiff line change
@@ -2125,10 +2125,12 @@
21252125
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.16.tgz#94ae78fab4a38d73086e962d0b65c30d816bfb0a"
21262126
integrity sha512-HX7Em5NYQAXKW+1T+FiuG27NGwzJfCX3s1GjOa7ujxZa52kjJLOr4FUxT+giF6Tgxv1e+/czV/iTtBw27WTU9g==
21272127

2128-
"@types/lru-cache@5.1.1":
2129-
version "5.1.1"
2130-
resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef"
2131-
integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==
2128+
"@types/lru-cache@7.10.10":
2129+
version "7.10.10"
2130+
resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-7.10.10.tgz#3fa937c35ff4b3f6753d5737915c9bf8e693a713"
2131+
integrity sha512-nEpVRPWW9EBmx2SCfNn3ClYxPL7IktPX12HhIoSc/H5mMjdeW3+YsXIpseLQ2xF35+OcpwKQbEUw5VtqE4PDNA==
2132+
dependencies:
2133+
lru-cache "*"
21322134

21332135
"@types/mapbox__point-geometry@*":
21342136
version "0.1.2"
@@ -3922,13 +3924,10 @@ lodash@^4.17.21:
39223924
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
39233925
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
39243926

3925-
lru-cache@^4.1.5:
3926-
version "4.1.5"
3927-
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd"
3928-
integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==
3929-
dependencies:
3930-
pseudomap "^1.0.2"
3931-
yallist "^2.1.2"
3927+
lru-cache@*, lru-cache@11.0.2:
3928+
version "11.0.2"
3929+
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-11.0.2.tgz#fbd8e7cf8211f5e7e5d91905c415a3f55755ca39"
3930+
integrity sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==
39323931

39333932
lru-cache@^5.1.1:
39343933
version "5.1.1"
@@ -4280,11 +4279,6 @@ protocol-buffers-schema@^3.3.1:
42804279
resolved "https://registry.yarnpkg.com/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz#77bc75a48b2ff142c1ad5b5b90c94cd0fa2efd03"
42814280
integrity sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==
42824281

4283-
pseudomap@^1.0.2:
4284-
version "1.0.2"
4285-
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
4286-
integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==
4287-
42884282
punycode@^2.1.0:
42894283
version "2.3.1"
42904284
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
@@ -4837,11 +4831,6 @@ y18n@^5.0.5:
48374831
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
48384832
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
48394833

4840-
yallist@^2.1.2:
4841-
version "2.1.2"
4842-
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
4843-
integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==
4844-
48454834
yallist@^3.0.2:
48464835
version "3.1.1"
48474836
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"

0 commit comments

Comments
 (0)
Please sign in to comment.