From 7ad31b004f2d71584a6e32ee29a7211a1fd22373 Mon Sep 17 00:00:00 2001 From: stavalfi Date: Mon, 13 Sep 2021 20:00:15 +0300 Subject: [PATCH] fix: add missing deps highlight.js --- filters/all.js | 2 +- package-lock.json | 11 ++++++++--- package.json | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/filters/all.js b/filters/all.js index 38c4618b3..0b59890fb 100644 --- a/filters/all.js +++ b/filters/all.js @@ -75,7 +75,7 @@ function loadLanguagesConfig() { const languages = fs.readdirSync(hljsLanguagesPath); for (let langPath of languages) { - const lang = require(path.resolve(hljsLanguagesPath, langPath)); + const lang = require(path.resolve(hljsLanguagesPath, langPath.replace('.js', ''))); hljs.registerLanguage(lang.name, lang); } diff --git a/package-lock.json b/package-lock.json index e7f137e7e..ebeb00fcc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -74,6 +74,11 @@ "use-resize-observer": "^7.0.0" }, "dependencies": { + "highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==" + }, "marked": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/marked/-/marked-2.1.3.tgz", @@ -3452,9 +3457,9 @@ } }, "highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==" + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.2.0.tgz", + "integrity": "sha512-JOySjtOEcyG8s4MLR2MNbLUyaXqUunmSnL2kdV/KuGJOmHZuAR5xC54Ko7goAXBWNhf09Vy3B+U7vR62UZ/0iw==" }, "hook-std": { "version": "2.0.0", diff --git a/package.json b/package.json index d89a91b3d..523a86d9f 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ }, "dependencies": { "@asyncapi/react-component": "^1.0.0-next.17", + "highlight.js": "^11.2.0", "puppeteer": "^5.3.1", "react": "^17.0.2", "react-dom": "^17.0.2",