@toptal/davinci-monorepo 8.1.4-alpha-CRT-5891-create-coverage-command-3ad3dcfd.4 → 8.1.4-alpha-CRT-5891-create-coverage-command-39ac7ea2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/davinci-monorepo",
3
- "version": "8.1.4-alpha-CRT-5891-create-coverage-command-3ad3dcfd.4+3ad3dcfd",
3
+ "version": "8.1.4-alpha-CRT-5891-create-coverage-command-39ac7ea2.4+39ac7ea2",
4
4
  "description": "Monorepo utility tools",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -35,7 +35,7 @@
35
35
  "dependencies": {
36
36
  "@nodelib/fs.walk": "^1.2.6",
37
37
  "@oclif/core": "^1.16.1",
38
- "@toptal/davinci-cli-shared": "2.3.1-alpha-CRT-5891-create-coverage-command-3ad3dcfd.36+3ad3dcfd",
38
+ "@toptal/davinci-cli-shared": "2.3.1-alpha-CRT-5891-create-coverage-command-39ac7ea2.36+39ac7ea2",
39
39
  "chalk": "^4.1.2",
40
40
  "codeowners": "5.1.1",
41
41
  "commander": "^10.0.0",
@@ -55,5 +55,5 @@
55
55
  "devDependencies": {
56
56
  "@jest/globals": "^29.4.2"
57
57
  },
58
- "gitHead": "3ad3dcfdfe83b96377701fd4b2534f7c209ca320"
58
+ "gitHead": "39ac7ea22e96507f6d67541bf2f17d2c76701e89"
59
59
  }
@@ -34,24 +34,19 @@ const readCypressCoverageReport = () => {
34
34
  return JSON.parse(data)
35
35
  }
36
36
 
37
- const splitReportIntoTeams = ({
38
- reportObj,
39
- teams,
40
- codeowners,
41
- coveragePath,
42
- }) => {
37
+ const splitReportIntoTeams = ({ report, teams, codeowners, coveragePath }) => {
43
38
  const teamsReport = {}
44
39
 
45
- Object.entries(reportObj).forEach(([reportPathKey, report]) => {
46
- const file = report.path
47
- const relativeWorkspacePath = path.relative(workspaceRoot, file)
40
+ Object.entries(report).forEach(([reportPathKey, reportValue]) => {
41
+ const filePath = reportValue.path
42
+ const relativeWorkspacePath = path.relative(workspaceRoot, filePath)
48
43
 
49
44
  const owners = codeowners.getOwner(relativeWorkspacePath)
50
45
 
51
46
  owners.forEach(owner => {
52
47
  teamsReport[owner] = {
53
48
  ...teamsReport[owner],
54
- [reportPathKey]: report,
49
+ [reportPathKey]: reportValue,
55
50
  }
56
51
  })
57
52
  })