From ee84ce9bea3d0067f2292e9a32244888cef442f9 Mon Sep 17 00:00:00 2001 From: Vincent Hardouin Date: Fri, 11 Nov 2022 18:03:39 +0100 Subject: [PATCH 1/2] fix: allow character in current version name --- npm-bump | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npm-bump b/npm-bump index d0d7bf4..5077d1a 100755 --- a/npm-bump +++ b/npm-bump @@ -118,7 +118,7 @@ function get_newest_versions() { } function install_version() { - current_version=$(npm list --depth=0 | grep "$1@" | grep -E -o "(\d*.){3}$") + current_version=$(npm list --depth=0 | grep "$1@" | grep -E -o "@.*$" | sed "s/@//") echo "Try to bump $1 from $current_version to $2" if [ -n "${command}" ]; then @@ -220,4 +220,4 @@ function show_result() { handle_arguments "$@" npm_files_exist bump_version -show_result \ No newline at end of file +show_result From 26d0f007f41f99420712db721ad071740998af2f Mon Sep 17 00:00:00 2001 From: Vincent Hardouin Date: Fri, 11 Nov 2022 18:05:06 +0100 Subject: [PATCH 2/2] feat: remove canary release in step-by-step mode --- npm-bump | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm-bump b/npm-bump index 5077d1a..058db66 100755 --- a/npm-bump +++ b/npm-bump @@ -94,7 +94,7 @@ function verlt() { ! verlte "$2" "$1"; } function get_versions() { unset versions - read -u 7 -r -d '\n' -a versions 7< <( npm view "$1" versions --json | awk -F "[,\n]" '!/\[|beta|alpha|rc|unstable|\]/ { gsub(/"/, "", $1); print $1}' | sort -V --reverse ) + read -u 7 -r -d '\n' -a versions 7< <( npm view "$1" versions --json | awk -F "[,\n]" '!/\[|beta|alpha|rc|unstable|canary|\]/ { gsub(/"/, "", $1); print $1}' | sort -V --reverse ) } function filter_new_versions() {