Adding pnpm support (#734)
This commit is contained in:
@@ -299,6 +299,7 @@ fn run() -> Result<()> {
|
|||||||
runner.execute(Step::Vim, "voom", || vim::run_voom(&base_dirs, run_type))?;
|
runner.execute(Step::Vim, "voom", || vim::run_voom(&base_dirs, run_type))?;
|
||||||
runner.execute(Step::Node, "npm", || node::run_npm_upgrade(&ctx))?;
|
runner.execute(Step::Node, "npm", || node::run_npm_upgrade(&ctx))?;
|
||||||
runner.execute(Step::Node, "yarn", || node::yarn_global_update(run_type))?;
|
runner.execute(Step::Node, "yarn", || node::yarn_global_update(run_type))?;
|
||||||
|
runner.execute(Step::Node, "pnpm", || node::pnpm_global_update(run_type))?;
|
||||||
runner.execute(Step::Deno, "deno", || node::deno_upgrade(&ctx))?;
|
runner.execute(Step::Deno, "deno", || node::deno_upgrade(&ctx))?;
|
||||||
runner.execute(Step::Composer, "composer", || generic::run_composer_update(&ctx))?;
|
runner.execute(Step::Composer, "composer", || generic::run_composer_update(&ctx))?;
|
||||||
runner.execute(Step::Krew, "krew", || generic::run_krew_upgrade(run_type))?;
|
runner.execute(Step::Krew, "krew", || generic::run_krew_upgrade(run_type))?;
|
||||||
|
|||||||
@@ -80,6 +80,13 @@ pub fn run_npm_upgrade(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
npm.upgrade(ctx.run_type(), use_sudo)
|
npm.upgrade(ctx.run_type(), use_sudo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn pnpm_global_update(run_type: RunType) -> Result<()> {
|
||||||
|
let pnpm = require("pnpm")?;
|
||||||
|
|
||||||
|
print_separator("Performant Node Package Manager");
|
||||||
|
run_type.execute(&pnpm).args(&["update", "-g"]).check_run()
|
||||||
|
}
|
||||||
|
|
||||||
pub fn yarn_global_update(run_type: RunType) -> Result<()> {
|
pub fn yarn_global_update(run_type: RunType) -> Result<()> {
|
||||||
let yarn = require("yarn")?;
|
let yarn = require("yarn")?;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user