diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-05-28 19:44:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-28 12:44:41 -0600 |
commit | b6a3f8f722db89bc136e91da598f581c5838d38e (patch) | |
tree | 668542949383621fab493343cc2ddf8a4928c649 /cli/tests | |
parent | bb0676d3e23dfd7fe27f9932b955694d51438486 (diff) |
refactor(core): remove ext: modules from the module map (#19040)
Rather than disallowing `ext:` resolution, clear the module map after
initializing extensions so extension modules are anonymized. This
operation is explicitly called in `deno_runtime`. Re-inject `node:`
specifiers into the module map after doing this.
Fixes #17717.
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/testdata/run/extension_dynamic_import.ts.out | 10 | ||||
-rw-r--r-- | cli/tests/testdata/run/extension_import.ts.out | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/cli/tests/testdata/run/extension_dynamic_import.ts.out b/cli/tests/testdata/run/extension_dynamic_import.ts.out index 081318960..4414ad923 100644 --- a/cli/tests/testdata/run/extension_dynamic_import.ts.out +++ b/cli/tests/testdata/run/extension_dynamic_import.ts.out @@ -1,4 +1,10 @@ -error: Uncaught (in promise) TypeError: Cannot load extension module from external code +error: Uncaught (in promise) TypeError: Unsupported scheme "ext" for module "ext:runtime/01_errors.js". Supported schemes: [ + "data", + "blob", + "file", + "http", + "https", +] await import("ext:runtime/01_errors.js"); ^ - at [WILDCARD]/extension_dynamic_import.ts:1:1 + at async [WILDCARD]/extension_dynamic_import.ts:1:1 diff --git a/cli/tests/testdata/run/extension_import.ts.out b/cli/tests/testdata/run/extension_import.ts.out index f1d9d5eb2..88039a9ce 100644 --- a/cli/tests/testdata/run/extension_import.ts.out +++ b/cli/tests/testdata/run/extension_import.ts.out @@ -5,4 +5,4 @@ error: Unsupported scheme "ext" for module "ext:runtime/01_errors.js". Supported "http", "https", ] - at [WILDCARD] + at [WILDCARD]/extension_import.ts:1:8 |