Skip to content

Commit

Permalink
reformat test
Browse files Browse the repository at this point in the history
  • Loading branch information
einbergisak committed Sep 3, 2024
1 parent e362ee9 commit d6ae9cc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/verify_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- test
pull_request:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion apps/backoffice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.9",
"globals": "^15.9.0",
"typescript": "^5.5.3",
"typescript": "^3.8.3",
"typescript-eslint": "^8.0.1",
"vite": "^5.4.1"
}
Expand Down
14 changes: 7 additions & 7 deletions verify_dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,20 @@ function compileVersionDictionary(deps: Record<string, string[]>) {
}
}

return Object.entries(versionDictionary)
.filter(([_, versions]) => Object.keys(versions).length > 1)
.reduce<VersionDictionary>((total, current) => {
total[current[0]] = current[1];
return total;
}, {});
// We're interested in deps with multiple versions
return Object.fromEntries(
Object.entries(versionDictionary)
.filter(([_, versions]) => Object.keys(versions).length > 1)
);

}

type FaultReport = Record<string, Record<string, string>>;
function getFaultReport(versionDictionary: VersionDictionary) {
/* example format of fault report
{
<project>: {
<library>: "Has version <version> but should have <version>"
<library>: "Has version <version> but should have <version>"
}
}
*/
Expand Down

0 comments on commit d6ae9cc

Please sign in to comment.