@pc360/chlog 0.1.9 โ†’ 0.1.10

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 +9 -1
  2. package/README.md +74 -156
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -8,8 +8,16 @@ 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.10] - 2026-02-15
14
+
15
+ ### Changed
16
+
11
17
  - Removed Ink card border lines so help and status output no longer render inside a box.
12
18
  - Added blank lines before and after help and error output to improve readability.
19
+ - Reorganized README onboarding flow into: installation, first-time dry-run usage, and troubleshooting.
20
+ - Added explicit `command not found: chlog` guidance, including PATH updates for `~/.zshrc` / `~/.bashrc` (with `~/.zhsrc` note).
13
21
 
14
22
  ## [0.1.9] - 2026-02-14
15
23
 
@@ -21,7 +29,7 @@ The format is based on Keep a Changelog, and this project follows Semantic Versi
21
29
 
22
30
  ### Changed
23
31
 
24
- - Update docs
32
+ - Update docs.
25
33
 
26
34
  ## [0.1.7] - 2026-02-14
27
35
 
package/README.md CHANGED
@@ -2,166 +2,140 @@
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
13
+ - Written as one clean line
16
14
  - Prefixed with scope and layer (`Back-End` or `Front-End`)
17
15
 
18
- ---
16
+ ## 1. Installation
17
+
18
+ Requirements:
19
19
 
20
- ## ๐Ÿ“ฆ Install
20
+ - Node.js `>= 18`
21
+
22
+ Install globally:
21
23
 
22
24
  ```bash
23
25
  npm i -g @pc360/chlog
24
26
  ```
25
27
 
26
- ## โœ… After Installation
28
+ Alternative (without global install):
29
+
30
+ ```bash
31
+ npx @pc360/chlog --type <added|changed|fixed|removed> --scope <scope> --message "<description>"
32
+ ```
27
33
 
28
- If `chlog` is not recognized after global install, add your npm global `bin` path to `PATH`.
34
+ ## 2. First-Time Usage (Dry Run First)
29
35
 
30
- 1. Get your npm prefix:
36
+ For first use, always run a dry run to preview output without creating a file:
31
37
 
32
38
  ```bash
33
- npm get prefix
39
+ chlog --type added --scope JES-99 --message "Test entry" --dry-run
34
40
  ```
35
41
 
36
- 2. Use the output as `<prefix>`, then add this to your shell config:
42
+ Short form:
37
43
 
38
44
  ```bash
39
- export PATH="$PATH:<prefix>/bin"
45
+ chlog -t added -s JES-99 -m "Test entry" -d
40
46
  ```
41
47
 
42
- For `zsh`, add it to `~/.zshrc`.
43
- For `bash`, add it to `~/.bashrc`.
44
-
45
- 3. Reload your shell config (or open a new terminal):
48
+ If the preview is correct, run the actual command:
46
49
 
47
50
  ```bash
48
- source ~/.zshrc
49
- # or
50
- source ~/.bashrc
51
+ chlog --type added --scope JES-99 --message "Test entry"
51
52
  ```
52
53
 
53
- Then run:
54
+ ## 3. If `chlog` Is Not Found
55
+
56
+ If you see `command not found: chlog` after installation, add npm global `bin` to your `PATH`.
57
+
58
+ 1. Get npm prefix:
54
59
 
55
60
  ```bash
56
- # Dry run (preview only)
57
- chlog --type <added|changed|fixed|removed> \
58
- --scope <scope> \
59
- --message "<description>" \
60
- [--frontend] \
61
- --dry-run
61
+ npm get prefix
62
+ ```
62
63
 
63
- # Dry run short form (preview only)
64
- chlog -t <added|changed|fixed|removed> -s <scope> -m "<description>" [-f] -d
64
+ 2. Add this line to your shell config (replace `<prefix>` with output above):
65
65
 
66
- # Create entry
67
- chlog --type <added|changed|fixed|removed> \
68
- --scope <scope> \
69
- --message "<description>" \
70
- [--frontend]
66
+ ```bash
67
+ export PATH="$PATH:<prefix>/bin"
71
68
  ```
72
69
 
73
- You can also run it without global install:
70
+ 3. Save to the right file:
71
+
72
+ - `zsh`: `~/.zshrc` (or `~/.zhsrc` if your environment uses that filename)
73
+ - `bash`: `~/.bashrc`
74
+
75
+ 4. Reload shell:
74
76
 
75
77
  ```bash
76
- npx @pc360/chlog --type <added|changed|fixed|removed> \
77
- --scope <scope> \
78
- --message "<description>" \
79
- [--frontend]
78
+ source ~/.zshrc
79
+ # or
80
+ source ~/.bashrc
80
81
  ```
81
82
 
82
- ---
83
+ 5. Verify:
83
84
 
84
- ## ๐Ÿš€ Usage
85
+ ```bash
86
+ chlog --version
87
+ ```
88
+
89
+ ## Usage
85
90
 
86
91
  ```bash
87
92
  chlog --type <added|changed|fixed|removed> \
88
93
  --scope <scope> \
89
94
  --message "<description>" \
90
95
  [--frontend]
96
+ ```
91
97
 
