diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-08-15 22:47:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-15 23:47:16 +0200 |
commit | 2bb013f9baa927fc7b392766b0182b91380b9aa8 (patch) | |
tree | ca8a7ea961b50213adf0904d724974c317cefb55 /cli/worker.rs | |
parent | 5ec3c5c3a46ca95f355a4520676b85ac619ca102 (diff) |
refactor: `version` module exports a single const struct (#25014)
This commit rewrites the internal `version` module that exported
various information about the current executable. Instead of exporting
several consts, we are now exporting a single const structure that
contains all the necessary information.
This is the first step towards cleaning up how we use this information
and should allow us to use SUI to be able to patch this information
in already produced binary making it easier to cut new releases.
---------
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Diffstat (limited to 'cli/worker.rs')
-rw-r--r-- | cli/worker.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/worker.rs b/cli/worker.rs index 7f04e8846..09aa1aec4 100644 --- a/cli/worker.rs +++ b/cli/worker.rs @@ -581,6 +581,7 @@ impl CliMainWorkerFactory { let options = WorkerOptions { bootstrap: BootstrapOptions { + deno_version: crate::version::DENO_VERSION_INFO.deno.to_string(), args: shared.options.argv.clone(), cpu_count: std::thread::available_parallelism() .map(|p| p.get()) @@ -596,7 +597,7 @@ impl CliMainWorkerFactory { color_level: colors::get_color_level(), unstable: shared.options.unstable, unstable_features, - user_agent: version::get_user_agent().to_string(), + user_agent: version::DENO_VERSION_INFO.user_agent.to_string(), inspect: shared.options.is_inspecting, has_node_modules_dir: shared.options.has_node_modules_dir, argv0: shared.options.argv0.clone(), @@ -778,6 +779,7 @@ fn create_web_worker_callback( let options = WebWorkerOptions { bootstrap: BootstrapOptions { + deno_version: crate::version::DENO_VERSION_INFO.deno.to_string(), args: shared.options.argv.clone(), cpu_count: std::thread::available_parallelism() .map(|p| p.get()) @@ -793,7 +795,7 @@ fn create_web_worker_callback( is_stderr_tty: deno_terminal::is_stderr_tty(), unstable: shared.options.unstable, unstable_features, - user_agent: version::get_user_agent().to_string(), + user_agent: version::DENO_VERSION_INFO.user_agent.to_string(), inspect: shared.options.is_inspecting, has_node_modules_dir: shared.options.has_node_modules_dir, argv0: shared.options.argv0.clone(), |