Skip to content

Commit

Permalink
Merge pull request #79 from zotoio/fix/jsonpath
Browse files Browse the repository at this point in the history
avoid vulnerable package
  • Loading branch information
wyvern8 authored Nov 8, 2024
2 parents 41e2dce + b2dd686 commit a130203
Show file tree
Hide file tree
Showing 3 changed files with 1,088 additions and 788 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@
"winston": "^3.13.0",
"yarn": "^1.22.21"
},
"resolutions": {
"jsonpath-plus": "^10.1.0"
},
"peerDependencies": {
"artillery": "^2.0.0-31"
},
Expand Down
4 changes: 3 additions & 1 deletion src/server/cacheManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ class LRUCache {
set(key: string, value: any, ttl: number): void {
if (this.cache.size >= this.maxSize) {
const oldestKey = this.cache.keys().next().value;
this.cache.delete(oldestKey);
if (oldestKey !== undefined) {
this.cache.delete(oldestKey);
}
}
this.cache.set(key, new CacheItem(value, Date.now() + ttl));
}
Expand Down
Loading

0 comments on commit a130203

Please sign in to comment.