From ccbe6c3b1fe531024611b17072393477ae5f0b1b Mon Sep 17 00:00:00 2001 From: Clark Du Date: Wed, 21 Nov 2018 13:32:13 +0000 Subject: [PATCH] chore: upgrade lru-cache to v5 (#4380) --- packages/vue-renderer/package.json | 2 +- packages/vue-renderer/src/spa-meta.js | 2 +- yarn.lock | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/vue-renderer/package.json b/packages/vue-renderer/package.json index 9e0913336c..4bce28b51d 100644 --- a/packages/vue-renderer/package.json +++ b/packages/vue-renderer/package.json @@ -12,7 +12,7 @@ "@nuxtjs/devalue": "^1.1.0", "consola": "^2.3.0", "fs-extra": "^7.0.1", - "lru-cache": "^4.1.3", + "lru-cache": "^5.1.1", "vue": "^2.5.17", "vue-meta": "^1.5.5", "vue-no-ssr": "^1.1.0", diff --git a/packages/vue-renderer/src/spa-meta.js b/packages/vue-renderer/src/spa-meta.js index 512eb08d4e..15103ac1e7 100644 --- a/packages/vue-renderer/src/spa-meta.js +++ b/packages/vue-renderer/src/spa-meta.js @@ -9,7 +9,7 @@ export default class SPAMetaRenderer { this.renderer = renderer this.options = this.renderer.context.options this.vueRenderer = createRenderer() - this.cache = LRU({}) + this.cache = new LRU() // Add VueMeta to Vue (this is only for SPA mode) // See app/index.js diff --git a/yarn.lock b/yarn.lock index 1c754671e1..919b90ed98 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6657,6 +6657,13 @@ lru-cache@4.1.x, lru-cache@^4.0.1, lru-cache@^4.1.2, lru-cache@^4.1.3: pseudomap "^1.0.2" yallist "^2.1.2" +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + magic-string@0.25.0: version "0.25.0" resolved "https://registry.npmjs.org/magic-string/-/magic-string-0.25.0.tgz#1f3696f9931ff0a1ed4c132250529e19cad6759b"