@codluv/versionguard 0.5.0 → 0.7.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"calver.d.ts","sourceRoot":"","sources":["../src/calver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACV,MAAM,EACN,YAAY,EAEZ,WAAW,EAEX,gBAAgB,EACjB,MAAM,SAAS,CAAC;AA8BjB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,IAAI,YAAY,CAoBhF;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAE3B;;;;OAIG;IACH,KAAK,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC;IAE1B;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAEnB;;;;OAIG;IACH,GAAG,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC;IAExB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,WAAW,CAAC,YAAY,EAAE,YAAY,GAAG,kBAAkB,CAoB1E;AAyCD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAKpE;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAG,MAAM,GAAG,IAAI,CAqDhF;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,QAAQ,CACtB,O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GAAG,MAAM,CAqB7E;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,eAAe,CAAC,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAG,MAAM,EAAE,CAE5F"}
@@ -19,6 +19,18 @@ export interface ChangelogValidationResult {
19
19
  */
20
20
  hasEntryForVersion: boolean;
21
21
  }
22
+ /**
23
+ * Options for changelog structure enforcement.
24
+ *
25
+ * @public
26
+ * @since 0.7.0
27
+ */
28
+ export interface ChangelogStructureOptions {
29
+ /** Validate section headers against an allowed list. */
30
+ enforceStructure?: boolean;
31
+ /** Allowed section names. Defaults to Keep a Changelog standard sections. */
32
+ sections?: string[];
33
+ }
22
34
  /**
23
35
  * Validates a changelog file for release readiness.
24
36
  *
@@ -28,19 +40,26 @@ export interface ChangelogValidationResult {
28
40
  * The validator checks for a top-level changelog heading, an `[Unreleased]`
29
41
  * section, and optionally a dated entry for the requested version.
30
42
  *
43
+ * When `structure.enforceStructure` is `true`, section headers (`### Name`)
44
+ * are validated against the allowed list and empty sections produce warnings.
45
+ *
31
46
  * @param changelogPath - Path to the changelog file.
32
47
  * @param version - Version that must be present in the changelog.
33
48
  * @param strict - Whether to require compare links and dated release headings.
34
49
  * @param requireEntry - Whether the requested version must already have an entry.
50
+ * @param structure - Optional structure enforcement options.
35
51
  * @returns The result of validating the changelog file.
36
52
  * @example
37
53
  * ```ts
38
54
  * import { validateChangelog } from 'versionguard';
39
55
  *
40
- * const result = validateChangelog('CHANGELOG.md', '1.2.0', true, true);
56
+ * const result = validateChangelog('CHANGELOG.md', '1.2.0', true, true, {
57
+ * enforceStructure: true,
58
+ * sections: ['Added', 'Changed', 'Fixed'],
59
+ * });
41
60
  * ```
42
61
  */
43
- export declare function validateChangelog(changelogPath: string, version: string, strict?: boolean, requireEntry?: boolean): ChangelogValidationResult;
62
+ export declare function validateChangelog(changelogPath: string, version: string, strict?: boolean, requireEntry?: boolean, structure?: ChangelogStructureOptions): ChangelogValidationResult;
44
63
  /**
45
64
  * Gets the most recent released version from a changelog.
46
65
  *
@@ -1 +1 @@
1
- {"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../src/changelog.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB;;OAEG;IACH,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAID;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,OAAc,EACtB,YAAY,GAAE,OAAc,GAC3B,yBAAyB,CAgD3B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQrE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAC7B,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,MAA8C,GACnD,IAAI,CAmBN;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAMjE;AASD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,MAAM,EACrB,IAAI,GAAE,MAA8C,GACnD,OAAO,CAoET"}
1
+ {"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../src/changelog.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB;;OAEG;IACH,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAcD;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACxC,wDAAwD;IACxD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,OAAc,EACtB,YAAY,GAAE,OAAc,EAC5B,SAAS,CAAC,EAAE,yBAAyB,GACpC,yBAAyB,CAuD3B;AAiCD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQrE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAC7B,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,MAA8C,GACnD,IAAI,CAmBN;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAMjE;AASD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,MAAM,EACrB,IAAI,GAAE,MAA8C,GACnD,OAAO,CAoET"}
@@ -6,6 +6,17 @@ import { parse as parse$2 } from "smol-toml";
6
6
  import * as yaml from "js-yaml";
7
7
  import { globSync } from "glob";
8
8
  import { fileURLToPath } from "node:url";
9
+ function validateModifier(modifier, schemeRules) {
10
+ if (!modifier || !schemeRules?.allowedModifiers) return null;
11
+ const baseModifier = modifier.replace(/[\d.]+$/, "") || modifier;
12
+ if (!schemeRules.allowedModifiers.includes(baseModifier)) {
13
+ return {
14
+ message: `Modifier "${modifier}" is not allowed. Allowed: ${schemeRules.allowedModifiers.join(", ")}`,
15
+ severity: "error"
16
+ };
17
+ }
18
+ return null;
19
+ }
9
20
  const VALID_TOKENS = /* @__PURE__ */ new Set([
10
21
  "YYYY",
11
22
  "YY",
@@ -200,13 +211,10 @@ function validate$2(version, calverFormat, preventFutureDates = true, schemeRule
200
211
  });
201
212
  }
