From b7d8a0c6f6e90a65243264faa3f702d1a9471090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 25 Apr 2019 19:47:33 +0200 Subject: [PATCH] Rename deno prefetch to deno fetch (#2210) --- cli/flags.rs | 4 ++-- cli/main.rs | 10 +++++----- tools/{prefetch_test.py => fetch_test.py} | 8 ++++---- tools/test.py | 4 ++-- website/manual.md | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) rename tools/{prefetch_test.py => fetch_test.py} (81%) diff --git a/cli/flags.rs b/cli/flags.rs index 93c07f610f..00b94f8113 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -96,9 +96,9 @@ pub fn create_cli_app<'a, 'b>() -> App<'a, 'b> { .require_equals(true) .help("Set V8 command line options"), ).subcommand( - SubCommand::with_name("prefetch") + SubCommand::with_name("fetch") .setting(AppSettings::DisableVersion) - .about("Prefetch the dependencies") + .about("Fetch the dependencies") .arg(Arg::with_name("file").takes_value(true).required(true)), ).subcommand( SubCommand::with_name("types") diff --git a/cli/main.rs b/cli/main.rs index 41b04785c4..436abe718d 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -153,7 +153,7 @@ fn types_command() { println!("{}", content); } -fn prefetch_or_info_command( +fn fetch_or_info_command( flags: DenoFlags, argv: Vec, print_info: bool, @@ -299,12 +299,12 @@ fn main() { ("info", Some(info_match)) => { let file: &str = info_match.value_of("file").unwrap(); argv.extend(vec![file.to_string()]); - prefetch_or_info_command(flags, argv, true); + fetch_or_info_command(flags, argv, true); } - ("prefetch", Some(prefetch_match)) => { - let file: &str = prefetch_match.value_of("file").unwrap(); + ("fetch", Some(fetch_match)) => { + let file: &str = fetch_match.value_of("file").unwrap(); argv.extend(vec![file.to_string()]); - prefetch_or_info_command(flags, argv, false); + fetch_or_info_command(flags, argv, false); } ("fmt", Some(fmt_match)) => { let files: Vec = fmt_match diff --git a/tools/prefetch_test.py b/tools/fetch_test.py similarity index 81% rename from tools/prefetch_test.py rename to tools/fetch_test.py index 9c671dc002..9ecb6fff42 100755 --- a/tools/prefetch_test.py +++ b/tools/fetch_test.py @@ -6,14 +6,14 @@ from util import mkdtemp, tests_path, run_output, green_ok import shutil -def prefetch_test(deno_exe): - sys.stdout.write("prefetch_test...") +def fetch_test(deno_exe): + sys.stdout.write("fetch_test...") sys.stdout.flush() deno_dir = mkdtemp() try: t = os.path.join(tests_path, "006_url_imports.ts") - output = run_output([deno_exe, "prefetch", t], + output = run_output([deno_exe, "fetch", t], merge_env={"DENO_DIR": deno_dir}) assert output == "" # Check that we actually did the prefetch. @@ -27,4 +27,4 @@ def prefetch_test(deno_exe): if __name__ == "__main__": - prefetch_test(sys.argv[1]) + fetch_test(sys.argv[1]) diff --git a/tools/test.py b/tools/test.py index 770c9ca8c6..7fddfc2ff6 100755 --- a/tools/test.py +++ b/tools/test.py @@ -13,7 +13,7 @@ from unit_tests import unit_tests from util_test import util_test from benchmark_test import benchmark_test from repl_test import repl_tests -from prefetch_test import prefetch_test +from fetch_test import fetch_test from fmt_test import fmt_test import subprocess import http_server @@ -94,7 +94,7 @@ def main(argv): unit_tests(deno_exe) - prefetch_test(deno_exe) + fetch_test(deno_exe) fmt_test(deno_exe) integration_tests(deno_exe) diff --git a/website/manual.md b/website/manual.md index 9e8736dc9c..3c72a2a8b1 100644 --- a/website/manual.md +++ b/website/manual.md @@ -561,9 +561,9 @@ OPTIONS: SUBCOMMANDS: