@versu/core 0.4.1 → 0.5.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @versu/core - Core Library
2
2
 
3
- The core business logic powering VERSU (Version Engine for Repo Semantic Evolution). This package is completely framework-agnostic and can be integrated into any TypeScript/JavaScript project, CI/CD system, or custom tooling.
3
+ The core business logic powering VERSU. This package is completely framework-agnostic and can be integrated into any TypeScript/JavaScript project, CI/CD system, or custom tooling.
4
4
 
5
5
  ## Installation
6
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"gradle-project-information.d.ts","sourceRoot":"","sources":["../../../src/adapters/gradle/gradle-project-information.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsB,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AA4H1G;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAuEtH;AA2CD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,kBAAkB,EAAE,qBAAqB,GAAG,kBAAkB,CA6CnG"}
1
+ {"version":3,"file":"gradle-project-information.d.ts","sourceRoot":"","sources":["../../../src/adapters/gradle/gradle-project-information.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsB,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AA4H1G;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAyEtH;AA2CD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,kBAAkB,EAAE,qBAAqB,GAAG,kBAAkB,CA6CnG"}
@@ -157,6 +157,8 @@ export async function getRawProjectInformation(projectRoot, outputFile) {
157
157
  const projectInformation = await getInformationWithVersions(projectRoot, data);
158
158
  if (executeScript) {
159
159
  // Write back to file with hash for future cache validation
160
+ const dirname = path.dirname(outputFile);
161
+ await fs.mkdir(dirname, { recursive: true });
160
162
  await fs.writeFile(outputFile, JSON.stringify(cachedData, null, 2), 'utf-8');
161
163
  }
162
164
  return projectInformation;
@@ -1,14 +1,15 @@
1
1
  import { ModuleChangeResult } from "../services/version-applier.js";
2
2
  import { Commit } from "conventional-commits-parser";
3
+ import { ModuleChangelogConfig } from "../services/changelog-generator.js";
3
4
  /** Update or create a changelog file for a module. */
4
5
  export declare function updateChangelogFile(changelogContent: string, changelogPath: string, prependPlaceholder: string): Promise<void>;
5
6
  /** Generate changelog for multiple modules. */
6
7
  export declare function generateChangelogsForModules(moduleResults: ModuleChangeResult[], getCommitsForModule: (moduleId: string) => Promise<{
7
8
  commits: Commit[];
8
9
  lastTag: string | null;
9
- }>, repoRoot: string): Promise<string[]>;
10
+ }>, repoRoot: string, config?: ModuleChangelogConfig): Promise<string[]>;
10
11
  export declare function generateRootChangelog(moduleResults: ModuleChangeResult[], getCommitsForModule: (moduleId: string) => Promise<{
11
12
  commits: Commit[];
12
13
  lastTag: string | null;
13
- }>, repoRoot: string): Promise<string | undefined>;
14
+ }>, repoRoot: string, config?: ModuleChangelogConfig): Promise<string | undefined>;
14
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,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGpE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAKrD,sDAAsD;AACtD,wBAAsB,mBAAmB,CACvC,gBAAgB,EAAE,MAAM,EACxB,aAAa,EAAE,MAAM,EACrB,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC,IAAI,CAAC,CAWf;AAsBD,+CAA+C;AAC/C,wBAAsB,4BAA4B,CAChD,aAAa,EAAE,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;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,CAAC,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAgF7B"}
@@ -1,5 +1,5 @@
1
1
  import { promises as fs } from "fs";
2
- import path, { join } from "path";
2
+ import { join } from "path";
3
3
  import { writeChangelogString } from "conventional-changelog-writer";
4
4
  import { logger } from "../utils/logger.js";
5
5
  import { exists } from "../utils/file.js";
@@ -28,17 +28,14 @@ async function buildContextRepository(options = {}) {
28
28
  };
29
29
  }
30
30
  /** Generate changelog for multiple modules. */
31
- export async function generateChangelogsForModules(moduleResults, getCommitsForModule, repoRoot) {
31
+ export async function generateChangelogsForModules(moduleResults, getCommitsForModule, repoRoot, config) {
32
32
  const changelogPaths = [];
33
- const configPath = path.resolve(repoRoot, "changelog.config.js");
34
- if (!(await exists(configPath))) {
35
- throw new Error(`Missing required changelog configuration file at ${configPath}`);
33
+ if (!config) {
34
+ throw new Error(`Missing required changelog configuration`);
36
35
  }
37
- logger.info(`Loading changelog configuration from ${configPath}...`);
38
- const userConfig = (await import(configPath)).default.module;
39
- const prependPlaceholder = userConfig.context.prependPlaceholder;
36
+ const prependPlaceholder = config?.context.prependPlaceholder;
40
37
  if (!prependPlaceholder) {
41
- throw new Error("Missing required context property 'prependPlaceholder' in changelog.config.js");
38
+ throw new Error("Missing required context property 'prependPlaceholder'");
42
39
  }
43
40
  const contextRepository = await buildContextRepository({ cwd: repoRoot });
44
41
  for (const moduleResult of moduleResults) {
@@ -68,30 +65,28 @@ export async function generateChangelogsForModules(moduleResults, getCommitsForM
68
65
  currentTag: currentTag,
69
66
  linkCompare: previousTag && currentTag ? true : false,
70
67
  ...contextRepository,
71
- ...userConfig.context,
68
+ ...config?.context,
72
69
  prepend,
73
- }, userConfig.options);
70
+ }, config?.options);
74
71
  logger.info(changelogContent);
75
72
  await updateChangelogFile(changelogContent, changelogPath, prependPlaceholder);
76
73
  changelogPaths.push(changelogPath);
77
74
  }
78
75
  return changelogPaths;
79
76
  }
