summaryrefslogtreecommitdiff
path: root/cli/compiler.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2019-06-12 21:00:08 +0200
committerRyan Dahl <ry@tinyclouds.org>2019-06-12 12:00:08 -0700
commitb3c4307d02d627287cd28486b208b53c3bd378f0 (patch)
tree2ae6de97a03f5a8f9188e3a1a02ae7fe575259f9 /cli/compiler.rs
parent2a5138a5166f0945d5fda68c89fa8e23c66fb681 (diff)
Refactor module resolving (#2493)
Adds ModuleSpecifier, which wraps a URL. This is now passed around instead of specifier and resolver strings.
Diffstat (limited to 'cli/compiler.rs')
-rw-r--r--cli/compiler.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/compiler.rs b/cli/compiler.rs
index 4233262a3..a33ccfcb0 100644
--- a/cli/compiler.rs
+++ b/cli/compiler.rs
@@ -247,8 +247,8 @@ mod tests {
fn test_compile_sync() {
tokio_util::init(|| {
let specifier = "./tests/002_hello.ts";
- use crate::worker;
- let module_name = worker::root_specifier_to_url(specifier)
+ use crate::module_specifier::ModuleSpecifier;
+ let module_name = ModuleSpecifier::resolve_root(specifier)
.unwrap()
.to_string();
@@ -294,8 +294,8 @@ mod tests {
#[test]
fn test_bundle_async() {
let specifier = "./tests/002_hello.ts";
- use crate::worker;
- let module_name = worker::root_specifier_to_url(specifier)
+ use crate::module_specifier::ModuleSpecifier;
+ let module_name = ModuleSpecifier::resolve_root(specifier)
.unwrap()
.to_string();