diff --git a/.github/workflows/verify_dependencies.yml b/.github/workflows/verify_dependencies.yml index 778eeea..116b6b9 100644 --- a/.github/workflows/verify_dependencies.yml +++ b/.github/workflows/verify_dependencies.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - test pull_request: jobs: diff --git a/apps/backoffice/package.json b/apps/backoffice/package.json index 4f1c189..4864b42 100644 --- a/apps/backoffice/package.json +++ b/apps/backoffice/package.json @@ -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" } diff --git a/verify_dependencies.ts b/verify_dependencies.ts index 57412b1..9b9444d 100644 --- a/verify_dependencies.ts +++ b/verify_dependencies.ts @@ -75,12 +75,12 @@ function compileVersionDictionary(deps: Record) { } } - return Object.entries(versionDictionary) - .filter(([_, versions]) => Object.keys(versions).length > 1) - .reduce((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>; @@ -88,7 +88,7 @@ function getFaultReport(versionDictionary: VersionDictionary) { /* example format of fault report { : { - : "Has version but should have " + : "Has version but should have " } } */