@d-dev/changelog-darwin-x64 0.4.1 → 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 +100 -201
- package/bin/changelog +0 -0
- package/index.js +9 -5
- package/package.json +11 -24
package/README.md
CHANGED
|
@@ -1,269 +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
|
-
|
|
8
|
-
$ changelog help
|
|
7
|
+
## Installation
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
<!-- tabs:start -->
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
changelog [command]
|
|
11
|
+
#### **npm**
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
add Add a changelog entry.
|
|
17
|
-
apply Apply changelog entries.
|
|
18
|
-
check Check that the current branch or last commit contains a changelog entry. Useful for CI workflows to enforce the presence of changelog entries.
|
|
19
|
-
help Help about any command
|
|
20
|
-
init Initialize project to use changelog.
|
|
21
|
-
update Update to the latest version of changelog
|
|
22
|
-
version Print the current version of changelog
|
|
13
|
+
Install globally:
|
|
23
14
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-h, --help help for changelog
|
|
27
|
-
--verbose enable verbose logging.
|
|
28
|
-
|
|
29
|
-
Use "changelog [command] --help" for more information about a command.
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Init
|
|
33
|
-
|
|
34
|
-
```shell
|
|
35
|
-
changelog init
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g @d-dev/changelog
|
|
36
17
|
```
|
|
37
18
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
### `config.yaml`
|
|
41
|
-
|
|
42
|
-
Changelog configuration:
|
|
43
|
-
|
|
44
|
-
```yaml
|
|
45
|
-
# Example config.yaml
|
|
46
|
-
|
|
47
|
-
# Current version of the project.
|
|
48
|
-
# This gets bumped, along with the files listed below,
|
|
49
|
-
# when running `changelog apply`
|
|
50
|
-
version: 0.1.0
|
|
51
|
-
changelogFile: CHANGELOG.md # Changelog file to manage
|
|
52
|
-
|
|
53
|
-
# A list of files containing versions to bump when running
|
|
54
|
-
# `changelog apply`.
|
|
55
|
-
# Uses RegExp patterns for matching and replacing the actual version.
|
|
56
|
-
# The RegExp must contain 1 capture group with the version portion to replace.
|
|
57
|
-
# View https://pkg.go.dev/regexp/syntax@go1.24.1 for RegExp syntax
|
|
58
|
-
# Use https://regex101.com/ with GoLang selected to test patterns.
|
|
59
|
-
# Examples for Node package.json and python pyproject.toml below.
|
|
60
|
-
files:
|
|
61
|
-
- path: package.json
|
|
62
|
-
pattern: '"version":\s*"(\d+\.\d+\.\d+)"'
|
|
63
|
-
- path: pyproject.toml
|
|
64
|
-
pattern: 'version\s*=\s*"(\d+\.\d+\.\d+)"'
|
|
65
|
-
|
|
66
|
-
# Configures `changelog add` command
|
|
67
|
-
onAdd:
|
|
68
|
-
# commit staged files + added changelog entry
|
|
69
|
-
# Uses the provided description as the commit message.
|
|
70
|
-
commitFiles: true
|
|
71
|
-
|
|
72
|
-
# Configure `changelog apply` command
|
|
73
|
-
onApply:
|
|
74
|
-
commitFiles: true
|
|
75
|
-
tagCommit: true
|
|
76
|
-
tagFormat: v{{version}}
|
|
77
|
-
# A list of commands to run after bumping version files
|
|
78
|
-
# and before committing and tagging.
|
|
79
|
-
# Often useful to run install/sync commands that may update
|
|
80
|
-
# lock files.
|
|
81
|
-
commands:
|
|
82
|
-
- npm install
|
|
83
|
-
- uv sync
|
|
19
|
+
Or as a dev dependency:
|
|
84
20
|
|
|
21
|
+
```bash
|
|
22
|
+
npm install -D @d-dev/changelog
|
|
85
23
|
```
|
|
86
24
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
A [Handlebars](https://handlebarsjs.com/) template used for adding new entries to the changelog file specified in the `.changelog/config.yaml` file.
|
|
90
|
-
|
|
91
|
-
Default template:
|
|
25
|
+
Or run with `npx`
|
|
92
26
|
|
|
27
|
+
```bash
|
|
28
|
+
npx @d-dev/changelog
|
|
93
29
|
```
|
|
94
|
-
## {{version}}
|
|
95
|
-
{{#if majorChanges}}
|
|
96
30
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
{{#each majorChanges}}
|
|
100
|
-
- {{shortSha}}: {{description}}
|
|
101
|
-
{{/each}}
|
|
102
|
-
{{/if}}
|
|
103
|
-
{{#if minorChanges}}
|
|
104
|
-
|
|
105
|
-
### Minor Changes
|
|
106
|
-
|
|
107
|
-
{{#each minorChanges}}
|
|
108
|
-
- {{shortSha}}: {{description}}
|
|
109
|
-
{{/each}}
|
|
110
|
-
{{/if}}
|
|
111
|
-
{{#if patchChanges}}
|
|
112
|
-
|
|
113
|
-
### Patch Changes
|
|
114
|
-
|
|
115
|
-
{{#each patchChanges}}
|
|
116
|
-
- {{shortSha}}: {{description}}
|
|
117
|
-
{{/each}}
|
|
118
|
-
{{/if}}
|
|
31
|
+
#### **PyPI**
|
|
119
32
|
|
|
33
|
+
Install with pip:
|
|
120
34
|
|
|
35
|
+
```bash
|
|
36
|
+
pip install changesets
|
|
121
37
|
```
|
|
122
38
|
|
|
123
|
-
|
|
39
|
+
Install with uv.
|
|
124
40
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
- majorChanges, minorChanges, patchChanges: A list of change descriptions.
|
|
128
|
-
- **Change Description:**
|
|
129
|
-
- Sha: The git Sha associated with the change commit.
|
|
130
|
-
- shortSha: The git short Sha associated with the change commit.
|
|
131
|
-
- change: `patch|minor|major`
|
|
132
|
-
- description: The description of the change
|
|
133
|
-
|
|
134
|
-
## Add
|
|
135
|
-
|
|
136
|
-
```shell
|
|
137
|
-
changelog add
|
|
41
|
+
```bash
|
|
42
|
+
uv tool install changesets
|
|
138
43
|
```
|
|
139
44
|
|
|
140
|
-
|
|
45
|
+
Or as a dev dependency
|
|
141
46
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
Example changelog entry:
|
|
145
|
-
|
|
146
|
-
```
|
|
147
|
-
---
|
|
148
|
-
change: "major"
|
|
149
|
-
---
|
|
150
|
-
A major change.
|
|
47
|
+
```bash
|
|
48
|
+
uv add --dev changesets
|
|
151
49
|
```
|
|
152
50
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
> [!NOTE]
|
|
156
|
-
> 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`.
|
|
157
|
-
|
|
158
|
-
## Apply
|
|
159
|
-
|
|
160
|
-
The apply command...
|
|
161
|
-
|
|
162
|
-
- Runs in dry mode by default. The command shows a preview of the changes and ask for confirmation prior to applying any changes.
|
|
163
|
-
- gathers previously created changelog entries from the `.changelog` directory and prepends the info to the `CHANGELOG.md` file according to the `.changelog/changelogTemplate.hbs` template file.
|
|
164
|
-
- Bumps semantic version numbers in specified files according to `.changelog/config.yaml`.
|
|
165
|
-
- run any commands listed in `.changelog/config.yaml`.
|
|
51
|
+
Or run directly with uvx (no install required):
|
|
166
52
|
|
|
167
53
|
```bash
|
|
168
|
-
changelog
|
|
54
|
+
uvx --from changesets changelog <command>
|
|
169
55
|
```
|
|
170
56
|
|
|
171
|
-
|
|
57
|
+
#### **GitHub Releases**
|
|
172
58
|
|
|
173
|
-
|
|
59
|
+
Download pre-built binaries from [GitHub Releases](https://github.com/dworthen/changelog/releases).
|
|
174
60
|
|
|
175
|
-
|
|
61
|
+
Available platforms:
|
|
176
62
|
|
|
177
|
-
|
|
63
|
+
| Platform | Architecture |
|
|
64
|
+
| ------------ | ------------ |
|
|
65
|
+
| Linux | x64, arm64 |
|
|
66
|
+
| Linux (musl) | x64, arm64 |
|
|
67
|
+
| macOS | x64, arm64 |
|
|
68
|
+
| Windows | x64 |
|
|
178
69
|
|
|
179
|
-
|
|
70
|
+
<!-- tabs:end -->
|
|
180
71
|
|
|
181
|
-
|
|
72
|
+
## Initialize
|
|
182
73
|
|
|
183
|
-
|
|
74
|
+
Run `changelog init` in your project root to set up the `.changelog` directory:
|
|
184
75
|
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
# or globally
|
|
188
|
-
npm install @d-dev/changelog -g
|
|
76
|
+
```bash
|
|
77
|
+
changelog init
|
|
189
78
|
```
|
|
190
79
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
https://pypi.org/project/changesets/
|
|
80
|
+
You'll be prompted for:
|
|
194
81
|
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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
|
|
200
90
|
```
|
|
201
91
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
https://pkg.go.dev/github.com/dworthen/changelog
|
|
205
|
-
|
|
206
|
-
With go version `1.24.x` you can add the package as a tool to your project with
|
|
92
|
+
This creates the following structure:
|
|
207
93
|
|
|
208
|
-
```
|
|
209
|
-
|
|
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
|
|
210
105
|
```
|
|
211
106
|
|
|
212
|
-
|
|
107
|
+
## Add an Entry
|
|
213
108
|
|
|
214
|
-
|
|
215
|
-
|
|
109
|
+
When you make a notable change, run `changelog add`:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
changelog add
|
|
216
113
|
```
|
|
217
114
|
|
|
218
|
-
|
|
115
|
+
Select a change type and provide a description:
|
|
219
116
|
|
|
220
117
|
```
|
|
221
|
-
|
|
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
|
|
222
122
|
```
|
|
223
123
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
#### Windows
|
|
124
|
+
A YAML file is created in `.changelog/next/`:
|
|
227
125
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
126
|
+
```yaml
|
|
127
|
+
timestamp: 1740000000000
|
|
128
|
+
type: Add
|
|
129
|
+
description: Support for YAML configuration files
|
|
232
130
|
```
|
|
233
131
|
|
|
234
|
-
|
|
132
|
+
The changelog file is automatically regenerated with an **Unreleased** section so you can preview changes at any time.
|
|
235
133
|
|
|
236
|
-
|
|
134
|
+
## Apply a Release
|
|
237
135
|
|
|
238
|
-
|
|
239
|
-
curl -sSfL https://raw.githubusercontent.com/dworthen/changelog/main/scripts/install.ps1 -o install.ps1 &&
|
|
240
|
-
pwsh -File install.ps1 -force -tag v0.0.1 -to ~/bin &&
|
|
241
|
-
rm install.ps1
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
#### Linux/Darwin
|
|
136
|
+
When you're ready to release, run `changelog apply`:
|
|
245
137
|
|
|
246
138
|
```bash
|
|
247
|
-
|
|
139
|
+
changelog apply
|
|
248
140
|
```
|
|
249
141
|
|
|
250
|
-
This
|
|
251
|
-
|
|
252
|
-
Running the installer with additional flags:
|
|
142
|
+
This computes the version bump, creates the release, and updates your project:
|
|
253
143
|
|
|
254
|
-
```
|
|
255
|
-
|
|
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
|
|
256
151
|
```
|
|
257
152
|
|
|
258
|
-
|
|
153
|
+
The version bump is determined by the change types present:
|
|
259
154
|
|
|
260
|
-
|
|
155
|
+
| Change Types | Bump |
|
|
156
|
+
| -------------- | ----- |
|
|
157
|
+
| Change, Remove | Major |
|
|
158
|
+
| Add, Deprecate | Minor |
|
|
159
|
+
| Fix | Patch |
|
|
160
|
+
| Internal | None |
|
|
261
161
|
|
|
262
|
-
|
|
162
|
+
After applying, push the commit and tag:
|
|
263
163
|
|
|
264
164
|
```bash
|
|
265
|
-
git
|
|
266
|
-
cd changelog
|
|
267
|
-
go mod tidy
|
|
268
|
-
go build ./main.go
|
|
165
|
+
git push origin main --follow-tags
|
|
269
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
|
}
|