You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i just wanted to throw this script in there, in case it can give inspiration to someone to write nupm update 🙏
# install a Nushell package without installing `nupm`defnupm-install [
package: path, # the path to the local package to install--log-level: string = "DEBUG"# the log level for the install--nupm: path, # the path to the `nupm`'s directory
]: nothing->nothing {
nu--commands$" use ($nupm) NU_LOG_LEVEL=($log_level) nupm install --path ($package)"
}
alias"nupm install"=nupm-install--nupm (
$env.GIT_REPOS_HOME|path join"github.com""nushell""nupm""nupm"
)
def"nupm update" [repos: list<string>]: nothing->nothing {
forrepoin$repos {
letpackage=$env.GIT_REPOS_HOME|path join$repogit-C$packagepulloriginmainnupminstall$package
}
}
I'm assuming this would need to work from Git tags on the module repo and those that are recognised as version numbers? So, updating everything to "latest" would infer what is latest based on semver comparisons presumably.
Once we have a dependencies file, it would need to be two operations I guess, one to update based on dependencies changed in the file by the user and another to discover what the latest versions are and apply them to the file ... But that's a tomorrow problem.
i just wanted to throw this script in there, in case it can give inspiration to someone to write
nupm update
🙏The text was updated successfully, but these errors were encountered: