aboutsummaryrefslogtreecommitdiffstats
path: root/package-lock.json
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-04-13 15:02:31 +0200
committerGitHub <noreply@github.com>2020-04-13 16:02:31 +0300
commit27e3cddfbef533f783898800ac4abdd5a453b436 (patch)
tree1ba9f63c9fac2f06549a28e043c3669042cf9ced /package-lock.json
parentcc4da79fb6302f35dfe9e2d5af7cda384083b0af (diff)
downloadgitea-27e3cddfbef533f783898800ac4abdd5a453b436.tar.gz
gitea-27e3cddfbef533f783898800ac4abdd5a453b436.zip
Move syntax highlighting to web worker (#11017)
This should eliminate page freezes when loading big files/diff. `highlightBlock` is needed to preserve existing nodes when highlighting and for that, highlight.js needs access to the DOM API so I added a DOM implementation to make it work, which adds around 300kB to the output file size of the lazy-loaded `highlight.js`. Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'package-lock.json')
-rw-r--r--package-lock.json25
1 files changed, 25 insertions, 0 deletions
diff --git a/package-lock.json b/package-lock.json
index 6f1f73245d..f0f7d08017 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3659,6 +3659,11 @@
"domelementtype": "1"
}
},
+ "domino": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/domino/-/domino-2.1.4.tgz",
+ "integrity": "sha512-l70mlQ7IjPKC8kT7GljQXJZmt5OqFL+RE91ik5y5WWQtsd9wP8R7gpFnNu96fK5MqAAZRXfLLsnzKtkty5fWGQ=="
+ },
"dompurify": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.8.tgz",
@@ -15008,6 +15013,26 @@
"errno": "~0.1.7"
}
},
+ "worker-loader": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/worker-loader/-/worker-loader-2.0.0.tgz",
+ "integrity": "sha512-tnvNp4K3KQOpfRnD20m8xltE3eWh89Ye+5oj7wXEEHKac1P4oZ6p9oTj8/8ExqoSBnk9nu5Pr4nKfQ1hn2APJw==",
+ "requires": {
+ "loader-utils": "^1.0.0",
+ "schema-utils": "^0.4.0"
+ },
+ "dependencies": {
+ "schema-utils": {
+ "version": "0.4.7",
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz",
+ "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==",
+ "requires": {
+ "ajv": "^6.1.0",
+ "ajv-keywords": "^3.1.0"
+ }
+ }
+ }
+ },
"wrap-ansi": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",