From e324151520c62c9503e5e38da66827cd7815ea14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 3 Sep 2022 18:19:30 +0200 Subject: 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. --- cli/tests/testdata/compat/test_runner/cjs.js | 9 -------- cli/tests/testdata/compat/test_runner/cjs.out | 27 ---------------------- cli/tests/testdata/compat/test_runner/esm.mjs | 9 -------- cli/tests/testdata/compat/test_runner/esm.out | 27 ---------------------- .../compat/test_runner/top_level_assertion_cjs.js | 4 ---- .../compat/test_runner/top_level_assertion_cjs.out | 4 ---- .../compat/test_runner/top_level_assertion_esm.mjs | 4 ---- .../compat/test_runner/top_level_assertion_esm.out | 4 ---- .../compat/test_runner/top_level_fail_cjs.js | 4 ---- .../compat/test_runner/top_level_fail_cjs.out | 27 ---------------------- .../compat/test_runner/top_level_fail_esm.mjs | 4 ---- .../compat/test_runner/top_level_fail_esm.out | 27 ---------------------- 12 files changed, 150 deletions(-) delete mode 100644 cli/tests/testdata/compat/test_runner/cjs.js delete mode 100644 cli/tests/testdata/compat/test_runner/cjs.out delete mode 100644 cli/tests/testdata/compat/test_runner/esm.mjs delete mode 100644 cli/tests/testdata/compat/test_runner/esm.out delete mode 100644 cli/tests/testdata/compat/test_runner/top_level_assertion_cjs.js delete mode 100644 cli/tests/testdata/compat/test_runner/top_level_assertion_cjs.out delete mode 100644 cli/tests/testdata/compat/test_runner/top_level_assertion_esm.mjs delete mode 100644 cli/tests/testdata/compat/test_runner/top_level_assertion_esm.out delete mode 100644 cli/tests/testdata/compat/test_runner/top_level_fail_cjs.js delete mode 100644 cli/tests/testdata/compat/test_runner/top_level_fail_cjs.out delete mode 100644 cli/tests/testdata/compat/test_runner/top_level_fail_esm.mjs delete mode 100644 cli/tests/testdata/compat/test_runner/top_level_fail_esm.out (limited to 'cli/tests/testdata/compat/test_runner') diff --git a/cli/tests/testdata/compat/test_runner/cjs.js b/cli/tests/testdata/compat/test_runner/cjs.js deleted file mode 100644 index 96a1b5112..000000000 --- a/cli/tests/testdata/compat/test_runner/cjs.js +++ /dev/null @@ -1,9 +0,0 @@ -const { strictEqual } = require("assert"); - -Deno.test("Correct assertion", () => { - strictEqual(20, 20); -}); - -Deno.test("Failed assertion", () => { - strictEqual(10, 20); -}); diff --git a/cli/tests/testdata/compat/test_runner/cjs.out b/cli/tests/testdata/compat/test_runner/cjs.out deleted file mode 100644 index 2e1e29e61..000000000 --- a/cli/tests/testdata/compat/test_runner/cjs.out +++ /dev/null @@ -1,27 +0,0 @@ -running 2 tests from ./compat/test_runner/cjs.js -Correct assertion ... ok ([WILDCARD]) -Failed assertion ... FAILED ([WILDCARD]) - - ERRORS - -Failed assertion => ./compat/test_runner/cjs.js:[WILDCARD] -error: AssertionError: Values are not strictly equal: - - - [Diff] Actual / Expected - - -- 10 -+ 20 - - Error.captureStackTrace(this, stackStartFn || stackStartFunction); - ^ -[WILDCARD] - - FAILURES - -Failed assertion => ./compat/test_runner/cjs.js:[WILDCARD] - -FAILED | 1 passed | 1 failed ([WILDCARD]) - -error: Test failed diff --git a/cli/tests/testdata/compat/test_runner/esm.mjs b/cli/tests/testdata/compat/test_runner/esm.mjs deleted file mode 100644 index 54a9468a4..000000000 --- a/cli/tests/testdata/compat/test_runner/esm.mjs +++ /dev/null @@ -1,9 +0,0 @@ -import { strictEqual } from "assert"; - -Deno.test("Correct assertion", () => { - strictEqual(20, 20); -}); - -Deno.test("Failed assertion", () => { - strictEqual(10, 20); -}); diff --git a/cli/tests/testdata/compat/test_runner/esm.out b/cli/tests/testdata/compat/test_runner/esm.out deleted file mode 100644 index e69573da1..000000000 --- a/cli/tests/testdata/compat/test_runner/esm.out +++ /dev/null @@ -1,27 +0,0 @@ -running 2 tests from ./compat/test_runner/esm.mjs -Correct assertion ... ok ([WILDCARD]) -Failed assertion ... FAILED ([WILDCARD]) - - ERRORS - -Failed assertion => ./compat/test_runner/esm.mjs:[WILDCARD] -error: AssertionError: Values are not strictly equal: - - - [Diff] Actual / Expected - - -- 10 -+ 20 - - Error.captureStackTrace(this, stackStartFn || stackStartFunction); - ^ -[WILDCARD] - - FAILURES - -Failed assertion => ./compat/test_runner/esm.mjs:[WILDCARD] - -FAILED | 1 passed | 1 failed ([WILDCARD]) - -error: Test failed diff --git a/cli/tests/testdata/compat/test_runner/top_level_assertion_cjs.js b/cli/tests/testdata/compat/test_runner/top_level_assertion_cjs.js deleted file mode 100644 index 318e72d86..000000000 --- a/cli/tests/testdata/compat/test_runner/top_level_assertion_cjs.js +++ /dev/null @@ -1,4 +0,0 @@ -const { notStrictEqual, strictEqual } = require("assert"); - -notStrictEqual(require.main, module, "The module was loaded as a main module"); -strictEqual(20, 20); diff --git a/cli/tests/testdata/compat/test_runner/top_level_assertion_cjs.out b/cli/tests/testdata/compat/test_runner/top_level_assertion_cjs.out deleted file mode 100644 index f74853cfd..000000000 --- a/cli/tests/testdata/compat/test_runner/top_level_assertion_cjs.out +++ /dev/null @@ -1,4 +0,0 @@ -running 0 tests from [WILDCARD] - -ok | 0 passed | 0 failed ([WILDCARD]) - diff --git a/cli/tests/testdata/compat/test_runner/top_level_assertion_esm.mjs b/cli/tests/testdata/compat/test_runner/top_level_assertion_esm.mjs deleted file mode 100644 index 8c217fd55..000000000 --- a/cli/tests/testdata/compat/test_runner/top_level_assertion_esm.mjs +++ /dev/null @@ -1,4 +0,0 @@ -import assert, { strictEqual } from "assert"; - -assert(!import.meta.main, "The module was loaded as a main module"); -strictEqual(20, 20); diff --git a/cli/tests/testdata/compat/test_runner/top_level_assertion_esm.out b/cli/tests/testdata/compat/test_runner/top_level_assertion_esm.out deleted file mode 100644 index f74853cfd..000000000 --- a/cli/tests/testdata/compat/test_runner/top_level_assertion_esm.out +++ /dev/null @@ -1,4 +0,0 @@ -running 0 tests from [WILDCARD] - -ok | 0 passed | 0 failed ([WILDCARD]) - diff --git a/cli/tests/testdata/compat/test_runner/top_level_fail_cjs.js b/cli/tests/testdata/compat/test_runner/top_level_fail_cjs.js deleted file mode 100644 index 20f809794..000000000 --- a/cli/tests/testdata/compat/test_runner/top_level_fail_cjs.js +++ /dev/null @@ -1,4 +0,0 @@ -const { notStrictEqual, strictEqual } = require("assert"); - -notStrictEqual(require.main, module, "The module was loaded as a main module"); -strictEqual(10, 20); diff --git a/cli/tests/testdata/compat/test_runner/top_level_fail_cjs.out b/cli/tests/testdata/compat/test_runner/top_level_fail_cjs.out deleted file mode 100644 index e1777d98a..000000000 --- a/cli/tests/testdata/compat/test_runner/top_level_fail_cjs.out +++ /dev/null @@ -1,27 +0,0 @@ -Uncaught error from ./compat/test_runner/top_level_fail_cjs.js FAILED - - ERRORS - -./compat/test_runner/top_level_fail_cjs.js (uncaught error) -error: (in promise) AssertionError: Values are not strictly equal: - - - [Diff] Actual / Expected - - -- 10 -+ 20 - - Error.captureStackTrace(this, stackStartFn || stackStartFunction); - ^ - at [WILDCARD] -This error was not caught from a test and caused the test runner to fail on the referenced module. -It most likely originated from a dangling promise, event/timeout handler or top-level code. - - FAILURES - -./compat/test_runner/top_level_fail_cjs.js (uncaught error) - -FAILED | 0 passed | 1 failed ([WILDCARD]) - -error: Test failed diff --git a/cli/tests/testdata/compat/test_runner/top_level_fail_esm.mjs b/cli/tests/testdata/compat/test_runner/top_level_fail_esm.mjs deleted file mode 100644 index 918d8c6a8..000000000 --- a/cli/tests/testdata/compat/test_runner/top_level_fail_esm.mjs +++ /dev/null @@ -1,4 +0,0 @@ -import assert, { strictEqual } from "assert"; - -assert(!import.meta.main, "The module was loaded as a main module"); -strictEqual(10, 20); diff --git a/cli/tests/testdata/compat/test_runner/top_level_fail_esm.out b/cli/tests/testdata/compat/test_runner/top_level_fail_esm.out deleted file mode 100644 index d34de2c21..000000000 --- a/cli/tests/testdata/compat/test_runner/top_level_fail_esm.out +++ /dev/null @@ -1,27 +0,0 @@ -Uncaught error from ./compat/test_runner/top_level_fail_esm.mjs FAILED - - ERRORS - -./compat/test_runner/top_level_fail_esm.mjs (uncaught error) -error: AssertionError: Values are not strictly equal: - - - [Diff] Actual / Expected - - -- 10 -+ 20 - - Error.captureStackTrace(this, stackStartFn || stackStartFunction); - ^ - at [WILDCARD] -This error was not caught from a test and caused the test runner to fail on the referenced module. -It most likely originated from a dangling promise, event/timeout handler or top-level code. - - FAILURES - -./compat/test_runner/top_level_fail_esm.mjs (uncaught error) - -FAILED | 0 passed | 1 failed ([WILDCARD]) - -error: Test failed -- cgit v1.2.3