202
213
  }
203
- if (parsed.modifier && schemeRules?.allowedModifiers) {
204
- const baseModifier = parsed.modifier.replace(/[\d.]+$/, "") || parsed.modifier;
205
- if (!schemeRules.allowedModifiers.includes(baseModifier)) {
206
- errors.push({
207
- message: `Modifier "${parsed.modifier}" is not allowed. Allowed: ${schemeRules.allowedModifiers.join(", ")}`,
208
- severity: "error"
209
- });
214
+ if (parsed.modifier) {
215
+ const modifierError = validateModifier(parsed.modifier, schemeRules);
216
+ if (modifierError) {
217
+ errors.push(modifierError);
210
218
  }
211
219
  }
212
220
  if (schemeRules?.maxNumericSegments) {
@@ -315,7 +323,15 @@ const calver = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
315
323
  validate: validate$2
316
324
  }, Symbol.toStringTag, { value: "Module" }));
317
325
  const CHANGELOG_DATE_REGEX = /^\d{4}-\d{2}-\d{2}$/;
318
- function validateChangelog(changelogPath, version, strict = true, requireEntry = true) {
326
+ const KEEP_A_CHANGELOG_SECTIONS = [
327
+ "Added",
328
+ "Changed",
329
+ "Deprecated",
330
+ "Removed",
331
+ "Fixed",
332
+ "Security"
333
+ ];
334
+ function validateChangelog(changelogPath, version, strict = true, requireEntry = true, structure) {
319
335
  if (!fs.existsSync(changelogPath)) {
320
336
  return {
321
337
  valid: !requireEntry,
@@ -352,12 +368,36 @@ function validateChangelog(changelogPath, version, strict = true, requireEntry =
352
368
  }
353
369
  }
354
370
  }
371
+ if (structure?.enforceStructure) {
372
+ const allowed = structure.sections ?? KEEP_A_CHANGELOG_SECTIONS;
373
+ const sectionErrors = validateSections(content, allowed);
374
+ errors.push(...sectionErrors);
375
+ }
355
376
  return {
356
377
  valid: errors.length === 0,
357
378
  errors,
358
379
  hasEntryForVersion
359
380
  };
360
381
  }
382
+ function validateSections(content, allowed) {
383
+ const errors = [];
384
+ const lines = content.split("\n");
385
+ for (let i = 0; i < lines.length; i++) {
386
+ const sectionMatch = lines[i].match(/^### (.+)/);
387
+ if (!sectionMatch) continue;
388
+ const sectionName = sectionMatch[1].trim();
389
+ if (!allowed.includes(sectionName)) {
390
+ errors.push(
391
+ `Invalid changelog section "### ${sectionName}" (line ${i + 1}). Allowed: ${allowed.join(", ")}`
392
+ );
393
+ }
394
+ const nextContentLine = lines.slice(i + 1).find((l) => l.trim().length > 0);
395
+ if (!nextContentLine || nextContentLine.startsWith("#")) {
396
+ errors.push(`Empty changelog section "### ${sectionName}" (line ${i + 1})`);
397
+ }
398
+ }
399
+ return errors;
400
+ }
361
401
  function addVersionEntry(changelogPath, version, date = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10)) {
362
402
  if (!fs.existsSync(changelogPath)) {
363
403
  throw new Error(`Changelog not found: ${changelogPath}`);
@@ -1336,17 +1376,42 @@ function getStructuralErrors(version) {
1336
1376
  });
1337
1377
  return errors;
1338
1378
  }
1339
- function validate$1(version) {
1340
- const parsed = parse(version);
1379
+ function validate$1(version, semverConfig, schemeRules) {
1380
+ let input = version;
1381
+ if (input.startsWith("v") || input.startsWith("V")) {
1382
+ if (semverConfig?.allowVPrefix) {
1383
+ input = input.slice(1);
1384
+ }
1385
+ }
1386
+ const parsed = parse(input);
1341
1387
  if (!parsed) {
1342
1388
  return {
1343
1389
  valid: false,
1344
1390
  errors: getStructuralErrors(version)
1345
1391
  };
1346
1392
  }
1393
+ const errors = [];
1394
+ if (semverConfig && !semverConfig.allowBuildMetadata && parsed.build.length > 0) {
1395
+ errors.push({
1396
+ message: `Build metadata is not allowed: "${parsed.build.join(".")}"`,
1397
+ severity: "error"
1398
+ });
1399
+ }
1400
+ if (semverConfig?.requirePrerelease && parsed.prerelease.length === 0) {
1401
+ errors.push({
1402
+ message: "A prerelease label is required (e.g., 1.2.3-alpha.1)",
1403
+ severity: "error"
1404
+ });
1405
+ }
1406
+ if (parsed.prerelease.length > 0) {
1407
+ const modifierError = validateModifier(parsed.prerelease[0], schemeRules);
1408
+ if (modifierError) {
1409
+ errors.push(modifierError);
1410
+ }
1411
+ }
1347
1412
  return {
1348
- valid: true,
1349
- errors: [],
1413
+ valid: errors.filter((e) => e.severity === "error").length === 0,
1414
+ errors,
1350
1415
  version: { type: "semver", version: parsed }
1351
1416
  };
1352
1417
  }
@@ -1527,6 +1592,14 @@ function checkHardcodedVersions(expectedVersion, config, ignorePatterns, cwd = p
1527
1592
  }
1528
1593
  return mismatches;
1529
1594
  }
1595
+ const DEFAULT_SEMVER_CONFIG = {
1596
+ allowVPrefix: false,
1597
+ allowBuildMetadata: true,
1598
+ requirePrerelease: false
1599
+ };
1600
+ function getSemVerConfig(config) {
1601
+ return { ...DEFAULT_SEMVER_CONFIG, ...config.versioning.semver };
1602
+ }
1530
1603
  function getCalVerConfig(config) {
1531
1604
  if (!config.versioning.calver) {
1532
1605
  throw new Error('CalVer configuration is required when versioning.type is "calver"');
@@ -1703,6 +1776,11 @@ const DEFAULT_CONFIG = {
1703
1776
  maxNumericSegments: 3,
1704
1777
  allowedModifiers: ["dev", "alpha", "beta", "rc"]
1705
1778
  },
1779
+ semver: {
1780
+ allowVPrefix: false,
1781
+ allowBuildMetadata: true,
1782
+ requirePrerelease: false
1783
+ },
1706
1784
  calver: {
1707
1785
  format: "YYYY.MM.PATCH",
1708
1786
  preventFutureDates: true,
@@ -1729,7 +1807,9 @@ const DEFAULT_CONFIG = {
1729
1807
  enabled: true,
1730
1808
  file: "CHANGELOG.md",
1731
1809
  strict: true,
1732
- requireEntry: true
1810
+ requireEntry: true,
1811
+ enforceStructure: false,
1812
+ sections: ["Added", "Changed", "Deprecated", "Removed", "Fixed", "Security"]
1733
1813
  },
1734
1814
  git: {
1735
1815
  hooks: {
@@ -1782,8 +1862,16 @@ function initConfig(cwd = process.cwd()) {
1782
1862
  }
1783
1863
  function generateDefaultConfig() {
1784
1864
  return `# VersionGuard Configuration
1865
+ # Change "type" to switch between semver and calver — both blocks are always present.
1785
1866
  versioning:
1786
1867
  type: semver
1868
+ semver:
1869
+ allowVPrefix: false
1870
+ allowBuildMetadata: true
1871
+ requirePrerelease: false
1872
+ calver:
1873
+ format: "YYYY.MM.PATCH"
1874
+ preventFutureDates: true
1787
1875
 
1788
1876
  sync:
1789
1877
  files:
@@ -2615,7 +2703,7 @@ function getTagPreflightError(config, cwd, expectedVersion, allowAutoFix = false
2615
2703
  return "Working tree must be clean before creating or validating release tags";
2616
2704
  }
2617
2705
  const version = expectedVersion ?? getPackageVersion(cwd, config.manifest);
2618
- const versionResult = config.versioning.type === "semver" ? validate$1(version) : validate$2(
2706
+ const versionResult = config.versioning.type === "semver" ? validate$1(version, getSemVerConfig(config), config.versioning.schemeRules) : validate$2(
2619
2707
  version,
2620
2708
  config.versioning.calver?.format ?? "YYYY.MM.PATCH",
2621
2709
  config.versioning.calver?.preventFutureDates ?? true,
@@ -2636,7 +2724,11 @@ function getTagPreflightError(config, cwd, expectedVersion, allowAutoFix = false
2636
2724
  path.join(cwd, config.changelog.file),
2637
2725
  version,
2638
2726
  config.changelog.strict,
2639
- config.changelog.requireEntry
2727
+ config.changelog.requireEntry,
2728
+ {
2729
+ enforceStructure: config.changelog.enforceStructure,
2730
+ sections: config.changelog.sections
2731
+ }
2640
2732
  );
2641
2733
  if (!changelogResult.valid) {
2642
2734
  return changelogResult.errors[0] ?? "Changelog validation failed";
@@ -2700,7 +2792,7 @@ function suggestTagMessage(version, cwd = process.cwd()) {
2700
2792
  }
2701
2793
  function validateVersion(version, config) {
2702
2794
  if (config.versioning.type === "semver") {
2703
- return validate$1(version);
2795
+ return validate$1(version, getSemVerConfig(config), config.versioning.schemeRules);
2704
2796
  }
2705
2797
  const calverConfig = getCalVerConfig(config);
2706
2798
  return validate$2(
@@ -2744,7 +2836,11 @@ function validate(config, cwd = process.cwd()) {
2744
2836
  changelogPath,
2745
2837
  version,
2746
2838
  config.changelog.strict,
2747
- config.changelog.requireEntry
2839
+ config.changelog.requireEntry,
2840
+ {
2841
+ enforceStructure: config.changelog.enforceStructure,
2842
+ sections: config.changelog.sections
2843
+ }
2748
2844
  );
2749
2845
  if (!changelogResult.valid) {
2750
2846
  changelogValid = false;
@@ -2828,6 +2924,7 @@ function isWorktreeClean(cwd) {
2828
2924
  }
2829
2925
  }
2830
2926
  export {
2927
+ validateVersion as $,
2831
2928
  checkHardcodedVersions as A,
2832
2929
  checkHookIntegrity as B,
2833
2930
  checkHooksPathOverride as C,
@@ -2840,21 +2937,21 @@ export {
2840
2937
  JsonVersionSource as J,
2841
2938
  getCalVerConfig as K,
2842
2939
  getLatestTag as L,
2843
- getTagFeedback as M,
2844
- getVersionSource as N,
2845
- initConfig as O,
2846
- resolveVersionSource as P,
2847
- semver as Q,
2940
+ getSemVerConfig as M,
2941
+ getTagFeedback as N,
2942
+ getVersionSource as O,
2943
+ initConfig as P,
2944
+ resolveVersionSource as Q,
2848
2945
  RegexVersionSource as R,
2849
- suggestTagMessage as S,
2946
+ semver as S,
2850
2947
  TomlVersionSource as T,
2851
- sync as U,
2948
+ suggestTagMessage as U,
2852
2949
  VersionFileSource as V,
2853
- syncVersion as W,
2854
- validateChangelog as X,
2950
+ sync as W,
2951
+ syncVersion as X,
2855
2952
  YamlVersionSource as Y,
2856
- validateTagForPush as Z,
2857
- validateVersion as _,
2953
+ validateChangelog as Z,
2954
+ validateTagForPush as _,
2858
2955
  installHooks as a,
2859
2956
  getPackageVersion as b,
2860
2957
  createCkmEngine as c,
@@ -2882,4 +2979,4 @@ export {
2882
2979
  canBump as y,
2883
2980
  checkEnforceHooksPolicy as z
2884
2981
  };
2885
- //# sourceMappingURL=index-CwOyEn5L.js.map
2982
+ //# sourceMappingURL=index-DWiw8Nps.js.map