summaryrefslogtreecommitdiff
path: root/cli/args/config_file.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-08-06 21:56:56 -0400
committerGitHub <noreply@github.com>2023-08-06 21:56:56 -0400
commitb9b03869489213fa9b24d7416afe9e3e27c81ce7 (patch)
tree7727f2906b0864b1242c9d8030ca6416ee053409 /cli/args/config_file.rs
parent7b5bc87f296d39e531051e1c0bb6cafa3808ab92 (diff)
feat(unstable): rename `deno_modules` to `vendor` (#20065)
Renames the unstable `deno_modules` directory and corresponding settings to `vendor` after feedback. Also causes the vendoring of the `node_modules` directory which can be disabled via `--node-modules-dir=false` or `"nodeModulesDir": false`.
Diffstat (limited to 'cli/args/config_file.rs')
-rw-r--r--cli/args/config_file.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/cli/args/config_file.rs b/cli/args/config_file.rs
index bbbc60e4d..6b3f96cd3 100644
--- a/cli/args/config_file.rs
+++ b/cli/args/config_file.rs
@@ -673,7 +673,7 @@ pub struct ConfigFileJson {
pub lock: Option<Value>,
pub exclude: Option<Value>,
pub node_modules_dir: Option<bool>,
- pub deno_modules_dir: Option<bool>,
+ pub vendor: Option<bool>,
}
#[derive(Clone, Debug)]
@@ -855,16 +855,16 @@ impl ConfigFile {
self.json.import_map.clone()
}
- pub fn node_modules_dir(&self) -> Option<bool> {
+ pub fn node_modules_dir_flag(&self) -> Option<bool> {
self.json.node_modules_dir
}
- pub fn deno_modules_dir(&self) -> Option<bool> {
- self.json.deno_modules_dir
+ pub fn vendor_dir_flag(&self) -> Option<bool> {
+ self.json.vendor
}
- pub fn deno_modules_dir_path(&self) -> Option<PathBuf> {
- if self.json.deno_modules_dir == Some(true) {
+ pub fn vendor_dir_path(&self) -> Option<PathBuf> {
+ if self.json.vendor == Some(true) {
Some(
self
.specifier
@@ -872,7 +872,7 @@ impl ConfigFile {
.unwrap()
.parent()
.unwrap()
- .join("deno_modules"),
+ .join("vendor"),
)
} else {
None
@@ -903,8 +903,8 @@ impl ConfigFile {
Vec::new()
};
- if self.deno_modules_dir() == Some(true) {
- exclude.push("deno_modules".to_string());
+ if self.vendor_dir_flag() == Some(true) {
+ exclude.push("vendor".to_string());
}
let raw_files_config = SerializedFilesConfig {