virtual-code-owners 2.2.3 → 3.0.1

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2022-2022 Sander Verweij
3
+ Copyright (c) 2022-2023 Sander Verweij
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -193,8 +193,9 @@ like this:
193
193
 
194
194
  ```json
195
195
  {
196
- ".github/VIRTUAL-CODEOWNERS.txt|.github/virtual-teams.yml": [
197
- "npx virtual-code-owners"
196
+ ".github/{VIRTUAL-CODEOWNERS.txt,virtual-teams.yml}": [
197
+ "virtual-code-owners",
198
+ "git add ."
198
199
  ]
199
200
  }
200
201
  ```
@@ -22,12 +22,14 @@ function shouldAppearInResult(pLine) {
22
22
  function convertLine(pTeamMap) {
23
23
  return (pUntreatedLine) => {
24
24
  const lTrimmedLine = pUntreatedLine.trim();
25
- const lSplitLine = lTrimmedLine.match(/^(?<filesPattern>[^\s]+\s+)(?<userNames>.*)$/);
25
+ const lSplitLine = lTrimmedLine.match(/^(?<filesPattern>[^\s]+)(?<spaces>\s+)(?<userNames>.*)$/);
26
26
  if (lTrimmedLine.startsWith("#") || !lSplitLine?.groups) {
27
27
  return pUntreatedLine;
28
28
  }
29
29
  const lUserNames = replaceTeamNames(lSplitLine.groups.userNames, pTeamMap);
30
- return lSplitLine.groups.filesPattern + uniqAndSortUserNames(lUserNames);
30
+ return (lSplitLine.groups.filesPattern +
31
+ lSplitLine.groups.spaces +
32
+ uniqAndSortUserNames(lUserNames));
31
33
  };
32
34
  }
33
35
  function replaceTeamNames(pUserNames, pTeamMap) {
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "2.2.3";
1
+ export const VERSION = "3.0.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virtual-code-owners",
3
- "version": "2.2.3",
3
+ "version": "3.0.1",
4
4
  "description": "Merges a VIRTUAL-CODEOWNERS.txt and a virtual-teams.yml into CODEOWNERS",
5
5
  "type": "module",
6
6
  "exports": {
@@ -20,7 +20,7 @@
20
20
  "LICENSE"
21
21
  ],
22
22
  "scripts": {
23
- "build": "rm -rf dist && ts-node --esm tools/get-version.ts > src/version.ts && tsc",
23
+ "build": "rm -rf dist && node --no-warnings --loader ts-node/esm tools/get-version.ts > src/version.ts && tsc",
24
24
  "check": "npm run format && npm run build && npm run depcruise -- --no-progress && npm test",
25
25
  "depcruise": "depcruise src tools",
26
26
  "depcruise:graph": "depcruise src --include-only '^(src)' --output-type dot | dot -T svg | depcruise-wrap-stream-in-html > dependency-graph.html",
@@ -54,32 +54,23 @@
54
54
  "devDependencies": {
55
55
  "@types/js-yaml": "4.0.5",
56
56
  "@types/mocha": "10.0.1",
57
- "@types/node": "18.15.11",
57
+ "@types/node": "20.1.4",
58
58
  "c8": "7.13.0",
59
- "dependency-cruiser": "^13.0.0-beta-2",
59
+ "dependency-cruiser": "13.0.0",
60
60
  "husky": "8.0.3",
61
- "lint-staged": "13.2.1",
61
+ "lint-staged": "13.2.2",
62
62
  "mocha": "10.2.0",
63
- "prettier": "2.8.7",
63
+ "prettier": "2.8.8",
64
64
  "ts-node": "10.9.1",
65
65
  "typescript": "5.0.4",
66
66
  "upem": "7.3.2",
67
- "watskeburt": "0.10.2"
67
+ "watskeburt": "0.11.2"
68
68
  },
69
69
  "dependencies": {
70
70
  "commander": "10.0.1",
71
71
  "js-yaml": "4.1.0"
72
72
  },
73
- "upem": {
74
- "policies": [
75
- {
76
- "package": "dependency-cruiser",
77
- "policy": "wanted",
78
- "because": "we're beta testing dependency-cruiser v13 and the _latest_ policy would bump down to v12 again"
79
- }
80
- ]
81
- },
82
73
  "engines": {
83
- "node": "^14.13.1||^16||>=18"
74
+ "node": "^16.14||>=18"
84
75
  }
85
76
  }