From 6fc6a62daf00affdeeeb34d6f02974354657fd34 Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Tue, 28 Nov 2023 23:39:29 +0100 Subject: [PATCH] tools: fix current version check PR-URL: https://github.com/nodejs/node/pull/50951 Reviewed-By: Moshe Atlow Reviewed-By: Antoine du Hamel Reviewed-By: Michael Dawson Reviewed-By: Luigi Pinca --- tools/dep_updaters/update-acorn-walk.sh | 2 +- tools/dep_updaters/update-acorn.sh | 2 +- tools/dep_updaters/update-minimatch.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/dep_updaters/update-acorn-walk.sh b/tools/dep_updaters/update-acorn-walk.sh index 844380305d0fe3..9967d63f0c6e2c 100755 --- a/tools/dep_updaters/update-acorn-walk.sh +++ b/tools/dep_updaters/update-acorn-walk.sh @@ -17,7 +17,7 @@ DEPS_DIR="$BASE_DIR/deps" . "$BASE_DIR/tools/dep_updaters/utils.sh" NEW_VERSION=$("$NODE" "$NPM" view acorn-walk dist-tags.latest) -CURRENT_VERSION=$("$NODE" "$NPM" --prefix './deps/acorn/acorn-walk/' pkg get version) +CURRENT_VERSION=$("$NODE" -p "require('./deps/acorn/acorn-walk/package.json').version") # This function exit with 0 if new version and current version are the same compare_dependency_version "acorn-walk" "$NEW_VERSION" "$CURRENT_VERSION" diff --git a/tools/dep_updaters/update-acorn.sh b/tools/dep_updaters/update-acorn.sh index 6c0f54a5447100..52c6974505beb0 100755 --- a/tools/dep_updaters/update-acorn.sh +++ b/tools/dep_updaters/update-acorn.sh @@ -17,7 +17,7 @@ DEPS_DIR="$BASE_DIR/deps" . "$BASE_DIR/tools/dep_updaters/utils.sh" NEW_VERSION=$("$NODE" "$NPM" view acorn dist-tags.latest) -CURRENT_VERSION=$("$NODE" "$NPM" --prefix './deps/acorn/acorn/' pkg get version) +CURRENT_VERSION=$("$NODE" -p "require('./deps/acorn/acorn/package.json').version") # This function exit with 0 if new version and current version are the same compare_dependency_version "acorn" "$NEW_VERSION" "$CURRENT_VERSION" diff --git a/tools/dep_updaters/update-minimatch.sh b/tools/dep_updaters/update-minimatch.sh index 6be6bdc44a7f52..2e6fdd0c11890b 100755 --- a/tools/dep_updaters/update-minimatch.sh +++ b/tools/dep_updaters/update-minimatch.sh @@ -17,7 +17,7 @@ NPM="$DEPS_DIR/npm/bin/npm-cli.js" . "$BASE_DIR/tools/dep_updaters/utils.sh" NEW_VERSION=$("$NODE" "$NPM" view minimatch dist-tags.latest) -CURRENT_VERSION=$("$NODE" "$NPM" --prefix './deps/minimatch' pkg get version) +CURRENT_VERSION=$("$NODE" -p "require('./deps/minimatch/package.json').version") # This function exit with 0 if new version and current version are the same compare_dependency_version "minimatch" "$NEW_VERSION" "$CURRENT_VERSION"