keep-a-changelog 2.6.1 → 2.6.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/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [2.6.2] - 2025-03-23
8
+ ### Added
9
+ - New option `--latest-release-full` to print the full release [#59]
10
+
7
11
  ## [2.6.1] - 2025-02-24
8
12
  ### Fixed
9
13
  - NPM publishing [#55], [#56].
@@ -119,7 +123,9 @@ New version merging Deno and Node code using Deno's `dnt` package.
119
123
  [#51]: https://github.com/oscarotero/keep-a-changelog/issues/51
120
124
  [#55]: https://github.com/oscarotero/keep-a-changelog/issues/55
121
125
  [#56]: https://github.com/oscarotero/keep-a-changelog/issues/56
126
+ [#59]: https://github.com/oscarotero/keep-a-changelog/issues/59
122
127
 
128
+ [2.6.2]: https://github.com/oscarotero/keep-a-changelog/compare/v2.6.1...v2.6.2
123
129
  [2.6.1]: https://github.com/oscarotero/keep-a-changelog/compare/v2.6.0...v2.6.1
124
130
  [2.6.0]: https://github.com/oscarotero/keep-a-changelog/compare/v2.5.3...v2.6.0
125
131
  [2.5.3]: https://github.com/oscarotero/keep-a-changelog/compare/v2.5.2...v2.5.3
package/README.md CHANGED
@@ -149,7 +149,7 @@ It reads the CHANGELOG.md file and override it with the new format:
149
149
  Deno:
150
150
 
151
151
  ```sh
152
- deno install --allow-read --allow-write -fr --name changelog https://deno.land/x/changelog/bin.ts
152
+ deno install --global --allow-read --allow-write -fr --name changelog https://deno.land/x/changelog/bin.ts
153
153
  ```
154
154
 
155
155
  Node:
@@ -188,13 +188,22 @@ If your "Unreleased" section has no version, you can specify it as an argument:
188
188
  changelog --release 2.0.0
189
189
  ```
190
190
 
191
- And return the latest released version:
191
+ Print the latest released version:
192
192
 
193
193
  ```sh
194
194
  changelog --latest-release
195
195
  > 2.0.0
196
196
  ```
197
197
 
198
+ Print the latest release:
199
+
200
+ ```text
201
+ changelog --latest-release-full
202
+ ## 2.6.1 - 2025-02-24
203
+ ### Fixed
204
+ - NPM publishing [#55], [#56].
205
+ ```
206
+
198
207
  See available options:
199
208
 
200
209
  ```sh
package/esm/bin.js CHANGED
@@ -24,6 +24,7 @@ const argv = parseArgs(dntShim.Deno.args, {
24
24
  "https",
25
25
  "init",
26
26
  "latest-release",
27
+ "latest-release-full",
27
28
  "quiet",
28
29
  "help",
29
30
  "combine",
@@ -62,6 +63,13 @@ try {
62
63
  }
63
64
  dntShim.Deno.exit(0);
64
65
  }
66
+ if (argv["latest-release-full"]) {
67
+ const release = changelog.releases.find((release) => release.date && release.version);
68
+ if (release) {
69
+ console.log(release.toString());
70
+ }
71
+ dntShim.Deno.exit(0);
72
+ }
65
73
  if (argv.release) {
66
74
  const release = changelog.releases.find((release) => {
67
75
  if (release.date) {
@@ -180,22 +188,23 @@ function showHelp() {
180
188
  Usage: keep-a-changelog [options]
181
189
 
182
190
  Options:
183
- --file, -f Changelog file (default: CHANGELOG.md)
184
- --format Output format (default: compact)
185
- --bullet-style Bullet point style (default: -)
186
- --url Repository URL
191
+ --file, -f Changelog file (default: CHANGELOG.md)
192
+ --format Output format (default: compact)
193
+ --bullet-style Bullet point style (default: -)
194
+ --url Repository URL
187
195
 
188
- --init Initialize a new changelog file
189
- --latest-release Print the latest release version
196
+ --init Initialize a new changelog file
197
+ --latest-release Print the latest release version
198
+ --latest-release-full Print the latest release
190
199
 
191
- --release Set the date of the specified release
192
- --combine Combine changes from releases with the same version
193
- --create Create a new release
200
+ --release Set the date of the specified release
201
+ --combine Combine changes from releases with the same version
202
+ --create Create a new release
194
203
 
195
- --no-v-prefix Do not add a "v" prefix to the version
196
- --no-sort-releases Do not sort releases
197
- --head Set the HEAD link
198
- --quiet Do not print errors
199
- --help, -h Show this help message
204
+ --no-v-prefix Do not add a "v" prefix to the version
205
+ --no-sort-releases Do not sort releases
206
+ --head Set the HEAD link
207
+ --quiet Do not print errors
208
+ --help, -h Show this help message
200
209
  `);
201
210
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keep-a-changelog",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "description": "Node package to parse and generate changelogs following the [keepachangelog](https://keepachangelog.com/) format.",
5
5
  "keywords": [
6
6
  "changelog",
package/script/bin.js CHANGED
@@ -52,6 +52,7 @@ const argv = (0, parse_args_js_1.parseArgs)(dntShim.Deno.args, {
52
52
  "https",
53
53
  "init",
54
54
  "latest-release",
55
+ "latest-release-full",
55
56
  "quiet",
56
57
  "help",
57
58
  "combine",
@@ -90,6 +91,13 @@ try {
90
91
  }
91
92
  dntShim.Deno.exit(0);
92
93
  }
94
+ if (argv["latest-release-full"]) {
95
+ const release = changelog.releases.find((release) => release.date && release.version);
96
+ if (release) {
97
+ console.log(release.toString());
98
+ }
99
+ dntShim.Deno.exit(0);
100
+ }
93
101
  if (argv.release) {
94
102
  const release = changelog.releases.find((release) => {
95
103
  if (release.date) {
@@ -208,22 +216,23 @@ function showHelp() {
208
216
  Usage: keep-a-changelog [options]
209
217
 
210
218
  Options:
211
- --file, -f Changelog file (default: CHANGELOG.md)
212
- --format Output format (default: compact)
213
- --bullet-style Bullet point style (default: -)
214
- --url Repository URL
219
+ --file, -f Changelog file (default: CHANGELOG.md)
220
+ --format Output format (default: compact)
221
+ --bullet-style Bullet point style (default: -)
222
+ --url Repository URL
215
223
 
216
- --init Initialize a new changelog file
217
- --latest-release Print the latest release version
224
+ --init Initialize a new changelog file
225
+ --latest-release Print the latest release version
226
+ --latest-release-full Print the latest release
218
227
 
219
- --release Set the date of the specified release
220
- --combine Combine changes from releases with the same version
221
- --create Create a new release
228
+ --release Set the date of the specified release
229
+ --combine Combine changes from releases with the same version
230
+ --create Create a new release
222
231
 
223
- --no-v-prefix Do not add a "v" prefix to the version
224
- --no-sort-releases Do not sort releases
225
- --head Set the HEAD link
226
- --quiet Do not print errors
227
- --help, -h Show this help message
232
+ --no-v-prefix Do not add a "v" prefix to the version
233
+ --no-sort-releases Do not sort releases
234
+ --head Set the HEAD link
235
+ --quiet Do not print errors
236
+ --help, -h Show this help message
228
237
  `);
229
238
  }