@programinglive/commiter 1.1.7 → 1.1.9
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
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.9](https://github.com/programinglive/commiter/compare/v1.1.8...v1.1.9) (2025-11-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🐛 Bug Fixes
|
|
9
|
+
|
|
10
|
+
* convert release scripts to CJS to support ESM projects ([842da02](https://github.com/programinglive/commiter/commit/842da0298f1c4df7aa93b43ca8698e3669ef6450))
|
|
11
|
+
|
|
12
|
+
### [1.1.8](https://github.com/programinglive/commiter/compare/v1.1.7...v1.1.8) (2025-11-22)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug Fixes
|
|
16
|
+
|
|
17
|
+
* update installation script to copy missing files and update gitignore ([5d56259](https://github.com/programinglive/commiter/commit/5d562592fe35b684fa12bd89748b24551ae28a66))
|
|
18
|
+
|
|
5
19
|
### [1.1.7](https://github.com/programinglive/commiter/compare/v1.1.6...v1.1.7) (2025-11-11)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -4,6 +4,8 @@ This document summarizes every published version of `@programinglive/commiter`.
|
|
|
4
4
|
|
|
5
5
|
| Version | Date | Highlights |
|
|
6
6
|
|---------|------|------------|
|
|
7
|
+
| 1.1.9 | 2025-11-24 | convert release scripts to CJS to support ESM projects (842da02) |
|
|
8
|
+
| 1.1.8 | 2025-11-22 | update installation script to copy missing files and update gitignore (5d56259) |
|
|
7
9
|
| 1.1.7 | 2025-11-11 | recommend dev workflow mcp server (58a5054) |
|
|
8
10
|
| 1.1.6 | 2025-11-05 | revert to simple release notes staging to avoid git ref conflicts (2f6a40e) |
|
|
9
11
|
| 1.1.5 | 2025-11-05 | include release notes in release commit via amendment (3f2afa8) |
|
|
@@ -32,6 +34,20 @@ This document summarizes every published version of `@programinglive/commiter`.
|
|
|
32
34
|
|
|
33
35
|
|
|
34
36
|
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## 1.1.9 – 🐛 Bug Fixes
|
|
40
|
+
|
|
41
|
+
Released on **2025-11-24**.
|
|
42
|
+
|
|
43
|
+
- convert release scripts to CJS to support ESM projects (842da02)
|
|
44
|
+
|
|
45
|
+
## 1.1.8 – 🐛 Bug Fixes
|
|
46
|
+
|
|
47
|
+
Released on **2025-11-22**.
|
|
48
|
+
|
|
49
|
+
- update installation script to copy missing files and update gitignore (5d56259)
|
|
50
|
+
|
|
35
51
|
## 1.1.7 – 📝 Documentation
|
|
36
52
|
|
|
37
53
|
Released on **2025-11-11**.
|
package/index.js
CHANGED
|
@@ -19,6 +19,23 @@ function ensureSafeTestScript(scripts = {}) {
|
|
|
19
19
|
return scripts;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
function copyRecursiveSync(src, dest) {
|
|
23
|
+
const exists = fs.existsSync(src);
|
|
24
|
+
const stats = exists && fs.statSync(src);
|
|
25
|
+
const isDirectory = exists && stats.isDirectory();
|
|
26
|
+
|
|
27
|
+
if (isDirectory) {
|
|
28
|
+
if (!fs.existsSync(dest)) {
|
|
29
|
+
fs.mkdirSync(dest);
|
|
30
|
+
}
|
|
31
|
+
fs.readdirSync(src).forEach((childItemName) => {
|
|
32
|
+
copyRecursiveSync(path.join(src, childItemName), path.join(dest, childItemName));
|
|
33
|
+
});
|
|
34
|
+
} else {
|
|
35
|
+
fs.copyFileSync(src, dest);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
22
39
|
function setupCommiter() {
|
|
23
40
|
console.log('🚀 Setting up Commiter...\n');
|
|
24
41
|
|
|
@@ -42,10 +59,10 @@ function setupCommiter() {
|
|
|
42
59
|
packageJson.scripts = ensureSafeTestScript(packageJson.scripts || {});
|
|
43
60
|
// Add scripts
|
|
44
61
|
packageJson.scripts.prepare = 'husky';
|
|
45
|
-
packageJson.scripts.release = 'node scripts/release.
|
|
46
|
-
packageJson.scripts['release:major'] = 'node scripts/release.
|
|
47
|
-
packageJson.scripts['release:minor'] = 'node scripts/release.
|
|
48
|
-
packageJson.scripts['release:patch'] = 'node scripts/release.
|
|
62
|
+
packageJson.scripts.release = 'node scripts/release.cjs';
|
|
63
|
+
packageJson.scripts['release:major'] = 'node scripts/release.cjs major';
|
|
64
|
+
packageJson.scripts['release:minor'] = 'node scripts/release.cjs minor';
|
|
65
|
+
packageJson.scripts['release:patch'] = 'node scripts/release.cjs patch';
|
|
49
66
|
|
|
50
67
|
// Add standard-version config
|
|
51
68
|
packageJson['standard-version'] = {
|
|
@@ -75,11 +92,23 @@ function setupCommiter() {
|
|
|
75
92
|
fs.mkdirSync(releaseScriptDir, { recursive: true });
|
|
76
93
|
}
|
|
77
94
|
|
|
78
|
-
const releaseScriptPath = path.join(releaseScriptDir, 'release.
|
|
79
|
-
const releaseScriptSource = path.join(__dirname, 'scripts', 'release.
|
|
80
|
-
|
|
95
|
+
const releaseScriptPath = path.join(releaseScriptDir, 'release.cjs');
|
|
96
|
+
const releaseScriptSource = path.join(__dirname, 'scripts', 'release.cjs');
|
|
97
|
+
fs.copyFileSync(releaseScriptSource, releaseScriptPath);
|
|
98
|
+
|
|
99
|
+
// Copy update-release-notes.js
|
|
100
|
+
const updateNotesSource = path.join(__dirname, 'scripts', 'update-release-notes.cjs');
|
|
101
|
+
const updateNotesDest = path.join(releaseScriptDir, 'update-release-notes.cjs');
|
|
102
|
+
if (fs.existsSync(updateNotesSource)) {
|
|
103
|
+
fs.copyFileSync(updateNotesSource, updateNotesDest);
|
|
104
|
+
}
|
|
81
105
|
|
|
82
|
-
|
|
106
|
+
// Copy preload directory
|
|
107
|
+
const preloadSource = path.join(__dirname, 'scripts', 'preload');
|
|
108
|
+
const preloadDest = path.join(releaseScriptDir, 'preload');
|
|
109
|
+
if (fs.existsSync(preloadSource)) {
|
|
110
|
+
copyRecursiveSync(preloadSource, preloadDest);
|
|
111
|
+
}
|
|
83
112
|
try {
|
|
84
113
|
fs.chmodSync(releaseScriptPath, 0o755);
|
|
85
114
|
} catch (error) {
|
|
@@ -124,6 +153,18 @@ npx --no -- commitlint --edit "$1"
|
|
|
124
153
|
fs.writeFileSync(path.join(huskyDir, 'commit-msg'), commitMsgHook);
|
|
125
154
|
fs.chmodSync(path.join(huskyDir, 'commit-msg'), 0o755);
|
|
126
155
|
|
|
156
|
+
// Update .gitignore
|
|
157
|
+
const gitignorePath = path.join(process.cwd(), '.gitignore');
|
|
158
|
+
let gitignoreContent = '';
|
|
159
|
+
if (fs.existsSync(gitignorePath)) {
|
|
160
|
+
gitignoreContent = fs.readFileSync(gitignorePath, 'utf8');
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (!gitignoreContent.includes('node_modules')) {
|
|
164
|
+
console.log('📝 Updating .gitignore...');
|
|
165
|
+
fs.appendFileSync(gitignorePath, '\nnode_modules\n');
|
|
166
|
+
}
|
|
167
|
+
|
|
127
168
|
console.log('\n✅ Commiter setup complete!\n');
|
|
128
169
|
console.log('📚 Available commands:');
|
|
129
170
|
console.log(' npm run release major - Create a major release (1.0.0 → 2.0.0)');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@programinglive/commiter",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
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": {
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test": "node --test",
|
|
11
11
|
"prepare": "husky",
|
|
12
|
-
"release": "node scripts/release.
|
|
13
|
-
"release:major": "node scripts/release.
|
|
14
|
-
"release:minor": "node scripts/release.
|
|
15
|
-
"release:patch": "node scripts/release.
|
|
12
|
+
"release": "node scripts/release.cjs",
|
|
13
|
+
"release:major": "node scripts/release.cjs major",
|
|
14
|
+
"release:minor": "node scripts/release.cjs minor",
|
|
15
|
+
"release:patch": "node scripts/release.cjs patch"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
18
|
"commit",
|
|
@@ -4,7 +4,7 @@ const { spawnSync } = require('child_process');
|
|
|
4
4
|
const fs = require('fs');
|
|
5
5
|
const path = require('path');
|
|
6
6
|
|
|
7
|
-
const { updateReleaseNotes } = require('./update-release-notes');
|
|
7
|
+
const { updateReleaseNotes } = require('./update-release-notes.cjs');
|
|
8
8
|
|
|
9
9
|
const fsFokPreloadPath = path.join(__dirname, 'preload', 'fs-f-ok.cjs');
|
|
10
10
|
const FS_FOK_PRELOAD_FLAG = buildPreloadFlag(fsFokPreloadPath);
|
|
File without changes
|