Skip to content

Commit

Permalink
Merge pull request prometheus#12829 from arukiidou/chore/bump-webui
Browse files Browse the repository at this point in the history
build(deps): bump lru-cache from 7.18.3 to 11.0.1 in /web/ui
  • Loading branch information
juliusv authored Sep 17, 2024
2 parents d90d097 + 54fe9f3 commit 6c5e2f8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion web/ui/module/codemirror-promql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.300.0-beta.0",
"lru-cache": "^7.18.3"
"lru-cache": "^11.0.1"
},
"devDependencies": {
"@codemirror/autocomplete": "^6.17.0",
Expand Down
7 changes: 5 additions & 2 deletions web/ui/module/codemirror-promql/src/client/prometheus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import { FetchFn } from './index';
import { Matcher } from '../types';
import { labelMatchersToString } from '../parser';
import LRUCache from 'lru-cache';
import { LRUCache } from 'lru-cache';

export interface MetricMetadata {
type: string;
Expand Down Expand Up @@ -292,7 +292,10 @@ class Cache {
private flags: Record<string, string>;

constructor(config?: CacheConfig) {
const maxAge: LRUCache.LimitedByTTL = { ttl: config && config.maxAge ? config.maxAge : 5 * 60 * 1000 };
const maxAge = {
ttl: config && config.maxAge ? config.maxAge : 5 * 60 * 1000,
ttlAutopurge: false,
};
this.completeAssociation = new LRUCache<string, Map<string, Set<string>>>(maxAge);
this.metricMetadata = {};
this.labelValues = new LRUCache<string, string[]>(maxAge);
Expand Down
11 changes: 5 additions & 6 deletions web/ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6c5e2f8

Please sign in to comment.