diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-09-03 18:19:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-03 18:19:30 +0200 |
| commit | e324151520c62c9503e5e38da66827cd7815ea14 (patch) | |
| tree | 51449e9ea202b758a4ac74210b97f6c9b65d26e7 /cli/tests/testdata/compat/worker | |
| parent | fc4025c878a7986576f693ed3ad297212f6a99de (diff) | |
BREAKING(unstable): remove --compat mode (#15678)
This commit removes "compat" mode. We shipped support for "npm:" specifier
support in v1.25 and that is preferred way to interact with Node code that we
will iterate and improve upon.
Diffstat (limited to 'cli/tests/testdata/compat/worker')
| -rw-r--r-- | cli/tests/testdata/compat/worker/worker.mjs | 9 | ||||
| -rw-r--r-- | cli/tests/testdata/compat/worker/worker_test.mjs | 18 | ||||
| -rw-r--r-- | cli/tests/testdata/compat/worker/worker_test.out | 2 |
3 files changed, 0 insertions, 29 deletions
diff --git a/cli/tests/testdata/compat/worker/worker.mjs b/cli/tests/testdata/compat/worker/worker.mjs deleted file mode 100644 index eb7cfed19..000000000 --- a/cli/tests/testdata/compat/worker/worker.mjs +++ /dev/null @@ -1,9 +0,0 @@ -console.log("hello from worker"); - -self.onmessage = (e) => { - if (e.data != "hello") { - throw new Error("wrong message"); - } - - self.postMessage({ pid: process.pid }); -} diff --git a/cli/tests/testdata/compat/worker/worker_test.mjs b/cli/tests/testdata/compat/worker/worker_test.mjs deleted file mode 100644 index 8613dde0c..000000000 --- a/cli/tests/testdata/compat/worker/worker_test.mjs +++ /dev/null @@ -1,18 +0,0 @@ -import { deferred } from "../../../../../test_util/std/async/deferred.ts"; - -const promise = deferred(); -const url = import.meta.resolve("./worker.mjs"); -const worker = new Worker(url, { type: "module" }); - -worker.onmessage = (e) => { - const pid = e.data.pid; - if (typeof pid != "number") { - throw new Error("pid is not a number"); - } - console.log("process.pid from worker:", pid); - promise.resolve(); -}; - -worker.postMessage("hello"); -await promise; -worker.terminate(); diff --git a/cli/tests/testdata/compat/worker/worker_test.out b/cli/tests/testdata/compat/worker/worker_test.out deleted file mode 100644 index 373841945..000000000 --- a/cli/tests/testdata/compat/worker/worker_test.out +++ /dev/null @@ -1,2 +0,0 @@ -hello from worker -process.pid from worker: [WILDCARD] |
