@versu/core 0.6.5 → 0.6.7
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/README.md +59 -15
- package/dist/adapters/project-information.d.ts +2 -2
- package/dist/adapters/project-information.d.ts.map +1 -1
- package/dist/changelog/index.d.ts +2 -2
- package/dist/changelog/index.d.ts.map +1 -1
- package/dist/changelog/index.js +14 -12
- package/dist/changelog/index.js.map +1 -1
- package/dist/config/index.d.ts +34 -45
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +38 -44
- package/dist/config/index.js.map +1 -1
- package/dist/factories/adapter-identifier-registry.d.ts +0 -4
- package/dist/factories/adapter-identifier-registry.d.ts.map +1 -1
- package/dist/factories/adapter-identifier-registry.js +1 -11
- package/dist/factories/adapter-identifier-registry.js.map +1 -1
- package/dist/git/index.d.ts +15 -1
- package/dist/git/index.d.ts.map +1 -1
- package/dist/git/index.js +38 -7
- package/dist/git/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/plugins/plugin-loader.d.ts +4 -4
- package/dist/plugins/plugin-loader.d.ts.map +1 -1
- package/dist/plugins/plugin-loader.js +8 -15
- package/dist/plugins/plugin-loader.js.map +1 -1
- package/dist/plugins/plugin-schema.d.ts +96 -0
- package/dist/plugins/plugin-schema.d.ts.map +1 -0
- package/dist/plugins/plugin-schema.js +128 -0
- package/dist/plugins/plugin-schema.js.map +1 -0
- package/dist/semver/index.d.ts +26 -18
- package/dist/semver/index.d.ts.map +1 -1
- package/dist/semver/index.js +27 -14
- package/dist/semver/index.js.map +1 -1
- package/dist/services/changelog-generator.d.ts.map +1 -1
- package/dist/services/changelog-generator.js +2 -6
- package/dist/services/changelog-generator.js.map +1 -1
- package/dist/services/configuration-loader.d.ts +1 -1
- package/dist/services/configuration-loader.d.ts.map +1 -1
- package/dist/services/configuration-loader.js.map +1 -1
- package/dist/services/configuration-validator.d.ts +8 -3
- package/dist/services/configuration-validator.d.ts.map +1 -1
- package/dist/services/configuration-validator.js +10 -2
- package/dist/services/configuration-validator.js.map +1 -1
- package/dist/services/module-detector.d.ts +5 -5
- package/dist/services/module-detector.d.ts.map +1 -1
- package/dist/services/module-registry.d.ts +14 -2
- package/dist/services/module-registry.d.ts.map +1 -1
- package/dist/services/module-registry.js +1 -1
- package/dist/services/module-registry.js.map +1 -1
- package/dist/services/version-bumper.d.ts +2 -3
- package/dist/services/version-bumper.d.ts.map +1 -1
- package/dist/services/version-bumper.js.map +1 -1
- package/dist/services/version-manager.d.ts +2 -2
- package/dist/services/version-manager.d.ts.map +1 -1
- package/dist/services/version-manager.js.map +1 -1
- package/dist/services/versu-runner.d.ts.map +1 -1
- package/dist/services/versu-runner.js +5 -4
- package/dist/services/versu-runner.js.map +1 -1
- package/dist/utils/version.d.ts +1 -1
- package/dist/utils/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -82,26 +82,49 @@ VERSU core uses [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for
|
|
|
82
82
|
|
|
83
83
|
```json
|
|
84
84
|
{
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
"versionRules": {
|
|
86
|
+
"defaultBump": "patch",
|
|
87
|
+
"commitTypeBumps": {
|
|
88
|
+
"feat": "minor",
|
|
89
|
+
"fix": "patch",
|
|
90
|
+
"perf": "patch",
|
|
91
|
+
"docs": "ignore"
|
|
92
|
+
},
|
|
93
|
+
"dependencyBumps": {
|
|
94
|
+
"major": "major",
|
|
95
|
+
"minor": "minor",
|
|
96
|
+
"patch": "patch"
|
|
97
|
+
}
|
|
91
98
|
},
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
"changelog": {
|
|
100
|
+
"root": {
|
|
101
|
+
"context": {
|
|
102
|
+
"prependPlaceholder": "<!-- CHANGELOG -->"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"module": {
|
|
106
|
+
"context": {
|
|
107
|
+
"prependPlaceholder": "<!-- CHANGELOG -->"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
96
110
|
}
|
|
97
111
|
}
|
|
98
112
|
```
|
|
99
113
|
|
|
114
|
+
**Changelog Configuration:**
|
|
115
|
+
|
|
116
|
+
- `changelog.root` - Configuration for root-level CHANGELOG.md generation
|
|
117
|
+
- `changelog.module` - Configuration for per-module CHANGELOG.md generation
|
|
118
|
+
- `context.prependPlaceholder` - Placeholder string in changelog files where new entries are inserted
|
|
119
|
+
- `options` - Advanced changelog generation options (templates, grouping, sorting)
|
|
120
|
+
|
|
121
|
+
VERSU uses [conventional-changelog-writer](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer) for changelog generation. You can pass any options supported by conventional-changelog-writer through the `options` field. For advanced customization with functions (like `transform`, `commitsGroupsSort`), use JavaScript configuration files (`.versurc.js` or `versu.config.js`).
|
|
122
|
+
|
|
100
123
|
## Adapters
|
|
101
124
|
|
|
102
125
|
### Gradle Adapter
|
|
103
126
|
|
|
104
|
-
|
|
127
|
+
Gradle support is provided by the **[@versu/plugin-gradle](../plugin-gradle)** package.
|
|
105
128
|
|
|
106
129
|
**Features:**
|
|
107
130
|
|
|
@@ -123,7 +146,7 @@ api.version=1.5.0
|
|
|
123
146
|
|
|
124
147
|
### Creating Custom Adapters
|
|
125
148
|
|
|
126
|
-
To add support for new project types,
|
|
149
|
+
To add support for new project types, create a plugin package that implements the adapter interfaces:
|
|
127
150
|
|
|
128
151
|
```typescript
|
|
129
152
|
import {
|
|
@@ -190,10 +213,30 @@ class MyModuleSystemFactory implements ModuleSystemFactory {
|
|
|
190
213
|
}
|
|
191
214
|
```
|
|
192
215
|
|
|
193
|
-
Then
|
|
216
|
+
Then create a plugin:
|
|
217
|
+
|
|
218
|
+
```typescript
|
|
219
|
+
import type { PluginContract } from '@versu/core';
|
|
220
|
+
|
|
221
|
+
const myPlugin: PluginContract = {
|
|
222
|
+
id: 'my-adapter',
|
|
223
|
+
name: 'My Adapter',
|
|
224
|
+
description: 'Support for my build system',
|
|
225
|
+
version: '1.0.0',
|
|
226
|
+
author: 'Your Name',
|
|
227
|
+
adapters: [
|
|
228
|
+
{
|
|
229
|
+
id: 'my-adapter',
|
|
230
|
+
adapterIdentifier: () => new MyAdapterIdentifier(),
|
|
231
|
+
moduleSystemFactory: (repoRoot: string) => new MyModuleSystemFactory(repoRoot),
|
|
232
|
+
},
|
|
233
|
+
],
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
export default myPlugin;
|
|
237
|
+
```
|
|
194
238
|
|
|
195
|
-
|
|
196
|
-
2. Add to `src/services/adapter-identifier-registry.ts` in the registry initialization
|
|
239
|
+
See [@versu/plugin-gradle](../plugin-gradle) for a complete implementation example.
|
|
197
240
|
|
|
198
241
|
## Development
|
|
199
242
|
|
|
@@ -230,6 +273,7 @@ npm publish --workspace packages/core --access public
|
|
|
230
273
|
|
|
231
274
|
- **[@versu/cli](../cli)** - Command-line interface
|
|
232
275
|
- **[@versu/action](../action)** - GitHub Actions integration
|
|
276
|
+
- **[@versu/plugin-gradle](../plugin-gradle)** - Gradle adapter plugin
|
|
233
277
|
|
|
234
278
|
## Requirements
|
|
235
279
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Version } from "../semver";
|
|
2
2
|
/**
|
|
3
3
|
* Represents a module within a project, containing metadata, version, and dependency information.
|
|
4
4
|
*/
|
|
@@ -14,7 +14,7 @@ export type Module = {
|
|
|
14
14
|
/** Set of module IDs that are affected when this module changes. */
|
|
15
15
|
readonly affectedModules: Set<string>;
|
|
16
16
|
/** Current semantic version of the module. */
|
|
17
|
-
readonly version:
|
|
17
|
+
readonly version: Version;
|
|
18
18
|
/** Whether the version is explicitly declared in build configuration (vs inherited). */
|
|
19
19
|
readonly declaredVersion: boolean;
|
|
20
20
|
} & Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-information.d.ts","sourceRoot":"","sources":["../../src/adapters/project-information.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"project-information.d.ts","sourceRoot":"","sources":["../../src/adapters/project-information.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,yCAAyC;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,yEAAyE;IACzE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,oFAAoF;IACpF,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IAEjC,oEAAoE;IACpE,QAAQ,CAAC,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAEtC,8CAA8C;IAC9C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B,wFAAwF;IACxF,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;CACnC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5B;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,sDAAsD;IACtD,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAE7B,4EAA4E;IAC5E,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE9C,oEAAoE;IACpE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,yCAAyC;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,kEAAkE;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,6DAA6D;IAC7D,QAAQ,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;IAEnC,6DAA6D;IAC7D,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B,mDAAmD;IACnD,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IAEjC,yEAAyE;IACzE,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;CACnC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE7D;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,CAAC"}
|
|
@@ -7,9 +7,9 @@ export declare function updateChangelogFile(changelogContent: string, changelogP
|
|
|
7
7
|
export declare function generateChangelogsForModules(moduleResults: ModuleChangeResult[], getCommitsForModule: (moduleId: string) => Promise<{
|
|
8
8
|
commits: Commit[];
|
|
9
9
|
lastTag: string | null;
|
|
10
|
-
}>, repoRoot: string, config?: ModuleChangelogConfig): Promise<string[]>;
|
|
10
|
+
}>, repoRoot: string, dryRun: boolean, config?: ModuleChangelogConfig): Promise<string[]>;
|
|
11
11
|
export declare function generateRootChangelog(moduleResults: ModuleChangeResult[], getCommitsForModule: (moduleId: string) => Promise<{
|
|
12
12
|
commits: Commit[];
|
|
13
13
|
lastTag: string | null;
|
|
14
|
-
}>, repoRoot: string, config?: ModuleChangelogConfig): Promise<string | undefined>;
|
|
14
|
+
}>, repoRoot: string, dryRun: boolean, config?: ModuleChangelogConfig): Promise<string | undefined>;
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/changelog/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE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C3D,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,EACf,MAAM,CAAC,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,EAAE,CAAC,CA4EnB;AAED,wBAAsB,qBAAqB,CACzC,aAAa,EAAE,kBAAkB,EAAE,EACnC,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,KACb,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,EAC3D,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,EACf,MAAM,CAAC,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAyE7B"}
|
package/dist/changelog/index.js
CHANGED
|
@@ -28,7 +28,7 @@ async function buildContextRepository(options = {}) {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
/** Generate changelog for multiple modules. */
|
|
31
|
-
export async function generateChangelogsForModules(moduleResults, getCommitsForModule, repoRoot, config) {
|
|
31
|
+
export async function generateChangelogsForModules(moduleResults, getCommitsForModule, repoRoot, dryRun, config) {
|
|
32
32
|
const changelogPaths = [];
|
|
33
33
|
if (!config) {
|
|
34
34
|
throw new Error(`Missing required changelog configuration`);
|
|
@@ -68,13 +68,17 @@ export async function generateChangelogsForModules(moduleResults, getCommitsForM
|
|
|
68
68
|
...config?.context,
|
|
69
69
|
prepend,
|
|
70
70
|
}, config?.options);
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
if (dryRun) {
|
|
72
|
+
logger.info(`🏃♂️ Dry run mode - skipping writing changelog for module ${moduleResult.id} to file`);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
await updateChangelogFile(changelogContent, changelogPath, prependPlaceholder);
|
|
76
|
+
}
|
|
73
77
|
changelogPaths.push(changelogPath);
|
|
74
78
|
}
|
|
75
79
|
return changelogPaths;
|
|
76
80
|
}
|
|
77
|
-
export async function generateRootChangelog(moduleResults, getCommitsForModule, repoRoot, config) {
|
|
81
|
+
export async function generateRootChangelog(moduleResults, getCommitsForModule, repoRoot, dryRun, config) {
|
|
78
82
|
const moduleResult = moduleResults.find((result) => result.type === "root");
|
|
79
83
|
if (!moduleResult) {
|
|
80
84
|
logger.info("No root module found, skipping root changelog generation...");
|
|
@@ -89,12 +93,6 @@ export async function generateRootChangelog(moduleResults, getCommitsForModule,
|
|
|
89
93
|
throw new Error("Missing required context property 'prependPlaceholder'");
|
|
90
94
|
}
|
|
91
95
|
const contextRepository = await buildContextRepository({ cwd: repoRoot });
|
|
92
|
-
/*if (!moduleResult.declaredVersion) {
|
|
93
|
-
logger.info(
|
|
94
|
-
`Module ${moduleResult.id} has no declared version, skipping changelog generation...`,
|
|
95
|
-
);
|
|
96
|
-
return;
|
|
97
|
-
}*/
|
|
98
96
|
const { commits, lastTag } = await getCommitsForModule(moduleResult.id);
|
|
99
97
|
if (commits.length === 0) {
|
|
100
98
|
logger.info(`No commits to include in changelog for module ${moduleResult.id}, skipping...`);
|
|
@@ -121,8 +119,12 @@ export async function generateRootChangelog(moduleResults, getCommitsForModule,
|
|
|
121
119
|
...config?.context,
|
|
122
120
|
prepend,
|
|
123
121
|
}, config?.options);
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
if (dryRun) {
|
|
123
|
+
logger.info(`🏃♂️ Dry run mode - skipping writing changelog for module ${moduleResult.id} to file`);
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
await updateChangelogFile(changelogContent, changelogPath, prependPlaceholder);
|
|
127
|
+
}
|
|
126
128
|
return changelogPath;
|
|
127
129
|
}
|
|
128
130
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/changelog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,IAAI,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M,EAAE,CAAC;QACX,MAAM,CAAC,IAAI,CACT,8DAA8D,YAAY,CAAC,EAAE,UAAU,CACxF,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,mBAAmB,CACvB,gBAAgB,EAChB,aAAa,EACb,kBAAkB,CACnB,CAAC;IACJ,CAAC;IAED,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
package/dist/config/index.d.ts
CHANGED
|
@@ -6,19 +6,19 @@ import { Commit } from "conventional-commits-parser";
|
|
|
6
6
|
* Validates that dependency cascade rules use valid bump types.
|
|
7
7
|
*/
|
|
8
8
|
declare const dependencyRulesSchema: z.ZodObject<{
|
|
9
|
-
|
|
9
|
+
major: z.ZodEnum<{
|
|
10
10
|
major: "major";
|
|
11
11
|
minor: "minor";
|
|
12
12
|
patch: "patch";
|
|
13
13
|
none: "none";
|
|
14
14
|
}>;
|
|
15
|
-
|
|
15
|
+
minor: z.ZodEnum<{
|
|
16
16
|
major: "major";
|
|
17
17
|
minor: "minor";
|
|
18
18
|
patch: "patch";
|
|
19
19
|
none: "none";
|
|
20
20
|
}>;
|
|
21
|
-
|
|
21
|
+
patch: z.ZodEnum<{
|
|
22
22
|
major: "major";
|
|
23
23
|
minor: "minor";
|
|
24
24
|
patch: "patch";
|
|
@@ -26,13 +26,9 @@ declare const dependencyRulesSchema: z.ZodObject<{
|
|
|
26
26
|
}>;
|
|
27
27
|
}, z.core.$strip>;
|
|
28
28
|
/**
|
|
29
|
-
* Zod schema for
|
|
30
|
-
* Validates
|
|
29
|
+
* Zod schema for Changelog configuration.
|
|
30
|
+
* Validates the structure of changelog options and context.
|
|
31
31
|
*/
|
|
32
|
-
declare const nodeJSConfigSchema: z.ZodObject<{
|
|
33
|
-
versionSource: z.ZodArray<z.ZodLiteral<"package.json">>;
|
|
34
|
-
updatePackageLock: z.ZodBoolean;
|
|
35
|
-
}, z.core.$strip>;
|
|
36
32
|
export declare const changelogSchema: z.ZodOptional<z.ZodObject<{
|
|
37
33
|
context: z.ZodObject<{
|
|
38
34
|
prependPlaceholder: z.ZodString;
|
|
@@ -45,7 +41,7 @@ export declare const changelogSchema: z.ZodOptional<z.ZodObject<{
|
|
|
45
41
|
commitPartial: z.ZodOptional<z.ZodString>;
|
|
46
42
|
headerPartial: z.ZodOptional<z.ZodString>;
|
|
47
43
|
footerPartial: z.ZodOptional<z.ZodString>;
|
|
48
|
-
}, z.core.$
|
|
44
|
+
}, z.core.$loose>>;
|
|
49
45
|
}, z.core.$strip>>;
|
|
50
46
|
/**
|
|
51
47
|
* Zod schema for the main Config object.
|
|
@@ -53,43 +49,40 @@ export declare const changelogSchema: z.ZodOptional<z.ZodObject<{
|
|
|
53
49
|
* configuration with detailed error messages for invalid configurations.
|
|
54
50
|
*/
|
|
55
51
|
export declare const configSchema: z.ZodObject<{
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
minor: "minor";
|
|
59
|
-
patch: "patch";
|
|
60
|
-
none: "none";
|
|
61
|
-
}>;
|
|
62
|
-
commitTypes: z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
63
|
-
major: "major";
|
|
64
|
-
minor: "minor";
|
|
65
|
-
patch: "patch";
|
|
66
|
-
none: "none";
|
|
67
|
-
ignore: "ignore";
|
|
68
|
-
}>>;
|
|
69
|
-
dependencyRules: z.ZodObject<{
|
|
70
|
-
onMajorOfDependency: z.ZodEnum<{
|
|
71
|
-
major: "major";
|
|
72
|
-
minor: "minor";
|
|
73
|
-
patch: "patch";
|
|
74
|
-
none: "none";
|
|
75
|
-
}>;
|
|
76
|
-
onMinorOfDependency: z.ZodEnum<{
|
|
52
|
+
versionRules: z.ZodObject<{
|
|
53
|
+
defaultBump: z.ZodEnum<{
|
|
77
54
|
major: "major";
|
|
78
55
|
minor: "minor";
|
|
79
56
|
patch: "patch";
|
|
80
57
|
none: "none";
|
|
81
58
|
}>;
|
|
82
|
-
|
|
59
|
+
commitTypeBumps: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
|
|
83
60
|
major: "major";
|
|
84
61
|
minor: "minor";
|
|
85
62
|
patch: "patch";
|
|
86
63
|
none: "none";
|
|
87
|
-
}
|
|
64
|
+
}>, z.ZodLiteral<"ignore">]>>;
|
|
65
|
+
dependencyBumps: z.ZodObject<{
|
|
66
|
+
major: z.ZodEnum<{
|
|
67
|
+
major: "major";
|
|
68
|
+
minor: "minor";
|
|
69
|
+
patch: "patch";
|
|
70
|
+
none: "none";
|
|
71
|
+
}>;
|
|
72
|
+
minor: z.ZodEnum<{
|
|
73
|
+
major: "major";
|
|
74
|
+
minor: "minor";
|
|
75
|
+
patch: "patch";
|
|
76
|
+
none: "none";
|
|
77
|
+
}>;
|
|
78
|
+
patch: z.ZodEnum<{
|
|
79
|
+
major: "major";
|
|
80
|
+
minor: "minor";
|
|
81
|
+
patch: "patch";
|
|
82
|
+
none: "none";
|
|
83
|
+
}>;
|
|
84
|
+
}, z.core.$strip>;
|
|
88
85
|
}, z.core.$strip>;
|
|
89
|
-
nodejs: z.ZodOptional<z.ZodObject<{
|
|
90
|
-
versionSource: z.ZodArray<z.ZodLiteral<"package.json">>;
|
|
91
|
-
updatePackageLock: z.ZodBoolean;
|
|
92
|
-
}, z.core.$strip>>;
|
|
93
86
|
plugins: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
94
87
|
changelog: z.ZodOptional<z.ZodObject<{
|
|
95
88
|
root: z.ZodOptional<z.ZodObject<{
|
|
@@ -104,7 +97,7 @@ export declare const configSchema: z.ZodObject<{
|
|
|
104
97
|
commitPartial: z.ZodOptional<z.ZodString>;
|
|
105
98
|
headerPartial: z.ZodOptional<z.ZodString>;
|
|
106
99
|
footerPartial: z.ZodOptional<z.ZodString>;
|
|
107
|
-
}, z.core.$
|
|
100
|
+
}, z.core.$loose>>;
|
|
108
101
|
}, z.core.$strip>>;
|
|
109
102
|
module: z.ZodOptional<z.ZodObject<{
|
|
110
103
|
context: z.ZodObject<{
|
|
@@ -118,12 +111,12 @@ export declare const configSchema: z.ZodObject<{
|
|
|
118
111
|
commitPartial: z.ZodOptional<z.ZodString>;
|
|
119
112
|
headerPartial: z.ZodOptional<z.ZodString>;
|
|
120
113
|
footerPartial: z.ZodOptional<z.ZodString>;
|
|
121
|
-
}, z.core.$
|
|
114
|
+
}, z.core.$loose>>;
|
|
122
115
|
}, z.core.$strip>>;
|
|
123
116
|
}, z.core.$strip>>;
|
|
124
117
|
}, z.core.$strip>;
|
|
125
118
|
/**
|
|
126
|
-
* Configuration for
|
|
119
|
+
* Configuration for version bumping behavior.
|
|
127
120
|
* Controls commit type handling, dependency cascade rules, and adapter-specific settings.
|
|
128
121
|
*/
|
|
129
122
|
export type Config = z.infer<typeof configSchema>;
|
|
@@ -133,11 +126,7 @@ export type Config = z.infer<typeof configSchema>;
|
|
|
133
126
|
*/
|
|
134
127
|
export type DependencyRules = z.infer<typeof dependencyRulesSchema>;
|
|
135
128
|
/**
|
|
136
|
-
*
|
|
137
|
-
*/
|
|
138
|
-
export type NodeJSConfig = z.infer<typeof nodeJSConfigSchema>;
|
|
139
|
-
/**
|
|
140
|
-
* Default VERSU configuration following Conventional Commits specification.
|
|
129
|
+
* Default configuration following Conventional Commits specification.
|
|
141
130
|
* Maps common commit types to semantic version bumps and defines dependency cascade rules.
|
|
142
131
|
*/
|
|
143
132
|
export declare const DEFAULT_CONFIG: Config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAerD;;;GAGG;AACH,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;iBAIzB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;kBAoBf,CAAC;AAEd;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAavB,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAsB5B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,CAe7E;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,kBAAkB,EAAE,QAAQ,EAC5B,MAAM,EAAE,MAAM,GACb,QAAQ,CAaV;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,MAAM,EACrD,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,CAAC,GACb,MAAM,CAAC,CAAC,CAAC,CAEX"}
|
package/dist/config/index.js
CHANGED
|
@@ -9,30 +9,20 @@ const bumpTypeSchema = z.enum(["major", "minor", "patch", "none"]);
|
|
|
9
9
|
* Zod schema for BumpType or 'ignore' values.
|
|
10
10
|
* Used for commit type mappings where 'ignore' is allowed.
|
|
11
11
|
*/
|
|
12
|
-
const bumpTypeOrIgnoreSchema = z.
|
|
13
|
-
"major",
|
|
14
|
-
"minor",
|
|
15
|
-
"patch",
|
|
16
|
-
"none",
|
|
17
|
-
"ignore",
|
|
18
|
-
]);
|
|
12
|
+
const bumpTypeOrIgnoreSchema = z.union([bumpTypeSchema, z.literal("ignore")]);
|
|
19
13
|
/**
|
|
20
14
|
* Zod schema for DependencyRules configuration.
|
|
21
15
|
* Validates that dependency cascade rules use valid bump types.
|
|
22
16
|
*/
|
|
23
17
|
const dependencyRulesSchema = z.object({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
major: bumpTypeSchema,
|
|
19
|
+
minor: bumpTypeSchema,
|
|
20
|
+
patch: bumpTypeSchema,
|
|
27
21
|
});
|
|
28
22
|
/**
|
|
29
|
-
* Zod schema for
|
|
30
|
-
* Validates
|
|
23
|
+
* Zod schema for Changelog configuration.
|
|
24
|
+
* Validates the structure of changelog options and context.
|
|
31
25
|
*/
|
|
32
|
-
const nodeJSConfigSchema = z.object({
|
|
33
|
-
versionSource: z.array(z.literal("package.json")),
|
|
34
|
-
updatePackageLock: z.boolean(),
|
|
35
|
-
});
|
|
36
26
|
export const changelogSchema = z
|
|
37
27
|
.object({
|
|
38
28
|
context: z
|
|
@@ -50,6 +40,7 @@ export const changelogSchema = z
|
|
|
50
40
|
headerPartial: z.string().optional(),
|
|
51
41
|
footerPartial: z.string().optional(),
|
|
52
42
|
})
|
|
43
|
+
.loose()
|
|
53
44
|
.optional(),
|
|
54
45
|
})
|
|
55
46
|
.optional();
|
|
@@ -59,10 +50,11 @@ export const changelogSchema = z
|
|
|
59
50
|
* configuration with detailed error messages for invalid configurations.
|
|
60
51
|
*/
|
|
61
52
|
export const configSchema = z.object({
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
53
|
+
versionRules: z.object({
|
|
54
|
+
defaultBump: bumpTypeSchema,
|
|
55
|
+
commitTypeBumps: z.record(z.string(), bumpTypeOrIgnoreSchema),
|
|
56
|
+
dependencyBumps: dependencyRulesSchema,
|
|
57
|
+
}),
|
|
66
58
|
plugins: z.array(z.string()).optional().default([]),
|
|
67
59
|
changelog: z
|
|
68
60
|
.object({
|
|
@@ -72,28 +64,30 @@ export const configSchema = z.object({
|
|
|
72
64
|
.optional(),
|
|
73
65
|
});
|
|
74
66
|
/**
|
|
75
|
-
* Default
|
|
67
|
+
* Default configuration following Conventional Commits specification.
|
|
76
68
|
* Maps common commit types to semantic version bumps and defines dependency cascade rules.
|
|
77
69
|
*/
|
|
78
70
|
export const DEFAULT_CONFIG = {
|
|
79
|
-
defaultBump: "patch",
|
|
80
|
-
commitTypes: {
|
|
81
|
-
feat: "minor",
|
|
82
|
-
fix: "patch",
|
|
83
|
-
perf: "patch",
|
|
84
|
-
refactor: "patch",
|
|
85
|
-
docs: "ignore",
|
|
86
|
-
test: "ignore",
|
|
87
|
-
chore: "ignore",
|
|
88
|
-
style: "ignore",
|
|
89
|
-
ci: "ignore",
|
|
90
|
-
build: "ignore",
|
|
91
|
-
},
|
|
92
71
|
plugins: [],
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
72
|
+
versionRules: {
|
|
73
|
+
defaultBump: "patch",
|
|
74
|
+
commitTypeBumps: {
|
|
75
|
+
feat: "minor",
|
|
76
|
+
fix: "patch",
|
|
77
|
+
perf: "patch",
|
|
78
|
+
refactor: "patch",
|
|
79
|
+
docs: "ignore",
|
|
80
|
+
test: "ignore",
|
|
81
|
+
chore: "ignore",
|
|
82
|
+
style: "ignore",
|
|
83
|
+
ci: "ignore",
|
|
84
|
+
build: "ignore",
|
|
85
|
+
},
|
|
86
|
+
dependencyBumps: {
|
|
87
|
+
major: "major",
|
|
88
|
+
minor: "minor",
|
|
89
|
+
patch: "patch",
|
|
90
|
+
},
|
|
97
91
|
},
|
|
98
92
|
};
|
|
99
93
|
/**
|
|
@@ -108,11 +102,11 @@ export function getBumpTypeForCommit(commit, config) {
|
|
|
108
102
|
return "major";
|
|
109
103
|
}
|
|
110
104
|
const commitType = commit.type || "unknown";
|
|
111
|
-
const configuredBump = config.
|
|
105
|
+
const configuredBump = config.versionRules.commitTypeBumps[commitType];
|
|
112
106
|
if (configuredBump === "ignore") {
|
|
113
107
|
return "none";
|
|
114
108
|
}
|
|
115
|
-
return configuredBump || config.defaultBump;
|
|
109
|
+
return configuredBump || config.versionRules.defaultBump;
|
|
116
110
|
}
|
|
117
111
|
/**
|
|
118
112
|
* Determines how a module should be bumped when one of its dependencies changes.
|
|
@@ -122,14 +116,14 @@ export function getBumpTypeForCommit(commit, config) {
|
|
|
122
116
|
* @returns The bump type to apply to the dependent module
|
|
123
117
|
*/
|
|
124
118
|
export function getDependencyBumpType(dependencyBumpType, config) {
|
|
125
|
-
const rules = config.
|
|
119
|
+
const rules = config.versionRules.dependencyBumps;
|
|
126
120
|
switch (dependencyBumpType) {
|
|
127
121
|
case "major":
|
|
128
|
-
return rules.
|
|
122
|
+
return rules.major;
|
|
129
123
|
case "minor":
|
|
130
|
-
return rules.
|
|
124
|
+
return rules.minor;
|
|
131
125
|
case "patch":
|
|
132
|
-
return rules.
|
|
126
|
+
return rules.patch;
|
|
133
127
|
default:
|
|
134
128
|
return "none";
|
|
135
129
|
}
|
package/dist/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;;GAGG;AACH,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAEnE;;;GAGG;AACH,MAAM,sBAAsB,GAAG,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,O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AAC;IAE5C,MAAM,cAAc,GAAG,MAAM,CAAC,YAAY,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;IAEvE,IAAI,cAAc,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,cAAc,IAAI,MAAM,CAAC,YAAY,CAAC,WAAW,CAAC;AAC3D,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,kBAA4B,EAC5B,MAAc;IAEd,MAAM,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC,eAAe,CAAC;IAElD,QAAQ,kBAAkB,EAAE,CAAC;QAC3B,KAAK,OAAO;YACV,OAAO,KAAK,CAAC,KAAK,CAAC;QACrB,KAAK,OAAO;YACV,OAAO,KAAK,CAAC,KAAK,CAAC;QACrB,KAAK,OAAO;YACV,OAAO,KAAK,CAAC,KAAK,CAAC;QACrB;YACE,OAAO,MAAM,CAAC;IAClB,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,MAAc,EACd,WAAc;IAEd,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC;AAC7B,CAAC"}
|
|
@@ -4,10 +4,6 @@ import { PluginContract } from "../plugins/plugin-loader.js";
|
|
|
4
4
|
* Creates and configures the global adapter identifier registry.
|
|
5
5
|
*
|
|
6
6
|
* @returns Configured {@link AdapterIdentifierRegistry} with all available adapters
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* Central point for registering all supported project adapters.
|
|
10
|
-
* To add a new adapter, implement {@link AdapterIdentifier} and add it to the array.
|
|
11
7
|
*/
|
|
12
8
|
export declare function createAdapterIdentifierRegistry(plugins: PluginContract[]): AdapterIdentifierRegistry;
|
|
13
9
|
//# sourceMappingURL=adapter-identifier-registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-identifier-registry.d.ts","sourceRoot":"","sources":["../../src/factories/adapter-identifier-registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"adapter-identifier-registry.d.ts","sourceRoot":"","sources":["../../src/factories/adapter-identifier-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,cAAc,EAAE,GACxB,yBAAyB,CAS3B"}
|
|
@@ -3,21 +3,11 @@ import { AdapterIdentifierRegistry } from "../services/adapter-identifier-regist
|
|
|
3
3
|
* Creates and configures the global adapter identifier registry.
|
|
4
4
|
*
|
|
5
5
|
* @returns Configured {@link AdapterIdentifierRegistry} with all available adapters
|
|
6
|
-
*
|
|
7
|
-
* @remarks
|
|
8
|
-
* Central point for registering all supported project adapters.
|
|
9
|
-
* To add a new adapter, implement {@link AdapterIdentifier} and add it to the array.
|
|
10
6
|
*/
|
|
11
7
|
export function createAdapterIdentifierRegistry(plugins) {
|
|
12
8
|
// Array of all registered adapter identifiers
|
|
13
9
|
// Order matters: first matching adapter is selected during auto-detection
|
|
14
|
-
const identifiers =
|
|
15
|
-
// Add future adapter identifiers here as they are implemented:
|
|
16
|
-
// new MavenAdapterIdentifier(),
|
|
17
|
-
// new NodeJSAdapterIdentifier(),
|
|
18
|
-
// new PythonAdapterIdentifier(),
|
|
19
|
-
...plugins.flatMap((plugin) => plugin.adapters.map((adapter) => adapter.adapterIdentifier())),
|
|
20
|
-
];
|
|
10
|
+
const identifiers = plugins.flatMap((plugin) => plugin.adapters.map((adapter) => adapter.adapterIdentifier()));
|
|
21
11
|
// Create and return the registry with all registered identifiers
|
|
22
12
|
return new AdapterIdentifierRegistry(identifiers);
|
|
23
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-identifier-registry.js","sourceRoot":"","sources":["../../src/factories/adapter-identifier-registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"adapter-identifier-registry.js","sourceRoot":"","sources":["../../src/factories/adapter-identifier-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AAGvF;;;;GAIG;AACH,MAAM,UAAU,+BAA+B,CAC7C,OAAyB;IAEzB,8CAA8C;IAC9C,0EAA0E;IAC1E,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAC7C,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAC9D,CAAC;IAEF,iEAAiE;IACjE,OAAO,IAAI,yBAAyB,CAAC,WAAW,CAAC,CAAC;AACpD,CAAC"}
|
package/dist/git/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Git operations module for
|
|
2
|
+
* Git operations module for version management.
|
|
3
3
|
* Provides interfaces for commit analysis, tagging, and conventional commit parsing.
|
|
4
4
|
* Supports monorepo and multi-module projects with module-specific tag management.
|
|
5
5
|
*/
|
|
@@ -255,6 +255,20 @@ export declare function pushCommits(options?: GitOptions): Promise<void>;
|
|
|
255
255
|
* Unlike `isWorkingDirectoryClean()`, this function throws on errors.
|
|
256
256
|
*/
|
|
257
257
|
export declare function hasChangesToCommit(options?: GitOptions): Promise<boolean>;
|
|
258
|
+
/**
|
|
259
|
+
* Retrieves the URL of the current Git repository's 'origin' remote.
|
|
260
|
+
*
|
|
261
|
+
* This function executes a Git command to fetch the URL of the 'origin' remote
|
|
262
|
+
* for the repository in the specified working directory.
|
|
263
|
+
*
|
|
264
|
+
* @param options - Configuration options for the Git operation
|
|
265
|
+
* @param options.cwd - The working directory where the Git command should be executed.
|
|
266
|
+
* Defaults to the current working directory if not specified.
|
|
267
|
+
*
|
|
268
|
+
* @returns A promise that resolves to the trimmed URL string of the 'origin' remote
|
|
269
|
+
*
|
|
270
|
+
* @throws {Error} If the Git command fails or the repository URL cannot be retrieved
|
|
271
|
+
*/
|
|
258
272
|
export declare function getCurrentRepoUrl(options?: GitOptions): Promise<string>;
|
|
259
273
|
/**
|
|
260
274
|
* Parses a git repository URL (SSH or HTTP/HTTPS) and extracts its components.
|