Add option to disable node package updates (#213)
This commit is contained in:
committed by
Roey Darwish Dror
parent
bfbb486fba
commit
7bdd00f88a
@@ -28,6 +28,7 @@ lazy_static! {
|
|||||||
m.insert("vim", Step::Vim);
|
m.insert("vim", Step::Vim);
|
||||||
m.insert("emacs", Step::Emacs);
|
m.insert("emacs", Step::Emacs);
|
||||||
m.insert("gem", Step::Gem);
|
m.insert("gem", Step::Gem);
|
||||||
|
m.insert("node", Step::Node);
|
||||||
m.insert("sdkman", Step::Sdkman);
|
m.insert("sdkman", Step::Sdkman);
|
||||||
m.insert("remotes", Step::Remotes);
|
m.insert("remotes", Step::Remotes);
|
||||||
m.insert("rustup", Step::Rustup);
|
m.insert("rustup", Step::Rustup);
|
||||||
@@ -53,6 +54,8 @@ pub enum Step {
|
|||||||
Emacs,
|
Emacs,
|
||||||
/// Don't upgrade ruby gems
|
/// Don't upgrade ruby gems
|
||||||
Gem,
|
Gem,
|
||||||
|
/// Don't upgrade npm/composer/yarn packages
|
||||||
|
Node,
|
||||||
/// Don't upgrade SDKMAN! and its packages
|
/// Don't upgrade SDKMAN! and its packages
|
||||||
Sdkman,
|
Sdkman,
|
||||||
/// Don't run remote Togprades
|
/// Don't run remote Togprades
|
||||||
|
|||||||
38
src/main.rs
38
src/main.rs
@@ -351,24 +351,26 @@ fn run() -> Result<(), Error> {
|
|||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
execute(
|
if config.should_run(Step::Node) {
|
||||||
&mut report,
|
execute(
|
||||||
"NPM",
|
&mut report,
|
||||||
|| node::run_npm_upgrade(&base_dirs, run_type),
|
"NPM",
|
||||||
config.no_retry(),
|
|| node::run_npm_upgrade(&base_dirs, run_type),
|
||||||
)?;
|
config.no_retry(),
|
||||||
execute(
|
)?;
|
||||||
&mut report,
|
execute(
|
||||||
"composer",
|
&mut report,
|
||||||
|| generic::run_composer_update(&base_dirs, run_type),
|
"composer",
|
||||||
config.no_retry(),
|
|| generic::run_composer_update(&base_dirs, run_type),
|
||||||
)?;
|
config.no_retry(),
|
||||||
execute(
|
)?;
|
||||||
&mut report,
|
execute(
|
||||||
"yarn",
|
&mut report,
|
||||||
|| node::yarn_global_update(run_type),
|
"yarn",
|
||||||
config.no_retry(),
|
|| node::yarn_global_update(run_type),
|
||||||
)?;
|
config.no_retry(),
|
||||||
|
)?;
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(not(any(
|
#[cfg(not(any(
|
||||||
target_os = "freebsd",
|
target_os = "freebsd",
|
||||||
|
|||||||
Reference in New Issue
Block a user