80
- export async function generateRootChangelog(moduleResults, getCommitsForModule, repoRoot) {
77
+ export async function generateRootChangelog(moduleResults, getCommitsForModule, repoRoot, config) {
81
78
  const moduleResult = moduleResults.find((result) => result.type === "root");
82
79
  if (!moduleResult) {
83
80
  logger.info("No root module found, skipping root changelog generation...");
84
81
  return;
85
82
  }
86
- const configPath = path.resolve(repoRoot, "changelog.config.js");
87
- if (!(await exists(configPath))) {
88
- throw new Error(`Missing required changelog configuration file at ${configPath}`);
83
+ if (!config) {
84
+ throw new Error(`Missing required changelog configuration`);
89
85
  }
90
- logger.info(`Loading root changelog configuration from ${configPath}...`);
91
- const userConfig = (await import(configPath)).default.root;
92
- const prependPlaceholder = userConfig.context.prependPlaceholder;
86
+ logger.info(`Loading root changelog configuration...`);
87
+ const prependPlaceholder = config?.context.prependPlaceholder;
93
88
  if (!prependPlaceholder) {
94
- throw new Error("Missing required context property 'prependPlaceholder' in changelog.config.js");
89
+ throw new Error("Missing required context property 'prependPlaceholder'");
95
90
  }
96
91
  const contextRepository = await buildContextRepository({ cwd: repoRoot });
97
92
  /*if (!moduleResult.declaredVersion) {
@@ -123,9 +118,9 @@ export async function generateRootChangelog(moduleResults, getCommitsForModule,
123
118
  currentTag: currentTag,
124
119
  linkCompare: previousTag && currentTag ? true : false,
125
120
  ...contextRepository,
126
- ...userConfig.context,
121
+ ...config?.context,
127
122
  prepend,
128
- }, userConfig.options);
123
+ }, config?.options);
129
124
  logger.info(changelogContent);
130
125
  await updateChangelogFile(changelogContent, changelogPath, prependPlaceholder);
131
126
  return changelogPath;
@@ -33,6 +33,20 @@ declare const nodeJSConfigSchema: z.ZodObject<{
33
33
  versionSource: z.ZodArray<z.ZodLiteral<"package.json">>;
34
34
  updatePackageLock: z.ZodBoolean;
35
35
  }, z.core.$strip>;
36
+ export declare const changelogSchema: z.ZodOptional<z.ZodObject<{
37
+ context: z.ZodObject<{
38
+ prependPlaceholder: z.ZodString;
39
+ }, z.core.$loose>;
40
+ options: z.ZodOptional<z.ZodObject<{
41
+ groupBy: z.ZodOptional<z.ZodString>;
42
+ commitsGroupsSort: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
43
+ transform: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
44
+ mainTemplate: z.ZodOptional<z.ZodString>;
45
+ commitPartial: z.ZodOptional<z.ZodString>;
46
+ headerPartial: z.ZodOptional<z.ZodString>;
47
+ footerPartial: z.ZodOptional<z.ZodString>;
48
+ }, z.core.$strip>>;
49
+ }, z.core.$strip>>;
36
50
  /**
37
51
  * Zod schema for the main Config object.
38
52
  * This schema is used by ConfigurationValidator to ensure type-safe
@@ -76,6 +90,36 @@ export declare const configSchema: z.ZodObject<{
76
90
  versionSource: z.ZodArray<z.ZodLiteral<"package.json">>;
77
91
  updatePackageLock: z.ZodBoolean;
78
92
  }, z.core.$strip>>;
93
+ changelog: z.ZodOptional<z.ZodObject<{
94
+ root: z.ZodOptional<z.ZodObject<{
95
+ context: z.ZodObject<{
96
+ prependPlaceholder: z.ZodString;
97
+ }, z.core.$loose>;
98
+ options: z.ZodOptional<z.ZodObject<{
99
+ groupBy: z.ZodOptional<z.ZodString>;
100
+ commitsGroupsSort: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
101
+ transform: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
102
+ mainTemplate: z.ZodOptional<z.ZodString>;
103
+ commitPartial: z.ZodOptional<z.ZodString>;
104
+ headerPartial: z.ZodOptional<z.ZodString>;
105
+ footerPartial: z.ZodOptional<z.ZodString>;
106
+ }, z.core.$strip>>;
107
+ }, z.core.$strip>>;
108
+ module: z.ZodOptional<z.ZodObject<{
109
+ context: z.ZodObject<{
110
+ prependPlaceholder: z.ZodString;
111
+ }, z.core.$loose>;
112
+ options: z.ZodOptional<z.ZodObject<{
113
+ groupBy: z.ZodOptional<z.ZodString>;
114
+ commitsGroupsSort: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
115
+ transform: z.ZodOptional<z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>>;
116
+ mainTemplate: z.ZodOptional<z.ZodString>;
117
+ commitPartial: z.ZodOptional<z.ZodString>;
118
+ headerPartial: z.ZodOptional<z.ZodString>;
119
+ footerPartial: z.ZodOptional<z.ZodString>;
120
+ }, z.core.$strip>>;
121
+ }, z.core.$strip>>;
122
+ }, z.core.$strip>>;
79
123
  }, z.core.$strip>;
80
124
  /**
81
125
  * Configuration for VERSU version bumping behavior.
@@ -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;AAqBrD;;;GAGG;AACH,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;iBAIzB,CAAC;AAEH;;;GAGG;AACH,QAAA,MAAM,kBAAkB;;;iBAGtB,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKvB,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD;;;GAGG;AACH,MAAM,MAA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;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAmB5B,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"}
@@ -33,6 +33,26 @@ const nodeJSConfigSchema = z.object({
33
33
  versionSource: z.array(z.literal("package.json")),
34
34
  updatePackageLock: z.boolean(),
35
35
  });
36
+ export const changelogSchema = z
37
+ .object({
38
+ context: z
39
+ .object({
40
+ prependPlaceholder: z.string(),
41
+ })
42
+ .loose(),
43
+ options: z
44
+ .object({
45
+ groupBy: z.string().optional(),
46
+ commitsGroupsSort: z.function().optional(),
47
+ transform: z.function().optional(),
48
+ mainTemplate: z.string().optional(),
49
+ commitPartial: z.string().optional(),
50
+ headerPartial: z.string().optional(),
51
+ footerPartial: z.string().optional(),
52
+ })
53
+ .optional(),
54
+ })
55
+ .optional();
36
56
  /**
37
57
  * Zod schema for the main Config object.
38
58
  * This schema is used by ConfigurationValidator to ensure type-safe
@@ -43,6 +63,12 @@ export const configSchema = z.object({
43
63
  commitTypes: z.record(z.string(), bumpTypeOrIgnoreSchema),
44
64
  dependencyRules: dependencyRulesSchema,
45
65
  nodejs: nodeJSConfigSchema.optional(),
66
+ changelog: z
67
+ .object({
68
+ root: changelogSchema,
69
+ module: changelogSchema,
70
+ })
71
+ .optional(),
46
72
  });
47
73
  /**
48
74
  * Default VERSU configuration following Conventional Commits specification.
@@ -135,6 +135,7 @@ export declare function createTag(tagName: string, message: string, options?: Gi
135
135
  * @throws {Error} If push fails (no remote, authentication, network, conflicts, etc.)
136
136
  */
137
137
  export declare function pushTags(options?: GitOptions): Promise<void>;
138
+ export declare function getModuleTagName(moduleName: string, version: string): string;
138
139
  /**
139
140
  * Checks if the git working directory is clean (no uncommitted changes).
140
141
  * Uses `git status --porcelain` to detect modified, staged, deleted, or untracked files.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/git/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAgB,MAAM,6BAA6B,CAAC;AAGnE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAUrC;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB;;;;OAIG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,6DAA6D;IAC7D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;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M,CAAC,CAIjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,WAAW,CAAC,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAI3E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,YAAY,CAAC,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAI5E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,WAAW,CAAC,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAI3E"}
package/dist/git/index.js CHANGED
@@ -286,6 +286,11 @@ function getModuleTagPattern(moduleName) {
286
286
  // Format: moduleName@* where * matches any version
287
287
  return `${moduleName}@*`;
288
288
  }
289
+ export function getModuleTagName(moduleName, version) {
290
+ // Construct tag name for a module and version
291
+ // Format: moduleName@version (e.g., 'core@1.0.0')
292
+ return `${moduleName}@${version}`;
293
+ }
289
294
  /**
290
295
  * Parses a git tag name to extract module and version components.
291
296
  *
@@ -1,9 +1,14 @@
1
1
  import { ModuleChangeResult } from "./version-applier.js";
2
2
  import { Commit } from "conventional-commits-parser";
3
+ import zod from "zod";
4
+ import { changelogSchema, configSchema } from "../config/index.js";
5
+ export type ModuleChangelogConfig = zod.infer<typeof changelogSchema>;
6
+ export type ChangelogConfig = zod.infer<typeof configSchema>["changelog"];
3
7
  export type ChangelogGeneratorOptions = {
4
8
  generateChangelog: boolean;
5
9
  repoRoot: string;
6
10
  dryRun: boolean;
11
+ config: ChangelogConfig;
7
12
  };
8
13
  export declare class ChangelogGenerator {
9
14
  private readonly options;
@@ -1 +1 @@
1
- {"version":3,"file":"changelog-generator.d.ts","sourceRoot":"","sources":["../../src/services/changelog-generator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,MAAM,MAAM,yBAAyB,GAAG;IAC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E,OAAO,EAAE,MAAM,EAAE,CAAC;QAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,GACxE,OAAO,CAAC,MAAM,EAAE,CAAC;CAwCrB"}
@@ -16,9 +16,9 @@ export class ChangelogGenerator {
16
16
  return [];
17
17
  }*/
18
18
  // Generate individual module changelogs
19
- const changelogPaths = await generateChangelogsForModules(moduleResults, async (moduleId) => moduleCommits.get(moduleId) || { commits: [], lastTag: null }, this.options.repoRoot);
19
+ const changelogPaths = await generateChangelogsForModules(moduleResults, async (moduleId) => moduleCommits.get(moduleId) || { commits: [], lastTag: null }, this.options.repoRoot, this.options.config?.module);
20
20
  // Generate root changelog
21
- const rootChangelogPath = await generateRootChangelog(moduleResults, async (moduleId) => moduleCommits.get(moduleId) || { commits: [], lastTag: null }, this.options.repoRoot);
21
+ const rootChangelogPath = await generateRootChangelog(moduleResults, async (moduleId) => moduleCommits.get(moduleId) || { commits: [], lastTag: null }, this.options.repoRoot, this.options.config?.root);
22
22
  if (rootChangelogPath) {
23
23
  changelogPaths.push(rootChangelogPath);
24
24
  }
@@ -16,7 +16,7 @@ export class ConfigurationLoader {
16
16
  constructor(configurationValidator) {
17
17
  this.configurationValidator = configurationValidator;
18
18
  // Initialize cosmiconfig explorer once for reuse across multiple loads
19
- this.explorer = cosmiconfig("versu");
19
+ this.explorer = cosmiconfig("versu", { searchStrategy: 'global' });
20
20
  }
21
21
  /**
22
22
  * Loads and validates the VERSU configuration.
@@ -13,6 +13,8 @@ export type ModuleChangeResult = {
13
13
  readonly to: string;
14
14
  readonly bumpType: BumpType;
15
15
  readonly declaredVersion: boolean;
16
+ readonly isRelease: boolean;
17
+ readonly tagName?: string;
16
18
  };
17
19
  export declare class VersionApplier {
18
20
  private readonly versionManager;
@@ -1 +1 @@
1
- {"version":3,"file":"version-applier.d.ts","sourceRoot":"","sources":["../../src/services/version-applier.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,C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AAG;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,qBAAa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO;gBADP,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,qBAAqB;IAG3C,mBAAmB,CACvB,sBAAsB,EAAE,qBAAqB,EAAE,GAC9C,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAgDhC,OAAO,CAAC,iBAAiB;YAeX,aAAa;YAWb,cAAc;CAM7B"}
@@ -1,5 +1,6 @@
1
1
  import { logger } from "../utils/logger.js";
2
- import { formatSemVer } from "../semver/index.js";
2
+ import { formatSemVer, isReleaseVersion } from "../semver/index.js";
3
+ import { getModuleTagName } from "../git/index.js";
3
4
  export class VersionApplier {
4
5
  versionManager;
5
6
  options;
@@ -27,16 +28,23 @@ export class VersionApplier {
27
28
  await this.commitVersions();
28
29
  }
29
30
  // Create and return result objects
30
- return processedModuleChanges.map((change) => ({
31
- id: change.module.id,
32
- name: change.module.name,
33
- path: change.module.path,
34
- type: change.module.type,
35
- from: formatSemVer(change.fromVersion),
36
- to: change.toVersion,
37
- bumpType: change.bumpType,
38
- declaredVersion: change.module.declaredVersion,
39
- }));
31
+ return processedModuleChanges.map((change) => {
32
+ const isRelease = isReleaseVersion(change.toVersion);
33
+ return {
34
+ id: change.module.id,
35
+ name: change.module.name,
36
+ path: change.module.path,
37
+ type: change.module.type,
38
+ from: formatSemVer(change.fromVersion),
39
+ to: change.toVersion,
40
+ bumpType: change.bumpType,
41
+ declaredVersion: change.module.declaredVersion,
42
+ tagName: isRelease
43
+ ? getModuleTagName(change.module.name, change.toVersion)
44
+ : undefined,
45
+ isRelease: isRelease,
46
+ };
47
+ });
40
48
  }
41
49
  logPlannedChanges(processedModuleChanges) {
42
50
  logger.info(`📈 Planning to update ${processedModuleChanges.length} modules:`);
@@ -13,7 +13,6 @@ export type RunnerOptions = {
13
13
  readonly appendSnapshot: boolean;
14
14
  readonly pushChanges: boolean;
15
15
  readonly generateChangelog: boolean;
16
- readonly outputFile: string;
17
16
  };
18
17
  export type RunnerResult = {
19
18
  readonly bumped: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"versu-runner.d.ts","sourceRoot":"","sources":["../../src/services/versu-runner.ts"],"names":[],"mappings":"AAYA,OAAO,EAGL,kBAAkB,EACnB,MAAM,sBAAsB,CAAC;AAO9B,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAK5D,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACj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;IACtC,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,kBAAkB,CAAsB;IAChD,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,yBAAyB,CAA4B;IAC7D,OAAO,CAAC,uBAAuB,CAA0B;gBAE7C,OAAO,EAAE,aAAa;IAoBlC,OAAO,CAAC,cAAc;IAqBtB,OAAO,CAAC,eAAe;IAgCjB,GAAG,IAAI,OAAO,CAAC,YAAY,CAAC;YAYpB,KAAK;CA0IpB"}
@@ -26,7 +26,7 @@ export class VersuRunner {
26
26
  commitAnalyzer;
27
27
  versionBumper; // Will be initialized in run()
28
28
  versionApplier; // Will be initialized in run()
29
- changelogGenerator;
29
+ changelogGenerator; // Will be initialized in run()
30
30
  gitOperations; // Will be initialized in run()
31
31
  adapterIdentifierRegistry;
32
32
  adapterMetadataProvider;
@@ -34,15 +34,9 @@ export class VersuRunner {
34
34
  this.options = {
35
35
  ...options,
36
36
  repoRoot: path.resolve(options.repoRoot),
37
- outputFile: path.resolve(options.outputFile),
38
37
  };
39
38
  // Initialize services
40
39
  this.configurationLoader = new ConfigurationLoader(new ConfigurationValidator());
41
- this.changelogGenerator = new ChangelogGenerator({
42
- generateChangelog: options.generateChangelog,
43
- repoRoot: options.repoRoot,
44
- dryRun: options.dryRun,
45
- });
46
40
  this.adapterIdentifierRegistry = createAdapterIdentifierRegistry();
47
41
  this.adapterMetadataProvider = new AdapterMetadataProvider(this.adapterIdentifierRegistry, {
48
42
  repoRoot: options.repoRoot,
@@ -51,12 +45,10 @@ export class VersuRunner {
51
45
  }
52
46
  logStartupInfo() {
53
47
  logger.info(banner);
54
- logger.info("🌌 Version Engine for Repo Semantic Evolution");
55
- logger.info(" Orchestrating your monorepo multiverse...");
48
+ logger.info("Composing the history of your code, one version at a time....");
56
49
  logger.info("");
57
50
  logger.info("🚀 Starting VERSU engine...");
58
51
  logger.info(`Repository: ${this.options.repoRoot}`);
59
- logger.info(`Output file: ${this.options.outputFile}`);
60
52
  logger.info(`Adapter: ${this.options.adapter || "(auto-detect)"}`);
61
53
  logger.info(`Dry run: ${this.options.dryRun}`);
62
54
  logger.info(`Prerelease mode: ${this.options.prereleaseMode}`);
@@ -110,7 +102,8 @@ export class VersuRunner {
110
102
  // Initialize module system factory with resolved adapter
111
103
  this.moduleSystemFactory = createModuleSystemFactory(this.adapter.id, this.options.repoRoot);
112
104
  // Load configuration
113
- this.config = await this.configurationLoader.load(this.options.repoRoot);
105
+ const configDirectory = path.join(this.options.repoRoot, ".versu");
106
+ this.config = await this.configurationLoader.load(configDirectory);
114
107
  // Check if working directory is clean
115
108
  if (!this.options.dryRun &&
116
109
  !isWorkingDirectoryClean({ cwd: this.options.repoRoot })) {
@@ -118,7 +111,7 @@ export class VersuRunner {
118
111
  }
119
112
  // Discover modules and get hierarchy manager
120
113
  logger.info("🔍 Discovering modules...");
121
- const detector = this.moduleSystemFactory.createDetector(this.options.outputFile);
114
+ const detector = this.moduleSystemFactory.createDetector(path.resolve(path.join(configDirectory, 'project-information.json')));
122
115
  this.moduleRegistry = await detector.detect();
123
116
  // Log discovered modules through hierarchy manager
124
117
  const moduleIds = this.moduleRegistry.getModuleIds();
@@ -161,6 +154,12 @@ export class VersuRunner {
161
154
  };
162
155
  this.versionApplier = new VersionApplier(this.versionManager, versionApplierOptions);
163
156
  const changedModules = await this.versionApplier.applyVersionChanges(processedModuleChanges);
157
+ this.changelogGenerator = new ChangelogGenerator({
158
+ generateChangelog: this.options.generateChangelog,
159
+ repoRoot: this.options.repoRoot,
160
+ dryRun: this.options.dryRun,
161
+ config: this.config.changelog,
162
+ });
164
163
  // Generate changelogs
165
164
  const changelogPaths = await this.changelogGenerator.generateChangelogs(changedModules, moduleCommits);
166
165
  // Initialize git operations service
@@ -1,3 +1,3 @@
1
- export declare const VERSION = "0.4.1";
1
+ export declare const VERSION = "0.5.1";
2
2
  export declare const PACKAGE_NAME = "@versu/core";
3
3
  //# sourceMappingURL=version.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // This file is auto-generated. Do not edit manually.
2
2
  // Run 'npm run generate-version' to update this file.
3
- export const VERSION = "0.4.1";
3
+ export const VERSION = "0.5.1";
4
4
  export const PACKAGE_NAME = "@versu/core";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@versu/core",
3
- "version": "0.4.1",
4
- "description": "Version Engine for Repo Semantic Evolution (Core Library)",
3
+ "version": "0.5.1",
4
+ "description": "VERSU (Core Library)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "exports": {