Skip to content

Commit b6f9633

Browse files
committed
fix(plugin-js-packages): prevent negative scores in yarn v2+ workspaces
1 parent 562c83b commit b6f9633

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/plugin-js-packages/src/lib/package-managers/yarn-modern/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export type Yarnv2VersionOverview = {
2323
latest: string;
2424
name: string;
2525
type: DependencyGroupLong;
26+
workspace?: string;
2627
};
2728

2829
export type Yarnv2OutdatedResultJson = Yarnv2VersionOverview[];

packages/plugin-js-packages/src/lib/package-managers/yarn-modern/yarn-modern.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const yarnv2PackageManager: PackageManager = {
3434
ignoreExitCode: true,
3535
},
3636
outdated: {
37-
commandArgs: COMMON_OUTDATED_ARGS,
37+
commandArgs: [...COMMON_OUTDATED_ARGS, '--workspace=.'], // filter out other packages in case of Yarn workspaces
3838
unifyResult: yarnv2ToOutdatedResult,
3939
},
4040
};

0 commit comments

Comments
 (0)