From 152a2c3566ed5df3e9315063cae9bddd946cfa0d Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 15 Sep 2022 12:36:46 -0400 Subject: [PATCH] chore: fixups for release This commit runs the formatter and linter, and also backs out some changes that build on top of features that are not included in this release line. --- cli/main.rs | 1 - cli/npm/cache.rs | 4 ---- cli/proc_state.rs | 7 ++----- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/cli/main.rs b/cli/main.rs index ba4aa51231..85890212fe 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -132,7 +132,6 @@ fn print_cache_info( ) -> Result<(), AnyError> { let deno_dir = &state.dir.root; let modules_cache = &state.file_fetcher.get_http_cache_location(); - let npm_cache = &state.npm_cache.as_readonly().get_cache_location(); let typescript_cache = &state.dir.gen_cache.location; let registry_cache = &state.dir.root.join(lsp::language_server::REGISTRIES_PATH); diff --git a/cli/npm/cache.rs b/cli/npm/cache.rs index aae9ddb4ea..8fa946642f 100644 --- a/cli/npm/cache.rs +++ b/cli/npm/cache.rs @@ -179,10 +179,6 @@ impl NpmCache { } } - pub fn as_readonly(&self) -> ReadonlyNpmCache { - self.readonly.clone() - } - pub async fn ensure_package( &self, id: &NpmPackageId, diff --git a/cli/proc_state.rs b/cli/proc_state.rs index bd5e0361f6..8f4505ae46 100644 --- a/cli/proc_state.rs +++ b/cli/proc_state.rs @@ -219,10 +219,7 @@ impl ProcState { let parsed_source_cache = ParsedSourceCache::new(Some(dir.dep_analysis_db_file_path())); let registry_url = NpmRegistryApi::default_url(); - let npm_cache = NpmCache::from_deno_dir( - &dir, - cli_options.cache_setting(), - ); + let npm_cache = NpmCache::from_deno_dir(&dir, cli_options.cache_setting()); let api = NpmRegistryApi::new( registry_url, npm_cache.clone(), @@ -235,7 +232,7 @@ impl ProcState { cli_options.unstable() // don't do the unstable error when in the lsp || matches!(cli_options.sub_command(), DenoSubcommand::Lsp), - cli_options.no_npm(), + false, ); let emit_options: deno_ast::EmitOptions = ts_config_result.ts_config.into();