summaryrefslogtreecommitdiff
path: root/cli/compilers
diff options
context:
space:
mode:
Diffstat (limited to 'cli/compilers')
-rw-r--r--cli/compilers/js.rs2
-rw-r--r--cli/compilers/json.rs2
-rw-r--r--cli/compilers/mod.rs4
-rw-r--r--cli/compilers/ts.rs16
-rw-r--r--cli/compilers/wasm.rs6
5 files changed, 15 insertions, 15 deletions
diff --git a/cli/compilers/js.rs b/cli/compilers/js.rs
index e6142a57e..d90960bfc 100644
--- a/cli/compilers/js.rs
+++ b/cli/compilers/js.rs
@@ -7,7 +7,7 @@ use std::str;
pub struct JsCompiler {}
impl JsCompiler {
- pub async fn compile_async(
+ pub async fn compile(
&self,
source_file: SourceFile,
) -> Result<CompiledModule, ErrBox> {
diff --git a/cli/compilers/json.rs b/cli/compilers/json.rs
index 8d9ed1c4f..0b7a91af3 100644
--- a/cli/compilers/json.rs
+++ b/cli/compilers/json.rs
@@ -10,7 +10,7 @@ static JS_RESERVED_WORDS: &str = r"^(?:do|if|in|for|let|new|try|var|case|else|en
pub struct JsonCompiler {}
impl JsonCompiler {
- pub async fn compile_async(
+ pub async fn compile(
&self,
source_file: &SourceFile,
) -> Result<CompiledModule, ErrBox> {
diff --git a/cli/compilers/mod.rs b/cli/compilers/mod.rs
index f6fc28d37..e30c89173 100644
--- a/cli/compilers/mod.rs
+++ b/cli/compilers/mod.rs
@@ -11,8 +11,8 @@ mod wasm;
pub use js::JsCompiler;
pub use json::JsonCompiler;
-pub use ts::runtime_compile_async;
-pub use ts::runtime_transpile_async;
+pub use ts::runtime_compile;
+pub use ts::runtime_transpile;
pub use ts::TargetLib;
pub use ts::TsCompiler;
pub use wasm::WasmCompiler;
diff --git a/cli/compilers/ts.rs b/cli/compilers/ts.rs
index 2113aceb0..b08a12beb 100644
--- a/cli/compilers/ts.rs
+++ b/cli/compilers/ts.rs
@@ -269,7 +269,7 @@ impl TsCompiler {
worker
}
- pub async fn bundle_async(
+ pub async fn bundle(
&self,
global_state: GlobalState,
module_name: String,
@@ -322,7 +322,7 @@ impl TsCompiler {
///
/// If compilation is required then new V8 worker is spawned with fresh TS
/// compiler.
- pub async fn compile_async(
+ pub async fn compile(
&self,
global_state: GlobalState,
source_file: &SourceFile,
@@ -641,7 +641,7 @@ async fn execute_in_thread_json(
Ok(json!(json_str))
}
-pub fn runtime_compile_async<S: BuildHasher>(
+pub fn runtime_compile<S: BuildHasher>(
global_state: GlobalState,
root_name: &str,
sources: &Option<HashMap<String, String, S>>,
@@ -663,7 +663,7 @@ pub fn runtime_compile_async<S: BuildHasher>(
execute_in_thread_json(req_msg, global_state).boxed_local()
}
-pub fn runtime_transpile_async<S: BuildHasher>(
+pub fn runtime_transpile<S: BuildHasher>(
global_state: GlobalState,
sources: &HashMap<String, String, S>,
options: &Option<String>,
@@ -689,7 +689,7 @@ mod tests {
use tempfile::TempDir;
#[tokio::test]
- async fn test_compile_async() {
+ async fn test_compile() {
let p = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.parent()
.unwrap()
@@ -707,7 +707,7 @@ mod tests {
GlobalState::mock(vec![String::from("deno"), String::from("hello.js")]);
let result = mock_state
.ts_compiler
- .compile_async(mock_state.clone(), &out, TargetLib::Main)
+ .compile(mock_state.clone(), &out, TargetLib::Main)
.await;
assert!(result.is_ok());
assert!(result
@@ -718,7 +718,7 @@ mod tests {
}
#[tokio::test]
- async fn test_bundle_async() {
+ async fn test_bundle() {
let p = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.parent()
.unwrap()
@@ -736,7 +736,7 @@ mod tests {
let result = state
.ts_compiler
- .bundle_async(
+ .bundle(
state.clone(),
module_name,
Some(PathBuf::from("$deno$/bundle.js")),
diff --git a/cli/compilers/wasm.rs b/cli/compilers/wasm.rs
index bc056d4f9..bcdc8a51c 100644
--- a/cli/compilers/wasm.rs
+++ b/cli/compilers/wasm.rs
@@ -71,7 +71,7 @@ impl WasmCompiler {
worker
}
- pub async fn compile_async(
+ pub async fn compile(
&self,
global_state: GlobalState,
source_file: &SourceFile,
@@ -84,7 +84,7 @@ impl WasmCompiler {
if let Some(m) = maybe_cached {
return Ok(m);
}
- debug!(">>>>> wasm_compile_async START");
+ debug!(">>>>> wasm_compile START");
let base64_data = base64::encode(&source_file.source_code);
let url = source_file.url.clone();
let req_msg = serde_json::to_string(&base64_data)
@@ -108,7 +108,7 @@ impl WasmCompiler {
{
cache_.lock().unwrap().insert(url.clone(), module.clone());
}
- debug!("<<<<< wasm_compile_async END");
+ debug!("<<<<< wasm_compile END");
Ok(module)
}
}