Skip to content

Commit 7bc1221

Browse files
committed
fix: use set for major bumps check
1 parent 50306cc commit 7bc1221

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Diff for: src/ui.ts

+5-7
Original file line numberDiff line numberDiff line change
@@ -139,18 +139,16 @@ function createApp({
139139
? majorBumps.split(',').filter(Boolean)
140140
: (req.query.majorBumps as string[] | undefined) || [];
141141

142-
const requiredDependents = [
143-
...new Set(
144-
majorBumpsArray.flatMap((majorBump) =>
145-
findAllWorkspacePackagesThatDependOnPackage(project, majorBump),
146-
),
142+
const requiredDependents = new Set(
143+
majorBumpsArray.flatMap((majorBump) =>
144+
findAllWorkspacePackagesThatDependOnPackage(project, majorBump),
147145
),
148-
];
146+
);
149147

150148
const pkgs = Object.values(project.workspacePackages).filter(
151149
(pkg) =>
152150
pkg.hasChangesSinceLatestRelease ||
153-
requiredDependents.includes(pkg.validatedManifest.name),
151+
requiredDependents.has(pkg.validatedManifest.name),
154152
);
155153

156154
const packages = pkgs.map((pkg) => ({

0 commit comments

Comments
 (0)