From 05acc51054b067b8d74d6df49922b97584dddffa Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sun, 28 Jun 2020 18:31:43 +0100 Subject: [PATCH] Desktop, Mobile: Fixes #3281: Prevent code highlighting from freezing the app in some cases --- CliClient/package-lock.json | 6 +-- CliClient/package.json | 2 +- ElectronClient/package-lock.json | 6 +-- ElectronClient/package.json | 2 +- .../lib/joplin-renderer/package-lock.json | 44 ++----------------- .../lib/joplin-renderer/package.json | 4 +- ReactNativeClient/package-lock.json | 6 +-- ReactNativeClient/package.json | 2 +- 8 files changed, 17 insertions(+), 55 deletions(-) diff --git a/CliClient/package-lock.json b/CliClient/package-lock.json index eae5745f3..11f5ab886 100644 --- a/CliClient/package-lock.json +++ b/CliClient/package-lock.json @@ -3039,9 +3039,9 @@ "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=" }, "highlight.js": { - "version": "9.18.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz", - "integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==" + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.1.1.tgz", + "integrity": "sha512-b4L09127uVa+9vkMgPpdUQP78ickGbHEQTWeBrQFTJZ4/n2aihWOGS0ZoUqAwjVmfjhq/C76HRzkqwZhK4sBbg==" }, "homedir-polyfill": { "version": "1.0.3", diff --git a/CliClient/package.json b/CliClient/package.json index c43759e76..4c79b7f41 100644 --- a/CliClient/package.json +++ b/CliClient/package.json @@ -49,7 +49,7 @@ "font-awesome-filetypes": "^2.1.0", "form-data": "^2.1.4", "fs-extra": "^5.0.0", - "highlight.js": "^9.17.1", + "highlight.js": "10.1.1", "html-entities": "^1.2.1", "html-minifier": "^3.5.15", "htmlparser2": "^4.1.0", diff --git a/ElectronClient/package-lock.json b/ElectronClient/package-lock.json index d3ae07209..532e53123 100644 --- a/ElectronClient/package-lock.json +++ b/ElectronClient/package-lock.json @@ -6304,9 +6304,9 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" }, "highlight.js": { - "version": "9.18.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz", - "integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==" + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.1.1.tgz", + "integrity": "sha512-b4L09127uVa+9vkMgPpdUQP78ickGbHEQTWeBrQFTJZ4/n2aihWOGS0ZoUqAwjVmfjhq/C76HRzkqwZhK4sBbg==" }, "hoist-non-react-statics": { "version": "2.5.0", diff --git a/ElectronClient/package.json b/ElectronClient/package.json index 45fd8ae3d..2d64205fc 100644 --- a/ElectronClient/package.json +++ b/ElectronClient/package.json @@ -118,7 +118,7 @@ "form-data": "^2.3.2", "formatcoords": "^1.1.3", "fs-extra": "^5.0.0", - "highlight.js": "^9.17.1", + "highlight.js": "^10.1.1", "html-entities": "^1.2.1", "html-minifier": "^4.0.0", "htmlparser2": "^4.1.0", diff --git a/ReactNativeClient/lib/joplin-renderer/package-lock.json b/ReactNativeClient/lib/joplin-renderer/package-lock.json index 62702c020..0981cb030 100644 --- a/ReactNativeClient/lib/joplin-renderer/package-lock.json +++ b/ReactNativeClient/lib/joplin-renderer/package-lock.json @@ -444,29 +444,15 @@ "lodash": "^4.17.15" } }, - "handlebars": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz", - "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==", - "requires": { - "neo-async": "^2.6.0", - "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" - } - }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" }, "highlight.js": { - "version": "9.17.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.17.1.tgz", - "integrity": "sha512-TA2/doAur5Ol8+iM3Ov7qy3jYcr/QiJ2eDTdRF4dfbjG7AaaB99J5G+zSl11ljbl6cIcahgPY6SKb3sC3EJ0fw==", - "requires": { - "handlebars": "^4.5.3" - } + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.1.1.tgz", + "integrity": "sha512-b4L09127uVa+9vkMgPpdUQP78ickGbHEQTWeBrQFTJZ4/n2aihWOGS0ZoUqAwjVmfjhq/C76HRzkqwZhK4sBbg==" }, "html-entities": { "version": "1.2.1", @@ -734,11 +720,6 @@ "brace-expansion": "^1.1.7" } }, - "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" - }, "moment-mini": { "version": "2.22.1", "resolved": "https://registry.npmjs.org/moment-mini/-/moment-mini-2.22.1.tgz", @@ -749,11 +730,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" - }, "no-case": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", @@ -771,15 +747,6 @@ "wrappy": "1" } }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, "param-case": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", @@ -913,11 +880,6 @@ "unorm": ">= 1.0.0" } }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" - }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/ReactNativeClient/lib/joplin-renderer/package.json b/ReactNativeClient/lib/joplin-renderer/package.json index 7d964314b..15c86fd49 100644 --- a/ReactNativeClient/lib/joplin-renderer/package.json +++ b/ReactNativeClient/lib/joplin-renderer/package.json @@ -18,7 +18,7 @@ "base-64": "^0.1.0", "font-awesome-filetypes": "^2.1.0", "fs-extra": "^8.1.0", - "highlight.js": "^9.17.1", + "highlight.js": "10.1.1", "html-entities": "^1.2.1", "json-stringify-safe": "^5.0.1", "katex": "^0.11.1", @@ -36,8 +36,8 @@ "markdown-it-sup": "^1.0.0", "markdown-it-toc-done-right": "^4.1.0", "md5": "^2.2.1", - "mermaid": "^8.4.6", "memory-cache": "^0.2.0", + "mermaid": "^8.4.6", "uslug": "^1.0.4" } } diff --git a/ReactNativeClient/package-lock.json b/ReactNativeClient/package-lock.json index 36e23123a..30264aa07 100644 --- a/ReactNativeClient/package-lock.json +++ b/ReactNativeClient/package-lock.json @@ -5537,9 +5537,9 @@ "integrity": "sha512-eNHUQHuadDMJARpaqvlCZoK/Nitpj6oywq3vQ3wCwEsww5morX34mW5PmKWQTO7aU0ck0hgulxR+EVDlXygGxQ==" }, "highlight.js": { - "version": "9.18.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz", - "integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==" + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.1.1.tgz", + "integrity": "sha512-b4L09127uVa+9vkMgPpdUQP78ickGbHEQTWeBrQFTJZ4/n2aihWOGS0ZoUqAwjVmfjhq/C76HRzkqwZhK4sBbg==" }, "hoist-non-react-statics": { "version": "2.5.0", diff --git a/ReactNativeClient/package.json b/ReactNativeClient/package.json index 07708c511..067dbda85 100644 --- a/ReactNativeClient/package.json +++ b/ReactNativeClient/package.json @@ -26,7 +26,7 @@ "events": "^1.1.1", "font-awesome-filetypes": "^2.1.0", "form-data": "^2.1.4", - "highlight.js": "^9.17.1", + "highlight.js": "10.1.1", "html-entities": "^1.2.1", "htmlparser2": "^4.1.0", "jsc-android": "241213.1.0",