@edcalderon/versioning 1.5.4 → 1.5.5
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 +19 -1
- package/README.md +3 -1
- package/dist/changelog.js +1 -16
- package/dist/extensions/readme-maintainer/index.js +5 -1
- package/package.json +1 -1
- package/test-changelog.js +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,25 @@
|
|
|
1
|
-
## [1.5.
|
|
1
|
+
## [1.5.5](https://github.com/edcalderon/my-second-brain/compare/versioning-v1.5.4...versioning-v1.5.5) (2026-03-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **versioning:** guard against blank changelog sections in readme-maintainer ([1570811](https://github.com/edcalderon/my-second-brain/commit/1570811e4890ee4b376bb7fcae4d7ca065c2bde5))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
2
10
|
|
|
3
11
|
|
|
12
|
+
## [1.5.5](https://github.com/edcalderon/my-second-brain/compare/versioning-v1.5.4...versioning-v1.5.5) (2026-03-22)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [1.5.4](https://github.com/edcalderon/my-second-brain/compare/versioning-v1.5.3...versioning-v1.5.4) (2026-03-22)
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
4
21
|
|
|
22
|
+
* **versioning:** isolate changelog generation to package path and fix tag prefix ([8b94673](https://github.com/edcalderon/my-second-brain/commit/8b94673e738ff9eb7b30f40df88296a24683526f))
|
|
5
23
|
|
|
6
24
|
|
|
7
25
|
## [1.5.3](https://github.com/edcalderon/my-second-brain/compare/v1.5.1...v1.5.3) (2026-03-22)
|
package/README.md
CHANGED
|
@@ -8,9 +8,11 @@ A comprehensive versioning and changelog management tool designed for monorepos
|
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
## 📋 Latest Changes (v1.5.
|
|
11
|
+
## 📋 Latest Changes (v1.5.5)
|
|
12
12
|
|
|
13
|
+
### Bug Fixes
|
|
13
14
|
|
|
15
|
+
* **versioning:** guard against blank changelog sections in readme-maintainer ([1570811](https://github.com/edcalderon/my-second-brain/commit/1570811e4890ee4b376bb7fcae4d7ca065c2bde5))
|
|
14
16
|
|
|
15
17
|
For full version history, see [CHANGELOG.md](./CHANGELOG.md) and [GitHub releases](https://github.com/edcalderon/my-second-brain/releases)
|
|
16
18
|
|
package/dist/changelog.js
CHANGED
|
@@ -38,25 +38,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.ChangelogManager = void 0;
|
|
40
40
|
const fs = __importStar(require("fs-extra"));
|
|
41
|
-
const path = __importStar(require("path"));
|
|
42
41
|
const conventional_changelog_1 = __importDefault(require("conventional-changelog"));
|
|
43
42
|
class ChangelogManager {
|
|
44
43
|
constructor(config = {}) {
|
|
45
|
-
const
|
|
46
|
-
let computedPath = config.changelog?.path || config.path;
|
|
47
|
-
if (!computedPath && fs.existsSync(path.join(cwd, '.git'))) {
|
|
48
|
-
computedPath = '.';
|
|
49
|
-
}
|
|
50
|
-
else if (!computedPath) {
|
|
51
|
-
try {
|
|
52
|
-
const { execSync } = require('child_process');
|
|
53
|
-
const gitRoot = execSync('git rev-parse --show-toplevel', { encoding: 'utf8' }).trim();
|
|
54
|
-
computedPath = path.relative(gitRoot, cwd);
|
|
55
|
-
}
|
|
56
|
-
catch (err) {
|
|
57
|
-
computedPath = '.';
|
|
58
|
-
}
|
|
59
|
-
}
|
|
44
|
+
const computedPath = config.changelog?.path || config.path || '.';
|
|
60
45
|
this.config = {
|
|
61
46
|
preset: config.changelog?.preset || 'angular',
|
|
62
47
|
infile: config.changelogFile || 'CHANGELOG.md',
|
|
@@ -127,8 +127,12 @@ exports.default = {
|
|
|
127
127
|
blockLines.shift();
|
|
128
128
|
while (blockLines.length > 0 && blockLines[blockLines.length - 1].trim() === '')
|
|
129
129
|
blockLines.pop();
|
|
130
|
-
const extractedChanges = blockLines.join('\n');
|
|
130
|
+
const extractedChanges = blockLines.join('\n').trim();
|
|
131
131
|
const versionStr = selectedBlock.version;
|
|
132
|
+
if (!extractedChanges) {
|
|
133
|
+
console.log(`⚠️ Changelog block for v${versionStr} is empty. Skipping README update.`);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
132
136
|
const readmeDir = path.dirname(readmePath);
|
|
133
137
|
const changelogRelPath = path.relative(readmeDir, changelogPath).split(path.sep).join('/');
|
|
134
138
|
const changelogLinkPath = changelogRelPath.startsWith('..') ? changelogRelPath : `./${changelogRelPath}`;
|
package/package.json
CHANGED