diff options
author | Asher Gomez <ashersaupingomez@gmail.com> | 2024-09-03 01:27:37 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-02 17:27:37 +0200 |
commit | bc51eca70000e809ef3b64f66e9482316768e02a (patch) | |
tree | d9972377959be338e7192e7e53f94584432c263c /cli/bench | |
parent | 503f95a54fe290471b0807157e37d2d996ff0357 (diff) |
BREAKING: remove `deno bundle` (#25339)
`deno bundle` now produces:
```
error: ⚠️ `deno bundle` was removed in Deno 2.
See the Deno 1.x to 2.x Migration Guide for migration instructions: https://docs.deno.com/runtime/manual/advanced/migrate_deprecations
```
`deno bundle --help` now produces:
```
⚠️ `deno bundle` was removed in Deno 2.
See the Deno 1.x to 2.x Migration Guide for migration instructions: https://docs.deno.com/runtime/manual/advanced/migrate_deprecations
Usage: deno bundle [OPTIONS]
Options:
-q, --quiet Suppress diagnostic output
--unstable Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features
To view the list of individual unstable feature flags, run this command again with --help=unstable
```
Diffstat (limited to 'cli/bench')
-rw-r--r-- | cli/bench/main.rs | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/cli/bench/main.rs b/cli/bench/main.rs index 68f4c6ce3..72fa7e963 100644 --- a/cli/bench/main.rs +++ b/cli/bench/main.rs @@ -143,29 +143,6 @@ const EXEC_TIME_BENCHMARKS: &[(&str, &[&str], Option<i32>)] = &[ ], None, ), - ( - "bundle", - &[ - "bundle", - "--unstable", - "--config", - "tests/config/deno.json", - "tests/util/std/http/file_server_test.ts", - ], - None, - ), - ( - "bundle_no_check", - &[ - "bundle", - "--no-check", - "--unstable", - "--config", - "tests/config/deno.json", - "tests/util/std/http/file_server_test.ts", - ], - None, - ), ]; const RESULT_KEYS: &[&str] = @@ -314,40 +291,6 @@ fn get_binary_sizes(target_dir: &Path) -> Result<HashMap<String, i64>> { Ok(sizes) } -const BUNDLES: &[(&str, &str)] = &[ - ("file_server", "./tests/util/std/http/file_server.ts"), - ("welcome", "./tests/testdata/welcome.ts"), -]; -fn bundle_benchmark(deno_exe: &Path) -> Result<HashMap<String, i64>> { - let mut sizes = HashMap::<String, i64>::new(); - - for (name, url) in BUNDLES { - let path = format!("{name}.bundle.js"); - test_util::run( - &[ - deno_exe.to_str().unwrap(), - "bundle", - "--unstable", - "--config", - "tests/config/deno.json", - url, - &path, - ], - None, - None, - None, - true, - ); - - let file = PathBuf::from(path); - assert!(file.is_file()); - sizes.insert(name.to_string(), file.metadata()?.len() as i64); - let _ = fs::remove_file(file); - } - - Ok(sizes) -} - fn run_max_mem_benchmark(deno_exe: &Path) -> Result<HashMap<String, i64>> { let mut results = HashMap::<String, i64>::new(); @@ -415,7 +358,6 @@ async fn main() -> Result<()> { let mut args = env::args(); let mut benchmarks = vec![ - "bundle", "exec_time", "binary_size", "cargo_deps", @@ -465,11 +407,6 @@ async fn main() -> Result<()> { ..Default::default() }; - if benchmarks.contains(&"bundle") { - let bundle_size = bundle_benchmark(&deno_exe)?; - new_data.bundle_size = bundle_size; - } - if benchmarks.contains(&"exec_time") { let exec_times = run_exec_time(&deno_exe, &target_dir)?; new_data.benchmark = exec_times; |