From 3c1225c6e52574d43f21a5385ca0eb85bf6fb5ea Mon Sep 17 00:00:00 2001 From: David de Kloet Date: Wed, 26 Nov 2025 16:29:37 +0100 Subject: [PATCH] Fix intersect bug in get-changeset-arguments.sh --- .github/scripts/get-changeset-arguments.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/scripts/get-changeset-arguments.sh b/.github/scripts/get-changeset-arguments.sh index 4ec1ea2d33..b91ddcebd4 100755 --- a/.github/scripts/get-changeset-arguments.sh +++ b/.github/scripts/get-changeset-arguments.sh @@ -34,14 +34,18 @@ intersect() { add_changed_reverse_package_deps() { packages="$1" - # We need to include reverse dependencies because if a dependency is - # bumped, this also results in a patch bump of the dependent package. - # But if the dependency is not actually changed (either directly or - # transitively), but only included because of a requirement of - # `changeset version`, we don't want to include it. Otherwise almost all - # packages get included through common dependencies such as - # @chainlink/ea-test-helpers. - intersect "$($SOURCE_DIR/get-reverse-dependencies.sh $packages)" "$CHANGED_PACKAGES_RECURSIVE" + { + # Keep the existing packages. + echo "$packages" + # We need to include reverse dependencies because if a dependency is + # bumped, this also results in a patch bump of the dependent package. + # But if the dependency is not actually changed (either directly or + # transitively), but only included because of a requirement of + # `changeset version`, we don't want to include it. Otherwise almost all + # packages get included through common dependencies such as + # @chainlink/ea-test-helpers. + intersect "$($SOURCE_DIR/get-reverse-dependencies.sh $packages)" "$CHANGED_PACKAGES_RECURSIVE" + } | sort -u } add_package_deps() {