From c3cedefef33d4ce3615f39b276f6df2830499bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 10 Apr 2023 17:40:52 -0400 Subject: [PATCH] feat: update lru-cache to 9.x, closes #11454 --- install/package.json | 2 +- src/cache/lru.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install/package.json b/install/package.json index 706434432d..acd5c5af0c 100644 --- a/install/package.json +++ b/install/package.json @@ -81,7 +81,7 @@ "less": "4.1.3", "lodash": "4.17.21", "logrotate-stream": "0.2.9", - "lru-cache": "8.0.5", + "lru-cache": "9.0.1", "material-design-lite": "1.3.0", "mime": "3.0.0", "mkdirp": "2.1.6", diff --git a/src/cache/lru.js b/src/cache/lru.js index 3434e0773b..fc6eb69147 100644 --- a/src/cache/lru.js +++ b/src/cache/lru.js @@ -1,7 +1,7 @@ 'use strict'; module.exports = function (opts) { - const LRU = require('lru-cache'); + const { LRUCache } = require('lru-cache'); const pubsub = require('../pubsub'); // lru-cache@7 deprecations @@ -28,7 +28,7 @@ module.exports = function (opts) { } }); - const lruCache = new LRU(opts); + const lruCache = new LRUCache(opts); const cache = {}; cache.name = opts.name;