nrush v1.1.3
nrush 🦀
A speedy way to update all packages in a Node/Bun project, written in Rust.
Usage
Bun
bun --bun add -d nrush@latest # Ensures the latest version is used
nrush -iNode
npx nrush@latest -iCommands:
nrush about- Display comprehensive information about NRush.nrush help- Provide a usage guide for NRush. Primarily, this section.
Arguments:
(Arguments are applicable only if no commands are supplied and only nrush is executed.)
Update Options (
-u/--update):- Automatically updates all dependencies without user interaction.
Interactive Mode (
-i/--interactive)- User can select which packages to update. Defaults to this if both
-uand-iare supplied.
- User can select which packages to update. Defaults to this if both
Include (
--include <dev,peer>):- Include
devand/orpeerdependencies in the update process.
- Include
Path Specification (
-p <path>/--path <path>):- Specify the path to a
package.jsonfile. The default is the current directory.
- Specify the path to a
Skip Ranges in Versioning (
--skip-ranges):- Skips version ranges in package.json. Default is
false, preserving them. - Example:
^1.0.0will be updated to2.0.0if--skip-rangesis supplied.
- Skips version ranges in package.json. Default is
Update Any Version (
--update-any):- Updates
*versions in package.json. Default isfalse, maintaining them. - Example:
*will be updated to2.0.0if--update-anyis supplied.
- Updates
SOON: Semver Constraint (
-s <semver>/--semver <semver>):- Specify a maximum semver range to update to. Choose either
major,minor, orpatch. Default ismajor. - This currently does nothing.
- Specify a maximum semver range to update to. Choose either
By executing nrush without any arguments or commands, a list of updatable packages will be displayed, and you'll be prompted to install them.
Purpose
I made this as a personal alternative to npm-check-updates, mostly as a challenge to write a less feature-packed,
faster version that checks the packages concurrently, resulting in 🔥speed🔥.
Concurrency, baby.
Contributing
Please do. I don't really do Rust that often, and all of this was done in 30 minutes.
Goals
- Full feature set from npm-check-updates
Notes
- nrush is short for npm rush, as in "please get me up to date"
- The base
omznc/nrushpackage figures out your OS architecture and downloads the correct binary. It useschild_processwhich you could find alarming, but hey, that's what open-source is for. - These are the underlying binaries: - nrush-windows-x64 - nrush-windows-arm64 - nrush-darwin-x64 - nrush-darwin-arm64 - nrush-linux-x64 - nrush-linux-arm64
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago