mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 19:00:32 -06:00
588a79c80c
Before this commit, we had a yarn package set up in the root directory and also in `app/assets/javascripts`. That meant two `yarn install` calls and two `node_modules` directories. This commit merges them both into the root location, and updates references to node_modules. A previous attempt can be found at https://github.com/discourse/discourse/pull/21172. This commit re-uses that script to merge the `yarn.lock` files. Co-authored-by: Jarek Radosz <jradosz@gmail.com>
28 lines
1.2 KiB
Diff
28 lines
1.2 KiB
Diff
diff --git a/node_modules/content-tag/pkg/standalone.js b/node_modules/content-tag/pkg/standalone.js
|
|
index 7be08fc..35777bf 100644
|
|
--- a/node_modules/content-tag/pkg/standalone.js
|
|
+++ b/node_modules/content-tag/pkg/standalone.js
|
|
@@ -1,7 +1,8 @@
|
|
-import init from "./standalone/content_tag.js";
|
|
+import { initSync } from "./standalone/content_tag.js";
|
|
+import module from "./standalone/content_tag_bg.wasm";
|
|
import { Preprocessor as WasmPreprocessor } from "./standalone/content_tag.js";
|
|
|
|
-await init();
|
|
+initSync(module);
|
|
|
|
const defaultOptions = {
|
|
inline_source_map: false,
|
|
diff --git a/node_modules/content-tag/pkg/standalone/content_tag.js b/node_modules/content-tag/pkg/standalone/content_tag.js
|
|
index aaefe00..bb20026 100644
|
|
--- a/node_modules/content-tag/pkg/standalone/content_tag.js
|
|
+++ b/node_modules/content-tag/pkg/standalone/content_tag.js
|
|
@@ -20,6 +20,7 @@ function takeObject(idx) {
|
|
return ret;
|
|
}
|
|
|
|
+const { TextDecoder, TextEncoder } = require('util');
|
|
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
|
|
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|