Skip to content

Commit

Permalink
feat(update-dependencies): use npm-check-updates for bun updates
Browse files Browse the repository at this point in the history
  • Loading branch information
believer committed May 6, 2024
1 parent bd3c50f commit 69f898a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/utils/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,18 @@ pub fn update() -> Result<()> {
}
}
NodeInstaller::Pnpm => vec!["update", "--interactive", "--latest"],
NodeInstaller::Bun => panic!("Bun does not support updating dependencies"),
NodeInstaller::Bun => {
println!("Bun has no built-in support for updating dependencies. Using npm-check-updates instead.");

vec!["npm-check-updates", "--root", "--format=group", "-i"]
}
};

let package_runner = match package_manager {
NodeInstaller::Npm => "npx",
NodeInstaller::Yarn => "yarn",
NodeInstaller::Pnpm => "pnpm",
NodeInstaller::Bun => panic!("Bun does not support updating dependencies"),
NodeInstaller::Bun => "bunx",
};

helpers::spawn_command(package_runner, &arguments).unwrap();
Expand Down

0 comments on commit 69f898a

Please sign in to comment.