diff options
Diffstat (limited to 'cli/tools/registry/pm.rs')
-rw-r--r-- | cli/tools/registry/pm.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/tools/registry/pm.rs b/cli/tools/registry/pm.rs index 40493c6bf..4fdc02550 100644 --- a/cli/tools/registry/pm.rs +++ b/cli/tools/registry/pm.rs @@ -50,7 +50,7 @@ impl DenoConfigFormat { enum DenoOrPackageJson { Deno(deno_config::ConfigFile, DenoConfigFormat), - Npm(deno_node::PackageJson, Option<FmtOptionsConfig>), + Npm(Arc<deno_node::PackageJson>, Option<FmtOptionsConfig>), } impl DenoOrPackageJson { @@ -306,8 +306,8 @@ pub async fn add(flags: Flags, add_flags: AddFlags) -> Result<(), AnyError> { .await .context("Failed to update configuration file")?; - // TODO(bartlomieju): we should now cache the imports from the deno.json. - + // clear the previously cached package.json from memory before reloading it + deno_node::PackageJsonThreadLocalCache::clear(); // make a new CliFactory to pick up the updated config file let cli_factory = CliFactory::from_flags(flags)?; // cache deps |