@edcalderon/versioning 1.5.2 → 1.5.4
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 +27 -0
- package/README.md +1 -8
- package/dist/changelog.d.ts +3 -1
- package/dist/changelog.js +27 -5
- package/dist/extensions/readme-maintainer/index.js +8 -1
- package/dist/release.js +3 -0
- package/package.json +6 -6
- package/test-changelog.js +7 -0
- package/versioning.config.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
## [1.5.4](https://github.com/edcalderon/my-second-brain/compare/versioning-v1.5.3...versioning-v1.5.4) (2026-03-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## [1.5.3](https://github.com/edcalderon/my-second-brain/compare/v1.5.1...v1.5.3) (2026-03-22)
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **versioning:** execute postChangelog hook in release manager and run update-readme ([219e62e](https://github.com/edcalderon/my-second-brain/commit/219e62eb86b234eabf0ab7b306e10b864e2f0f51))
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **versioning:** add workspace env extension ([c3c7131](https://github.com/edcalderon/my-second-brain/commit/c3c71315aabe8cb266a0a1b59a2194169471d19f))
|
|
16
|
+
* **versioning:** workspace-scripts extension v1.0.0 — auto-generate dev:all, build:all, per-app scripts ([adb586c](https://github.com/edcalderon/my-second-brain/commit/adb586cc7021fd6b554fe62884a3dc9d24b8c311))
|
|
17
|
+
|
|
18
|
+
## [1.5.2](https://github.com/edcalderon/my-second-brain/compare/v1.5.1...v1.5.2) (2026-03-22)
|
|
19
|
+
|
|
20
|
+
(No changes recorded for versioning in v1.5.2)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
1
28
|
|
|
2
29
|
|
|
3
30
|
# Changelog
|
package/README.md
CHANGED
|
@@ -8,16 +8,9 @@ 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.4)
|
|
12
12
|
|
|
13
|
-
### Fixed
|
|
14
|
-
- 🔧 Fixed `secrets-check` extension to use Husky v9 hook format (removed deprecated `._/husky.sh` sourcing)
|
|
15
|
-
- 🔧 Fixed `cleanup-repo` extension to use Husky v9 hook format
|
|
16
|
-
- 🔄 Enhanced `init` command to automatically set up husky and add `prepare` script to package.json
|
|
17
|
-
- ✨ Added optional `postinstall` hook to versioning package that conditionally sets up husky when consumed
|
|
18
13
|
|
|
19
|
-
### Changed
|
|
20
|
-
- 📝 Updated hook generation to be compatible with Husky v9+ (eliminates deprecation warnings in v10)
|
|
21
14
|
|
|
22
15
|
For full version history, see [CHANGELOG.md](./CHANGELOG.md) and [GitHub releases](https://github.com/edcalderon/my-second-brain/releases)
|
|
23
16
|
|
package/dist/changelog.d.ts
CHANGED
|
@@ -4,10 +4,12 @@ export interface ChangelogConfig {
|
|
|
4
4
|
outfile?: string;
|
|
5
5
|
releaseCount?: number;
|
|
6
6
|
sameFile?: boolean;
|
|
7
|
+
tagPrefix?: string;
|
|
8
|
+
path?: string;
|
|
7
9
|
}
|
|
8
10
|
export declare class ChangelogManager {
|
|
9
11
|
private config;
|
|
10
|
-
constructor(config?:
|
|
12
|
+
constructor(config?: any);
|
|
11
13
|
generate(from?: string, to?: string): Promise<string>;
|
|
12
14
|
private updateExistingChangelog;
|
|
13
15
|
getLatestRelease(): Promise<string | null>;
|
package/dist/changelog.js
CHANGED
|
@@ -38,25 +38,47 @@ 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"));
|
|
41
42
|
const conventional_changelog_1 = __importDefault(require("conventional-changelog"));
|
|
42
43
|
class ChangelogManager {
|
|
43
44
|
constructor(config = {}) {
|
|
45
|
+
const cwd = process.cwd();
|
|
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
60
|
this.config = {
|
|
45
|
-
preset: 'angular',
|
|
46
|
-
infile: 'CHANGELOG.md',
|
|
47
|
-
outfile: 'CHANGELOG.md',
|
|
61
|
+
preset: config.changelog?.preset || 'angular',
|
|
62
|
+
infile: config.changelogFile || 'CHANGELOG.md',
|
|
63
|
+
outfile: config.changelogFile || 'CHANGELOG.md',
|
|
48
64
|
sameFile: true,
|
|
65
|
+
tagPrefix: config.changelog?.tagPrefix || config.tagPrefix,
|
|
66
|
+
path: computedPath,
|
|
49
67
|
...config
|
|
50
68
|
};
|
|
51
69
|
}
|
|
52
70
|
async generate(from, to) {
|
|
53
71
|
return new Promise((resolve, reject) => {
|
|
54
72
|
let changelog = '';
|
|
55
|
-
const stream =
|
|
73
|
+
const stream = conventional_changelog_1.default({
|
|
56
74
|
preset: this.config.preset,
|
|
57
75
|
releaseCount: this.config.releaseCount,
|
|
58
76
|
...(from && { from }),
|
|
59
|
-
...(to && { to })
|
|
77
|
+
...(to && { to }),
|
|
78
|
+
...(this.config.tagPrefix && { tagPrefix: this.config.tagPrefix })
|
|
79
|
+
}, undefined, // context
|
|
80
|
+
{
|
|
81
|
+
...(this.config.path && { path: this.config.path })
|
|
60
82
|
});
|
|
61
83
|
stream.on('data', (chunk) => {
|
|
62
84
|
changelog += chunk.toString();
|
|
@@ -181,7 +181,14 @@ exports.default = {
|
|
|
181
181
|
},
|
|
182
182
|
hooks: {
|
|
183
183
|
postChangelog: async (_options) => {
|
|
184
|
-
console.log('💡
|
|
184
|
+
console.log('💡 Syncing READMEs with the latest CHANGELOG entries...');
|
|
185
|
+
try {
|
|
186
|
+
const { execSync } = require('child_process');
|
|
187
|
+
execSync('pnpm --recursive run --if-present update-readme', { stdio: 'inherit' });
|
|
188
|
+
}
|
|
189
|
+
catch (err) {
|
|
190
|
+
console.log('⚠️ Failed to auto-sync readmes or none found.');
|
|
191
|
+
}
|
|
185
192
|
}
|
|
186
193
|
}
|
|
187
194
|
};
|
package/dist/release.js
CHANGED
|
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.ReleaseManager = void 0;
|
|
37
37
|
const fs = __importStar(require("fs-extra"));
|
|
38
38
|
const path = __importStar(require("path"));
|
|
39
|
+
const extensions_1 = require("./extensions");
|
|
39
40
|
class ReleaseManager {
|
|
40
41
|
constructor(config) {
|
|
41
42
|
this.config = {
|
|
@@ -63,6 +64,7 @@ class ReleaseManager {
|
|
|
63
64
|
}
|
|
64
65
|
// Generate changelog
|
|
65
66
|
await this.config.changelogManager.generate();
|
|
67
|
+
await (0, extensions_1.runExtensionHooks)('postChangelog', {});
|
|
66
68
|
// Commit changes
|
|
67
69
|
if (this.config.createCommit) {
|
|
68
70
|
await this.config.versionManager.commitChanges(version);
|
|
@@ -119,6 +121,7 @@ class ReleaseManager {
|
|
|
119
121
|
build: options.build
|
|
120
122
|
});
|
|
121
123
|
await this.config.changelogManager.generate();
|
|
124
|
+
await (0, extensions_1.runExtensionHooks)('postChangelog', {});
|
|
122
125
|
if (this.config.createCommit) {
|
|
123
126
|
await this.config.versionManager.commitChanges(result.version);
|
|
124
127
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edcalderon/versioning",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
4
4
|
"description": "A comprehensive versioning and changelog management tool for monorepos",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
"lint": "eslint src/**/*.ts",
|
|
16
16
|
"postinstall": "node scripts/post-install.js",
|
|
17
17
|
"prepublishOnly": "npm run build && npm run test",
|
|
18
|
-
"version:patch": "node dist/cli.js patch --no-
|
|
19
|
-
"version:minor": "node dist/cli.js minor --no-
|
|
20
|
-
"version:major": "node dist/cli.js major --no-
|
|
18
|
+
"version:patch": "node dist/cli.js patch --no-tag",
|
|
19
|
+
"version:minor": "node dist/cli.js minor --no-tag",
|
|
20
|
+
"version:major": "node dist/cli.js major --no-tag",
|
|
21
21
|
"changelog": "node dist/cli.js changelog",
|
|
22
22
|
"publish:npm": "node dist/cli.js publish-package",
|
|
23
23
|
"publish:local": "node dist/cli.js publish-local",
|
|
24
24
|
"create-tag": "node scripts/create-tag.js",
|
|
25
|
-
"release": "npm run version:patch && npm run
|
|
26
|
-
"release:local": "npm run version:patch && npm run
|
|
25
|
+
"release": "npm run version:patch && npm run create-tag",
|
|
26
|
+
"release:local": "npm run version:patch && npm run publish:local",
|
|
27
27
|
"update-readme": "node dist/cli.js update-readme"
|
|
28
28
|
},
|
|
29
29
|
"keywords": [
|