92
- # Short form
98
+ Short form:
99
+
100
+ ```bash
93
101
  chlog -t <added|changed|fixed|removed> -s <scope> -m "<description>" [-f]
94
102
  ```
95
103
 
96
- ---
97
-
98
- ## ๐Ÿงฉ Parameters
104
+ ## Parameters
99
105
 
100
106
  | Flag | Required | Description |
101
107
  | ---------------- | -------- | --------------------------------------------------- |
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 |
109
-
110
- ---
108
+ | `-t, --type` | Yes | Change type: `added`, `changed`, `fixed`, `removed` |
109
+ | `-s, --scope` | Yes | Jira ticket or module name |
110
+ | `-m, --message` | Yes | Description of the change |
111
+ | `-f, --frontend` | No | Uses `[Front-End]` instead of `[Back-End]` |
112
+ | `-d, --dry-run` | No | Preview file creation without writing |
113
+ | `-h, --help` | No | Show help |
114
+ | `-v, --version` | No | Show CLI version |
111
115
 
112
- ## ๐Ÿ“ Examples
116
+ ## Examples
113
117
 
114
- ### Back-End Change (Default)
118
+ Back-End (default):
115
119
 
116
- ```
120
+ ```bash
117
121
  chlog --type added --scope JES-33 --message "Add daily consolidated JE job"
118
122
  ```
119
123
 
120
- Creates:
121
-
122
- ```
123
- changelog/unreleased/added/20260213124530
124
- ```
125
-
126
- File content:
127
-
128
- ```
129
- [JES-33] [Back-End] Add daily consolidated JE job
130
- ```
131
-
132
- ---
133
-
134
- ### Front-End Change
124
+ Front-End:
135
125
 
136
- ```
126
+ ```bash
137
127
  chlog --type fixed --scope JES-45 --frontend --message "Fix table pagination issue"
138
128
  ```
139
129
 
140
- File content:
141
-
142
- ```
143
- [JES-45] [Front-End] Fix table pagination issue
144
- ```
145
-
146
- ---
147
-
148
- ### Module-Based Scope
130
+ Module scope:
149
131
 
150
- ```
132
+ ```bash
151
133
  chlog --type changed --scope "Credit Validation" --message "Improve credit limit computation"
152
134
  ```
153
135
 
154
- File content:
136
+ ## Output Structure
155
137
 
156
- ```
157
- [Credit Validation] [Back-End] Improve credit limit computation
158
- ```
159
-
160
- ---
161
-
162
- ## ๐Ÿ“‚ Directory Structure
163
-
164
- ```
138
+ ```text
165
139
  changelog/
166
140
  โ””โ”€โ”€ unreleased/
167
141
  โ”œโ”€โ”€ added/
@@ -170,71 +144,21 @@ changelog/
170
144
  โ””โ”€โ”€ removed/
171
145
  ```
172
146
 
173
- Each entry is stored as a timestamp-named file:
147
+ Entry filename format:
174
148
 
175
- ```
149
+ ```text
176
150
  YYYYMMDDHHmmss
177
151
  ```
178
152
 
179
- Timezone used: **Asia/Manila**
153
+ Timezone used: `Asia/Manila`
180
154
 
181
- ---
182
-
183
- ## ๐Ÿ” Rules Enforced by CLI
155
+ ## CLI Rules
184
156
 
185
157
  - `--type` is required
186
158
  - `--scope` is required
187
159
  - `--message` is required
188
- - Prevents overwriting existing files
189
- - Automatically inserts `[Back-End]` or `[Front-End]`
190
- - Generates timestamp using Asia/Manila timezone
191
-
192
- ---
193
-
194
- ## ๐Ÿง  Recommended Conventions
195
-
196
- Preferred scope format:
197
-
198
- - Jira ticket: `JES-45`
199
- - Module name: `"Credit Validation"`
200
-
201
- Recommended message style:
202
-
203
- - Use imperative mood
204
- - Start with capital letter
205
- - Do not end with period
206
-
207
- Example:
208
-
209
- ```
210
- Add dealer credit validation logic
211
- Fix FR status blocking issue
212
- ```
213
-
214
- ---
215
-
216
- ## ๐Ÿงช Dry Run Mode
217
-
218
- Preview without creating file:
219
-
220
- ```
221
- chlog --type added --scope JES-99 --message "Test entry" --dry-run
222
- ```
223
-
224
- ---
225
-
226
- ## ๐Ÿ›  Node Version
227
-
228
- Requires:
229
-
230
- ```
231
- Node.js >= 18
232
- ```
233
-
234
- Runtime dependencies:
235
-
236
- - `ink`
237
- - `react`
160
+ - Existing files are not overwritten
161
+ - Layer tag is auto-added (`[Back-End]` or `[Front-End]`)
238
162
 
239
163
  ---
240
164
 
@@ -265,9 +189,3 @@ node --test
265
189
  - Output line formatting
266
190
  - Front-End vs Back-End label handling
267
191
  - 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.10",
4
4
  "description": "PC360 Changelog CLI Tool",
5
5
  "author": "aalmazan@pcdsi.ph",
6
6
  "bin": {