@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.
Files changed (3) hide show
  1. package/CHANGELOG.md +22 -2
  2. package/README.md +171 -139
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- # Changelog
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
- The CLI now renders polished terminal cards using `ink` in interactive terminals, with plain-text fallback for scripts/CI.
10
-
11
- Each entry file is automatically:
9
+ Each entry is automatically:
12
10
 
13
- - Named using Asia/Manila timestamp (`YYYYMMDDHHmmss`)
11
+ - Named with Asia/Manila timestamp (`YYYYMMDDHHmmss`)
14
12
  - Placed in the correct type directory
15
- - Written as a single clean line
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
- ## ๐Ÿ“ฆ Install
18
+ # 1. Installation
21
19
 
22
- ```bash
23
- npm i -g @pc360/chlog
24
- ```
20
+ ## Requirements
25
21
 
26
- ## โœ… After Installation
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
- If `chlog` is not recognized after global install, add your npm global `bin` path to `PATH`.
29
-
30
- 1. Get your npm prefix:
30
+ Install globally:
31
31
 
32
32
  ```bash
33
- npm get prefix
33
+ npm i -g @pc360/chlog
34
34
  ```
35
35
 
36
- 2. Use the output as `<prefix>`, then add this to your shell config:
36
+ Alternative (without global install):
37
37
 
38
38
  ```bash
39
- export PATH="$PATH:<prefix>/bin"
39
+ npx @pc360/chlog --type <added|changed|fixed|removed> --scope <scope> --message "<description>"
40
40
  ```
41
41
 
42
- For `zsh`, add it to `~/.zshrc`.
43
- For `bash`, add it to `~/.bashrc`.
42
+ ---
44
43
 
45
- 3. Reload your shell config (or open a new terminal):
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
- source ~/.zshrc
49
- # or
50
- source ~/.bashrc
49
+ chlog --type added --scope JES-99 --message "Test entry" --dry-run
51
50
  ```
52
51
 
53
- Then run:
52
+ Short form:
54
53
 
55
54
  ```bash
56
- # Dry run (preview only)
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
- You can also run it without global install:
58
+ If the preview is correct, run the actual command:
74
59
 
75
60
  ```bash
76
- npx @pc360/chlog --type <added|changed|fixed|removed> \
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
- ## ๐Ÿš€ Usage
66
+ # 3. If `chlog` Is Not Found
85
67
 
86
- ```bash
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
- # Short form
93
- chlog -t <added|changed|fixed|removed> -s <scope> -m "<description>" [-f]
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
- ## ๐Ÿงฉ Parameters
80
+ # ๐Ÿ–ฅ Shell Setup Per Environment
99
81
 
100
- | Flag | Required | Description |
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
- ## ๐Ÿ“ Examples
86
+ ## ๐ŸŽ macOS Terminal / iTerm2
113
87
 
114
- ### Back-End Change (Default)
88
+ If using **zsh** (default on macOS):
115
89
 
116
- ```
117
- chlog --type added --scope JES-33 --message "Add daily consolidated JE job"
90
+ ```bash
91
+ echo 'export PATH="$PATH:$(npm get prefix)/bin"' >> ~/.zshrc
92
+ source ~/.zshrc
118
93
  ```
119
94
 
120
- Creates:
95
+ If using **bash**:
121
96
 
122
- ```
123
- changelog/unreleased/added/20260213124530
97
+ ```bash
98
+ echo 'export PATH="$PATH:$(npm get prefix)/bin"' >> ~/.bashrc
99
+ source ~/.bashrc
124
100
  ```
125
101
 
126
- File content:
102
+ Verify:
127
103
 
128
- ```
129
- [JES-33] [Back-End] Add daily consolidated JE job
104
+ ```bash
105
+ chlog --version
130
106
  ```
131
107
 
132
108
  ---
133
109
 
134
- ### Front-End Change
110
+ ## ๐ŸชŸ Git Bash (Windows)
111
+
112
+ Git Bash runs as a **login shell**, which means it loads:
135
113
 
136
114
  ```
