@toptal/davinci-monorepo 8.1.4-alpha-CRT-5891-create-coverage-command-c72932eb.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-
|
|
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-
|
|
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": "
|
|
58
|
+
"gitHead": "39ac7ea22e96507f6d67541bf2f17d2c76701e89"
|
|
59
59
|
}
|
|
@@ -47,7 +47,7 @@ const generateTeamCoverage = async options => {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
for await (const team of teams) {
|
|
50
|
-
print.
|
|
50
|
+
print.grey('Team coverage: ', team)
|
|
51
51
|
|
|
52
52
|
const sanitizedTeam = sanitizeTeamName(team)
|
|
53
53
|
const sanitizedTeamPath = path.join(TEAMS_COVERAGE_PATH, sanitizedTeam)
|
|
@@ -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(
|
|
46
|
-
const
|
|
47
|
-
const relativeWorkspacePath = path.relative(workspaceRoot,
|
|
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]:
|
|
49
|
+
[reportPathKey]: reportValue,
|
|
55
50
|
}
|
|
56
51
|
})
|
|
57
52
|
})
|
|
@@ -77,7 +72,7 @@ const getAllTeams = codeowners => {
|
|
|
77
72
|
// eslint-disable-next-line id-length
|
|
78
73
|
.filter((v, i, a) => a.indexOf(v) === i)
|
|
79
74
|
|
|
80
|
-
print.
|
|
75
|
+
print.grey('Teams: ', uniqueTeams)
|
|
81
76
|
|
|
82
77
|
return uniqueTeams
|
|
83
78
|
}
|