summaryrefslogtreecommitdiff
path: root/cli/tools/installer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/installer.rs')
-rw-r--r--cli/tools/installer.rs46
1 files changed, 27 insertions, 19 deletions
diff --git a/cli/tools/installer.rs b/cli/tools/installer.rs
index 2dc86f0dc..bf39abc65 100644
--- a/cli/tools/installer.rs
+++ b/cli/tools/installer.rs
@@ -308,11 +308,9 @@ fn resolve_shim_data(
// we should avoid a default branch here to ensure we continue to cover any
// changes to this flag.
match flags.type_check_mode {
- TypeCheckMode::All => (),
- TypeCheckMode::None => executable_args.push("--no-check".to_string()),
- TypeCheckMode::Local => {
- executable_args.push("--no-check=remote".to_string())
- }
+ TypeCheckMode::All => executable_args.push("--check=all".to_string()),
+ TypeCheckMode::None => {}
+ TypeCheckMode::Local => executable_args.push("--check".to_string()),
}
if flags.unstable {
@@ -515,11 +513,12 @@ mod tests {
println!("this is the file path {:?}", content);
if cfg!(windows) {
assert!(content.contains(
- r#""run" "--unstable" "http://localhost:4545/echo_server.ts""#
+ r#""run" "--check" "--unstable" "http://localhost:4545/echo_server.ts""#
));
} else {
- assert!(content
- .contains(r#"run --unstable 'http://localhost:4545/echo_server.ts'"#));
+ assert!(content.contains(
+ r#"run --check --unstable 'http://localhost:4545/echo_server.ts'"#
+ ));
}
}
@@ -540,7 +539,7 @@ mod tests {
assert_eq!(shim_data.name, "echo_server");
assert_eq!(
shim_data.args,
- vec!["run", "http://localhost:4545/echo_server.ts",]
+ vec!["run", "--check", "http://localhost:4545/echo_server.ts",]
);
}
@@ -561,7 +560,7 @@ mod tests {
assert_eq!(shim_data.name, "subdir");
assert_eq!(
shim_data.args,
- vec!["run", "http://localhost:4545/subdir/main.ts",]
+ vec!["run", "--check", "http://localhost:4545/subdir/main.ts",]
);
}
@@ -582,7 +581,7 @@ mod tests {
assert_eq!(shim_data.name, "echo_test");
assert_eq!(
shim_data.args,
- vec!["run", "http://localhost:4545/echo_server.ts",]
+ vec!["run", "--check", "http://localhost:4545/echo_server.ts",]
);
}
@@ -615,7 +614,6 @@ mod tests {
"--allow-read",
"--allow-net",
"--quiet",
- "--no-check",
"--compat",
"http://localhost:4545/echo_server.ts",
"--foobar",
@@ -642,7 +640,12 @@ mod tests {
assert_eq!(
shim_data.args,
- vec!["run", "--no-prompt", "http://localhost:4545/echo_server.ts",]
+ vec![
+ "run",
+ "--check",
+ "--no-prompt",
+ "http://localhost:4545/echo_server.ts",
+ ]
);
}
@@ -665,7 +668,12 @@ mod tests {
assert_eq!(
shim_data.args,
- vec!["run", "--allow-all", "http://localhost:4545/echo_server.ts",]
+ vec![
+ "run",
+ "--allow-all",
+ "--check",
+ "http://localhost:4545/echo_server.ts",
+ ]
);
}
@@ -828,9 +836,8 @@ mod tests {
if cfg!(windows) {
// TODO: see comment above this test
} else {
- assert!(
- content.contains(r#"run 'http://localhost:4545/echo_server.ts' '"'"#)
- );
+ assert!(content
+ .contains(r#"run --check 'http://localhost:4545/echo_server.ts' '"'"#));
}
}
@@ -949,9 +956,10 @@ mod tests {
}
assert!(file_path.exists());
- let mut expected_string = format!("run '{}'", &file_module_string);
+ let mut expected_string = format!("run --check '{}'", &file_module_string);
if cfg!(windows) {
- expected_string = format!("\"run\" \"{}\"", &file_module_string);
+ expected_string =
+ format!("\"run\" \"--check\" \"{}\"", &file_module_string);
}
let content = fs::read_to_string(file_path).unwrap();