137
- chlog --type fixed --scope JES-45 --frontend --message "Fix table pagination issue"
115
+ ~/.bash_profile
138
116
  ```
139
117
 
140
- File content:
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
- [JES-45] [Front-End] Fix table pagination issue
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
- ### Module-Based Scope
143
+ ### Step 2: Add npm Global Path to `.bashrc`
149
144
 
150
- ```
151
- chlog --type changed --scope "Credit Validation" --message "Improve credit limit computation"
145
+ ```bash
146
+ nano ~/.bashrc
152
147
  ```
153
148
 
154
- File content:
149
+ Add:
155
150
 
156
- ```
157
- [Credit Validation] [Back-End] Improve credit limit computation
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
- ## ๐Ÿ“‚ Directory Structure
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
- Each entry is stored as a timestamp-named file:
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
- YYYYMMDDHHmmss
176
+
177
+ Add:
178
+
179
+ ```bash
180
+ export PATH="$PATH:$(npm get prefix)/bin"
177
181
  ```
178
182
 
179
- Timezone used: **Asia/Manila**
183
+ Reload:
180
184
 
181
- ---
185
+ ```bash
186
+ source ~/.bashrc
187
+ ```
182
188
 
183
- ## ๐Ÿ” Rules Enforced by CLI
189
+ Verify:
184
190
 
185
- - `--type` is required
186
- - `--scope` is required
187
- - `--message` is required
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
- ## ๐Ÿง  Recommended Conventions
197
+ # Usage
195
198
 
196
- Preferred scope format:
199
+ ```bash
200
+ chlog --type <added|changed|fixed|removed> \
201
+ --scope <scope> \
202
+ --message "<description>" \
203
+ [--frontend]
204
+ ```
197
205
 
198
- - Jira ticket: `JES-45`
199
- - Module name: `"Credit Validation"`
206
+ Short form:
200
207
 
201
- Recommended message style:
208
+ ```bash
209
+ chlog -t <added|changed|fixed|removed> -s <scope> -m "<description>" [-f]
210
+ ```
202
211
 
203
- - Use imperative mood
204
- - Start with capital letter
205
- - Do not end with period
212
+ ---
206
213
 
207
- Example:
214
+ # Parameters
208
215
 
209
- ```
210
- Add dealer credit validation logic
211
- Fix FR status blocking issue
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
- ## ๐Ÿงช Dry Run Mode
228
+ # Examples
217
229
 
218
- Preview without creating file:
230
+ ### Back-End (default)
219
231
 
232
+ ```bash
233
+ chlog --type added --scope JES-33 --message "Add daily consolidated JE job"
220
234
  ```
221
- chlog --type added --scope JES-99 --message "Test entry" --dry-run
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
- ## ๐Ÿ›  Node Version
244
+ ```bash
245
+ chlog --type changed --scope "Credit Validation" --message "Improve credit limit computation"
246
+ ```
227
247
 
228
- Requires:
248
+ ---
229
249
 
250
+ # Output Structure
251
+
252
+ ```text
253
+ changelog/
254
+ โ””โ”€โ”€ unreleased/
255
+ โ”œโ”€โ”€ added/
256
+ โ”œโ”€โ”€ changed/
257
+ โ”œโ”€โ”€ fixed/
258
+ โ””โ”€โ”€ removed/
230
259
  ```
231
- Node.js >= 18
260
+
261
+ Entry filename format:
262
+
263
+ ```text
264
+ YYYYMMDDHHmmss
232
265
  ```
233
266
 
234
- Runtime dependencies:
267
+ Timezone used: `Asia/Manila`
235
268
 
236
- - `ink`
237
- - `react`
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
- ## ๐Ÿงช Running Unit Tests
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
- ### Run Tests
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 with Node:
291
+ Or directly:
254
292
 
255
- ```
293
+ ```bash
256
294
  node --test
257
295
  ```
258
296
 
259
- ### What Is Tested
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pc360/chlog",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "PC360 Changelog CLI Tool",
5
5
  "author": "aalmazan@pcdsi.ph",
6
6
  "bin": {