@pob/root 19.1.0 → 19.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.
- package/CHANGELOG.md +13 -0
- package/bin/pob-check-commit-msg.js +47 -0
- package/bin/postinstall/github-workflows/push-renovate-build.yml +3 -3
- package/bin/postinstall/github-workflows/push-renovate-pob_root.yml +3 -3
- package/bin/postinstall/github-workflows/push-renovate-prettier.yml +3 -3
- package/bin/postinstall/install-husky.js +1 -3
- package/lib/commitlint-config.js +40 -0
- package/package.json +9 -7
- package/bin/commitlint.js +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [19.2.0](https://github.com/christophehurpeau/pob/compare/@pob/root@19.1.0...@pob/root@19.2.0) (2025-09-17)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* remove @commitlint/cli ([cabad17](https://github.com/christophehurpeau/pob/commit/cabad17eae4eeba02aea42975536eea9131dfb45))
|
|
11
|
+
* update actions/setup-node to v5 ([#2580](https://github.com/christophehurpeau/pob/issues/2580)) ([c93f9bb](https://github.com/christophehurpeau/pob/commit/c93f9bb8b0969ec2c0884109994c39f9e9773368))
|
|
12
|
+
* update dependencies ([ef7157a](https://github.com/christophehurpeau/pob/commit/ef7157a6db8fc3b6b927cf8d739b65c8f590d3fc))
|
|
13
|
+
* use @pob/root/commitlint-config ([c0a9daa](https://github.com/christophehurpeau/pob/commit/c0a9daa689397134eba9ac11ac4c72c0819b13f9))
|
|
14
|
+
|
|
15
|
+
Version bump for dependency: @pob/pretty-pkg
|
|
16
|
+
Version bump for dependency: yarn-version
|
|
17
|
+
|
|
18
|
+
|
|
6
19
|
## [19.1.0](https://github.com/christophehurpeau/pob/compare/@pob/root@19.0.0...@pob/root@19.1.0) (2025-08-24)
|
|
7
20
|
|
|
8
21
|
### Features
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { execSync } from "node:child_process";
|
|
4
|
+
import fs from "node:fs";
|
|
5
|
+
import { formatResult } from "@commitlint/format";
|
|
6
|
+
import lint from "@commitlint/lint";
|
|
7
|
+
import commitlintConfig from "../lib/commitlint-config.js";
|
|
8
|
+
|
|
9
|
+
const argv = process.argv.slice(2);
|
|
10
|
+
const filePath = argv[0];
|
|
11
|
+
|
|
12
|
+
if (!filePath) {
|
|
13
|
+
console.error("No file path provided");
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const content = fs.readFileSync(filePath, "utf8");
|
|
18
|
+
|
|
19
|
+
if (!content) {
|
|
20
|
+
console.error("No content provided");
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const parserOpts = commitlintConfig.parserPreset.parser;
|
|
25
|
+
const opts = {
|
|
26
|
+
parserOpts: parserOpts || {},
|
|
27
|
+
plugins: commitlintConfig.plugins || [],
|
|
28
|
+
ignores: commitlintConfig.ignores || [],
|
|
29
|
+
defaultIgnores: commitlintConfig.defaultIgnores || [],
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
let commentChar = "#";
|
|
33
|
+
try {
|
|
34
|
+
commentChar =
|
|
35
|
+
execSync("git config core.commentChar", { encoding: "utf8" }).trim() || "#";
|
|
36
|
+
} catch {
|
|
37
|
+
// git not available or config not set, use default
|
|
38
|
+
}
|
|
39
|
+
opts.parserOpts.commentChar = commentChar;
|
|
40
|
+
|
|
41
|
+
const result = await lint(content, commitlintConfig.rules, opts);
|
|
42
|
+
|
|
43
|
+
if (result.errors.length > 0) {
|
|
44
|
+
console.error("Error: Invalid commit message");
|
|
45
|
+
console.error(formatResult(result).join("\n"));
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
@@ -13,13 +13,13 @@ jobs:
|
|
|
13
13
|
with:
|
|
14
14
|
token: ${{ secrets.GH_TOKEN }}
|
|
15
15
|
|
|
16
|
-
-
|
|
16
|
+
- $ciPreStep$
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-node@v5
|
|
17
19
|
with:
|
|
18
20
|
node-version: 22
|
|
19
21
|
check-latest: true
|
|
20
22
|
|
|
21
|
-
- $ciPreStep$
|
|
22
|
-
|
|
23
23
|
- name: Install Dependencies
|
|
24
24
|
run: $installOnCICommand$
|
|
25
25
|
|
|
@@ -15,13 +15,13 @@ jobs:
|
|
|
15
15
|
with:
|
|
16
16
|
token: ${{ secrets.GH_TOKEN }}
|
|
17
17
|
|
|
18
|
-
-
|
|
18
|
+
- $ciPreStep$
|
|
19
|
+
|
|
20
|
+
- uses: actions/setup-node@v5
|
|
19
21
|
with:
|
|
20
22
|
node-version: 22
|
|
21
23
|
check-latest: true
|
|
22
24
|
|
|
23
|
-
- $ciPreStep$
|
|
24
|
-
|
|
25
25
|
- name: Install Dependencies
|
|
26
26
|
# no immutable here
|
|
27
27
|
run: $installMutableCommand$
|
|
@@ -14,13 +14,13 @@ jobs:
|
|
|
14
14
|
with:
|
|
15
15
|
token: ${{ secrets.GH_TOKEN }}
|
|
16
16
|
|
|
17
|
-
-
|
|
17
|
+
- $ciPreStep$
|
|
18
|
+
|
|
19
|
+
- uses: actions/setup-node@v5
|
|
18
20
|
with:
|
|
19
21
|
node-version: 22
|
|
20
22
|
check-latest: true
|
|
21
23
|
|
|
22
|
-
- $ciPreStep$
|
|
23
|
-
|
|
24
24
|
- name: Install Dependencies
|
|
25
25
|
run: $installOnCICommand$
|
|
26
26
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable complexity */
|
|
2
|
-
|
|
3
1
|
import fs from "node:fs";
|
|
4
2
|
import path from "node:path";
|
|
5
3
|
import husky from "husky";
|
|
@@ -81,7 +79,7 @@ export default function installHusky({ pkg, pm }) {
|
|
|
81
79
|
afterDiffCommand = "",
|
|
82
80
|
} = getPackageManagerCommands(pm, isYarnBerry);
|
|
83
81
|
|
|
84
|
-
writeHook("commit-msg", `${pmExec}
|
|
82
|
+
writeHook("commit-msg", `${pmExec} pob-check-commit-msg $1`);
|
|
85
83
|
writeHook(
|
|
86
84
|
"pre-commit",
|
|
87
85
|
`${pmExec} pob-root-lint-staged${
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { RuleConfigSeverity } from "@commitlint/types";
|
|
2
|
+
import createConventionalPreset from "conventional-changelog-conventionalcommits";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
parserPreset: await createConventionalPreset(),
|
|
6
|
+
rules: {
|
|
7
|
+
"body-leading-blank": [RuleConfigSeverity.Warning, "always"],
|
|
8
|
+
"body-max-line-length": [RuleConfigSeverity.Disabled],
|
|
9
|
+
"footer-leading-blank": [RuleConfigSeverity.Warning, "always"],
|
|
10
|
+
"footer-max-line-length": [RuleConfigSeverity.Disabled],
|
|
11
|
+
"header-max-length": [RuleConfigSeverity.Disabled],
|
|
12
|
+
"header-trim": [RuleConfigSeverity.Error, "always"],
|
|
13
|
+
"subject-case": [
|
|
14
|
+
RuleConfigSeverity.Error,
|
|
15
|
+
"never",
|
|
16
|
+
["sentence-case", "start-case", "pascal-case", "upper-case"],
|
|
17
|
+
],
|
|
18
|
+
"subject-empty": [RuleConfigSeverity.Error, "never"],
|
|
19
|
+
"subject-full-stop": [RuleConfigSeverity.Error, "never", "."],
|
|
20
|
+
"type-case": [RuleConfigSeverity.Error, "always", "lower-case"],
|
|
21
|
+
"type-empty": [RuleConfigSeverity.Error, "never"],
|
|
22
|
+
"type-enum": [
|
|
23
|
+
RuleConfigSeverity.Error,
|
|
24
|
+
"always",
|
|
25
|
+
[
|
|
26
|
+
"build",
|
|
27
|
+
"chore",
|
|
28
|
+
"ci",
|
|
29
|
+
"docs",
|
|
30
|
+
"feat",
|
|
31
|
+
"fix",
|
|
32
|
+
"perf",
|
|
33
|
+
"refactor",
|
|
34
|
+
"revert",
|
|
35
|
+
"style",
|
|
36
|
+
"test",
|
|
37
|
+
],
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pob/root",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.2.0",
|
|
4
4
|
"description": "root package",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"sideEffects": false,
|
|
19
19
|
"bin": {
|
|
20
|
-
"
|
|
20
|
+
"pob-check-commit-msg": "./bin/pob-check-commit-msg.js",
|
|
21
21
|
"pob-root-lint-staged": "./bin/pob-root-lint-staged.js",
|
|
22
22
|
"pob-root-postinstall": "./bin/pob-root-postinstall.js",
|
|
23
23
|
"pob-root-prettier": "./bin/prettier.cjs",
|
|
@@ -65,18 +65,20 @@
|
|
|
65
65
|
"pob": {},
|
|
66
66
|
"prettier": "@pob/root/prettier-config",
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@commitlint/
|
|
69
|
-
"@
|
|
68
|
+
"@commitlint/format": "19.8.1",
|
|
69
|
+
"@commitlint/lint": "19.8.1",
|
|
70
|
+
"@commitlint/types": "19.8.1",
|
|
71
|
+
"@pob/pretty-pkg": "13.1.0",
|
|
70
72
|
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
71
73
|
"cosmiconfig": "^9.0.0",
|
|
72
74
|
"husky": "~9.1.7",
|
|
73
75
|
"json5": "^2.2.3",
|
|
74
|
-
"lint-staged": "16.1.
|
|
75
|
-
"pob-dependencies": "20.
|
|
76
|
+
"lint-staged": "16.1.6",
|
|
77
|
+
"pob-dependencies": "20.2.0",
|
|
76
78
|
"prettier": "3.6.2",
|
|
77
79
|
"repository-check-dirty": "11.0.0",
|
|
78
80
|
"semver": "^7.3.7",
|
|
79
81
|
"which-pm-runs": "1.1.0",
|
|
80
|
-
"yarn-version": "8.
|
|
82
|
+
"yarn-version": "8.2.0"
|
|
81
83
|
}
|
|
82
84
|
}
|