From a53f311440456c5db4d5f764f0cde709de1a125e Mon Sep 17 00:00:00 2001 From: spypsy Date: Tue, 19 Sep 2023 09:37:51 +0000 Subject: [PATCH 1/2] fix: remove non-npm packages from end-to-end during canary flow --- .../end-to-end/scripts/setup_canary.sh | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/yarn-project/end-to-end/scripts/setup_canary.sh b/yarn-project/end-to-end/scripts/setup_canary.sh index 6d6806fed08..dd56d883798 100755 --- a/yarn-project/end-to-end/scripts/setup_canary.sh +++ b/yarn-project/end-to-end/scripts/setup_canary.sh @@ -49,13 +49,27 @@ done cd .. echo "Updating external Aztec dependencies to version $VERSION" - -# Packages that are publically available in npm -# TARGET_PKGS=("@aztec/aztec.js" "@aztec/cli" "@aztec/l1-artifacts" "@aztec/noir-contracts") +JSON_TARGET_PKGS=$(printf '%s\n' "${TARGET_PKGS[@]}" | jq -R -s -c 'split("\n") | map(select(. != ""))') TMP=$(mktemp) -for PKG in "${TARGET_PKGS[@]}"; do - jq --arg v $VERSION ".dependencies[\"$PKG\"] = \$v" package.json > $TMP && mv $TMP package.json -done +# for PKG in "${TARGET_PKGS[@]}"; do +# jq --arg v $VERSION ".dependencies[\"$PKG\"] = \$v" package.json > $TMP && mv $TMP package.json +# done +jq --arg v $VERSION --argjson target_pkgs "$JSON_TARGET_PKGS" ' +.dependencies |= with_entries( + select( + (.key | startswith("@aztec")) as $isAztec | + if $isAztec then + .key as $k | any($target_pkgs[]; . == $k) + else + true + end + ) | + if .key as $k | any($target_pkgs[]; . == $k) then + .value = $v + else + . + end +)' package.json > $TMP && mv $TMP package.json jq ".references = []" tsconfig.json > $TMP && mv $TMP tsconfig.json From a8904e698aa96d5afb25fe1a702b84fdd8bae313 Mon Sep 17 00:00:00 2001 From: spypsy Date: Tue, 19 Sep 2023 09:59:53 +0000 Subject: [PATCH 2/2] remove comment --- yarn-project/end-to-end/scripts/setup_canary.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/yarn-project/end-to-end/scripts/setup_canary.sh b/yarn-project/end-to-end/scripts/setup_canary.sh index dd56d883798..e7ea1020221 100755 --- a/yarn-project/end-to-end/scripts/setup_canary.sh +++ b/yarn-project/end-to-end/scripts/setup_canary.sh @@ -52,9 +52,6 @@ echo "Updating external Aztec dependencies to version $VERSION" JSON_TARGET_PKGS=$(printf '%s\n' "${TARGET_PKGS[@]}" | jq -R -s -c 'split("\n") | map(select(. != ""))') TMP=$(mktemp) -# for PKG in "${TARGET_PKGS[@]}"; do -# jq --arg v $VERSION ".dependencies[\"$PKG\"] = \$v" package.json > $TMP && mv $TMP package.json -# done jq --arg v $VERSION --argjson target_pkgs "$JSON_TARGET_PKGS" ' .dependencies |= with_entries( select(