@programinglive/commiter 1.2.16 β 1.2.18
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 +30 -0
- package/README.md +5 -4
- package/commitlint.config.cjs +1 -1
- package/docs/PRD.md +18 -0
- package/docs/release-notes/RELEASE_NOTES.md +20 -0
- package/index.js +13 -0
- package/package.json +3 -3
- package/scripts/release.cjs +34 -2
- package/web/index.html +35 -23
- package/PRD.md +0 -96
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,36 @@
|
|
|
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.18](https://github.com/programinglive/commiter/compare/v1.2.17...v1.2.18) (2026-01-01)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### π Documentation
|
|
9
|
+
|
|
10
|
+
* **release-notes:** add 1.2.17 entry ([0a79779](https://github.com/programinglive/commiter/commit/0a7977964e9231a53d7d006cec5e847daeee2033))
|
|
11
|
+
* **web:** refresh homepage content for v1.2.17 ([2fc6666](https://github.com/programinglive/commiter/commit/2fc6666369e18a0dbda9488d9ed0ac6a09298f95))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### β¨ Features
|
|
15
|
+
|
|
16
|
+
* add usage warning and MCP dev-workflow tip ([df7bc00](https://github.com/programinglive/commiter/commit/df7bc0078f75780f3daaeb703b6fe2b248910446))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### β
Tests
|
|
20
|
+
|
|
21
|
+
* add automated tests for usage warnings ([af6283e](https://github.com/programinglive/commiter/commit/af6283edfa4e1e677fc20bfc5e6b243db192867f))
|
|
22
|
+
|
|
23
|
+
### [1.2.17](https://github.com/programinglive/commiter/compare/v1.2.16...v1.2.17) (2025-12-26)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### π Documentation
|
|
27
|
+
|
|
28
|
+
* **web:** update homepage for v1.2.16 release ([c4ba36e](https://github.com/programinglive/commiter/commit/c4ba36ed3b9ec50f16df92b4cc37094f3173fc3a))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### β¨ Features
|
|
32
|
+
|
|
33
|
+
* **release:** enforce PRD presence warning ([227e237](https://github.com/programinglive/commiter/commit/227e237012cb56f9b570e69f96dc4bd2e836b319))
|
|
34
|
+
|
|
5
35
|
### [1.2.16](https://github.com/programinglive/commiter/compare/v1.2.15...v1.2.16) (2025-12-13)
|
|
6
36
|
|
|
7
37
|
|
package/README.md
CHANGED
|
@@ -128,10 +128,11 @@ npm run release
|
|
|
128
128
|
|
|
129
129
|
1. π§ͺ **Runs tests** - Detects your package manager and runs the `test` script automatically (tests only run during release, not on commit)
|
|
130
130
|
2. π **Analyzes commits** - Examines commits since last release
|
|
131
|
-
3.
|
|
132
|
-
4.
|
|
133
|
-
5.
|
|
134
|
-
6.
|
|
131
|
+
3. π **Verifies documentation** β Warns if `docs/PRD.md` is missing so every project keeps an up-to-date PRD
|
|
132
|
+
4. π’ **Bumps version** - Updates version in `package.json`
|
|
133
|
+
5. π **Updates changelog** - Generates `CHANGELOG.md` with icons
|
|
134
|
+
6. π·οΈ **Creates tag** - Creates a git tag for the release
|
|
135
|
+
7. πΎ **Commits release** - Commits changes with format: `chore(release): v1.2.3 π`
|
|
135
136
|
|
|
136
137
|
## Push Your Release
|
|
137
138
|
|
package/commitlint.config.cjs
CHANGED
package/docs/PRD.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# PRD: Usage Clarification and Automated Testing
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
Prevent users and AI assistants from misusing `@programinglive/commiter` as a generic git commit tool. Guide AI assistants toward the correct tool (@programinglive/dev-workflow-mcp-server) and ensure these safeguards are verified by automated tests.
|
|
5
|
+
|
|
6
|
+
## Problem
|
|
7
|
+
AI assistants sometimes assume `@programinglive/commiter` is for committing files (e.g., `commiter "message"`). This fails because the tool is meant for setup and release orchestration. Automated verification of these safeguards was initially missing.
|
|
8
|
+
|
|
9
|
+
## Requirements
|
|
10
|
+
- Display a warning banner if arguments are passed to `node index.js`.
|
|
11
|
+
- Suggest standard `git commit` commands.
|
|
12
|
+
- Provide a tip to use the MCP dev-workflow for AI assistants.
|
|
13
|
+
- Update release script error messages to include the same tip.
|
|
14
|
+
- **[NEW]** Implement automated tests to verify the above behavior across `index.js` and `scripts/release.cjs`.
|
|
15
|
+
|
|
16
|
+
## Verification
|
|
17
|
+
- Automated tests in `test/usage-warning.test.js`.
|
|
18
|
+
- Manual verification of CLI output.
|
|
@@ -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.18 | 2026-01-01 | **release-notes:** add 1.2.17 entry (0a79779) |
|
|
8
|
+
| 1.2.17 | 2025-12-26 | **web:** update homepage for v1.2.16 release (c4ba36e) |
|
|
7
9
|
| 1.2.16 | 2025-12-13 | upgrade to node 20 and update npm for OIDC (5f7d9a0) |
|
|
8
10
|
| 1.2.15 | 2025-12-13 | remove registry-url to fix OIDC auth conflict (c49b6e8) |
|
|
9
11
|
| 1.2.14 | 2025-12-13 | remove legacy auth token env (8508deb) |
|
|
@@ -73,6 +75,24 @@ This document summarizes every published version of `@programinglive/commiter`.
|
|
|
73
75
|
|
|
74
76
|
|
|
75
77
|
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
## 1.2.18 β π Documentation
|
|
82
|
+
|
|
83
|
+
Released on **2026-01-01**.
|
|
84
|
+
|
|
85
|
+
- **release-notes:** add 1.2.17 entry (0a79779)
|
|
86
|
+
- **web:** refresh homepage content for v1.2.17 (2fc6666)
|
|
87
|
+
- add usage warning and MCP dev-workflow tip (df7bc00)
|
|
88
|
+
- add automated tests for usage warnings (af6283e)
|
|
89
|
+
|
|
90
|
+
## 1.2.17 β π Documentation
|
|
91
|
+
|
|
92
|
+
Released on **2025-12-26**.
|
|
93
|
+
|
|
94
|
+
- **web:** update homepage for v1.2.16 release (c4ba36e)
|
|
95
|
+
- **release:** enforce PRD presence warning (227e237)
|
|
76
96
|
|
|
77
97
|
## 1.2.16 β π· Continuous Integration
|
|
78
98
|
|
package/index.js
CHANGED
|
@@ -37,6 +37,19 @@ function copyRecursiveSync(src, dest) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
function setupCommiter() {
|
|
40
|
+
const args = process.argv.slice(2);
|
|
41
|
+
|
|
42
|
+
// If arguments are passed, it's likely someone is trying to use this as a commit tool
|
|
43
|
+
if (args.length > 0) {
|
|
44
|
+
console.error('\nβ οΈ WARNING: @programinglive/commiter is a SETUP and RELEASE tool, NOT a commit tool.');
|
|
45
|
+
console.error('π To commit your changes, please use standard git commands:');
|
|
46
|
+
console.error(' git add .');
|
|
47
|
+
console.error(' git commit -m "your message"\n');
|
|
48
|
+
console.error('π‘ TIP for AI: Use the `@programinglive/dev-workflow-mcp-server` to handle commits and releases properly.');
|
|
49
|
+
console.error('β If you meant to setup this project, run without arguments.\n');
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
|
|
40
53
|
console.log('π Setting up Commiter...\n');
|
|
41
54
|
|
|
42
55
|
// Check if package.json exists
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@programinglive/commiter",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.18",
|
|
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": {
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
]
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
|
-
"@commitlint/cli": "^20.
|
|
92
|
-
"@commitlint/config-conventional": "^20.
|
|
91
|
+
"@commitlint/cli": "^20.2.0",
|
|
92
|
+
"@commitlint/config-conventional": "^20.2.0",
|
|
93
93
|
"husky": "^9.1.7",
|
|
94
94
|
"standard-version": "^9.5.0"
|
|
95
95
|
}
|
package/scripts/release.cjs
CHANGED
|
@@ -11,6 +11,9 @@ const FS_FOK_PRELOAD_FLAG = buildPreloadFlag(fsFokPreloadPath);
|
|
|
11
11
|
|
|
12
12
|
require('./preload/fs-f-ok.cjs');
|
|
13
13
|
|
|
14
|
+
const DEFAULT_PRD_RELATIVE_PATH = path.join('docs', 'PRD.md');
|
|
15
|
+
const DEFAULT_PRD_DISPLAY_PATH = 'docs/PRD.md';
|
|
16
|
+
|
|
14
17
|
const VALID_RELEASE_TYPES = new Set([
|
|
15
18
|
'major',
|
|
16
19
|
'minor',
|
|
@@ -60,7 +63,7 @@ function getNpmRunArgument(env = process.env) {
|
|
|
60
63
|
|
|
61
64
|
function buildStandardVersionArgs({ releaseType, extraArgs }) {
|
|
62
65
|
const args = [];
|
|
63
|
-
|
|
66
|
+
|
|
64
67
|
// Handle --first-release flag
|
|
65
68
|
const isFirstRelease = Array.isArray(extraArgs) && extraArgs.includes('--first-release');
|
|
66
69
|
if (isFirstRelease) {
|
|
@@ -72,6 +75,11 @@ function buildStandardVersionArgs({ releaseType, extraArgs }) {
|
|
|
72
75
|
const isValid = VALID_RELEASE_TYPES.has(normalized) || SEMVER_REGEX.test(normalized);
|
|
73
76
|
if (!isValid) {
|
|
74
77
|
const allowed = Array.from(VALID_RELEASE_TYPES).join(', ');
|
|
78
|
+
console.error('\nβ οΈ WARNING: Unknown release type or command detected.');
|
|
79
|
+
console.error('π If you are trying to commit changes, please use standard git commands:');
|
|
80
|
+
console.error(' git add .');
|
|
81
|
+
console.error(' git commit -m "your message"\n');
|
|
82
|
+
console.error('π‘ TIP for AI: Use the `@programinglive/dev-workflow-mcp-server` to handle commits and releases properly.');
|
|
75
83
|
throw new Error(`Unknown release type "${normalized}". Use one of ${allowed} or a valid semver version.`);
|
|
76
84
|
}
|
|
77
85
|
args.push('--release-as', normalized);
|
|
@@ -161,6 +169,8 @@ function runRelease({
|
|
|
161
169
|
throw new Error('Working tree has uncommitted changes. Commit or stash before running release.');
|
|
162
170
|
}
|
|
163
171
|
|
|
172
|
+
ensurePrdPresence({ cwd, dependencies });
|
|
173
|
+
|
|
164
174
|
const testResult = runProjectTests({ spawn, env });
|
|
165
175
|
if (testResult && typeof testResult.status === 'number' && testResult.status !== 0) {
|
|
166
176
|
return testResult;
|
|
@@ -219,9 +229,31 @@ module.exports = {
|
|
|
219
229
|
detectPackageManager,
|
|
220
230
|
runProjectTests,
|
|
221
231
|
runRelease,
|
|
222
|
-
isWorkingTreeClean
|
|
232
|
+
isWorkingTreeClean,
|
|
233
|
+
ensurePrdPresence
|
|
223
234
|
};
|
|
224
235
|
|
|
236
|
+
function ensurePrdPresence({ cwd = process.cwd(), dependencies = {} } = {}) {
|
|
237
|
+
const {
|
|
238
|
+
fsExistsSync = fs.existsSync,
|
|
239
|
+
logger = console,
|
|
240
|
+
prdRelativePath = DEFAULT_PRD_RELATIVE_PATH,
|
|
241
|
+
prdDisplayPath = DEFAULT_PRD_DISPLAY_PATH
|
|
242
|
+
} = dependencies;
|
|
243
|
+
|
|
244
|
+
const resolvedPath = path.isAbsolute(prdRelativePath)
|
|
245
|
+
? prdRelativePath
|
|
246
|
+
: path.join(cwd, prdRelativePath);
|
|
247
|
+
|
|
248
|
+
if (fsExistsSync(resolvedPath)) {
|
|
249
|
+
return true;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
const warn = typeof logger?.warn === 'function' ? logger.warn.bind(logger) : console.warn.bind(console);
|
|
253
|
+
warn(`β οΈ Product Requirements Document missing (${prdDisplayPath}). Add ${DEFAULT_PRD_DISPLAY_PATH} so teams understand release expectations.`);
|
|
254
|
+
return false;
|
|
255
|
+
}
|
|
256
|
+
|
|
225
257
|
function buildPreloadFlag(filePath) {
|
|
226
258
|
const resolved = path.resolve(filePath);
|
|
227
259
|
const escaped = resolved.includes(' ')
|
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.
|
|
69
|
+
<span>v1.2.17 - 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.
|
|
93
|
+
<div class="stat-value">1.2.17</div>
|
|
94
94
|
<div class="stat-label">Latest Version</div>
|
|
95
95
|
</div>
|
|
96
96
|
<div class="stat-item">
|
|
@@ -121,9 +121,9 @@
|
|
|
121
121
|
<div class="code-line output success">π Setup complete! Ready to release.</div>
|
|
122
122
|
<div class="code-line"><span class="prompt">$</span> npm run release:patch</div>
|
|
123
123
|
<div class="code-line output">β Running tests...</div>
|
|
124
|
-
<div class="code-line output">β Bumping version to 1.
|
|
124
|
+
<div class="code-line output">β Bumping version to 1.2.17...</div>
|
|
125
125
|
<div class="code-line output">β Updating CHANGELOG.md...</div>
|
|
126
|
-
<div class="code-line output success">π Release v1.
|
|
126
|
+
<div class="code-line output success">π Release v1.2.17 ready!</div>
|
|
127
127
|
<div class="code-line cursor">_</div>
|
|
128
128
|
</div>
|
|
129
129
|
</div>
|
|
@@ -388,34 +388,46 @@
|
|
|
388
388
|
<!-- RELEASES_TIMELINE:START -->
|
|
389
389
|
<div class="release-item">
|
|
390
390
|
<div class="release-badge">Latest</div>
|
|
391
|
-
<div class="release-version">v1.2.
|
|
392
|
-
<div class="release-date">
|
|
393
|
-
<div class="release-type"
|
|
394
|
-
<p class="release-description">
|
|
391
|
+
<div class="release-version">v1.2.17</div>
|
|
392
|
+
<div class="release-date">December 26, 2025</div>
|
|
393
|
+
<div class="release-type">π Documentation</div>
|
|
394
|
+
<p class="release-description">web: update homepage for the v1.2.16 release spotlight</p>
|
|
395
395
|
</div>
|
|
396
396
|
<div class="release-item">
|
|
397
|
-
<div class="release-version">v1.2.
|
|
398
|
-
<div class="release-date">
|
|
399
|
-
<div class="release-type"
|
|
400
|
-
<p class="release-description">
|
|
397
|
+
<div class="release-version">v1.2.16</div>
|
|
398
|
+
<div class="release-date">December 13, 2025</div>
|
|
399
|
+
<div class="release-type">π· Continuous Integration</div>
|
|
400
|
+
<p class="release-description">upgrade to node 20 and update npm for OIDC via GitHub Actions</p>
|
|
401
|
+
</div>
|
|
402
|
+
<div class="release-item">
|
|
403
|
+
<div class="release-version">v1.2.15</div>
|
|
404
|
+
<div class="release-date">December 13, 2025</div>
|
|
405
|
+
<div class="release-type">π· Continuous Integration</div>
|
|
406
|
+
<p class="release-description">remove registry-url to fix OIDC auth conflict</p>
|
|
401
407
|
</div>
|
|
402
408
|
<div class="release-item">
|
|
403
|
-
<div class="release-version">v1.2.
|
|
404
|
-
<div class="release-date">
|
|
405
|
-
<div class="release-type"
|
|
406
|
-
<p class="release-description">
|
|
409
|
+
<div class="release-version">v1.2.14</div>
|
|
410
|
+
<div class="release-date">December 13, 2025</div>
|
|
411
|
+
<div class="release-type">π· Continuous Integration</div>
|
|
412
|
+
<p class="release-description">remove legacy auth token env</p>
|
|
407
413
|
</div>
|
|
408
414
|
<div class="release-item">
|
|
409
|
-
<div class="release-version">v1.2.
|
|
410
|
-
<div class="release-date">
|
|
415
|
+
<div class="release-version">v1.2.13</div>
|
|
416
|
+
<div class="release-date">December 13, 2025</div>
|
|
417
|
+
<div class="release-type">π· Continuous Integration</div>
|
|
418
|
+
<p class="release-description">enable npm trusted publishing (OIDC) with provenance</p>
|
|
419
|
+
</div>
|
|
420
|
+
<div class="release-item">
|
|
421
|
+
<div class="release-version">v1.2.12</div>
|
|
422
|
+
<div class="release-date">December 13, 2025</div>
|
|
411
423
|
<div class="release-type">π§Ή Chores</div>
|
|
412
|
-
<p class="release-description">
|
|
424
|
+
<p class="release-description">cleanup and add deployment scripts</p>
|
|
413
425
|
</div>
|
|
414
426
|
<div class="release-item">
|
|
415
|
-
<div class="release-version">v1.2.
|
|
416
|
-
<div class="release-date">
|
|
417
|
-
<div class="release-type"
|
|
418
|
-
<p class="release-description">
|
|
427
|
+
<div class="release-version">v1.2.11</div>
|
|
428
|
+
<div class="release-date">December 11, 2025</div>
|
|
429
|
+
<div class="release-type">π§Ή Chores</div>
|
|
430
|
+
<p class="release-description">cleanup and add deployment scripts</p>
|
|
419
431
|
</div>
|
|
420
432
|
<!-- RELEASES_TIMELINE:END -->
|
|
421
433
|
</div>
|
package/PRD.md
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
# Commiter Product Requirements Document (PRD)
|
|
2
|
-
|
|
3
|
-
## 1. Overview
|
|
4
|
-
Commiter is a CLI utility that bootstraps and automates conventional release workflows for JavaScript/TypeScript projects. It enforces commit conventions, orchestrates semantic version bumps, keeps release tooling configured, and surfaces feedback during release execution so teams can ship confidently.
|
|
5
|
-
|
|
6
|
-
## 2. Problem Statement
|
|
7
|
-
Growing teams often struggle to keep release processes consistent: commit messages drift from convention, changelogs become stale, and release scripts accumulate manual steps. Commiter removes this friction by installing opinionated tooling, providing curated scripts, and running guard rails (tests, linters) before invoking `standard-version` to publish a release.
|
|
8
|
-
|
|
9
|
-
## 3. Goals & Success Metrics
|
|
10
|
-
- **Consistent releases**: Every release run through Commiter formats commits, updates changelogs, tags, and version bumps without manual editing.
|
|
11
|
-
- **Low ceremony onboarding**: A single `npx commiter` command prepares repositories (Husky, commitlint, release scripts).
|
|
12
|
-
- **Signal-rich automation**: Release logs clearly show which steps ran, including any warnings (e.g., tests skipped). Zero noisy deprecation warnings.
|
|
13
|
-
- **Reliability**: New releases do not regress existing behavior; the automated test suite passes (`node --test`).
|
|
14
|
-
- **Adoption Metric**: Track installations (npm downloads) and successful release script exits.
|
|
15
|
-
|
|
16
|
-
## 4. Personas
|
|
17
|
-
1. **Solo Maintainer** β wants painless semantic releases without memorizing commands.
|
|
18
|
-
2. **Team Lead** β enforces commit standards across contributors and ensures releases produce accurate changelogs.
|
|
19
|
-
3. **DevOps/CI Engineer** β integrates Commiterβs release command into CI pipelines and expects deterministic, machine-readable output.
|
|
20
|
-
|
|
21
|
-
## 5. Key Features
|
|
22
|
-
- **Setup CLI (`index.js`)**
|
|
23
|
-
- Installs dev dependencies (`standard-version`, `commitlint`, `husky`).
|
|
24
|
-
- Configures package scripts (`npm run release`, `release:major/minor/patch`, `release:first`).
|
|
25
|
-
- Creates Husky hooks and commitlint configuration.
|
|
26
|
-
- Generates release helper script and ensures executable permissions (POSIX-friendly).
|
|
27
|
-
- **Release Helper (`scripts/release.js`)**
|
|
28
|
-
- Detects release type from CLI args or npm context.
|
|
29
|
-
- Runs project tests via detected package manager before releasing.
|
|
30
|
-
- Invokes `standard-version`, passing the preload script via `NODE_OPTIONS`.
|
|
31
|
-
- Supports first release mode that sets version to 0.0.1 for new projects.
|
|
32
|
-
- Stays focused on repository assets only (website updates are intentionally manual to avoid cross-project impacts).
|
|
33
|
-
- **Preload Patching (`scripts/preload/fs-f-ok.cjs`)**
|
|
34
|
-
- Hooks Nodeβs module loader to transparently replace deprecated `fs.F_OK` usages in `standard-version` without altering `node_modules`.
|
|
35
|
-
- **Website & Documentation**
|
|
36
|
-
- Professional landing page in `web/` directory.
|
|
37
|
-
- Automated GitHub Releases generation.
|
|
38
|
-
- Open Graph social media preview support.
|
|
39
|
-
- **Testing**
|
|
40
|
-
- Suite executed via `node --test` covers setup utilities, release argument parsing, and the preload patch.
|
|
41
|
-
|
|
42
|
-
## 6. Functional Requirements
|
|
43
|
-
1. Running `npx @programinglive/commiter` inside a Node project should configure release tooling without manual edits.
|
|
44
|
-
2. `npm run release` must:
|
|
45
|
-
- Run the projectβs tests (if defined) with the correct package manager.
|
|
46
|
-
- Execute `standard-version`, passing the preload script via `NODE_OPTIONS`.
|
|
47
|
-
- Exit with non-zero status if tests or standard-version commands fail.
|
|
48
|
-
3. CLI should provide friendly console output (status icons, instructions).
|
|
49
|
-
4. The preload script must eliminate `[DEP0176] fs.F_OK` warnings on supported Node versions.
|
|
50
|
-
5. Documentation (README, PRD, release notes) remains shipped with the package.
|
|
51
|
-
|
|
52
|
-
## 7. Non-Functional Requirements
|
|
53
|
-
- **Compatibility**: Supports Node.js 18+ (aligning with dependencies); tested on Windows/macOS/Linux.
|
|
54
|
-
- **Maintainability**: Avoid direct edits to dependencies; wrap behavior in Commiter-controlled modules.
|
|
55
|
-
- **Performance**: Release command overhead minimal (<1s additional startup time) beyond running tests and standard-version.
|
|
56
|
-
- **Security**: No network requests during CLI execution beyond npm installs triggered by the user.
|
|
57
|
-
|
|
58
|
-
## 8. User Journeys
|
|
59
|
-
1. **Initial Setup**
|
|
60
|
-
- Run `npx @programinglive/commiter`.
|
|
61
|
-
- Tool installs dependencies, updates `package.json`, and scaffolds Husky hooks.
|
|
62
|
-
- Maintainer confirms success message and new scripts.
|
|
63
|
-
2. **First Release**
|
|
64
|
-
- Developer runs `npm run release:first` for new projects.
|
|
65
|
-
- Commiter sets version to 0.0.1, runs tests, creates initial changelog and git tag.
|
|
66
|
-
- Project foundation established with proper semantic versioning.
|
|
67
|
-
3. **Standard Release**
|
|
68
|
-
- Developer runs `npm run release minor` or `npm run release` (defaults to patch).
|
|
69
|
-
- Commiter runs tests, ensures preload patch prevents deprecation warnings, executes `standard-version`.
|
|
70
|
-
- Release completes with updated changelog and git tag.
|
|
71
|
-
4. **CI Pipeline**
|
|
72
|
-
- CI job executes `npm run release -- --prerelease beta`.
|
|
73
|
-
- Logs show tests executed, no deprecation warnings, and release artifacts generated.
|
|
74
|
-
|
|
75
|
-
## 9. Milestones & Roadmap
|
|
76
|
-
- **v1.1.x** (current)
|
|
77
|
-
- Deprecation warning mitigation, enhanced tests, PRD + release documentation.
|
|
78
|
-
- **Future Considerations**
|
|
79
|
-
- Support for monorepo detection (Lerna/Nx) to run scoped releases.
|
|
80
|
-
- Optional lint/test command customization via config file.
|
|
81
|
-
- Telemetry opt-in for release statistics (downloads, success rates).
|
|
82
|
-
|
|
83
|
-
## 10. Risks & Mitigations
|
|
84
|
-
- **Dependency API Changes**: Upstream packages may alter file paths. Mitigate with targeted module resolution and tests.
|
|
85
|
-
- **User Customization Conflicts**: Custom scripts might skip tests. Provide documentation for overriding behavior.
|
|
86
|
-
- **Platform Differences**: Windows path quoting; addressed via `buildPreloadFlag` helper.
|
|
87
|
-
|
|
88
|
-
## 11. Release & QA Checklist
|
|
89
|
-
- [x] `npm test` (alias for `node --test`) passes.
|
|
90
|
-
- [x] Manual run of `node scripts/release.js --help` shows no `[DEP0176]` warning.
|
|
91
|
-
- [ ] Update `CHANGELOG.md` (handled by standard-version during actual release).
|
|
92
|
-
- [ ] Verify README reflects latest setup instructions before shipping.
|
|
93
|
-
|
|
94
|
-
## 12. Appendices
|
|
95
|
-
- **Release Notes**: See `docs/release-notes/` for per-change summaries.
|
|
96
|
-
- **Testing Artifacts**: `test/` directory contains Node test runner suites.
|