diff options
| author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-05-16 00:09:35 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-16 07:09:35 +0000 |
| commit | 88983fb3eb5a085f7d358a7a98d5c738a21b5d27 (patch) | |
| tree | d4d83c5bd668edc25d30616fd4a3decc1cea3fb9 /cli/args | |
| parent | bba553bea5938932518dc6382e464968ce8374b4 (diff) | |
fix(node): seperate worker module cache (#23634)
Construct a new module graph container for workers instead of sharing it
with the main worker.
Fixes #17248
Fixes #23461
---------
Co-authored-by: David Sherret <dsherret@gmail.com>
Diffstat (limited to 'cli/args')
| -rw-r--r-- | cli/args/mod.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 434a4fa6a..0a0f7d704 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -12,6 +12,7 @@ use self::package_json::PackageJsonDeps; use ::import_map::ImportMap; use deno_ast::SourceMapOption; use deno_core::resolve_url_or_path; +use deno_graph::GraphKind; use deno_npm::resolution::ValidSerializedNpmResolutionSnapshot; use deno_npm::NpmSystemInfo; use deno_runtime::deno_tls::RootCertStoreProvider; @@ -873,6 +874,14 @@ impl CliOptions { self.maybe_config_file.as_ref().map(|f| f.specifier.clone()) } + pub fn graph_kind(&self) -> GraphKind { + match self.sub_command() { + DenoSubcommand::Cache(_) => GraphKind::All, + DenoSubcommand::Check(_) => GraphKind::TypesOnly, + _ => self.type_check_mode().as_graph_kind(), + } + } + pub fn ts_type_lib_window(&self) -> TsTypeLib { TsTypeLib::DenoWindow } |
