@venizia/vulcan-okf 0.4.7 → 0.4.8-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venizia/vulcan-okf",
3
- "version": "0.4.7",
3
+ "version": "0.4.8-0",
4
4
  "description": "VULCAN knowledge tooling: OKF v0.2 conformance check (plus --strict house rules), gen, coverage and the offline graph explorer for a project's .agents/knowledge bundle. Bun-only.",
5
5
  "homepage": "https://github.com/VENIZIA-AI/vulcan/tree/main/packages/okf",
6
6
  "bugs": {
@@ -2,7 +2,6 @@ import { spawnSync } from 'node:child_process';
2
2
  import { existsSync, readdirSync, readFileSync } from 'node:fs';
3
3
  import { join, relative } from 'node:path';
4
4
  import { readOkfProject } from '../project/index.ts';
5
- import type { IOkfProject } from '../project/index.ts';
6
5
 
7
6
  const DATED_ENTRY = /^\d{4}-\d{2}-\d{2}-.*\.md$/;
8
7
  const FRONTMATTER = /^---\r?\n([\s\S]*?)\r?\n---/;
@@ -21,9 +20,9 @@ const frontmatterOf = (opts: { text: string }): TRecord => {
21
20
  return isRecord(parsed) ? parsed.value : {};
22
21
  };
23
22
 
24
- /** The tag a release override names, by the project's template; a `<date>` part matches any date. */
25
- const tagPatternOf = (opts: { project: IOkfProject; dir: string; version: string }): RegExp => {
26
- const escaped = opts.project.tagPattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
23
+ /** The tag a release override names, by one template of the project; a `<date>` part matches any date. */
24
+ const tagPatternOf = (opts: { template: string; dir: string; version: string }): RegExp => {
25
+ const escaped = opts.template.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
27
26
 
28
27
  return new RegExp(
29
28
  `^${escaped
@@ -110,9 +109,11 @@ export const collectChangelogProblems = (): string[] => {
110
109
 
111
110
  tags ??= tagsOf({ root: project.root });
112
111
 
113
- const pattern = tagPatternOf({ project, dir, version: override[2] });
112
+ const patterns = [project.tagPattern, ...project.legacyTagPatterns].map((template) =>
113
+ tagPatternOf({ template, dir, version: override[2] }),
114
+ );
114
115
 
115
- if (!tags.some((tag) => pattern.test(tag))) {
116
+ if (!tags.some((tag) => patterns.some((pattern) => pattern.test(tag)))) {
116
117
  const expected = project.tagPattern
117
118
  .replace(/<(?:dir|package)>/g, dir)
118
119
  .replace(/<version>/g, override[2])
@@ -27,6 +27,8 @@ export interface IOkfProject {
27
27
  changelogs?: string;
28
28
  /** `atlas.tagPattern`, the template of a release tag. */
29
29
  tagPattern: string;
30
+ /** `atlas.legacyTagPatterns`: templates of an earlier tag layout that still name releases. */
31
+ legacyTagPatterns: string[];
30
32
  /** Absolute; `okf.contents.files` - agent-read files outside the bundle that carry a contents list. */
31
33
  contentsFiles: string[];
32
34
  packages: IOkfPackage[];
@@ -175,6 +175,7 @@ export const readOkfProject = (): IOkfProject => {
175
175
  value: atlas.tagPattern,
176
176
  fallback: OkfProjectConstants.DEFAULT_TAG_PATTERN,
177
177
  }),
178
+ legacyTagPatterns: stringsOf({ value: atlas.legacyTagPatterns }),
178
179
  contentsFiles: contentsFilesOf({
179
180
  patterns: Array.isArray(recordOf({ value: okf.contents }).files)
180
181
  ? stringsOf({ value: recordOf({ value: okf.contents }).files })