commitizen 5.0.0 → 5.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/.github/workflows/release.yml +3 -2
- package/CONTRIBUTING.md +20 -1
- package/README.md +4 -3
- package/babel.config.js +1 -1
- package/package.json +30 -5
|
@@ -18,8 +18,9 @@ jobs:
|
|
|
18
18
|
with:
|
|
19
19
|
# semantic-release 26 requires Node >= 26.13
|
|
20
20
|
node-version: 26
|
|
21
|
-
# npm@latest
|
|
22
|
-
#
|
|
21
|
+
# npm@latest: releases are staged with `npm stage publish` (see
|
|
22
|
+
# "release" in package.json), signed in through npm trusted publishing
|
|
23
|
+
# (OIDC). A maintainer approves each staged version with 2FA.
|
|
23
24
|
- run: npm install -g npm@latest pnpm@12
|
|
24
25
|
- run: pnpm install --frozen-lockfile
|
|
25
26
|
- run: pnpm run semantic-release
|
package/CONTRIBUTING.md
CHANGED
|
@@ -6,7 +6,7 @@ Thanks for considering a contribution to commitizen!
|
|
|
6
6
|
|
|
7
7
|
* **Node.js 22.18+, 24.11+ or 26.** Developing commitizen needs a newer Node.js
|
|
8
8
|
than using it: Babel 8 requires `^22.18.0 || >=24.11.0`. Installing
|
|
9
|
-
commitizen itself only needs Node.js 22.
|
|
9
|
+
commitizen itself only needs Node.js 22.13 or newer.
|
|
10
10
|
The supported development range is declared in `devEngines.runtime` in
|
|
11
11
|
`package.json`, and pnpm refuses to install with a Node.js outside it. If your
|
|
12
12
|
`node` is managed by pnpm, pnpm picks a matching version for this repository
|
|
@@ -59,6 +59,25 @@ which semantic-release requires.
|
|
|
59
59
|
|
|
60
60
|
All other commit types will trigger no new release.
|
|
61
61
|
|
|
62
|
+
Releases are staged, not published straight to npm. When a release commit lands
|
|
63
|
+
on `master`, the release workflow tags the version, runs `npm stage publish`
|
|
64
|
+
(signed in through npm trusted publishing) and creates a draft GitHub release.
|
|
65
|
+
Nothing reaches npm until a maintainer with publish rights approves it with 2FA,
|
|
66
|
+
using npm 12 or newer:
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
npm stage list commitizen
|
|
70
|
+
npm stage download <stage-id> # optional: inspect the tarball
|
|
71
|
+
npm stage approve <stage-id>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Then publish the draft release at
|
|
75
|
+
https://github.com/commitizen/cz-cli/releases.
|
|
76
|
+
|
|
77
|
+
To abandon a staged version instead, run `npm stage reject <stage-id>`,
|
|
78
|
+
delete the draft release, and delete its tag (`git push origin :refs/tags/vX.Y.Z`)
|
|
79
|
+
so the next release can reuse the version.
|
|
80
|
+
|
|
62
81
|
## Gotchas
|
|
63
82
|
|
|
64
83
|
### Editors that strip trailing whitespace can break tests
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ When you commit with Commitizen, you'll be prompted to fill out any required com
|
|
|
7
7
|
|
|
8
8
|
## Installing the command line tool
|
|
9
9
|
|
|
10
|
-
Commitizen requires Node.js 22.
|
|
10
|
+
Commitizen requires Node.js 22.13 or newer and is tested against Node.js 22, 24 & 26.
|
|
11
11
|
|
|
12
12
|
Installation is as simple as running the following command (if you see `EACCES` error, reading [fixing npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) may help):
|
|
13
13
|
|
|
@@ -172,12 +172,12 @@ For `husky` users, add the following configuration to the project's `package.jso
|
|
|
172
172
|
Add the "Commitizen friendly" badge to your README using the following markdown:
|
|
173
173
|
|
|
174
174
|
```
|
|
175
|
-
[](
|
|
175
|
+
[](https://commitizen.github.io/cz-cli/)
|
|
176
176
|
```
|
|
177
177
|
|
|
178
178
|
Your badge will look like this:
|
|
179
179
|
|
|
180
|
-
[](
|
|
180
|
+
[](https://commitizen.github.io/cz-cli/)
|
|
181
181
|
|
|
182
182
|
It may also make sense to change your `README.md` or `CONTRIBUTING.md` files to include or link to the Commitizen project so that your new contributors may learn more about installing and using Commitizen.
|
|
183
183
|
|
|
@@ -279,6 +279,7 @@ We know that every project and build process has different requirements, so we'v
|
|
|
279
279
|
- [cz-emoji-conventional](https://www.npmjs.com/package/cz-emoji-conventional)
|
|
280
280
|
- [cz-git](https://github.com/Zhengqbbb/cz-git)
|
|
281
281
|
- [cz-vinyl](https://github.com/Exlint/cz-vinyl)
|
|
282
|
+
- [commit-jazzer](https://github.com/Zilero232/commit-jazzer)
|
|
282
283
|
|
|
283
284
|
To create an adapter, just fork one of these great adapters and modify it to suit your needs. We pass you an instance of [Inquirer.js](https://github.com/SBoudrias/Inquirer.js/), but you can capture input using whatever means necessary. Just call the `commit` callback with a string and we'll be happy. Publish it to npm, and you'll be all set!
|
|
284
285
|
|
package/babel.config.js
CHANGED
|
@@ -11,7 +11,7 @@ module.exports = (api) => {
|
|
|
11
11
|
"@babel/preset-env",
|
|
12
12
|
{
|
|
13
13
|
targets: {
|
|
14
|
-
node: "22.
|
|
14
|
+
node: "22.13",
|
|
15
15
|
},
|
|
16
16
|
// Babel 8 no longer converts ES modules to CommonJS by default. dist/
|
|
17
17
|
// must stay CommonJS: adapters and other consumers require('commitizen').
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "commitizen",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "Git commit, but play nice with conventions.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
-
"packageManager": "pnpm@12.
|
|
6
|
+
"packageManager": "pnpm@12.24.0",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"check-coverage": "nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100",
|
|
9
9
|
"commit": "node bin/git-cz",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"homepage": "https://github.com/commitizen/cz-cli",
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
28
|
-
"url": "https://github.com/commitizen/cz-cli.git"
|
|
28
|
+
"url": "git+https://github.com/commitizen/cz-cli.git"
|
|
29
29
|
},
|
|
30
30
|
"keywords": [
|
|
31
31
|
"commit",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"@babel/preset-env": "8.1.4",
|
|
51
51
|
"@babel/register": "8.1.2",
|
|
52
52
|
"@istanbuljs/nyc-config-babel": "3.0.0",
|
|
53
|
+
"@semantic-release/exec": "7.1.0",
|
|
53
54
|
"babel-plugin-istanbul": "8.0.0",
|
|
54
55
|
"chai": "6.3.0",
|
|
55
56
|
"conventional-changelog-conventionalcommits": "10.4.1",
|
|
@@ -82,7 +83,7 @@
|
|
|
82
83
|
},
|
|
83
84
|
"engineStrict": true,
|
|
84
85
|
"engines": {
|
|
85
|
-
"node": ">= 22.
|
|
86
|
+
"node": ">= 22.13"
|
|
86
87
|
},
|
|
87
88
|
"devEngines": {
|
|
88
89
|
"runtime": {
|
|
@@ -96,6 +97,30 @@
|
|
|
96
97
|
"url": "https://opencollective.com/commitizen"
|
|
97
98
|
},
|
|
98
99
|
"release": {
|
|
99
|
-
"preset": "conventionalcommits"
|
|
100
|
+
"preset": "conventionalcommits",
|
|
101
|
+
"plugins": [
|
|
102
|
+
"@semantic-release/commit-analyzer",
|
|
103
|
+
"@semantic-release/release-notes-generator",
|
|
104
|
+
[
|
|
105
|
+
"@semantic-release/npm",
|
|
106
|
+
{
|
|
107
|
+
"npmPublish": false
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
[
|
|
111
|
+
"@semantic-release/exec",
|
|
112
|
+
{
|
|
113
|
+
"publishCmd": "npm stage publish --tag latest --provenance --loglevel verbose"
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
[
|
|
117
|
+
"@semantic-release/github",
|
|
118
|
+
{
|
|
119
|
+
"draftRelease": true,
|
|
120
|
+
"successComment": false,
|
|
121
|
+
"releasedLabels": false
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
]
|
|
100
125
|
}
|
|
101
126
|
}
|