@programinglive/commiter 1.2.6 → 1.2.8

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,30 @@
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.2.8](https://github.com/programinglive/commiter/compare/v1.2.6...v1.2.8) (2025-12-02)
6
+
7
+
8
+ ### ♻️ Refactors
9
+
10
+ * remove website auto updates ([c6f2498](https://github.com/programinglive/commiter/commit/c6f24986dd657d7eae91ac84e821a6dbbb492e37))
11
+
12
+
13
+ ### 🧹 Chores
14
+
15
+ * **release:** 1.2.7 🚀 ([cb97edc](https://github.com/programinglive/commiter/commit/cb97edca4bccbccaf2e2b1228e0b0b6eef71dbb6))
16
+
17
+
18
+ ### 🏗️ Build System
19
+
20
+ * add netlify.toml for static site deployment ([2f70ec7](https://github.com/programinglive/commiter/commit/2f70ec7be08970d7a51b6fe186ef3fac9a9cef9e))
21
+
22
+ ### [1.2.7](https://github.com/programinglive/commiter/compare/v1.2.6...v1.2.7) (2025-12-02)
23
+
24
+
25
+ ### ♻️ Refactors
26
+
27
+ * remove website auto updates ([c6f2498](https://github.com/programinglive/commiter/commit/c6f24986dd657d7eae91ac84e821a6dbbb492e37))
28
+
5
29
  ### [1.2.6](https://github.com/programinglive/commiter/compare/v1.2.5...v1.2.6) (2025-11-30)
6
30
 
7
31
 
package/PRD.md CHANGED
@@ -27,8 +27,8 @@ Growing teams often struggle to keep release processes consistent: commit messag
27
27
  - **Release Helper (`scripts/release.js`)**
28
28
  - Detects release type from CLI args or npm context.
29
29
  - Runs project tests via detected package manager before releasing.
30
- - Invokes `standard-version` with additional flags (e.g., preload patch for deprecated APIs).
31
- - **[NEW]** Automatically updates website version in `web/index.html`.
30
+ - Invokes `standard-version`, passing the preload script via `NODE_OPTIONS`.
31
+ - Stays focused on repository assets only (website updates are intentionally manual to avoid cross-project impacts).
32
32
  - **Preload Patching (`scripts/preload/fs-f-ok.cjs`)**
33
33
  - Hooks Node’s module loader to transparently replace deprecated `fs.F_OK` usages in `standard-version` without altering `node_modules`.
34
34
  - **Website & Documentation**
@@ -4,6 +4,8 @@ This document summarizes every published version of `@programinglive/commiter`.
4
4
 
5
5
  | Version | Date | Highlights |
6
6
  |---------|------|------------|
7
+ | 1.2.8 | 2025-12-02 | remove website auto updates (c6f2498) |
8
+ | 1.2.7 | 2025-12-02 | remove website auto updates (c6f2498) |
7
9
  | 1.2.6 | 2025-11-30 | tests only run during release, not on commit (15600a0) |
8
10
  | 1.2.5 | 2025-11-29 | **release:** v1.2.4 🚀 (23e546a) |
9
11
  | 1.2.4 | 2025-11-27 | **release:** 1.2.3 (9d12f7e) |
@@ -54,6 +56,22 @@ This document summarizes every published version of `@programinglive/commiter`.
54
56
 
55
57
 
56
58
 
59
+
60
+
61
+ ## 1.2.8 – ♻️ Refactors
62
+
63
+ Released on **2025-12-02**.
64
+
65
+ - remove website auto updates (c6f2498)
66
+ - **release:** 1.2.7 🚀 (cb97edc)
67
+ - add netlify.toml for static site deployment (2f70ec7)
68
+
69
+ ## 1.2.7 – ♻️ Refactors
70
+
71
+ Released on **2025-12-02**.
72
+
73
+ - remove website auto updates (c6f2498)
74
+
57
75
  ## 1.2.6 – 🐛 Bug Fixes
58
76
 
59
77
  Released on **2025-11-30**.
package/netlify.toml ADDED
@@ -0,0 +1,2 @@
1
+ [build]
2
+ publish = "web"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@programinglive/commiter",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
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": {
@@ -13,9 +13,7 @@
13
13
  "release:major": "node scripts/release.cjs major",
14
14
  "release:minor": "node scripts/release.cjs minor",
15
15
  "release:patch": "node scripts/release.cjs patch",
16
- "web": "npx serve web",
17
- "update:web": "node scripts/update-web-version.js",
18
- "update:web:releases": "node scripts/update-web-releases.js"
16
+ "web": "npx serve web"
19
17
  },
20
18
  "keywords": [
21
19
  "commit",
@@ -188,39 +188,6 @@ function runRelease({
188
188
  }
189
189
  }
190
190
 
191
- let websiteVersionUpdated = false;
192
- let websiteTimelineUpdated = false;
193
-
194
- // Update website version
195
- try {
196
- console.log('🌐 Updating website version...');
197
- const updateWebResult = spawnSync(process.execPath, ['scripts/update-web-version.js'], { stdio: 'inherit', cwd });
198
- if (updateWebResult.status === 0) {
199
- websiteVersionUpdated = true;
200
- } else {
201
- console.warn('⚠️ Failed to update website version');
202
- }
203
- } catch (error) {
204
- console.warn(`⚠️ Skipping website version update: ${error.message}`);
205
- }
206
-
207
- // Update website releases timeline
208
- try {
209
- console.log('🌐 Updating website releases timeline...');
210
- const updateTimelineResult = spawnSync(process.execPath, ['scripts/update-web-releases.js'], { stdio: 'inherit', cwd });
211
- if (updateTimelineResult.status === 0) {
212
- websiteTimelineUpdated = true;
213
- } else {
214
- console.warn('⚠️ Failed to update website releases timeline');
215
- }
216
- } catch (error) {
217
- console.warn(`⚠️ Skipping website releases timeline update: ${error.message}`);
218
- }
219
-
220
- if (websiteVersionUpdated || websiteTimelineUpdated) {
221
- spawnSync('git', ['add', 'web/index.html'], { stdio: 'inherit', cwd });
222
- }
223
-
224
191
  return releaseResult;
225
192
  }
226
193
  if (require.main === module) {
package/web/index.html CHANGED
@@ -66,7 +66,7 @@
66
66
  <div class="hero-content">
67
67
  <div class="hero-badge">
68
68
  <span class="badge-dot"></span>
69
- <span>v1.2.6 - Latest Release</span>
69
+ <span>v1.2.5 - Latest Release</span>
70
70
  </div>
71
71
  <h1 class="hero-title">
72
72
  Ship Releases with <span class="gradient-text">Confidence</span>
@@ -90,7 +90,7 @@
90
90
  </div>
91
91
  <div class="hero-stats">
92
92
  <div class="stat-item">
93
- <div class="stat-value">1.2.6</div>
93
+ <div class="stat-value">1.2.5</div>
94
94
  <div class="stat-label">Latest Version</div>
95
95
  </div>
96
96
  <div class="stat-item">
@@ -385,12 +385,6 @@
385
385
  <!-- RELEASES_TIMELINE:START -->
386
386
  <div class="release-item">
387
387
  <div class="release-badge">Latest</div>
388
- <div class="release-version">v1.2.6</div>
389
- <div class="release-date">November 30, 2025</div>
390
- <div class="release-type">🐛 Bug Fixes</div>
391
- <p class="release-description">tests only run during release, not on commit (15600a0)</p>
392
- </div>
393
- <div class="release-item">
394
388
  <div class="release-version">v1.2.5</div>
395
389
  <div class="release-date">November 29, 2025</div>
396
390
  <div class="release-type">🧹 Chores</div>
@@ -414,6 +408,12 @@
414
408
  <div class="release-type">🧹 Chores</div>
415
409
  <p class="release-description">update homepage url (556b173)</p>
416
410
  </div>
411
+ <div class="release-item">
412
+ <div class="release-version">v1.2.1</div>
413
+ <div class="release-date">November 26, 2025</div>
414
+ <div class="release-type">🐛 Bug Fixes</div>
415
+ <p class="release-description">release: improve website version update reliability (18f5ace)</p>
416
+ </div>
417
417
  <!-- RELEASES_TIMELINE:END -->
418
418
  </div>
419
419
  <div class="releases-cta">
@@ -1,232 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- const DEFAULT_MAX_RELEASES = 5;
5
- const RELEASE_NOTES_PATH = path.join(__dirname, '..', 'docs', 'release-notes', 'RELEASE_NOTES.md');
6
- const INDEX_PATH = path.join(__dirname, '..', 'web', 'index.html');
7
- const MARKER_START = '<!-- RELEASES_TIMELINE:START -->';
8
- const MARKER_END = '<!-- RELEASES_TIMELINE:END -->';
9
-
10
- function readFileOrThrow(filePath, label) {
11
- if (!fs.existsSync(filePath)) {
12
- throw new Error(`${label} not found at ${filePath}`);
13
- }
14
- return fs.readFileSync(filePath, 'utf8');
15
- }
16
-
17
- function sanitizeText(text = '') {
18
- return text
19
- .replace(/\*\*/g, '')
20
- .replace(/`/g, '')
21
- .replace(/\[([^\]]+)\]\([^\)]+\)/g, '$1')
22
- .replace(/\s+/g, ' ')
23
- .trim();
24
- }
25
-
26
- function escapeHtml(text = '') {
27
- return text
28
- .replace(/&/g, '&amp;')
29
- .replace(/</g, '&lt;')
30
- .replace(/>/g, '&gt;')
31
- .replace(/"/g, '&quot;')
32
- .replace(/'/g, '&#39;');
33
- }
34
-
35
- function formatDate(dateString) {
36
- if (!dateString) {
37
- return 'Date pending';
38
- }
39
- const date = new Date(dateString);
40
- if (Number.isNaN(date.valueOf())) {
41
- return dateString;
42
- }
43
- return date.toLocaleDateString('en-US', {
44
- year: 'numeric',
45
- month: 'long',
46
- day: 'numeric'
47
- });
48
- }
49
-
50
- function extractReleaseSections(content) {
51
- const normalizedContent = content.replace(/\r\n/g, '\n');
52
- const tableEntries = extractReleaseTableEntries(normalizedContent);
53
- const detailMap = extractReleaseDetailsMap(normalizedContent);
54
-
55
- if (tableEntries.length === 0) {
56
- return extractSectionEntries(normalizedContent);
57
- }
58
-
59
- return tableEntries.map((entry) => {
60
- const details = detailMap.get(entry.version) || {};
61
- return {
62
- version: entry.version,
63
- releaseType: details.releaseType || '',
64
- date: entry.date,
65
- description: details.description || entry.highlight || 'See CHANGELOG for details.'
66
- };
67
- });
68
- }
69
-
70
- function extractReleaseTableEntries(content) {
71
- const lines = content.split('\n');
72
- const headerIndex = lines.findIndex((line) => /^\|\s*Version\s*\|/i.test(line));
73
- if (headerIndex === -1) {
74
- return [];
75
- }
76
-
77
- const entries = [];
78
- for (let i = headerIndex + 2; i < lines.length; i++) {
79
- const line = lines[i];
80
- if (!line.trim().startsWith('|')) {
81
- break;
82
- }
83
- const cells = line.split('|').slice(1, -1).map((cell) => sanitizeText(cell));
84
- if (cells.length < 3) {
85
- continue;
86
- }
87
- const [version, date, highlight] = cells;
88
- if (!version) {
89
- continue;
90
- }
91
- entries.push({ version, date, highlight });
92
- }
93
-
94
- return entries;
95
- }
96
-
97
- function extractReleaseDetailsMap(content) {
98
- const map = new Map();
99
- const sectionRegex = /^##\s+(.+?)\s*$([\s\S]*?)(?=^##\s+|$)/gm;
100
- let match;
101
-
102
- while ((match = sectionRegex.exec(content)) !== null) {
103
- const heading = match[1].trim();
104
- const body = match[2].trim().replace(/\r/g, '');
105
- const headingMatch = heading.match(/^(\d+\.\d+\.\d+)(?:\s+[–-]\s+(.+))?/);
106
- if (!headingMatch) {
107
- continue;
108
- }
109
-
110
- const version = headingMatch[1];
111
- const releaseType = headingMatch[2] ? headingMatch[2].trim() : '';
112
- const descriptionMatch = body.match(/^\s*\-\s+(.+)$/m);
113
- const description = descriptionMatch ? sanitizeText(descriptionMatch[1]) : undefined;
114
-
115
- map.set(version, {
116
- releaseType,
117
- description
118
- });
119
- }
120
-
121
- return map;
122
- }
123
-
124
- function extractSectionEntries(content) {
125
- const sections = [];
126
- const sectionRegex = /^##\s+(.+?)\s*$([\s\S]*?)(?=^##\s+|$)/gm;
127
- let match;
128
-
129
- while ((match = sectionRegex.exec(content)) !== null) {
130
- const heading = match[1].trim();
131
- const body = match[2].trim().replace(/\r/g, '');
132
- const headingMatch = heading.match(/^(\d+\.\d+\.\d+)(?:\s+[–-]\s+(.+))?/);
133
- if (!headingMatch) {
134
- continue;
135
- }
136
-
137
- const version = headingMatch[1];
138
- const releaseType = headingMatch[2] ? headingMatch[2].trim() : '';
139
- const dateMatch = body.match(/Released on \*\*(\d{4}-\d{2}-\d{2})\*\*\.?/);
140
- const descriptionMatch = body.match(/^\s*\-\s+(.+)$/m);
141
-
142
- sections.push({
143
- version,
144
- releaseType,
145
- date: dateMatch ? dateMatch[1] : undefined,
146
- description: descriptionMatch ? sanitizeText(descriptionMatch[1]) : 'See CHANGELOG for details.'
147
- });
148
- }
149
-
150
- return sections;
151
- }
152
-
153
- function renderReleaseItem(release, { latest = false, indent = '' } = {}) {
154
- const badge = latest ? `\n${indent} <div class="release-badge">Latest</div>` : '';
155
- const typeLine = release.releaseType
156
- ? `\n${indent} <div class="release-type">${escapeHtml(release.releaseType)}</div>`
157
- : '';
158
-
159
- return `${indent}<div class="release-item">${badge}
160
- ${indent} <div class="release-version">v${escapeHtml(release.version)}</div>
161
- ${indent} <div class="release-date">${escapeHtml(formatDate(release.date))}</div>${typeLine}
162
- ${indent} <p class="release-description">${escapeHtml(release.description)}</p>
163
- ${indent}</div>`;
164
- }
165
-
166
- function updateIndexHtml({
167
- htmlContent,
168
- releases,
169
- markerStart = MARKER_START,
170
- markerEnd = MARKER_END,
171
- indent = ' '
172
- }) {
173
- const startIndex = htmlContent.indexOf(markerStart);
174
- const endIndex = htmlContent.indexOf(markerEnd);
175
-
176
- if (startIndex === -1 || endIndex === -1 || endIndex <= startIndex) {
177
- throw new Error('Release timeline markers not found in web/index.html');
178
- }
179
-
180
- const before = htmlContent.slice(0, startIndex + markerStart.length);
181
- const after = htmlContent.slice(endIndex);
182
- const timeline = releases
183
- .map((release, idx) => renderReleaseItem(release, { latest: idx === 0, indent }))
184
- .join('\n');
185
-
186
- return `${before}\n${timeline}\n${indent}${after.trimStart()}`;
187
- }
188
-
189
- function updateWebReleases({
190
- releaseNotesPath = RELEASE_NOTES_PATH,
191
- indexPath = INDEX_PATH,
192
- maxReleases = DEFAULT_MAX_RELEASES
193
- } = {}) {
194
- const notesContent = readFileOrThrow(releaseNotesPath, 'Release notes');
195
- const releases = extractReleaseSections(notesContent).slice(0, maxReleases);
196
-
197
- if (releases.length === 0) {
198
- console.warn('⚠️ No release sections found; skipping website update.');
199
- return false;
200
- }
201
-
202
- const htmlContent = readFileOrThrow(indexPath, 'Landing page');
203
- const nextContent = updateIndexHtml({ htmlContent, releases });
204
- fs.writeFileSync(indexPath, nextContent);
205
- console.log(`✅ Updated website releases timeline with ${releases.length} entries.`);
206
- return true;
207
- }
208
-
209
- function main() {
210
- try {
211
- updateWebReleases();
212
- } catch (error) {
213
- console.error(`❌ Failed to update website releases timeline: ${error.message}`);
214
- process.exit(1);
215
- }
216
- }
217
-
218
- module.exports = {
219
- escapeHtml,
220
- sanitizeText,
221
- formatDate,
222
- extractReleaseSections,
223
- renderReleaseItem,
224
- updateIndexHtml,
225
- updateWebReleases,
226
- MARKER_START,
227
- MARKER_END
228
- };
229
-
230
- if (require.main === module) {
231
- main();
232
- }
@@ -1,37 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const { execSync } = require('child_process');
4
-
5
- // Get current version from latest git tag
6
- let version;
7
- try {
8
- // Get the latest tag
9
- const tag = execSync('git describe --tags --abbrev=0', { encoding: 'utf8' }).trim();
10
- // Remove 'v' prefix if present
11
- version = tag.startsWith('v') ? tag.substring(1) : tag;
12
- } catch (error) {
13
- // Fallback to package.json if no tags exist
14
- console.warn('⚠️ No git tags found, falling back to package.json version');
15
- const packageJson = require('../package.json');
16
- version = packageJson.version;
17
- }
18
-
19
- const indexPath = path.join(__dirname, '../web/index.html');
20
- let content = fs.readFileSync(indexPath, 'utf8');
21
-
22
- // Update version in the badge
23
- // Matches: <span>v1.1.9 - Latest Release</span>
24
- content = content.replace(
25
- /<span>v\d+\.\d+\.\d+ - Latest Release<\/span>/,
26
- `<span>v${version} - Latest Release</span>`
27
- );
28
-
29
- // Update version in the stats
30
- // Matches: <div class="stat-value">1.1.9</div>
31
- content = content.replace(
32
- /<div class="stat-value">\d+\.\d+\.\d+<\/div>(\s*<div class="stat-label">Latest Version<\/div>)/,
33
- `<div class="stat-value">${version}</div>$1`
34
- );
35
-
36
- fs.writeFileSync(indexPath, content);
37
- console.log(`✅ Updated website to version ${version} (from git tag)`);