summaryrefslogtreecommitdiff
path: root/cli/factory.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-07-19 15:56:07 -0400
committerGitHub <noreply@github.com>2024-07-19 15:56:07 -0400
commitafcae364beb2cffa8e583b4ffd3a55b59336cb1b (patch)
treef98ba0e5af179b9172f130b63fb35cd77c122932 /cli/factory.rs
parenta4c76add565b9674ef6880de88013948c61a1ce5 (diff)
refactor: update to deno_config 0.25 (#24645)
- Gets rid of WorkspaceMemberContext. It's now `Workspace` and `WorkspaceDirectory` - Uses the workspace cache in the lsp * https://github.com/denoland/deno_config/pull/95 * https://github.com/denoland/deno_config/pull/96
Diffstat (limited to 'cli/factory.rs')
-rw-r--r--cli/factory.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/cli/factory.rs b/cli/factory.rs
index df7b2c868..15c36cfd2 100644
--- a/cli/factory.rs
+++ b/cli/factory.rs
@@ -54,10 +54,10 @@ use crate::worker::CliMainWorkerOptions;
use std::collections::BTreeSet;
use std::path::PathBuf;
+use deno_config::deno_json::ConfigFile;
use deno_config::package_json::PackageJsonDepValue;
use deno_config::workspace::PackageJsonDepResolution;
use deno_config::workspace::WorkspaceResolver;
-use deno_config::ConfigFile;
use deno_core::error::AnyError;
use deno_core::futures::FutureExt;
use deno_core::FeatureChecker;
@@ -341,7 +341,8 @@ impl CliFactory {
// initialize the lockfile with the workspace's configuration
if let Some(lockfile) = &maybe_lockfile {
- let (root_url, root_folder) = self.options.workspace.root_folder();
+ let root_url = self.options.workspace().root_dir();
+ let root_folder = self.options.workspace().root_folder_configs();
let config = deno_lockfile::WorkspaceConfig {
root: WorkspaceMemberConfig {
package_json_deps: pkg_json_deps(root_folder.pkg_json.as_deref()),
@@ -349,7 +350,7 @@ impl CliFactory {
},
members: self
.options
- .workspace
+ .workspace()
.config_folders()
.iter()
.filter(|(folder_url, _)| *folder_url != root_url)
@@ -440,7 +441,7 @@ impl CliFactory {
text_only_progress_bar: self.text_only_progress_bar().clone(),
maybe_node_modules_path: self.options.node_modules_dir_path().cloned(),
package_json_deps_provider: Arc::new(PackageJsonInstallDepsProvider::from_workspace(
- &self.options.workspace,
+ self.options.workspace(),
)),
npm_system_info: self.options.npm_system_info(),
npmrc: self.options.npmrc().clone(),
@@ -510,7 +511,7 @@ impl CliFactory {
.unstable_bare_node_builtins(),
maybe_jsx_import_source_config: self
.options
- .workspace
+ .workspace()
.to_maybe_jsx_import_source_config()?,
maybe_vendor_dir: self.options.vendor_dir_path(),
})))