diff --git a/web/ui/module/codemirror-promql/package.json b/web/ui/module/codemirror-promql/package.json index 8a9dbcb08..205cd2c0d 100644 --- a/web/ui/module/codemirror-promql/package.json +++ b/web/ui/module/codemirror-promql/package.json @@ -30,7 +30,7 @@ "homepage": "https://github.com/prometheus/prometheus/blob/main/web/ui/module/codemirror-promql/README.md", "dependencies": { "@prometheus-io/lezer-promql": "0.46.0", - "lru-cache": "^6.0.0" + "lru-cache": "^7.18.3" }, "devDependencies": { "@codemirror/autocomplete": "^6.7.1", @@ -39,9 +39,8 @@ "@codemirror/state": "^6.2.1", "@codemirror/view": "^6.13.0", "@lezer/common": "^1.0.3", - "@lezer/lr": "^1.3.6", "@lezer/highlight": "^1.1.6", - "@types/lru-cache": "^5.1.1", + "@lezer/lr": "^1.3.6", "isomorphic-fetch": "^3.0.0", "nock": "^13.3.1" }, diff --git a/web/ui/module/codemirror-promql/src/client/prometheus.ts b/web/ui/module/codemirror-promql/src/client/prometheus.ts index 0055247c0..a9c7f7456 100644 --- a/web/ui/module/codemirror-promql/src/client/prometheus.ts +++ b/web/ui/module/codemirror-promql/src/client/prometheus.ts @@ -281,7 +281,7 @@ class Cache { private flags: Record; constructor(config?: CacheConfig) { - const maxAge = config && config.maxAge ? config.maxAge : 5 * 60 * 1000; + const maxAge: LRUCache.LimitedByTTL = { ttl: config && config.maxAge ? config.maxAge : 5 * 60 * 1000 }; this.completeAssociation = new LRUCache>>(maxAge); this.metricMetadata = {}; this.labelValues = new LRUCache(maxAge); diff --git a/web/ui/module/lezer-promql/package.json b/web/ui/module/lezer-promql/package.json index 6e4f599a3..06a4cacf0 100644 --- a/web/ui/module/lezer-promql/package.json +++ b/web/ui/module/lezer-promql/package.json @@ -31,11 +31,11 @@ }, "devDependencies": { "@lezer/generator": "^1.2.3", - "@lezer/lr": "^1.3.6", - "@lezer/highlight": "^1.1.6" + "@lezer/highlight": "^1.1.6", + "@lezer/lr": "^1.3.6" }, "peerDependencies": { - "@lezer/lr": "^1.2.3", - "@lezer/highlight": "^1.1.2" + "@lezer/highlight": "^1.1.2", + "@lezer/lr": "^1.2.3" } } diff --git a/web/ui/package-lock.json b/web/ui/package-lock.json index f6593bee9..c4bf7fb8a 100644 --- a/web/ui/package-lock.json +++ b/web/ui/package-lock.json @@ -32,7 +32,7 @@ "license": "Apache-2.0", "dependencies": { "@prometheus-io/lezer-promql": "0.46.0", - "lru-cache": "^6.0.0" + "lru-cache": "^7.18.3" }, "devDependencies": { "@codemirror/autocomplete": "^6.7.1", @@ -43,7 +43,6 @@ "@lezer/common": "^1.0.3", "@lezer/highlight": "^1.1.6", "@lezer/lr": "^1.3.6", - "@types/lru-cache": "^5.1.1", "isomorphic-fetch": "^3.0.0", "nock": "^13.3.1" }, @@ -59,6 +58,14 @@ "@lezer/common": "^1.0.1" } }, + "module/codemirror-promql/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "engines": { + "node": ">=12" + } + }, "module/lezer-promql": { "name": "@prometheus-io/lezer-promql", "version": "0.46.0", @@ -4394,12 +4401,6 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "node_modules/@types/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", - "dev": true - }, "node_modules/@types/mime": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz", @@ -13216,6 +13217,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -20712,7 +20714,8 @@ "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, "node_modules/yaml": { "version": "1.10.2", @@ -23488,10 +23491,16 @@ "@lezer/highlight": "^1.1.6", "@lezer/lr": "^1.3.6", "@prometheus-io/lezer-promql": "0.46.0", - "@types/lru-cache": "^5.1.1", "isomorphic-fetch": "^3.0.0", - "lru-cache": "^6.0.0", + "lru-cache": "^7.18.3", "nock": "^13.3.1" + }, + "dependencies": { + "lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==" + } } }, "@prometheus-io/lezer-promql": { @@ -24059,12 +24068,6 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "@types/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", - "dev": true - }, "@types/mime": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz", @@ -30843,6 +30846,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, "requires": { "yallist": "^4.0.0" } @@ -36376,7 +36380,8 @@ "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, "yaml": { "version": "1.10.2", diff --git a/web/ui/package.json b/web/ui/package.json index d5663ee75..a6a4d6a32 100644 --- a/web/ui/package.json +++ b/web/ui/package.json @@ -23,8 +23,8 @@ "eslint-plugin-prettier": "^4.2.1", "jest-canvas-mock": "^2.5.1", "jest-fetch-mock": "^3.0.3", - "react-scripts": "^5.0.1", "prettier": "^2.8.8", + "react-scripts": "^5.0.1", "ts-jest": "^29.1.0", "typescript": "^4.9.5" } diff --git a/web/ui/react-app/package.json b/web/ui/react-app/package.json index 969de4279..33eee82cf 100644 --- a/web/ui/react-app/package.json +++ b/web/ui/react-app/package.json @@ -14,9 +14,9 @@ "@fortawesome/fontawesome-svg-core": "6.4.0", "@fortawesome/free-solid-svg-icons": "6.4.0", "@fortawesome/react-fontawesome": "0.2.0", - "@lezer/lr": "^1.3.6", - "@lezer/highlight": "^1.1.6", "@lezer/common": "^1.0.3", + "@lezer/highlight": "^1.1.6", + "@lezer/lr": "^1.3.6", "@nexucis/fuzzy": "^0.4.1", "@nexucis/kvsearch": "^0.8.1", "@prometheus-io/codemirror-promql": "0.46.0",