@edcalderon/versioning 1.5.1 → 1.5.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.
@@ -129,13 +129,15 @@ exports.default = {
129
129
  blockLines.pop();
130
130
  const extractedChanges = blockLines.join('\n');
131
131
  const versionStr = selectedBlock.version;
132
- const changelogRelPath = options.changelog.replace(/^\.\//, '');
132
+ const readmeDir = path.dirname(readmePath);
133
+ const changelogRelPath = path.relative(readmeDir, changelogPath).split(path.sep).join('/');
134
+ const changelogLinkPath = changelogRelPath.startsWith('..') ? changelogRelPath : `./${changelogRelPath}`;
133
135
  const newBlock = [
134
136
  `## 📋 Latest Changes (v${versionStr})`,
135
137
  '',
136
138
  extractedChanges,
137
139
  '',
138
- `For full version history, see [CHANGELOG.md](./${changelogRelPath}) and [GitHub releases](https://github.com/edcalderon/my-second-brain/releases)`,
140
+ `For full version history, see [CHANGELOG.md](${changelogLinkPath}) and [GitHub releases](https://github.com/edcalderon/my-second-brain/releases)`,
139
141
  '',
140
142
  ].join('\n');
141
143
  // -------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edcalderon/versioning",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "A comprehensive versioning and changelog management tool for monorepos",
5
5
  "main": "dist/index.js",
6
6
  "bin": {