virtual-code-owners 6.1.2 → 6.2.0
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.
|
@@ -22,7 +22,10 @@ function generateLine(pCSTLine, pTeamMap) {
|
|
|
22
22
|
const lUserNames = uniq(pCSTLine.users.flatMap((pUser) => expandTeamToUserNames(pUser, pTeamMap)))
|
|
23
23
|
.sort(compareUserNames)
|
|
24
24
|
.join(" ");
|
|
25
|
-
return pCSTLine.filesPattern +
|
|
25
|
+
return (pCSTLine.filesPattern +
|
|
26
|
+
pCSTLine.spaces +
|
|
27
|
+
lUserNames +
|
|
28
|
+
(pCSTLine.inlineComment ? ` #${pCSTLine.inlineComment}` : ""));
|
|
26
29
|
}
|
|
27
30
|
return pCSTLine.raw;
|
|
28
31
|
}
|
|
@@ -38,14 +38,15 @@ function orderAnomaly(pLeft, pRight) {
|
|
|
38
38
|
}
|
|
39
39
|
function parseLine(pUntreatedLine, pTeamMap, pLineNo) {
|
|
40
40
|
const lTrimmedLine = pUntreatedLine.trim();
|
|
41
|
-
const
|
|
41
|
+
const lCommentSplitLine = lTrimmedLine.split(/\s*#/);
|
|
42
|
+
const lRule = lCommentSplitLine[0].match(/^(?<filesPattern>[^\s]+)(?<spaces>\s+)(?<userNames>.*)$/);
|
|
42
43
|
if (lTrimmedLine.startsWith("#!")) {
|
|
43
44
|
return { type: "ignorable-comment", line: pLineNo, raw: pUntreatedLine };
|
|
44
45
|
}
|
|
45
46
|
if (lTrimmedLine.startsWith("#")) {
|
|
46
47
|
return { type: "comment", line: pLineNo, raw: pUntreatedLine };
|
|
47
48
|
}
|
|
48
|
-
if (!
|
|
49
|
+
if (!lRule?.groups) {
|
|
49
50
|
if (lTrimmedLine === "") {
|
|
50
51
|
return { type: "empty", line: pLineNo, raw: pUntreatedLine };
|
|
51
52
|
}
|
|
@@ -54,9 +55,10 @@ function parseLine(pUntreatedLine, pTeamMap, pLineNo) {
|
|
|
54
55
|
return {
|
|
55
56
|
type: "rule",
|
|
56
57
|
line: pLineNo,
|
|
57
|
-
filesPattern:
|
|
58
|
-
spaces:
|
|
59
|
-
users: parseUsers(
|
|
58
|
+
filesPattern: lRule.groups.filesPattern,
|
|
59
|
+
spaces: lRule.groups.spaces,
|
|
60
|
+
users: parseUsers(lRule.groups.userNames, pTeamMap),
|
|
61
|
+
inlineComment: lCommentSplitLine[1] ?? "",
|
|
60
62
|
raw: pUntreatedLine,
|
|
61
63
|
};
|
|
62
64
|
}
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "6.
|
|
1
|
+
export const VERSION = "6.2.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virtual-code-owners",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"description": "Makes your CODEOWNERS file liveable again",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -69,12 +69,12 @@
|
|
|
69
69
|
"url": "https://github.com/sverweij/virtual-code-owners/issues"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@types/node": "20.5.
|
|
72
|
+
"@types/node": "20.5.8",
|
|
73
73
|
"c8": "8.0.1",
|
|
74
|
-
"dependency-cruiser": "13.1.
|
|
74
|
+
"dependency-cruiser": "13.1.5",
|
|
75
75
|
"husky": "8.0.3",
|
|
76
76
|
"lint-staged": "14.0.1",
|
|
77
|
-
"prettier": "3.0.
|
|
77
|
+
"prettier": "3.0.3",
|
|
78
78
|
"ts-node": "10.9.1",
|
|
79
79
|
"typescript": "5.2.2",
|
|
80
80
|
"upem": "8.0.0",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"ajv": "8.12.0",
|
|
85
|
-
"yaml": "2.3.
|
|
85
|
+
"yaml": "2.3.2"
|
|
86
86
|
},
|
|
87
87
|
"engines": {
|
|
88
88
|
"node": "^16.19.0||^18.11.0||>=20.0.0"
|