From 9521f7c028fd40f1839d484d4e8c75f1d427f3f4 Mon Sep 17 00:00:00 2001 From: Lucas Garron Date: Tue, 27 Aug 2024 11:45:50 +0200 Subject: [PATCH] [comlink-everywhere] Remove `eval` arg. --- .../vendor/apache/comlink-everywhere/outside/index.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/cubing/vendor/apache/comlink-everywhere/outside/index.ts b/src/cubing/vendor/apache/comlink-everywhere/outside/index.ts index 84b6f3cb9..8e6b9561b 100644 --- a/src/cubing/vendor/apache/comlink-everywhere/outside/index.ts +++ b/src/cubing/vendor/apache/comlink-everywhere/outside/index.ts @@ -24,18 +24,12 @@ async function nodeWorker( export async function constructWorker( source: string | URL, - options?: { eval?: boolean; type?: WorkerType }, + options?: { type?: WorkerType }, ): Promise { let worker: Worker; if (useNodeWorkarounds) { - return nodeWorker(source, { eval: options?.eval }); + return nodeWorker(source); } else { - if (options?.eval) { - const blob = new Blob([source as string], { - type: "application/javascript", - }); - source = URL.createObjectURL(blob); - } worker = new globalThis.Worker(source, { type: options ? options.type : undefined, // TODO: Is it safe to use `options?.type`? });