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>
This commit is contained in:
Bartek Iwańczuk 2024-08-15 22:47:16 +01:00 committed by GitHub
parent 5ec3c5c3a4
commit 2bb013f9ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 214 additions and 142 deletions

View file

@ -1293,7 +1293,10 @@ impl CliOptions {
return Ok(None);
};
Ok(Some(InspectorServer::new(host, version::get_user_agent())?))
Ok(Some(InspectorServer::new(
host,
version::DENO_VERSION_INFO.user_agent,
)?))
}
pub fn maybe_lockfile(&self) -> Option<&Arc<CliLockfile>> {