@d-dev/changelog-darwin-x64 0.4.0 → 1.0.0
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 +106 -154
- package/bin/changelog +0 -0
- package/index.js +9 -5
- package/package.json +11 -24
package/README.md
CHANGED
|
@@ -1,216 +1,168 @@
|
|
|
1
|
-
#
|
|
1
|
+
# changelog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Changelog is a CLI tool for managing changelogs. Individual changelog entries are stored as files, eliminating merge conflicts and enabling CI enforcement.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[Full documentation](https://dworthen.github.io/changelog)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Installation
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
<!-- tabs:start -->
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
changelog add
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-

|
|
16
|
-
|
|
17
|
-
This creates a timestamped file in the `.changelog` directory ready to be added to source control and applied at a later time. Depending on how changelog is configured, the `add` command also adds the timestamped file to the git staging area and then commit all staged files using the provided description as the commit message.
|
|
18
|
-
|
|
19
|
-
> [!NOTE]
|
|
20
|
-
> As a best practice, commit the timestamp file with the set of files the changelog entry describes. For example, run `git add <FILES...>` prior to running `changelog add`.
|
|
21
|
-
|
|
22
|
-
### Apply
|
|
11
|
+
#### **npm**
|
|
23
12
|
|
|
24
|
-
|
|
13
|
+
Install globally:
|
|
25
14
|
|
|
26
15
|
```bash
|
|
27
|
-
changelog
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-

|
|
31
|
-
|
|
32
|
-
The resulting `CHANGELOG.md` file.
|
|
33
|
-
|
|
34
|
-
```md
|
|
35
|
-
## 0.2.0
|
|
36
|
-
|
|
37
|
-
### Minor Changes
|
|
38
|
-
|
|
39
|
-
- a07c8dd: Describe a minor change.
|
|
16
|
+
npm install -g @d-dev/changelog
|
|
40
17
|
```
|
|
41
18
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
## Features
|
|
45
|
-
|
|
46
|
-
- Store and track changelog descriptions per commit
|
|
47
|
-
- Apply changelog entries to `CHANGELOG.md`
|
|
48
|
-
- Sync version fields in specified JSON files such as the version field in a package.json file.
|
|
49
|
-
|
|
50
|
-
## TODO
|
|
51
|
-
|
|
52
|
-
- Add support for prereleases
|
|
53
|
-
- Add support for monorepos
|
|
54
|
-
- Add support for other version file formats (yaml, toml, etc.)
|
|
55
|
-
|
|
56
|
-
## Install
|
|
57
|
-
|
|
58
|
-
### NPM
|
|
19
|
+
Or as a dev dependency:
|
|
59
20
|
|
|
21
|
+
```bash
|
|
22
|
+
npm install -D @d-dev/changelog
|
|
60
23
|
```
|
|
61
|
-
npm install @d-dev/changelog -g
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### Binaries
|
|
65
24
|
|
|
66
|
-
|
|
25
|
+
Or run with `npx`
|
|
67
26
|
|
|
68
|
-
```
|
|
69
|
-
|
|
27
|
+
```bash
|
|
28
|
+
npx @d-dev/changelog
|
|
70
29
|
```
|
|
71
30
|
|
|
72
|
-
|
|
31
|
+
#### **PyPI**
|
|
73
32
|
|
|
74
|
-
|
|
33
|
+
Install with pip:
|
|
75
34
|
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
pwsh -File install.ps1 -force -tag v0.0.1 -to ~/bin &&
|
|
79
|
-
rm install.ps1
|
|
35
|
+
```bash
|
|
36
|
+
pip install changesets
|
|
80
37
|
```
|
|
81
38
|
|
|
82
|
-
|
|
39
|
+
Install with uv.
|
|
83
40
|
|
|
84
41
|
```bash
|
|
85
|
-
|
|
42
|
+
uv tool install changesets
|
|
86
43
|
```
|
|
87
44
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
Running the installer with additional flags:
|
|
45
|
+
Or as a dev dependency
|
|
91
46
|
|
|
92
47
|
```bash
|
|
93
|
-
|
|
48
|
+
uv add --dev changesets
|
|
94
49
|
```
|
|
95
50
|
|
|
96
|
-
|
|
51
|
+
Or run directly with uvx (no install required):
|
|
97
52
|
|
|
98
53
|
```bash
|
|
99
|
-
|
|
54
|
+
uvx --from changesets changelog <command>
|
|
100
55
|
```
|
|
101
56
|
|
|
102
|
-
|
|
57
|
+
#### **GitHub Releases**
|
|
103
58
|
|
|
104
|
-
|
|
59
|
+
Download pre-built binaries from [GitHub Releases](https://github.com/dworthen/changelog/releases).
|
|
105
60
|
|
|
106
|
-
|
|
61
|
+
Available platforms:
|
|
107
62
|
|
|
108
|
-
|
|
63
|
+
| Platform | Architecture |
|
|
64
|
+
| ------------ | ------------ |
|
|
65
|
+
| Linux | x64, arm64 |
|
|
66
|
+
| Linux (musl) | x64, arm64 |
|
|
67
|
+
| macOS | x64, arm64 |
|
|
68
|
+
| Windows | x64 |
|
|
109
69
|
|
|
110
|
-
|
|
70
|
+
<!-- tabs:end -->
|
|
111
71
|
|
|
112
|
-
|
|
72
|
+
## Initialize
|
|
113
73
|
|
|
114
|
-
|
|
74
|
+
Run `changelog init` in your project root to set up the `.changelog` directory:
|
|
115
75
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
### 3. Commit changelog apply
|
|
121
|
-
|
|
122
|
-

|
|
123
|
-
|
|
124
|
-
`changelog apply` updates `CHANGELOG.md` and associated version files. If yes, then `changelog apply` will commit the changed files using the commit description `chore: apply changelog`.
|
|
125
|
-
|
|
126
|
-
### 4. Tag commit (not presented if previous answer == No)
|
|
127
|
-
|
|
128
|
-

|
|
129
|
-
|
|
130
|
-
If yes, `changelog apply` tags the commit created. This option is ignored if the answer to the previous question is No.
|
|
131
|
-
|
|
132
|
-
### 5. Tag format (not presented if either of the previous two answers == No)
|
|
76
|
+
```bash
|
|
77
|
+
changelog init
|
|
78
|
+
```
|
|
133
79
|
|
|
134
|
-
|
|
80
|
+
You'll be prompted for:
|
|
135
81
|
|
|
136
|
-
|
|
82
|
+
```
|
|
83
|
+
? Current version: 0.1.0
|
|
84
|
+
? Changelog file path: CHANGELOG.md
|
|
85
|
+
? Main git branch: main
|
|
86
|
+
Enter post-apply commands (leave blank to finish):
|
|
87
|
+
? Post-apply command: npm install
|
|
88
|
+
? Post-apply command (1 added):
|
|
89
|
+
✓ Initialized .changelog directory
|
|
90
|
+
```
|
|
137
91
|
|
|
138
|
-
|
|
92
|
+
This creates the following structure:
|
|
139
93
|
|
|
140
|
-
|
|
94
|
+
```
|
|
95
|
+
.changelog/
|
|
96
|
+
├── config.yaml
|
|
97
|
+
├── next/
|
|
98
|
+
│ └── .gitkeep
|
|
99
|
+
├── releases/
|
|
100
|
+
│ └── .gitkeep
|
|
101
|
+
└── templates/
|
|
102
|
+
├── header.md
|
|
103
|
+
├── body.eta
|
|
104
|
+
└── footer.md
|
|
105
|
+
```
|
|
141
106
|
|
|
142
|
-
|
|
107
|
+
## Add an Entry
|
|
143
108
|
|
|
144
|
-
|
|
145
|
-
> Currently, only JSON files are supported.
|
|
109
|
+
When you make a notable change, run `changelog add`:
|
|
146
110
|
|
|
147
|
-
|
|
111
|
+
```bash
|
|
112
|
+
changelog add
|
|
113
|
+
```
|
|
148
114
|
|
|
149
|
-
|
|
115
|
+
Select a change type and provide a description:
|
|
150
116
|
|
|
151
|
-
|
|
117
|
+
```
|
|
118
|
+
? Change type: Add - Add a new feature. Minor version bump.
|
|
119
|
+
? Description: Support for YAML configuration files
|
|
120
|
+
✓ Added changelog entry: .changelog/next/1740000000000.yaml
|
|
121
|
+
✓ Updated CHANGELOG.md
|
|
122
|
+
```
|
|
152
123
|
|
|
153
|
-
|
|
124
|
+
A YAML file is created in `.changelog/next/`:
|
|
154
125
|
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
{
|
|
160
|
-
"file": "package.json",
|
|
161
|
-
"path": "version"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"file": "some-json-file.json",
|
|
165
|
-
"path": "path.to.nested"
|
|
166
|
-
}
|
|
167
|
-
],
|
|
168
|
-
"onAdd": {
|
|
169
|
-
"commitFiles": true
|
|
170
|
-
},
|
|
171
|
-
"onApply": {
|
|
172
|
-
"commitFiles": true,
|
|
173
|
-
"tagCommit": true,
|
|
174
|
-
"tagFormat": "v{{version}}"
|
|
175
|
-
}
|
|
176
|
-
}
|
|
126
|
+
```yaml
|
|
127
|
+
timestamp: 1740000000000
|
|
128
|
+
type: Add
|
|
129
|
+
description: Support for YAML configuration files
|
|
177
130
|
```
|
|
178
131
|
|
|
179
|
-
**
|
|
132
|
+
The changelog file is automatically regenerated with an **Unreleased** section so you can preview changes at any time.
|
|
180
133
|
|
|
181
|
-
|
|
134
|
+
## Apply a Release
|
|
182
135
|
|
|
183
|
-
|
|
184
|
-
- **oldVersion**: The previous project version prior to `changelog apply`.
|
|
185
|
-
- **patchChanges|minorChanges|majorChanges**: A list of changes grouped by the level of change (patch, minor, or major). The variable is available if there is a change of that type present in the current update, otherwise its null.
|
|
186
|
-
- **sha**: The full git commit hash for the change.
|
|
187
|
-
- **shortSha**: The short git commit hash for the change.
|
|
188
|
-
- **description**: Changelog description.
|
|
136
|
+
When you're ready to release, run `changelog apply`:
|
|
189
137
|
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
|
|
138
|
+
```bash
|
|
139
|
+
changelog apply
|
|
140
|
+
```
|
|
193
141
|
|
|
194
|
-
|
|
142
|
+
This computes the version bump, creates the release, and updates your project:
|
|
195
143
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
144
|
+
```
|
|
145
|
+
✓ Updated version in package.json to 0.2.0
|
|
146
|
+
✓ Applied version 0.2.0
|
|
147
|
+
✓ Updated CHANGELOG.md
|
|
148
|
+
Running post-apply command: npm install
|
|
149
|
+
? Commit changes and tag the commit? Yes
|
|
150
|
+
✓ Committed and tagged version 0.2.0
|
|
151
|
+
```
|
|
201
152
|
|
|
202
|
-
|
|
153
|
+
The version bump is determined by the change types present:
|
|
203
154
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
155
|
+
| Change Types | Bump |
|
|
156
|
+
| -------------- | ----- |
|
|
157
|
+
| Change, Remove | Major |
|
|
158
|
+
| Add, Deprecate | Minor |
|
|
159
|
+
| Fix | Patch |
|
|
160
|
+
| Internal | None |
|
|
209
161
|
|
|
210
|
-
|
|
162
|
+
After applying, push the commit and tag:
|
|
211
163
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
{{/each}}
|
|
215
|
-
{{~/if}}
|
|
164
|
+
```bash
|
|
165
|
+
git push origin main --follow-tags
|
|
216
166
|
```
|
|
167
|
+
|
|
168
|
+
[Full documentation](https://dworthen.github.io/changelog)
|
package/bin/changelog
CHANGED
|
Binary file
|
package/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
1
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
|
|
5
|
+
export function getBinPath() {
|
|
6
|
+
const binPath = join(import.meta.dirname, "bin", "changelog");
|
|
7
|
+
if (!existsSync(binPath)) {
|
|
8
|
+
throw new Error(`Binary not found at expected path: ${binPath}`);
|
|
9
|
+
}
|
|
10
|
+
return binPath;
|
|
7
11
|
}
|
package/package.json
CHANGED
|
@@ -1,39 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d-dev/changelog-darwin-x64",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"author": "Derek Worthen <worthend.derek@gmail.com>",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A CLI tool for managing changelogs in your project",
|
|
6
5
|
"license": "MIT",
|
|
7
|
-
"
|
|
8
|
-
"description": "Git-based changelog manager for JavaScript, Python, and Go projects.",
|
|
9
|
-
"keywords": [
|
|
10
|
-
"changelog",
|
|
11
|
-
"git",
|
|
12
|
-
"javascript",
|
|
13
|
-
"python",
|
|
14
|
-
"go"
|
|
15
|
-
],
|
|
16
|
-
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
17
7
|
"exports": {
|
|
18
8
|
".": {
|
|
19
9
|
"import": "./index.js"
|
|
20
10
|
},
|
|
21
11
|
"./package.json": "./package.json"
|
|
22
12
|
},
|
|
13
|
+
"files": [
|
|
14
|
+
"package.json",
|
|
15
|
+
"index.js",
|
|
16
|
+
"README.md",
|
|
17
|
+
"LICENSE",
|
|
18
|
+
"bin"
|
|
19
|
+
],
|
|
23
20
|
"os": [
|
|
24
21
|
"darwin"
|
|
25
22
|
],
|
|
26
23
|
"cpu": [
|
|
27
24
|
"x64"
|
|
28
|
-
]
|
|
29
|
-
"files": [
|
|
30
|
-
"package.json",
|
|
31
|
-
"README.md",
|
|
32
|
-
"license",
|
|
33
|
-
"bin",
|
|
34
|
-
"index.js"
|
|
35
|
-
],
|
|
36
|
-
"scripts": {
|
|
37
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
38
|
-
}
|
|
25
|
+
]
|
|
39
26
|
}
|