@codingame/monaco-vscode-standalone-html-language-features 36.2.4 → 36.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,7 +43,7 @@ function getWorkerBootstrapUrl(workerScriptUrl, workerOptions) {
|
|
|
43
43
|
].join("")], { type: "application/javascript" });
|
|
44
44
|
return URL.createObjectURL(blob);
|
|
45
45
|
}
|
|
46
|
-
function getWorker(descriptor) {
|
|
46
|
+
async function getWorker(descriptor) {
|
|
47
47
|
const label = descriptor.label;
|
|
48
48
|
const monacoEnvironment = globalThis.MonacoEnvironment;
|
|
49
49
|
if (monacoEnvironment) {
|
|
@@ -53,10 +53,12 @@ function getWorker(descriptor) {
|
|
|
53
53
|
if (typeof monacoEnvironment.getWorkerUrl === "function") {
|
|
54
54
|
const workerUrl = monacoEnvironment.getWorkerUrl("workerMain.js", label);
|
|
55
55
|
const workerOptions = { name: label, type: "module", ...monacoEnvironment.getWorkerOptions?.("workerMain.js", label) };
|
|
56
|
-
|
|
56
|
+
const worker = new Worker(
|
|
57
57
|
getWorkerBootstrapUrl(ttPolicy ? ttPolicy.createScriptURL(workerUrl) : workerUrl, workerOptions),
|
|
58
58
|
workerOptions
|
|
59
59
|
);
|
|
60
|
+
await whenESMWorkerReady(worker);
|
|
61
|
+
return worker;
|
|
60
62
|
}
|
|
61
63
|
}
|
|
62
64
|
if (descriptor.createWorker) {
|
|
@@ -73,8 +75,7 @@ function createWebWorker(opts) {
|
|
|
73
75
|
moduleId: opts.moduleId,
|
|
74
76
|
createWorker: opts.createWorker
|
|
75
77
|
})
|
|
76
|
-
).then(
|
|
77
|
-
await whenESMWorkerReady(w);
|
|
78
|
+
).then((w) => {
|
|
78
79
|
w.postMessage("ignore");
|
|
79
80
|
w.postMessage(opts.createData);
|
|
80
81
|
return w;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-standalone-html-language-features",
|
|
3
|
-
"version": "36.2.
|
|
3
|
+
"version": "36.2.5",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"types": "./languages/features/html/register.d.ts",
|
|
28
28
|
"module": "./languages/features/html/register.js",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@36.2.
|
|
30
|
+
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@36.2.5",
|
|
31
31
|
"vscode-html-languageservice": "5.2.0",
|
|
32
32
|
"vscode-languageserver-textdocument": "1.0.12",
|
|
33
33
|
"vscode-languageserver-types": "3.17.5"
|