ci-scripts: use jq to modify NPM dependencies

This commit is contained in:
pabloFuente 2023-03-03 12:23:31 +01:00
parent d3c98050ce
commit 69cd6f9c1a

View File

@ -396,7 +396,8 @@ fi
# -------------
if [[ "${BUMP_NPM_DEPENDENCY_VERSION}" == true ]]; then
pushd ${PROJECT_PATH}
npm install "${DEPENDENCY}@${VERSION}" --save-exact=true --legacy-peer-deps
tmp=$(mktemp) && jq ".dependencies.\"${DEPENDENCY}\" = \"${VERSION}\"" package.json >"$tmp" && mv "$tmp" package.json
# npm install "${DEPENDENCY}@${VERSION}" --save-exact=true --legacy-peer-deps
popd
fi