@commitlint/config-lerna-scopes 20.4.0 → 21.0.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.
- package/index.js +11 -5
- package/package.json +6 -7
- package/readme.md +2 -5
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
|
-
import
|
|
3
|
+
import { glob } from "node:fs/promises";
|
|
4
4
|
import configWorkspaceScopes from "@commitlint/config-workspace-scopes";
|
|
5
5
|
|
|
6
6
|
export default {
|
|
@@ -41,10 +41,16 @@ async function findPackages(cwd) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
const patterns = normalizePatterns(packages);
|
|
44
|
-
const entries =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
const entries = [];
|
|
45
|
+
for (const pattern of patterns) {
|
|
46
|
+
for await (const entry of glob(pattern, {
|
|
47
|
+
cwd,
|
|
48
|
+
exclude: (p) =>
|
|
49
|
+
p.includes("node_modules") || p.includes("bower_components"),
|
|
50
|
+
})) {
|
|
51
|
+
entries.push(entry);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
48
54
|
|
|
49
55
|
const pkgJsons = await Promise.all(
|
|
50
56
|
Array.from(new Set(entries.map((entry) => path.join(cwd, entry)))).map(
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commitlint/config-lerna-scopes",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "21.0.0",
|
|
5
5
|
"description": "Shareable commitlint config enforcing lerna package and workspace names as scopes",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"files": [
|
|
@@ -37,15 +37,14 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"engines": {
|
|
40
|
-
"node": ">=
|
|
40
|
+
"node": ">=22.12.0"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@commitlint/config-workspace-scopes": "^
|
|
44
|
-
"fast-glob": "^3.3.3"
|
|
43
|
+
"@commitlint/config-workspace-scopes": "^21.0.0"
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
|
-
"@commitlint/test": "^
|
|
48
|
-
"@commitlint/utils": "^
|
|
46
|
+
"@commitlint/test": "^21.0.0",
|
|
47
|
+
"@commitlint/utils": "^21.0.0"
|
|
49
48
|
},
|
|
50
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "f081a8ef93019bb8b07f39c756f6d4a052020d3b"
|
|
51
50
|
}
|
package/readme.md
CHANGED
|
@@ -31,17 +31,14 @@ packages
|
|
|
31
31
|
└── web
|
|
32
32
|
|
|
33
33
|
❯ echo "build(api): change something in api's build" | commitlint
|
|
34
|
-
⧗ input: build(api): change something in api's build
|
|
35
|
-
✔ found 0 problems, 0 warnings
|
|
36
34
|
|
|
37
35
|
❯ echo "test(foo): this won't pass" | commitlint
|
|
38
|
-
⧗ input
|
|
36
|
+
⧗ --- input ---
|
|
37
|
+
test(foo): this won't pass
|
|
39
38
|
✖ scope must be one of [api, app, web] [scope-enum]
|
|
40
39
|
✖ found 1 problems, 0 warnings
|
|
41
40
|
|
|
42
41
|
❯ echo "ci: do some general maintenance" | commitlint
|
|
43
|
-
⧗ input: ci: do some general maintenance
|
|
44
|
-
✔ found 0 problems, 0 warnings
|
|
45
42
|
```
|
|
46
43
|
|
|
47
44
|
Consult [Rules reference](https://commitlint.js.org/reference/rules) for a list of available rules.
|