Skip to content

Commit 02bbec3

Browse files
chore: lint
1 parent 84f03bc commit 02bbec3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/upgrade/assessmentManager.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import { buildPackageId } from './utility';
1111
import metadataManager from './metadataManager';
1212
import { sendInfo } from 'vscode-extension-telemetry-wrapper';
1313

14-
function getVersionRange(versions: Set<string>) :string {
14+
function getVersionRange(versions: Set<string>) : string {
1515
const versionList = [...versions].sort((a, b) => semver.compare(a, b));
1616
if (versionList.length === 1) {
1717
return versionList[0];
1818
}
19-
return `${versionList[0]}|${versionList[versionList.length-1]}`;
19+
return `${versionList[0]}|${versionList[versionList.length - 1]}`;
2020
}
2121

2222
function getJavaIssues(data: INodeData): UpgradeIssue[] {
@@ -78,7 +78,7 @@ function getDependencyIssue(data: INodeData, versionSet: VersionSet): UpgradeIss
7878
}
7979

8080
if (!versionSet[groupId]) {
81-
versionSet[groupId]= new Set();
81+
versionSet[groupId] = new Set();
8282
}
8383
versionSet[groupId].add(versionString);
8484

@@ -97,14 +97,14 @@ async function getDependencyIssues(projectNode: INodeData): Promise<UpgradeIssue
9797
path: packageContainer.path,
9898
});
9999

100-
const versionSet: VersionSet = {};
101-
const issues = packages.map(pkg => getDependencyIssue(pkg, versionSet)).filter((x): x is UpgradeIssue => Boolean(x));
102-
if (Object.entries(versionSet).length > 0) {
100+
const versionsByGroupId: VersionSet = {};
101+
const issues = packages.map(pkg => getDependencyIssue(pkg, versionsByGroupId)).filter((x): x is UpgradeIssue => Boolean(x));
102+
if (Object.entries(versionsByGroupId).length > 0) {
103103
sendInfo("", {
104104
operationName: "java.dependency.assessmentManager.getDependencyIssues",
105105
versionRangeByGroupId: JSON.stringify(
106106
Object.fromEntries(
107-
Object.entries(versionSet).map(([groupId, versionSet]) => [groupId, getVersionRange(versionSet)]),
107+
Object.entries(versionsByGroupId).map(([groupId, versions]) => [groupId, getVersionRange(versions)]),
108108
),
109109
),
110110
});

0 commit comments

Comments
 (0)