@programinglive/commiter 1.1.4 → 1.1.5
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 +12 -0
- package/docs/release-notes/RELEASE_NOTES.md +9 -0
- package/package.json +1 -1
- package/scripts/release.js +44 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.5](https://github.com/programinglive/commiter/compare/v1.1.4...v1.1.5) (2025-11-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features
|
|
9
|
+
|
|
10
|
+
* include release notes in release commit via amendment ([3f2afa8](https://github.com/programinglive/commiter/commit/3f2afa8bd0bd264d047df06ae791384e74dc827e))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### 📝 Documentation
|
|
14
|
+
|
|
15
|
+
* update release notes for v1.1.5 ([cb3dbe6](https://github.com/programinglive/commiter/commit/cb3dbe62a85a174bfb074e3d2526a005fc83d0d7))
|
|
16
|
+
|
|
5
17
|
### [1.1.4](https://github.com/programinglive/commiter/compare/v1.1.3...v1.1.4) (2025-11-05)
|
|
6
18
|
|
|
7
19
|
|
|
@@ -4,6 +4,7 @@ This document summarizes every published version of `@programinglive/commiter`.
|
|
|
4
4
|
|
|
5
5
|
| Version | Date | Highlights |
|
|
6
6
|
|---------|------|------------|
|
|
7
|
+
| 1.1.5 | 2025-11-05 | include release notes in release commit via amendment (3f2afa8) |
|
|
7
8
|
| 1.1.4 | 2025-11-05 | simplify release notes staging to avoid git ref conflicts (d4077aa) |
|
|
8
9
|
| 1.1.3 | 2025-11-05 | See CHANGELOG for details. |
|
|
9
10
|
| 1.1.2 | 2025-11-05 | auto-update release notes during release (99d1043) |
|
|
@@ -26,6 +27,14 @@ This document summarizes every published version of `@programinglive/commiter`.
|
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
|
|
30
|
+
|
|
31
|
+
## 1.1.5 – ✨ Features
|
|
32
|
+
|
|
33
|
+
Released on **2025-11-05**.
|
|
34
|
+
|
|
35
|
+
- include release notes in release commit via amendment (3f2afa8)
|
|
36
|
+
- update release notes for v1.1.5 (cb3dbe6)
|
|
37
|
+
|
|
29
38
|
## 1.1.4 – 🐛 Bug Fixes
|
|
30
39
|
|
|
31
40
|
Released on **2025-11-05**.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@programinglive/commiter",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "Commiter keeps repositories release-ready by enforcing conventional commits, generating icon-rich changelog entries, and orchestrating semantic version bumps without manual toil. It bootstraps Husky hooks, commitlint rules, and release scripts that inspect history, detect framework-specific test commands, run them automatically, tag git releases, coordinate npm publishing, surface release metrics, enforce project-specific checks, and give maintainers observability across distributed teams. Plus!",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
package/scripts/release.js
CHANGED
|
@@ -173,6 +173,17 @@ function runRelease({
|
|
|
173
173
|
|
|
174
174
|
const releaseNotesPath = dependencies.releaseNotesPath || path.join('docs', 'release-notes', 'RELEASE_NOTES.md');
|
|
175
175
|
const updateNotes = dependencies.updateReleaseNotes || ((options = {}) => updateReleaseNotes({ rootDir: cwd, ...options }));
|
|
176
|
+
const gitAdd = dependencies.gitAdd || ((files) => spawnSync('git', ['add', ...files], { stdio: 'inherit', cwd }));
|
|
177
|
+
const gitCommitAmend = dependencies.gitCommitAmend || (() => spawnSync('git', ['commit', '--amend', '--no-edit'], { stdio: 'inherit', cwd }));
|
|
178
|
+
const gitTag = dependencies.gitTag || ((tagName, tagMessage) => {
|
|
179
|
+
const args = tagMessage
|
|
180
|
+
? ['tag', '-f', '-a', tagName, '-m', tagMessage]
|
|
181
|
+
: ['tag', '-f', tagName];
|
|
182
|
+
return spawnSync('git', args, { stdio: 'inherit', cwd });
|
|
183
|
+
});
|
|
184
|
+
const getCommitMessage = dependencies.getCommitMessage || (() => spawnSync('git', ['log', '-1', '--pretty=%s'], { cwd, encoding: 'utf8' }));
|
|
185
|
+
const buildTagName = dependencies.buildTagName || ((version) => `v${version}`);
|
|
186
|
+
const loadPackage = dependencies.loadPackageJson || ((dir) => loadPackageJson(dir));
|
|
176
187
|
|
|
177
188
|
let notesUpdated = false;
|
|
178
189
|
try {
|
|
@@ -182,9 +193,40 @@ function runRelease({
|
|
|
182
193
|
}
|
|
183
194
|
|
|
184
195
|
if (notesUpdated) {
|
|
185
|
-
const gitAddResult =
|
|
196
|
+
const gitAddResult = gitAdd([releaseNotesPath]);
|
|
186
197
|
if (!gitAddResult || typeof gitAddResult.status !== 'number' || gitAddResult.status !== 0) {
|
|
187
|
-
console.warn('⚠️ Release notes updated but failed to stage. Please add manually
|
|
198
|
+
console.warn('⚠️ Release notes updated but failed to stage changes. Please add them manually.');
|
|
199
|
+
return releaseResult;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const gitCommitResult = gitCommitAmend();
|
|
203
|
+
if (!gitCommitResult || typeof gitCommitResult.status !== 'number' || gitCommitResult.status !== 0) {
|
|
204
|
+
console.warn('⚠️ Release notes updated but failed to amend release commit. Please amend manually.');
|
|
205
|
+
return releaseResult;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const packageJson = loadPackage(cwd);
|
|
209
|
+
const version = packageJson && packageJson.version;
|
|
210
|
+
if (!version) {
|
|
211
|
+
console.warn('⚠️ Cannot retag release: package.json version missing. Please update tag manually.');
|
|
212
|
+
return releaseResult;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const tagName = buildTagName(version);
|
|
216
|
+
let tagMessage;
|
|
217
|
+
try {
|
|
218
|
+
const commitMessageResult = getCommitMessage();
|
|
219
|
+
if (commitMessageResult && typeof commitMessageResult.status === 'number' && commitMessageResult.status === 0) {
|
|
220
|
+
const output = typeof commitMessageResult.stdout === 'string' ? commitMessageResult.stdout : '';
|
|
221
|
+
tagMessage = output.trim();
|
|
222
|
+
}
|
|
223
|
+
} catch (error) {
|
|
224
|
+
console.warn(`⚠️ Unable to read release commit message: ${error.message}`);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
const gitTagResult = gitTag(tagName, tagMessage);
|
|
228
|
+
if (!gitTagResult || typeof gitTagResult.status === 'number' && gitTagResult.status !== 0) {
|
|
229
|
+
console.warn(`⚠️ Failed to retag ${tagName}. Please update the tag manually before pushing.`);
|
|
188
230
|
}
|
|
189
231
|
}
|
|
190
232
|
|