Adding pnpm support (#734)

This commit is contained in:
SilentVoid13
2021-06-27 14:48:46 +02:00
committed by GitHub
parent 7fac74d304
commit 5ec1f4d2d6
2 changed files with 8 additions and 0 deletions

View File

@@ -299,6 +299,7 @@ fn run() -> Result<()> {
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, "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::Composer, "composer", || generic::run_composer_update(&ctx))?;
runner.execute(Step::Krew, "krew", || generic::run_krew_upgrade(run_type))?;

View File

@@ -80,6 +80,13 @@ pub fn run_npm_upgrade(ctx: &ExecutionContext) -> Result<()> {
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<()> {
let yarn = require("yarn")?;