mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
feat(config): Node modules option for 2.0 (#25299)
This commit is contained in:
parent
0fb8df6c0c
commit
86d5b919d8
13 changed files with 158 additions and 56 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -1375,9 +1375,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "deno_config"
|
name = "deno_config"
|
||||||
version = "0.30.1"
|
version = "0.31.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9657dbcc5210407fd9a1b1571310f2fe25c6dd6be2195c964d19f43d70045a95"
|
checksum = "efba70c2fbec59e6d0c6040376644803f2cebbb4d55a651cbab4794e390a8592"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"deno_package_json",
|
"deno_package_json",
|
||||||
|
|
|
@ -65,7 +65,7 @@ winres.workspace = true
|
||||||
[dependencies]
|
[dependencies]
|
||||||
deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "proposal", "react", "sourcemap", "transforms", "typescript", "view", "visit"] }
|
deno_ast = { workspace = true, features = ["bundler", "cjs", "codegen", "proposal", "react", "sourcemap", "transforms", "typescript", "view", "visit"] }
|
||||||
deno_cache_dir = { workspace = true }
|
deno_cache_dir = { workspace = true }
|
||||||
deno_config = { version = "=0.30.1", features = ["workspace", "sync"] }
|
deno_config = { version = "=0.31.0", features = ["workspace", "sync"] }
|
||||||
deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] }
|
deno_core = { workspace = true, features = ["include_js_files_for_snapshotting"] }
|
||||||
deno_doc = { version = "0.147.0", features = ["html", "syntect"] }
|
deno_doc = { version = "0.147.0", features = ["html", "syntect"] }
|
||||||
deno_emit = "=0.44.0"
|
deno_emit = "=0.44.0"
|
||||||
|
|
|
@ -10,6 +10,7 @@ use clap::ColorChoice;
|
||||||
use clap::Command;
|
use clap::Command;
|
||||||
use clap::ValueHint;
|
use clap::ValueHint;
|
||||||
use color_print::cstr;
|
use color_print::cstr;
|
||||||
|
use deno_config::deno_json::NodeModulesMode;
|
||||||
use deno_config::glob::FilePatterns;
|
use deno_config::glob::FilePatterns;
|
||||||
use deno_config::glob::PathOrPatternSet;
|
use deno_config::glob::PathOrPatternSet;
|
||||||
use deno_core::anyhow::bail;
|
use deno_core::anyhow::bail;
|
||||||
|
@ -602,6 +603,7 @@ pub struct Flags {
|
||||||
pub type_check_mode: TypeCheckMode,
|
pub type_check_mode: TypeCheckMode,
|
||||||
pub config_flag: ConfigFlag,
|
pub config_flag: ConfigFlag,
|
||||||
pub node_modules_dir: Option<bool>,
|
pub node_modules_dir: Option<bool>,
|
||||||
|
pub node_modules_mode: Option<NodeModulesMode>,
|
||||||
pub vendor: Option<bool>,
|
pub vendor: Option<bool>,
|
||||||
pub enable_op_summary_metrics: bool,
|
pub enable_op_summary_metrics: bool,
|
||||||
pub enable_testing_features: bool,
|
pub enable_testing_features: bool,
|
||||||
|
@ -2363,7 +2365,7 @@ TypeScript compiler cache: Subdirectory containing TS compiler output.",
|
||||||
.arg(no_lock_arg())
|
.arg(no_lock_arg())
|
||||||
.arg(config_arg())
|
.arg(config_arg())
|
||||||
.arg(import_map_arg())
|
.arg(import_map_arg())
|
||||||
.arg(node_modules_dir_arg())
|
.args(node_modules_args())
|
||||||
.arg(vendor_arg())
|
.arg(vendor_arg())
|
||||||
.arg(
|
.arg(
|
||||||
Arg::new("json")
|
Arg::new("json")
|
||||||
|
@ -3178,7 +3180,7 @@ Remote modules and multiple modules may also be specified:
|
||||||
.arg(config_arg())
|
.arg(config_arg())
|
||||||
.arg(import_map_arg())
|
.arg(import_map_arg())
|
||||||
.arg(lock_arg())
|
.arg(lock_arg())
|
||||||
.arg(node_modules_dir_arg())
|
.args(node_modules_args())
|
||||||
.arg(vendor_arg())
|
.arg(vendor_arg())
|
||||||
.arg(reload_arg())
|
.arg(reload_arg())
|
||||||
.arg(ca_file_arg())
|
.arg(ca_file_arg())
|
||||||
|
@ -3240,7 +3242,7 @@ fn compile_args_without_check_args(app: Command) -> Command {
|
||||||
.arg(import_map_arg())
|
.arg(import_map_arg())
|
||||||
.arg(no_remote_arg())
|
.arg(no_remote_arg())
|
||||||
.arg(no_npm_arg())
|
.arg(no_npm_arg())
|
||||||
.arg(node_modules_dir_arg())
|
.args(node_modules_args())
|
||||||
.arg(vendor_arg())
|
.arg(vendor_arg())
|
||||||
.arg(config_arg())
|
.arg(config_arg())
|
||||||
.arg(no_config_arg())
|
.arg(no_config_arg())
|
||||||
|
@ -3916,16 +3918,49 @@ fn no_npm_arg() -> Arg {
|
||||||
.help_heading(DEPENDENCY_MANAGEMENT_HEADING)
|
.help_heading(DEPENDENCY_MANAGEMENT_HEADING)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn node_modules_dir_arg() -> Arg {
|
fn node_modules_arg_parse(flags: &mut Flags, matches: &mut ArgMatches) {
|
||||||
Arg::new("node-modules-dir")
|
if *DENO_FUTURE {
|
||||||
.long("node-modules-dir")
|
let value = matches.remove_one::<NodeModulesMode>("node-modules");
|
||||||
.num_args(0..=1)
|
if let Some(mode) = value {
|
||||||
.value_parser(value_parser!(bool))
|
flags.node_modules_mode = Some(mode);
|
||||||
.value_name("DIRECTORY")
|
}
|
||||||
.default_missing_value("true")
|
} else {
|
||||||
.require_equals(true)
|
flags.node_modules_dir = matches.remove_one::<bool>("node-modules-dir");
|
||||||
.help("Enables or disables the use of a local node_modules folder for npm packages")
|
}
|
||||||
.help_heading(DEPENDENCY_MANAGEMENT_HEADING)
|
}
|
||||||
|
|
||||||
|
fn node_modules_args() -> Vec<Arg> {
|
||||||
|
if *DENO_FUTURE {
|
||||||
|
vec![
|
||||||
|
Arg::new("node-modules")
|
||||||
|
.long("node-modules")
|
||||||
|
.num_args(0..=1)
|
||||||
|
.value_parser(NodeModulesMode::parse)
|
||||||
|
.value_name("MODE")
|
||||||
|
.require_equals(true)
|
||||||
|
.help("Sets the node modules management mode for npm packages")
|
||||||
|
.help_heading(DEPENDENCY_MANAGEMENT_HEADING),
|
||||||
|
Arg::new("node-modules-dir")
|
||||||
|
.long("node-modules-dir")
|
||||||
|
.num_args(0..=1)
|
||||||
|
.value_parser(clap::builder::UnknownArgumentValueParser::suggest_arg(
|
||||||
|
"--node-modules",
|
||||||
|
))
|
||||||
|
.require_equals(true),
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
vec![
|
||||||
|
Arg::new("node-modules-dir")
|
||||||
|
.long("node-modules-dir")
|
||||||
|
.num_args(0..=1)
|
||||||
|
.value_parser(value_parser!(bool))
|
||||||
|
.value_name("ENABLED")
|
||||||
|
.default_missing_value("true")
|
||||||
|
.require_equals(true)
|
||||||
|
.help("Enables or disables the use of a local node_modules folder for npm packages")
|
||||||
|
.help_heading(DEPENDENCY_MANAGEMENT_HEADING)
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn vendor_arg() -> Arg {
|
fn vendor_arg() -> Arg {
|
||||||
|
@ -5315,7 +5350,7 @@ fn node_modules_and_vendor_dir_arg_parse(
|
||||||
flags: &mut Flags,
|
flags: &mut Flags,
|
||||||
matches: &mut ArgMatches,
|
matches: &mut ArgMatches,
|
||||||
) {
|
) {
|
||||||
flags.node_modules_dir = matches.remove_one::<bool>("node-modules-dir");
|
node_modules_arg_parse(flags, matches);
|
||||||
flags.vendor = matches.remove_one::<bool>("vendor");
|
flags.vendor = matches.remove_one::<bool>("vendor");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ mod lockfile;
|
||||||
mod package_json;
|
mod package_json;
|
||||||
|
|
||||||
use deno_ast::SourceMapOption;
|
use deno_ast::SourceMapOption;
|
||||||
|
use deno_config::deno_json::NodeModulesMode;
|
||||||
use deno_config::workspace::CreateResolverOptions;
|
use deno_config::workspace::CreateResolverOptions;
|
||||||
use deno_config::workspace::PackageJsonDepResolution;
|
use deno_config::workspace::PackageJsonDepResolution;
|
||||||
use deno_config::workspace::VendorEnablement;
|
use deno_config::workspace::VendorEnablement;
|
||||||
|
@ -819,6 +820,7 @@ impl CliOptions {
|
||||||
let maybe_node_modules_folder = resolve_node_modules_folder(
|
let maybe_node_modules_folder = resolve_node_modules_folder(
|
||||||
&initial_cwd,
|
&initial_cwd,
|
||||||
&flags,
|
&flags,
|
||||||
|
&start_dir.workspace,
|
||||||
root_folder.deno_json.as_deref(),
|
root_folder.deno_json.as_deref(),
|
||||||
root_folder.pkg_json.as_deref(),
|
root_folder.pkg_json.as_deref(),
|
||||||
&deno_dir_provider,
|
&deno_dir_provider,
|
||||||
|
@ -917,6 +919,10 @@ impl CliOptions {
|
||||||
};
|
};
|
||||||
|
|
||||||
for diagnostic in start_dir.workspace.diagnostics() {
|
for diagnostic in start_dir.workspace.diagnostics() {
|
||||||
|
// TODO(2.0): remove
|
||||||
|
if matches!(diagnostic.kind, deno_config::workspace::WorkspaceDiagnosticKind::DeprecatedNodeModulesDirOption(_)) && !*DENO_FUTURE {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
log::warn!("{} {}", colors::yellow("Warning"), diagnostic);
|
log::warn!("{} {}", colors::yellow("Warning"), diagnostic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1255,11 +1261,29 @@ impl CliOptions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn node_modules_dir_enablement(&self) -> Option<bool> {
|
pub fn node_modules_mode(&self) -> Result<Option<NodeModulesMode>, AnyError> {
|
||||||
self
|
if *DENO_FUTURE {
|
||||||
.flags
|
if let Some(flag) = self.flags.node_modules_mode {
|
||||||
.node_modules_dir
|
return Ok(Some(flag));
|
||||||
.or_else(|| self.workspace().node_modules_dir())
|
}
|
||||||
|
self.workspace().node_modules_mode().map_err(Into::into)
|
||||||
|
} else {
|
||||||
|
Ok(
|
||||||
|
self
|
||||||
|
.flags
|
||||||
|
.node_modules_dir
|
||||||
|
.or_else(|| self.workspace().node_modules_dir())
|
||||||
|
.map(|enabled| {
|
||||||
|
if enabled && self.byonm_enabled() {
|
||||||
|
NodeModulesMode::LocalManual
|
||||||
|
} else if enabled {
|
||||||
|
NodeModulesMode::LocalAuto
|
||||||
|
} else {
|
||||||
|
NodeModulesMode::GlobalAuto
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn vendor_dir_path(&self) -> Option<&PathBuf> {
|
pub fn vendor_dir_path(&self) -> Option<&PathBuf> {
|
||||||
|
@ -1611,9 +1635,19 @@ impl CliOptions {
|
||||||
|| self.workspace().has_unstable("bare-node-builtins")
|
|| self.workspace().has_unstable("bare-node-builtins")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn byonm_enabled(&self) -> bool {
|
||||||
|
// check if enabled via unstable
|
||||||
|
self.flags.unstable_config.byonm
|
||||||
|
|| NPM_PROCESS_STATE
|
||||||
|
.as_ref()
|
||||||
|
.map(|s| matches!(s.kind, NpmProcessStateKind::Byonm))
|
||||||
|
.unwrap_or(false)
|
||||||
|
|| self.workspace().has_unstable("byonm")
|
||||||
|
}
|
||||||
|
|
||||||
pub fn use_byonm(&self) -> bool {
|
pub fn use_byonm(&self) -> bool {
|
||||||
if self.enable_future_features()
|
if self.enable_future_features()
|
||||||
&& self.node_modules_dir_enablement().is_none()
|
&& self.node_modules_mode().ok().flatten().is_none()
|
||||||
&& self.maybe_node_modules_folder.is_some()
|
&& self.maybe_node_modules_folder.is_some()
|
||||||
&& self
|
&& self
|
||||||
.workspace()
|
.workspace()
|
||||||
|
@ -1624,13 +1658,7 @@ impl CliOptions {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if enabled via unstable
|
self.byonm_enabled()
|
||||||
self.flags.unstable_config.byonm
|
|
||||||
|| NPM_PROCESS_STATE
|
|
||||||
.as_ref()
|
|
||||||
.map(|s| matches!(s.kind, NpmProcessStateKind::Byonm))
|
|
||||||
.unwrap_or(false)
|
|
||||||
|| self.workspace().has_unstable("byonm")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn unstable_sloppy_imports(&self) -> bool {
|
pub fn unstable_sloppy_imports(&self) -> bool {
|
||||||
|
@ -1762,15 +1790,28 @@ impl CliOptions {
|
||||||
fn resolve_node_modules_folder(
|
fn resolve_node_modules_folder(
|
||||||
cwd: &Path,
|
cwd: &Path,
|
||||||
flags: &Flags,
|
flags: &Flags,
|
||||||
|
workspace: &Workspace,
|
||||||
maybe_config_file: Option<&ConfigFile>,
|
maybe_config_file: Option<&ConfigFile>,
|
||||||
maybe_package_json: Option<&PackageJson>,
|
maybe_package_json: Option<&PackageJson>,
|
||||||
deno_dir_provider: &Arc<DenoDirProvider>,
|
deno_dir_provider: &Arc<DenoDirProvider>,
|
||||||
) -> Result<Option<PathBuf>, AnyError> {
|
) -> Result<Option<PathBuf>, AnyError> {
|
||||||
let use_node_modules_dir = flags
|
let use_node_modules_dir = if *DENO_FUTURE {
|
||||||
.node_modules_dir
|
if let Some(mode) = flags.node_modules_mode {
|
||||||
.or_else(|| maybe_config_file.and_then(|c| c.json.node_modules_dir))
|
Some(mode.uses_node_modules_dir())
|
||||||
.or(flags.vendor)
|
} else {
|
||||||
.or_else(|| maybe_config_file.and_then(|c| c.json.vendor));
|
workspace
|
||||||
|
.node_modules_mode()?
|
||||||
|
.map(|m| m.uses_node_modules_dir())
|
||||||
|
.or(flags.vendor)
|
||||||
|
.or_else(|| maybe_config_file.and_then(|c| c.json.vendor))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
flags
|
||||||
|
.node_modules_dir
|
||||||
|
.or_else(|| maybe_config_file.and_then(|c| c.json.node_modules_dir))
|
||||||
|
.or(flags.vendor)
|
||||||
|
.or_else(|| maybe_config_file.and_then(|c| c.json.vendor))
|
||||||
|
};
|
||||||
let path = if use_node_modules_dir == Some(false) {
|
let path = if use_node_modules_dir == Some(false) {
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
} else if let Some(state) = &*NPM_PROCESS_STATE {
|
} else if let Some(state) = &*NPM_PROCESS_STATE {
|
||||||
|
|
|
@ -541,7 +541,12 @@ impl ModuleGraphBuilder {
|
||||||
) -> Result<(), AnyError> {
|
) -> Result<(), AnyError> {
|
||||||
// ensure an "npm install" is done if the user has explicitly
|
// ensure an "npm install" is done if the user has explicitly
|
||||||
// opted into using a node_modules directory
|
// opted into using a node_modules directory
|
||||||
if self.options.node_modules_dir_enablement() == Some(true) {
|
if self
|
||||||
|
.options
|
||||||
|
.node_modules_mode()?
|
||||||
|
.map(|m| m.uses_node_modules_dir())
|
||||||
|
.unwrap_or(false)
|
||||||
|
{
|
||||||
if let Some(npm_resolver) = self.npm_resolver.as_managed() {
|
if let Some(npm_resolver) = self.npm_resolver.as_managed() {
|
||||||
npm_resolver.ensure_top_level_package_json_install().await?;
|
npm_resolver.ensure_top_level_package_json_install().await?;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ use deno_config::deno_json::DenoJsonCache;
|
||||||
use deno_config::deno_json::FmtConfig;
|
use deno_config::deno_json::FmtConfig;
|
||||||
use deno_config::deno_json::FmtOptionsConfig;
|
use deno_config::deno_json::FmtOptionsConfig;
|
||||||
use deno_config::deno_json::LintConfig;
|
use deno_config::deno_json::LintConfig;
|
||||||
|
use deno_config::deno_json::NodeModulesMode;
|
||||||
use deno_config::deno_json::TestConfig;
|
use deno_config::deno_json::TestConfig;
|
||||||
use deno_config::deno_json::TsConfig;
|
use deno_config::deno_json::TsConfig;
|
||||||
use deno_config::fs::DenoConfigFs;
|
use deno_config::fs::DenoConfigFs;
|
||||||
|
@ -1390,8 +1391,16 @@ impl ConfigData {
|
||||||
let byonm = std::env::var("DENO_UNSTABLE_BYONM").is_ok()
|
let byonm = std::env::var("DENO_UNSTABLE_BYONM").is_ok()
|
||||||
|| member_dir.workspace.has_unstable("byonm")
|
|| member_dir.workspace.has_unstable("byonm")
|
||||||
|| (*DENO_FUTURE
|
|| (*DENO_FUTURE
|
||||||
&& member_dir.workspace.package_jsons().next().is_some()
|
&& matches!(
|
||||||
&& member_dir.workspace.node_modules_dir().is_none());
|
member_dir.workspace.node_modules_mode().unwrap_or_default(),
|
||||||
|
Some(NodeModulesMode::LocalManual)
|
||||||
|
))
|
||||||
|
|| (
|
||||||
|
*DENO_FUTURE
|
||||||
|
&& member_dir.workspace.package_jsons().next().is_some()
|
||||||
|
&& member_dir.workspace.node_modules_dir().is_none()
|
||||||
|
// TODO(2.0): remove
|
||||||
|
);
|
||||||
if byonm {
|
if byonm {
|
||||||
lsp_log!(" Enabled 'bring your own node_modules'.");
|
lsp_log!(" Enabled 'bring your own node_modules'.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,7 +194,12 @@ pub async fn eval_command(
|
||||||
pub async fn maybe_npm_install(factory: &CliFactory) -> Result<(), AnyError> {
|
pub async fn maybe_npm_install(factory: &CliFactory) -> Result<(), AnyError> {
|
||||||
// ensure an "npm install" is done if the user has explicitly
|
// ensure an "npm install" is done if the user has explicitly
|
||||||
// opted into using a managed node_modules directory
|
// opted into using a managed node_modules directory
|
||||||
if factory.cli_options()?.node_modules_dir_enablement() == Some(true) {
|
if factory
|
||||||
|
.cli_options()?
|
||||||
|
.node_modules_mode()?
|
||||||
|
.map(|m| m.uses_node_modules_dir())
|
||||||
|
.unwrap_or(false)
|
||||||
|
{
|
||||||
if let Some(npm_resolver) = factory.npm_resolver().await?.as_managed() {
|
if let Some(npm_resolver) = factory.npm_resolver().await?.as_managed() {
|
||||||
npm_resolver.ensure_top_level_package_json_install().await?;
|
npm_resolver.ensure_top_level_package_json_install().await?;
|
||||||
}
|
}
|
||||||
|
|
5
cli/tools/vendor/mod.rs
vendored
5
cli/tools/vendor/mod.rs
vendored
|
@ -88,7 +88,10 @@ pub async fn vendor(
|
||||||
let graph = output.graph;
|
let graph = output.graph;
|
||||||
let npm_package_count = graph.npm_packages.len();
|
let npm_package_count = graph.npm_packages.len();
|
||||||
let try_add_node_modules_dir = npm_package_count > 0
|
let try_add_node_modules_dir = npm_package_count > 0
|
||||||
&& cli_options.node_modules_dir_enablement().unwrap_or(true);
|
&& cli_options
|
||||||
|
.node_modules_mode()?
|
||||||
|
.map(|m| m.uses_node_modules_dir())
|
||||||
|
.unwrap_or(true);
|
||||||
|
|
||||||
log::info!(
|
log::info!(
|
||||||
concat!("Vendored {} {} into {} directory.",),
|
concat!("Vendored {} {} into {} directory.",),
|
||||||
|
|
|
@ -145,7 +145,6 @@ export function fork(
|
||||||
args = [
|
args = [
|
||||||
"run",
|
"run",
|
||||||
...op_bootstrap_unstable_args(),
|
...op_bootstrap_unstable_args(),
|
||||||
"--node-modules-dir",
|
|
||||||
"-A",
|
"-A",
|
||||||
...stringifiedV8Flags,
|
...stringifiedV8Flags,
|
||||||
...execArgv,
|
...execArgv,
|
||||||
|
|
|
@ -58,18 +58,22 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"error_when_package_json_changed": {
|
"error_when_package_json_changed": {
|
||||||
|
"envs": {
|
||||||
|
"DENO_FUTURE": "1"
|
||||||
|
},
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"envs": {
|
"args": [
|
||||||
"DENO_FUTURE": "1"
|
"eval",
|
||||||
},
|
"Deno.writeTextFileSync('deno.json', `{ \"nodeModules\": \"local-auto\" }`)"
|
||||||
|
],
|
||||||
|
"output": "[WILDCARD]"
|
||||||
|
},
|
||||||
|
{
|
||||||
"args": "cache add.ts",
|
"args": "cache add.ts",
|
||||||
"output": "[WILDCARD]"
|
"output": "[WILDCARD]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"envs": {
|
|
||||||
"DENO_FUTURE": "1"
|
|
||||||
},
|
|
||||||
"args": [
|
"args": [
|
||||||
"eval",
|
"eval",
|
||||||
"Deno.writeTextFileSync(\"package.json\", JSON.stringify({ dependencies: { \"@denotest/bin\": \"0.7.0\" } }))"
|
"Deno.writeTextFileSync(\"package.json\", JSON.stringify({ dependencies: { \"@denotest/bin\": \"0.7.0\" } }))"
|
||||||
|
@ -77,17 +81,11 @@
|
||||||
"output": ""
|
"output": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"envs": {
|
|
||||||
"DENO_FUTURE": "1"
|
|
||||||
},
|
|
||||||
"args": "cache --frozen add.ts",
|
"args": "cache --frozen add.ts",
|
||||||
"output": "frozen_package_json_changed.out",
|
"output": "frozen_package_json_changed.out",
|
||||||
"exitCode": 1
|
"exitCode": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"envs": {
|
|
||||||
"DENO_FUTURE": "1"
|
|
||||||
},
|
|
||||||
"args": "install --frozen",
|
"args": "install --frozen",
|
||||||
"output": "frozen_package_json_changed_install.out",
|
"output": "frozen_package_json_changed_install.out",
|
||||||
"exitCode": 1
|
"exitCode": 1
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
"nodeModulesDir": true
|
"nodeModules": "local-auto"
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,11 +10,11 @@
|
||||||
"exitCode": 1
|
"exitCode": 1
|
||||||
}, {
|
}, {
|
||||||
// this should override byonm
|
// this should override byonm
|
||||||
"args": "run --node-modules-dir=false --quiet main.ts",
|
"args": "run --node-modules=global-auto --quiet main.ts",
|
||||||
"output": "main.out"
|
"output": "main.out"
|
||||||
}, {
|
}, {
|
||||||
// same with this
|
// same with this
|
||||||
"args": "run --node-modules-dir --quiet main.ts",
|
"args": "run --node-modules=local-auto --quiet main.ts",
|
||||||
"output": "main.out"
|
"output": "main.out"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,6 +78,13 @@
|
||||||
"DENO_FUTURE": "1"
|
"DENO_FUTURE": "1"
|
||||||
},
|
},
|
||||||
"steps": [
|
"steps": [
|
||||||
|
{
|
||||||
|
"args": [
|
||||||
|
"eval",
|
||||||
|
"Deno.removeSync('./deno.json')"
|
||||||
|
],
|
||||||
|
"output": "[WILDCARD]"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"eval",
|
"eval",
|
||||||
|
|
Loading…
Reference in a new issue