Skip to content

Commit b41e530

Browse files
authored
Fix intersect bug in get-changeset-arguments.sh (#4329)
1 parent 58aa630 commit b41e530

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/scripts/get-changeset-arguments.sh

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,18 @@ intersect() {
3434

3535
add_changed_reverse_package_deps() {
3636
packages="$1"
37-
# We need to include reverse dependencies because if a dependency is
38-
# bumped, this also results in a patch bump of the dependent package.
39-
# But if the dependency is not actually changed (either directly or
40-
# transitively), but only included because of a requirement of
41-
# `changeset version`, we don't want to include it. Otherwise almost all
42-
# packages get included through common dependencies such as
43-
# @chainlink/ea-test-helpers.
44-
intersect "$($SOURCE_DIR/get-reverse-dependencies.sh $packages)" "$CHANGED_PACKAGES_RECURSIVE"
37+
{
38+
# Keep the existing packages.
39+
echo "$packages"
40+
# We need to include reverse dependencies because if a dependency is
41+
# bumped, this also results in a patch bump of the dependent package.
42+
# But if the dependency is not actually changed (either directly or
43+
# transitively), but only included because of a requirement of
44+
# `changeset version`, we don't want to include it. Otherwise almost all
45+
# packages get included through common dependencies such as
46+
# @chainlink/ea-test-helpers.
47+
intersect "$($SOURCE_DIR/get-reverse-dependencies.sh $packages)" "$CHANGED_PACKAGES_RECURSIVE"
48+
} | sort -u
4549
}
4650

4751
add_package_deps() {

0 commit comments

Comments
 (0)