format-commit 0.3.0 → 0.3.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/README.md +15 -6
- package/lib/commit.js +0 -1
- package/lib/default-config.json +1 -1
- package/lib/index.js +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# format-commit
|
|
2
2
|
|
|
3
|
+
[](https://badge.fury.io/js/format-commit)
|
|
4
|
+
[](https://nodejs.org/)
|
|
5
|
+
[](https://www.npmjs.com/package/format-commit)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
3
8
|
🚀 Lightweight CLI for consistent commit message formatting.
|
|
4
9
|
|
|
5
10
|
Standardize your commit naming with basic rules, and guide your workflow through an automated script. No bloat, no complexity — just clean, consistent commits.
|
|
@@ -43,10 +48,14 @@ format-commit --config
|
|
|
43
48
|
| :------- | :---------- |
|
|
44
49
|
| **format** | Commit title format:<br>1 - `(type) Name` / 2 - `(type) name`<br>3 - `type: Name` / 4 - `type: name`<br>5 - `type(scope) Name` / 6 - `type(scope) name`<br>7 - `type(scope): Name` / 8 - `type(scope): name` |
|
|
45
50
|
| **types** | Allowed commit types (default: `feat`, `fix`, `core`, `test`, `config`, `doc`) |
|
|
46
|
-
| **scopes** |
|
|
47
|
-
| **minLength** | Minimum commit title
|
|
48
|
-
| **maxLength** | Maximum commit title
|
|
49
|
-
| **changeVersion** | Version change policy:<br>`
|
|
50
|
-
| **releaseBranch** | Main/release branch name (used
|
|
51
|
+
| **scopes** | Scopes for commit categorization (formats 5-8 only) |
|
|
52
|
+
| **minLength** | Minimum length required for the commit title |
|
|
53
|
+
| **maxLength** | Maximum length required for the commit title |
|
|
54
|
+
| **changeVersion** | Version change policy:<br>`never` - Always prompt for version change<br>`only on release branch` - Only release branch commits require version change<br>`always` - All commits require version change |
|
|
55
|
+
| **releaseBranch** | Main/release branch name (used if changeVersion = `only on release branch`) |
|
|
51
56
|
| **showAllVersionTypes** | Show all version types or only main ones (`major`/`minor`/`patch`/`custom`) |
|
|
52
|
-
| **stageAllChanges** | Auto-stage all changes before commit |
|
|
57
|
+
| **stageAllChanges** | Auto-stage all changes before commit ⚠️ |
|
|
58
|
+
|
|
59
|
+
## Contributing
|
|
60
|
+
|
|
61
|
+
Contributions are welcome! Feel free to open issues or submit pull requests.
|
package/lib/commit.js
CHANGED
|
@@ -75,7 +75,6 @@ module.exports = async (config, testMode) => {
|
|
|
75
75
|
choices: config.showAllVersionTypes
|
|
76
76
|
? [...options.versionTypes, ...options.allVersionTypes]
|
|
77
77
|
: options.versionTypes,
|
|
78
|
-
initial: currentBranch === config.releaseBranch ? 1 : 2,
|
|
79
78
|
},
|
|
80
79
|
{
|
|
81
80
|
type: prev => prev === 'custom' ? 'text' : null,
|
package/lib/default-config.json
CHANGED
package/lib/index.js
CHANGED
|
@@ -13,7 +13,7 @@ const program = new Command();
|
|
|
13
13
|
program
|
|
14
14
|
.name('format-commit')
|
|
15
15
|
.description('CLI to standardize commit nomenclature')
|
|
16
|
-
.version('0.3.
|
|
16
|
+
.version('0.3.1')
|
|
17
17
|
.option('-c, --config', 'generate a configuration file on your project for format-commit')
|
|
18
18
|
.option('-t, --test', 'start script without finalize commit (for tests)');
|
|
19
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "format-commit",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Lightweight CLI to standardize commit messages",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "Thomas BARKATS",
|
|
@@ -28,6 +28,9 @@
|
|
|
28
28
|
},
|
|
29
29
|
"main": "./lib/index.js",
|
|
30
30
|
"type": "commonjs",
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=16.0.0"
|
|
33
|
+
},
|
|
31
34
|
"scripts": {
|
|
32
35
|
"start": "node lib/index.js",
|
|
33
36
|
"test": "echo \"Error: no test specified\" && exit 1",
|