From 63abf7170d1492d65e283dfc40f1ec2733d765f4 Mon Sep 17 00:00:00 2001 From: robertpitt Date: Wed, 11 Sep 2024 00:34:44 +0100 Subject: [PATCH] Resolve ESM/CJS Module import conflict by using the minified lru-cache export. --- lib/parsers/parser_cache.js | 2 +- lib/parsers/string.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/parsers/parser_cache.js b/lib/parsers/parser_cache.js index d85fabecce..c6573fffa4 100644 --- a/lib/parsers/parser_cache.js +++ b/lib/parsers/parser_cache.js @@ -1,6 +1,6 @@ 'use strict'; -const LRU = require('lru-cache').default; +const LRU = require('lru-cache/min').default; let parserCache = new LRU({ max: 15000, diff --git a/lib/parsers/string.js b/lib/parsers/string.js index 47c9bfa8a0..482a3662c0 100644 --- a/lib/parsers/string.js +++ b/lib/parsers/string.js @@ -1,7 +1,7 @@ 'use strict'; const Iconv = require('iconv-lite'); -const LRU = require('lru-cache').default; +const LRU = require('lru-cache/min').default; const decoderCache = new LRU({ max: 500,