diff options
Diffstat (limited to 'cli')
20 files changed, 43 insertions, 45 deletions
diff --git a/cli/js/40_testing.js b/cli/js/40_testing.js index 5077af120..c0b5367f8 100644 --- a/cli/js/40_testing.js +++ b/cli/js/40_testing.js @@ -3,10 +3,10 @@ const core = globalThis.Deno.core; const ops = core.ops; const internals = globalThis.__bootstrap.internals; -import { setExitHandler } from "internal:runtime/30_os.js"; -import { Console } from "internal:deno_console/02_console.js"; -import { serializePermissions } from "internal:runtime/10_permissions.js"; -import { assert } from "internal:deno_web/00_infra.js"; +import { setExitHandler } from "ext:runtime/30_os.js"; +import { Console } from "ext:deno_console/02_console.js"; +import { serializePermissions } from "ext:runtime/10_permissions.js"; +import { assert } from "ext:deno_web/00_infra.js"; const primordials = globalThis.__bootstrap.primordials; const { ArrayFrom, @@ -1424,6 +1424,6 @@ internals.testing = { enableBench, }; -import { denoNs } from "internal:runtime/90_deno_ns.js"; +import { denoNs } from "ext:runtime/90_deno_ns.js"; denoNs.bench = bench; denoNs.test = test; diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 3b1f740b2..239311975 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -4048,14 +4048,14 @@ itest!(node_prefix_missing { exit_code: 1, }); -itest!(internal_import { - args: "run run/internal_import.ts", - output: "run/internal_import.ts.out", +itest!(extension_import { + args: "run run/extension_import.ts", + output: "run/extension_import.ts.out", exit_code: 1, }); -itest!(internal_dynamic_import { - args: "run run/internal_dynamic_import.ts", - output: "run/internal_dynamic_import.ts.out", +itest!(extension_dynamic_import { + args: "run run/extension_dynamic_import.ts", + output: "run/extension_dynamic_import.ts.out", exit_code: 1, }); diff --git a/cli/tests/testdata/run/error_009_extensions_error.js.out b/cli/tests/testdata/run/error_009_extensions_error.js.out index 36fc6af26..ec286a60a 100644 --- a/cli/tests/testdata/run/error_009_extensions_error.js.out +++ b/cli/tests/testdata/run/error_009_extensions_error.js.out @@ -2,5 +2,5 @@ new Event(); ^ at [WILDCARD] - at new Event (internal:deno_web/[WILDCARD]) + at new Event (ext:deno_web/[WILDCARD]) at [WILDCARD] diff --git a/cli/tests/testdata/run/extension_dynamic_import.ts b/cli/tests/testdata/run/extension_dynamic_import.ts new file mode 100644 index 000000000..6fb3ac3a0 --- /dev/null +++ b/cli/tests/testdata/run/extension_dynamic_import.ts @@ -0,0 +1 @@ +await import("ext:runtime/01_errors.js"); diff --git a/cli/tests/testdata/run/extension_dynamic_import.ts.out b/cli/tests/testdata/run/extension_dynamic_import.ts.out new file mode 100644 index 000000000..18b05ea47 --- /dev/null +++ b/cli/tests/testdata/run/extension_dynamic_import.ts.out @@ -0,0 +1,4 @@ +error: Uncaught TypeError: Cannot load extension module from external code +await import("ext:runtime/01_errors.js"); +^ + at [WILDCARD]/extension_dynamic_import.ts:1:1 diff --git a/cli/tests/testdata/run/extension_import.ts b/cli/tests/testdata/run/extension_import.ts new file mode 100644 index 000000000..7bbbab799 --- /dev/null +++ b/cli/tests/testdata/run/extension_import.ts @@ -0,0 +1 @@ +import "ext:runtime/01_errors.js"; diff --git a/cli/tests/testdata/run/extension_import.ts.out b/cli/tests/testdata/run/extension_import.ts.out new file mode 100644 index 000000000..f1d9d5eb2 --- /dev/null +++ b/cli/tests/testdata/run/extension_import.ts.out @@ -0,0 +1,8 @@ +error: Unsupported scheme "ext" for module "ext:runtime/01_errors.js". Supported schemes: [ + "data", + "blob", + "file", + "http", + "https", +] + at [WILDCARD] diff --git a/cli/tests/testdata/run/fetch_async_error_stack.ts.out b/cli/tests/testdata/run/fetch_async_error_stack.ts.out index 8ca670847..e8169228f 100644 --- a/cli/tests/testdata/run/fetch_async_error_stack.ts.out +++ b/cli/tests/testdata/run/fetch_async_error_stack.ts.out @@ -1,5 +1,5 @@ error: Uncaught (in promise) TypeError: error sending request for url[WILDCARD] await fetch("https://nonexistent.deno.land/"); ^[WILDCARD] - at async fetch (internal:[WILDCARD]) + at async fetch (ext:[WILDCARD]) at async file:///[WILDCARD]/fetch_async_error_stack.ts:1:1 diff --git a/cli/tests/testdata/run/internal_dynamic_import.ts b/cli/tests/testdata/run/internal_dynamic_import.ts deleted file mode 100644 index 9dd2ce2e1..000000000 --- a/cli/tests/testdata/run/internal_dynamic_import.ts +++ /dev/null @@ -1 +0,0 @@ -await import("internal:runtime/01_errors.js"); diff --git a/cli/tests/testdata/run/internal_dynamic_import.ts.out b/cli/tests/testdata/run/internal_dynamic_import.ts.out deleted file mode 100644 index 3deb9366e..000000000 --- a/cli/tests/testdata/run/internal_dynamic_import.ts.out +++ /dev/null @@ -1,4 +0,0 @@ -error: Uncaught TypeError: Cannot load internal module from external code -await import("internal:runtime/01_errors.js"); -^ - at [WILDCARD]/internal_dynamic_import.ts:1:1 diff --git a/cli/tests/testdata/run/internal_import.ts b/cli/tests/testdata/run/internal_import.ts deleted file mode 100644 index 2cb834d33..000000000 --- a/cli/tests/testdata/run/internal_import.ts +++ /dev/null @@ -1 +0,0 @@ -import "internal:runtime/01_errors.js"; diff --git a/cli/tests/testdata/run/internal_import.ts.out b/cli/tests/testdata/run/internal_import.ts.out deleted file mode 100644 index ca82cc21e..000000000 --- a/cli/tests/testdata/run/internal_import.ts.out +++ /dev/null @@ -1,8 +0,0 @@ -error: Unsupported scheme "internal" for module "internal:runtime/01_errors.js". Supported schemes: [ - "data", - "blob", - "file", - "http", - "https", -] - at [WILDCARD] diff --git a/cli/tests/testdata/run/queue_microtask_error.ts.out b/cli/tests/testdata/run/queue_microtask_error.ts.out index c1af4fec9..a8ce13170 100644 --- a/cli/tests/testdata/run/queue_microtask_error.ts.out +++ b/cli/tests/testdata/run/queue_microtask_error.ts.out @@ -3,4 +3,4 @@ error: Uncaught Error: foo throw new Error("foo"); ^ at [WILDCARD]/queue_microtask_error.ts:2:9 - at internal:core/[WILDCARD] + at ext:core/[WILDCARD] diff --git a/cli/tests/testdata/run/queue_microtask_error_handled.ts.out b/cli/tests/testdata/run/queue_microtask_error_handled.ts.out index 9105570b3..bdc8eafa1 100644 --- a/cli/tests/testdata/run/queue_microtask_error_handled.ts.out +++ b/cli/tests/testdata/run/queue_microtask_error_handled.ts.out @@ -7,9 +7,9 @@ colno: 9, error: Error: foo at [WILDCARD]/queue_microtask_error_handled.ts:18:9 - at internal:core/[WILDCARD] + at ext:core/[WILDCARD] } onerror() called Error: foo at [WILDCARD]/queue_microtask_error_handled.ts:18:9 - at internal:core/[WILDCARD] + at ext:core/[WILDCARD] 2 diff --git a/cli/tests/testdata/run/wasm_streaming_panic_test.js.out b/cli/tests/testdata/run/wasm_streaming_panic_test.js.out index eec1e3b96..8a3c68e37 100644 --- a/cli/tests/testdata/run/wasm_streaming_panic_test.js.out +++ b/cli/tests/testdata/run/wasm_streaming_panic_test.js.out @@ -1,2 +1,2 @@ error: Uncaught (in promise) TypeError: Invalid WebAssembly content type. - at handleWasmStreaming (internal:deno_fetch/26_fetch.js:[WILDCARD]) + at handleWasmStreaming (ext:deno_fetch/26_fetch.js:[WILDCARD]) diff --git a/cli/tests/testdata/run/worker_drop_handle_race.js.out b/cli/tests/testdata/run/worker_drop_handle_race.js.out index d78535944..b176413cf 100644 --- a/cli/tests/testdata/run/worker_drop_handle_race.js.out +++ b/cli/tests/testdata/run/worker_drop_handle_race.js.out @@ -2,7 +2,7 @@ error: Uncaught (in worker "") Error throw new Error(); ^ at [WILDCARD]/workers/drop_handle_race.js:2:9 - at Object.action (internal:deno_web/02_timers.js:[WILDCARD]) - at handleTimerMacrotask (internal:deno_web/02_timers.js:[WILDCARD]) + at Object.action (ext:deno_web/02_timers.js:[WILDCARD]) + at handleTimerMacrotask (ext:deno_web/02_timers.js:[WILDCARD]) error: Uncaught (in promise) Error: Unhandled error in child worker. - at Worker.#pollControl (internal:runtime/11_workers.js:[WILDCARD]) + at Worker.#pollControl (ext:runtime/11_workers.js:[WILDCARD]) diff --git a/cli/tests/testdata/test/steps/failing_steps.out b/cli/tests/testdata/test/steps/failing_steps.out index a63058999..c68889c8d 100644 --- a/cli/tests/testdata/test/steps/failing_steps.out +++ b/cli/tests/testdata/test/steps/failing_steps.out @@ -37,13 +37,13 @@ failing step in failing test ... FAILED ([WILDCARD]) nested failure => ./test/steps/failing_steps.ts:[WILDCARD] error: Error: 1 test step failed. - at runTest (internal:cli/40_testing.js:[WILDCARD]) - at async runTests (internal:cli/40_testing.js:[WILDCARD]) + at runTest (ext:cli/40_testing.js:[WILDCARD]) + at async runTests (ext:cli/40_testing.js:[WILDCARD]) multiple test step failures => ./test/steps/failing_steps.ts:[WILDCARD] error: Error: 2 test steps failed. - at runTest (internal:cli/40_testing.js:[WILDCARD]) - at async runTests (internal:cli/40_testing.js:[WILDCARD]) + at runTest (ext:cli/40_testing.js:[WILDCARD]) + at async runTests (ext:cli/40_testing.js:[WILDCARD]) failing step in failing test => ./test/steps/failing_steps.ts:[WILDCARD] error: Error: Fail test. diff --git a/cli/tests/unit/opcall_test.ts b/cli/tests/unit/opcall_test.ts index fb7766e4f..8985c9780 100644 --- a/cli/tests/unit/opcall_test.ts +++ b/cli/tests/unit/opcall_test.ts @@ -16,8 +16,8 @@ Deno.test(async function sendAsyncStackTrace() { assertStringIncludes(s, "opcall_test.ts"); assertStringIncludes(s, "read"); assert( - !s.includes("internal:core"), - "opcall stack traces should NOT include internal:core internals such as unwrapOpResult", + !s.includes("ext:core"), + "opcall stack traces should NOT include ext:core internals such as unwrapOpResult", ); } }); diff --git a/cli/tools/coverage/mod.rs b/cli/tools/coverage/mod.rs index 1bd2779bf..c7a4d58da 100644 --- a/cli/tools/coverage/mod.rs +++ b/cli/tools/coverage/mod.rs @@ -594,7 +594,7 @@ fn filter_coverages( coverages .into_iter() .filter(|e| { - let is_internal = e.url.starts_with("internal:") + let is_internal = e.url.starts_with("ext:") || e.url.ends_with("__anonymous__") || e.url.ends_with("$deno$test.js") || e.url.ends_with(".snap"); diff --git a/cli/tools/test.rs b/cli/tools/test.rs index 6468da249..9ca806fb0 100644 --- a/cli/tools/test.rs +++ b/cli/tools/test.rs @@ -655,8 +655,7 @@ fn abbreviate_test_error(js_error: &JsError) -> JsError { // check if there are any stack frames coming from user code let should_filter = frames.iter().any(|f| { if let Some(file_name) = &f.file_name { - !(file_name.starts_with("[internal:") - || file_name.starts_with("internal:")) + !(file_name.starts_with("[ext:") || file_name.starts_with("ext:")) } else { true } @@ -668,8 +667,7 @@ fn abbreviate_test_error(js_error: &JsError) -> JsError { .rev() .skip_while(|f| { if let Some(file_name) = &f.file_name { - file_name.starts_with("[internal:") - || file_name.starts_with("internal:") + file_name.starts_with("[ext:") || file_name.starts_with("ext:") } else { false } |