changelog-tool 1.2.1 → 1.4.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/changelog.md CHANGED
@@ -1,6 +1,20 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 1.4.0 (2026-06-23)
5
+ ------------------
6
+
7
+ * Now requires Node 20. Older versions may work but are out of support.
8
+ * Removed an ugly deprecated warning that was introduced in Node 24.x.
9
+
10
+
11
+ 1.3.0 (2026-02-18)
12
+ ------------------
13
+
14
+ * #14 git release will no longer complain about untracked files in a repo, and
15
+ will no longer add all files before committing.
16
+
17
+
4
18
  1.2.1 (2025-05-26)
5
19
  ------------------
6
20
 
package/cli.mjs CHANGED
@@ -3,15 +3,19 @@
3
3
  import { parseArgs } from 'node:util';
4
4
  import * as fs from 'node:fs/promises';
5
5
  import * as url from 'node:url';
6
+ import * as path from 'node:path';
6
7
  import { readPackageVersion, exists, calculateNextVersion, isGit, isGitClean, runCommand } from './util.mjs';
7
- import { Changelog, VersionLog, LogItem } from './changelog.mjs';
8
+ import { Changelog, VersionLog } from './changelog.mjs';
8
9
  import { parseFile } from './parse.mjs';
9
10
 
10
11
  const filename = 'changelog.md';
11
12
 
12
13
  const pkg = JSON.parse(
13
14
  await fs.readFile(
14
- url.fileURLToPath(url.resolve(import.meta.url, './package.json')),
15
+ path.join(
16
+ url.fileURLToPath(import.meta.url),
17
+ '../package.json'
18
+ ),
15
19
  'utf-8',
16
20
  )
17
21
  );
@@ -275,7 +279,7 @@ async function release(force = false) {
275
279
  );
276
280
  }
277
281
  if (useGit) {
278
- runCommand(`git add --all`);
282
+ runCommand(`git add --update`);
279
283
  runCommand(`git commit -m "Releasing ${lastVersion.version}"`);
280
284
  runCommand(`git tag v${lastVersion.version}`);
281
285
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "changelog-tool",
3
- "version": "1.2.1",
3
+ "version": "1.4.0",
4
4
  "description": "A CLI tool for manipulating changelogs",
5
5
  "type": "module",
6
6
  "main": "index.mjs",
package/util.mjs CHANGED
@@ -148,6 +148,7 @@ export function runCommand(command) {
148
148
  export function isGitClean() {
149
149
 
150
150
  const result = execSync('git status --porcelain=v1').toString('utf-8');
151
- return result.trim().length === 0;
151
+ const trackedChanges = result.split('\n').filter(line => line.length > 0 && !line.startsWith('??'));
152
+ return trackedChanges.length === 0;
152
153
 
153
154
  }