Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove non-npm packages from end-to-end during canary flow #2394

Merged
merged 2 commits into from
Sep 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions yarn-project/end-to-end/scripts/setup_canary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,24 @@ 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
jq --arg v $VERSION --argjson target_pkgs "$JSON_TARGET_PKGS" '
.dependencies |= with_entries(
select(
(.key | startswith("@aztec")) as $isAztec |
if $isAztec then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh boy haha cool but this is where having JS available to use would be nice

.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