@pc360/chlog 0.1.9 โ 0.1.11
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 +22 -2
- package/README.md +171 -139
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
#Changelog
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
@@ -8,8 +8,28 @@ The format is based on Keep a Changelog, and this project follows Semantic Versi
|
|
|
8
8
|
|
|
9
9
|
### Changed
|
|
10
10
|
|
|
11
|
+
- No changes yet.
|
|
12
|
+
|
|
13
|
+
## [0.1.11] - 2026-02-15
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Added explicit terminal environment requirements in README (macOS Terminal, iTerm2, Git Bash for Windows, WSL2, Linux)
|
|
18
|
+
- Added detailed Git Bash login shell configuration guide
|
|
19
|
+
- Added cross-platform npm global PATH setup instructions
|
|
20
|
+
- Added structured shell setup section per environment
|
|
21
|
+
- Improved documentation clarity for Windows users
|
|
22
|
+
- Standardized installation and verification steps
|
|
23
|
+
- Refined README structure for better onboarding experience
|
|
24
|
+
|
|
25
|
+
## [0.1.10] - 2026-02-15
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
11
29
|
- Removed Ink card border lines so help and status output no longer render inside a box.
|
|
12
30
|
- Added blank lines before and after help and error output to improve readability.
|
|
31
|
+
- Reorganized README onboarding flow into: installation, first-time dry-run usage, and troubleshooting.
|
|
32
|
+
- Added explicit `command not found: chlog` guidance, including PATH updates for `~/.zshrc` / `~/.bashrc` (with `~/.zhsrc` note).
|
|
13
33
|
|
|
14
34
|
## [0.1.9] - 2026-02-14
|
|
15
35
|
|
|
@@ -21,7 +41,7 @@ The format is based on Keep a Changelog, and this project follows Semantic Versi
|
|
|
21
41
|
|
|
22
42
|
### Changed
|
|
23
43
|
|
|
24
|
-
- Update docs
|
|
44
|
+
- Update docs.
|
|
25
45
|
|
|
26
46
|
## [0.1.7] - 2026-02-14
|
|
27
47
|
|
package/README.md
CHANGED
|
@@ -2,261 +2,299 @@
|
|
|
2
2
|
|
|
3
3
|
Internal CLI tool for creating structured changelog entries under:
|
|
4
4
|
|
|
5
|
-
```
|
|
5
|
+
```text
|
|
6
6
|
changelog/unreleased/{added|changed|fixed|removed}
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Each entry file is automatically:
|
|
9
|
+
Each entry is automatically:
|
|
12
10
|
|
|
13
|
-
- Named
|
|
11
|
+
- Named with Asia/Manila timestamp (`YYYYMMDDHHmmss`)
|
|
14
12
|
- Placed in the correct type directory
|
|
15
|
-
- Written as
|
|
16
|
-
- Prefixed with scope and layer (`Back-End` or `Front-End`)
|
|
13
|
+
- Written as one clean line
|
|
14
|
+
- Prefixed with scope and layer (`[Back-End]` or `[Front-End]`)
|
|
17
15
|
|
|
18
16
|
---
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
# 1. Installation
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
npm i -g @pc360/chlog
|
|
24
|
-
```
|
|
20
|
+
## Requirements
|
|
25
21
|
|
|
26
|
-
|
|
22
|
+
- Node.js `>= 18`
|
|
23
|
+
- One of the following terminals:
|
|
24
|
+
- macOS Terminal
|
|
25
|
+
- iTerm2 (macOS)
|
|
26
|
+
- Git Bash (Windows)
|
|
27
|
+
- Linux bash/zsh
|
|
28
|
+
- WSL2 (Windows Subsystem for Linux)
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
1. Get your npm prefix:
|
|
30
|
+
Install globally:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
npm
|
|
33
|
+
npm i -g @pc360/chlog
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Alternative (without global install):
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
|
|
39
|
+
npx @pc360/chlog --type <added|changed|fixed|removed> --scope <scope> --message "<description>"
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
For `bash`, add it to `~/.bashrc`.
|
|
42
|
+
---
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
# 2. First-Time Usage (Dry Run Recommended)
|
|
45
|
+
|
|
46
|
+
For first use, always run a dry run to preview output without creating a file:
|
|
46
47
|
|
|
47
48
|
```bash
|
|
48
|
-
|
|
49
|
-
# or
|
|
50
|
-
source ~/.bashrc
|
|
49
|
+
chlog --type added --scope JES-99 --message "Test entry" --dry-run
|
|
51
50
|
```
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
Short form:
|
|
54
53
|
|
|
55
54
|
```bash
|
|
56
|
-
|
|
57
|
-
chlog --type <added|changed|fixed|removed> \
|
|
58
|
-
--scope <scope> \
|
|
59
|
-
--message "<description>" \
|
|
60
|
-
[--frontend] \
|
|
61
|
-
--dry-run
|
|
62
|
-
|
|
63
|
-
# Dry run short form (preview only)
|
|
64
|
-
chlog -t <added|changed|fixed|removed> -s <scope> -m "<description>" [-f] -d
|
|
65
|
-
|
|
66
|
-
# Create entry
|
|
67
|
-
chlog --type <added|changed|fixed|removed> \
|
|
68
|
-
--scope <scope> \
|
|
69
|
-
--message "<description>" \
|
|
70
|
-
[--frontend]
|
|
55
|
+
chlog -t added -s JES-99 -m "Test entry" -d
|
|
71
56
|
```
|
|
72
57
|
|
|
73
|
-
|
|
58
|
+
If the preview is correct, run the actual command:
|
|
74
59
|
|
|
75
60
|
```bash
|
|
76
|
-
|
|
77
|
-
--scope <scope> \
|
|
78
|
-
--message "<description>" \
|
|
79
|
-
[--frontend]
|
|
61
|
+
chlog --type added --scope JES-99 --message "Test entry"
|
|
80
62
|
```
|
|
81
63
|
|
|
82
64
|
---
|
|
83
65
|
|
|
84
|
-
|
|
66
|
+
# 3. If `chlog` Is Not Found
|
|
85
67
|
|
|
86
|
-
|
|
87
|
-
chlog --type <added|changed|fixed|removed> \
|
|
88
|
-
--scope <scope> \
|
|
89
|
-
--message "<description>" \
|
|
90
|
-
[--frontend]
|
|
68
|
+
If you see `command not found: chlog` after installation, add npm global `bin` to your `PATH`.
|
|
91
69
|
|
|
92
|
-
|
|
93
|
-
|
|
70
|
+
Check npm prefix:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npm get prefix
|
|
94
74
|
```
|
|
95
75
|
|
|
76
|
+
Then follow the setup instructions below depending on your environment.
|
|
77
|
+
|
|
96
78
|
---
|
|
97
79
|
|
|
98
|
-
|
|
80
|
+
# ๐ฅ Shell Setup Per Environment
|
|
99
81
|
|
|
100
|
-
|
|
101
|
-
| ---------------- | -------- | --------------------------------------------------- |
|
|
102
|
-
| `-t, --type` | โ
| Change type: `added`, `changed`, `fixed`, `removed` |
|
|
103
|
-
| `-s, --scope` | โ
| Jira ticket or module name |
|
|
104
|
-
| `-m, --message` | โ
| Description of the change |
|
|
105
|
-
| `-f, --frontend` | โ | Uses `[Front-End]` instead of `[Back-End]` |
|
|
106
|
-
| `-d, --dry-run` | โ | Preview file creation without writing |
|
|
107
|
-
| `-h, --help` | โ | Show help |
|
|
108
|
-
| `-v, --version` | โ | Show CLI version |
|
|
82
|
+
If `chlog` is installed globally but not found, ensure your npm global `bin` directory is included in your `PATH`.
|
|
109
83
|
|
|
110
84
|
---
|
|
111
85
|
|
|
112
|
-
##
|
|
86
|
+
## ๐ macOS Terminal / iTerm2
|
|
113
87
|
|
|
114
|
-
|
|
88
|
+
If using **zsh** (default on macOS):
|
|
115
89
|
|
|
116
|
-
```
|
|
117
|
-
|
|
90
|
+
```bash
|
|
91
|
+
echo 'export PATH="$PATH:$(npm get prefix)/bin"' >> ~/.zshrc
|
|
92
|
+
source ~/.zshrc
|
|
118
93
|
```
|
|
119
94
|
|
|
120
|
-
|
|
95
|
+
If using **bash**:
|
|
121
96
|
|
|
122
|
-
```
|
|
123
|
-
|
|
97
|
+
```bash
|
|
98
|
+
echo 'export PATH="$PATH:$(npm get prefix)/bin"' >> ~/.bashrc
|
|
99
|
+
source ~/.bashrc
|
|
124
100
|
```
|
|
125
101
|
|
|
126
|
-
|
|
102
|
+
Verify:
|
|
127
103
|
|
|
128
|
-
```
|
|
129
|
-
|
|
104
|
+
```bash
|
|
105
|
+
chlog --version
|
|
130
106
|
```
|
|
131
107
|
|
|
132
108
|
---
|
|
133
109
|
|
|
134
|
-
|
|
110
|
+
## ๐ช Git Bash (Windows)
|
|
111
|
+
|
|
112
|
+
Git Bash runs as a **login shell**, which means it loads:
|
|
135
113
|
|
|
136
114
|
```
|
|
137
|
-
|
|
115
|
+
~/.bash_profile
|
|
138
116
|
```
|
|
139
117
|
|
|
140
|
-
|
|
118
|
+
If `.bash_profile` exists, it may NOT automatically load `.bashrc`.
|
|
119
|
+
|
|
120
|
+
### Recommended Setup
|
|
121
|
+
|
|
122
|
+
### Step 1: Ensure `.bash_profile` Loads `.bashrc`
|
|
141
123
|
|
|
124
|
+
Open Git Bash:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
nano ~/.bash_profile
|
|
142
128
|
```
|
|
143
|
-
|
|
129
|
+
|
|
130
|
+
Add:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Load .bashrc if it exists
|
|
134
|
+
if [ -f ~/.bashrc ]; then
|
|
135
|
+
. ~/.bashrc
|
|
136
|
+
fi
|
|
144
137
|
```
|
|
145
138
|
|
|
139
|
+
Save and exit.
|
|
140
|
+
|
|
146
141
|
---
|
|
147
142
|
|
|
148
|
-
###
|
|
143
|
+
### Step 2: Add npm Global Path to `.bashrc`
|
|
149
144
|
|
|
150
|
-
```
|
|
151
|
-
|
|
145
|
+
```bash
|
|
146
|
+
nano ~/.bashrc
|
|
152
147
|
```
|
|
153
148
|
|
|
154
|
-
|
|
149
|
+
Add:
|
|
155
150
|
|
|
156
|
-
```
|
|
157
|
-
|
|
151
|
+
```bash
|
|
152
|
+
export PATH="$PATH:$(npm get prefix)/bin"
|
|
158
153
|
```
|
|
159
154
|
|
|
155
|
+
Save and restart Git Bash.
|
|
156
|
+
|
|
160
157
|
---
|
|
161
158
|
|
|
162
|
-
|
|
159
|
+
### Verify
|
|
163
160
|
|
|
161
|
+
```bash
|
|
162
|
+
chlog --version
|
|
164
163
|
```
|
|
165
|
-
changelog/
|
|
166
|
-
โโโ unreleased/
|
|
167
|
-
โโโ added/
|
|
168
|
-
โโโ changed/
|
|
169
|
-
โโโ fixed/
|
|
170
|
-
โโโ removed/
|
|
171
|
-
```
|
|
172
164
|
|
|
173
|
-
|
|
165
|
+
If the version prints, setup is successful.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## ๐ง WSL2 / Linux
|
|
170
|
+
|
|
171
|
+
Add npm global path to:
|
|
174
172
|
|
|
173
|
+
```bash
|
|
174
|
+
~/.bashrc
|
|
175
175
|
```
|
|
176
|
-
|
|
176
|
+
|
|
177
|
+
Add:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
export PATH="$PATH:$(npm get prefix)/bin"
|
|
177
181
|
```
|
|
178
182
|
|
|
179
|
-
|
|
183
|
+
Reload:
|
|
180
184
|
|
|
181
|
-
|
|
185
|
+
```bash
|
|
186
|
+
source ~/.bashrc
|
|
187
|
+
```
|
|
182
188
|
|
|
183
|
-
|
|
189
|
+
Verify:
|
|
184
190
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
- Prevents overwriting existing files
|
|
189
|
-
- Automatically inserts `[Back-End]` or `[Front-End]`
|
|
190
|
-
- Generates timestamp using Asia/Manila timezone
|
|
191
|
+
```bash
|
|
192
|
+
chlog --version
|
|
193
|
+
```
|
|
191
194
|
|
|
192
195
|
---
|
|
193
196
|
|
|
194
|
-
|
|
197
|
+
# Usage
|
|
195
198
|
|
|
196
|
-
|
|
199
|
+
```bash
|
|
200
|
+
chlog --type <added|changed|fixed|removed> \
|
|
201
|
+
--scope <scope> \
|
|
202
|
+
--message "<description>" \
|
|
203
|
+
[--frontend]
|
|
204
|
+
```
|
|
197
205
|
|
|
198
|
-
|
|
199
|
-
- Module name: `"Credit Validation"`
|
|
206
|
+
Short form:
|
|
200
207
|
|
|
201
|
-
|
|
208
|
+
```bash
|
|
209
|
+
chlog -t <added|changed|fixed|removed> -s <scope> -m "<description>" [-f]
|
|
210
|
+
```
|
|
202
211
|
|
|
203
|
-
|
|
204
|
-
- Start with capital letter
|
|
205
|
-
- Do not end with period
|
|
212
|
+
---
|
|
206
213
|
|
|
207
|
-
|
|
214
|
+
# Parameters
|
|
208
215
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
216
|
+
| Flag | Required | Description |
|
|
217
|
+
| ---------------- | -------- | --------------------------------------------------- |
|
|
218
|
+
| `-t, --type` | Yes | Change type: `added`, `changed`, `fixed`, `removed` |
|
|
219
|
+
| `-s, --scope` | Yes | Jira ticket or module name |
|
|
220
|
+
| `-m, --message` | Yes | Description of the change |
|
|
221
|
+
| `-f, --frontend` | No | Uses `[Front-End]` instead of `[Back-End]` |
|
|
222
|
+
| `-d, --dry-run` | No | Preview file creation without writing |
|
|
223
|
+
| `-h, --help` | No | Show help |
|
|
224
|
+
| `-v, --version` | No | Show CLI version |
|
|
213
225
|
|
|
214
226
|
---
|
|
215
227
|
|
|
216
|
-
|
|
228
|
+
# Examples
|
|
217
229
|
|
|
218
|
-
|
|
230
|
+
### Back-End (default)
|
|
219
231
|
|
|
232
|
+
```bash
|
|
233
|
+
chlog --type added --scope JES-33 --message "Add daily consolidated JE job"
|
|
220
234
|
```
|
|
221
|
-
|
|
235
|
+
|
|
236
|
+
### Front-End
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
chlog --type fixed --scope JES-45 --frontend --message "Fix table pagination issue"
|
|
222
240
|
```
|
|
223
241
|
|
|
224
|
-
|
|
242
|
+
### Module Scope
|
|
225
243
|
|
|
226
|
-
|
|
244
|
+
```bash
|
|
245
|
+
chlog --type changed --scope "Credit Validation" --message "Improve credit limit computation"
|
|
246
|
+
```
|
|
227
247
|
|
|
228
|
-
|
|
248
|
+
---
|
|
229
249
|
|
|
250
|
+
# Output Structure
|
|
251
|
+
|
|
252
|
+
```text
|
|
253
|
+
changelog/
|
|
254
|
+
โโโ unreleased/
|
|
255
|
+
โโโ added/
|
|
256
|
+
โโโ changed/
|
|
257
|
+
โโโ fixed/
|
|
258
|
+
โโโ removed/
|
|
230
259
|
```
|
|
231
|
-
|
|
260
|
+
|
|
261
|
+
Entry filename format:
|
|
262
|
+
|
|
263
|
+
```text
|
|
264
|
+
YYYYMMDDHHmmss
|
|
232
265
|
```
|
|
233
266
|
|
|
234
|
-
|
|
267
|
+
Timezone used: `Asia/Manila`
|
|
235
268
|
|
|
236
|
-
|
|
237
|
-
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
# CLI Rules
|
|
272
|
+
|
|
273
|
+
- `--type` is required
|
|
274
|
+
- `--scope` is required
|
|
275
|
+
- `--message` is required
|
|
276
|
+
- Existing files are not overwritten
|
|
277
|
+
- Layer tag is auto-added (`[Back-End]` or `[Front-End]`)
|
|
238
278
|
|
|
239
279
|
---
|
|
240
280
|
|
|
241
|
-
|
|
281
|
+
# ๐งช Running Unit Tests
|
|
242
282
|
|
|
243
283
|
This project uses Node.js built-in test runner (`node:test`). No external test framework is required.
|
|
244
284
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
From the project root:
|
|
285
|
+
## Run Tests
|
|
248
286
|
|
|
249
|
-
```
|
|
287
|
+
```bash
|
|
250
288
|
npm test
|
|
251
289
|
```
|
|
252
290
|
|
|
253
|
-
Or directly
|
|
291
|
+
Or directly:
|
|
254
292
|
|
|
255
|
-
```
|
|
293
|
+
```bash
|
|
256
294
|
node --test
|
|
257
295
|
```
|
|
258
296
|
|
|
259
|
-
|
|
297
|
+
## What Is Tested
|
|
260
298
|
|
|
261
299
|
- Argument parsing (`parseArgs`)
|
|
262
300
|
- Required flag validation (`validateArgs`)
|
|
@@ -265,9 +303,3 @@ node --test
|
|
|
265
303
|
- Output line formatting
|
|
266
304
|
- Front-End vs Back-End label handling
|
|
267
305
|
- Prevention of double label prefixing
|
|
268
|
-
|
|
269
|
-
---
|
|
270
|
-
|
|
271
|
-
## ๐จโ๐ป Maintainer
|
|
272
|
-
|
|
273
|
-
- almerleoalmazan@gmail.com
|