summaryrefslogtreecommitdiff
path: root/cli/worker.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-03-13 21:12:09 -0400
committerGitHub <noreply@github.com>2023-03-14 01:12:09 +0000
commit48ede89f1f192df28cc74822d7bb79b0b4bd0957 (patch)
treed6dd65cf03152fb0253aba551f7ed016e3b7b09f /cli/worker.rs
parentc4771356f27b250e7fdbcede0de5682982720455 (diff)
refactor(core): resolve_url_or_path and resolve_url_or_path_deprecated (#18170)
This commit changes current "deno_core::resolve_url_or_path" API to "resolve_url_or_path_deprecated" and adds new "resolve_url_or_path" API that requires to explicitly pass the directory from which paths should be resolved to. Some of the call sites were updated to use the new API, the reminder of them will be updated in a follow up PR. Towards landing https://github.com/denoland/deno/pull/15454
Diffstat (limited to 'cli/worker.rs')
-rw-r--r--cli/worker.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/cli/worker.rs b/cli/worker.rs
index 151f70f05..3643a4316 100644
--- a/cli/worker.rs
+++ b/cli/worker.rs
@@ -729,7 +729,6 @@ fn create_web_worker_callback(
mod tests {
use super::*;
use deno_core::resolve_path;
- use deno_core::resolve_url_or_path;
use deno_core::FsModuleLoader;
use deno_runtime::deno_broadcast_channel::InMemoryBroadcastChannel;
use deno_runtime::deno_web::BlobStore;
@@ -787,7 +786,7 @@ mod tests {
#[tokio::test]
async fn execute_mod_esm_imports_a() {
let p = test_util::testdata_path().join("runtime/esm_imports_a.js");
- let module_specifier = resolve_url_or_path(&p.to_string_lossy()).unwrap();
+ let module_specifier = ModuleSpecifier::from_file_path(&p).unwrap();
let mut worker = create_test_worker();
let result = worker.execute_main_module(&module_specifier).await;
if let Err(err) = result {