@kors/generate-changelog 0.2.3 → 1.0.2

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/README.md CHANGED
@@ -1,5 +1,76 @@
1
- ## Generate changelog from git commit history
1
+ <p align="center">
2
+ <h1 align="center">generate-changelog</h1>
3
+ </p>
4
+
5
+ #### Supported Platforms
6
+ <img src="https://stefkors.com/api/platform/index.svg?os=terminal,web" />
7
+
8
+ Generate structured changelog JSON from git commit history. Works with local repos and remote GitHub repositories.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install @kors/generate-changelog
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ### CLI
2
19
 
3
20
  ```bash
4
- npx @kors/generate-changelog
5
- ```
21
+ # Generate from local repo and write to changelog.json
22
+ npx @kors/generate-changelog --write
23
+
24
+ # Generate from a remote GitHub repo
25
+ npx @kors/generate-changelog --owner="StefKors" --repo="generate-changelog"
26
+ ```
27
+
28
+ ### Programmatic
29
+
30
+ ```typescript
31
+ import { generateChangelog } from "@kors/generate-changelog"
32
+
33
+ const changelog = await generateChangelog({ write: true })
34
+ // or from a remote repo
35
+ const changelog = await generateChangelog({ owner: "StefKors", repo: "generate-changelog" })
36
+ ```
37
+
38
+ ## CLI Options
39
+
40
+ | Flag | Short | Description |
41
+ |------|-------|-------------|
42
+ | `--write` | `-w` | Write output to `changelog.json` |
43
+ | `--owner` | `-o` | GitHub repo owner (use with `--repo`) |
44
+ | `--repo` | `-r` | GitHub repo name (use with `--owner`) |
45
+ | `--version` | | Print current version |
46
+ | `--help` | | Print help message |
47
+
48
+ ## Output Format
49
+
50
+ ```json
51
+ {
52
+ "releases": {
53
+ "1.2.0": [
54
+ { "type": "Added", "message": "New feature description" },
55
+ { "type": "Fixed", "message": "Bug fix description" }
56
+ ],
57
+ "1.1.0": [
58
+ { "type": "Improved", "message": "Performance improvement" }
59
+ ]
60
+ }
61
+ }
62
+ ```
63
+
64
+ Change types are auto-detected from commit messages: **Added**, **Fixed**, **Improved**, **Removed**.
65
+
66
+ ## Features
67
+
68
+ - Parses git tags to group commits by version
69
+ - Auto-classifies changes by type from commit messages
70
+ - Filters out merge commits and version bumps
71
+ - Supports local git repos and remote GitHub repos via Octokit
72
+ - Outputs structured JSON for use in release notes, changelogs, or UIs
73
+
74
+ ## License
75
+
76
+ MIT
@@ -1 +1,2 @@
1
1
  export { generateChangelog } from './lib/index.js';
2
+ export type * from './lib/index.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kors/generate-changelog",
3
3
  "description": "Generate a changelog json from a git commit history",
4
- "version": "0.2.3",
4
+ "version": "1.0.2",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "generate-changelog": "./distribution/cli.js"