clud-bug 0.7.0-rc.4 → 0.7.0-rc.5

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":"render.d.ts","sourceRoot":"","sources":["../../src/core/render.ts"],"names":[],"mappings":"AA8BA,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACvB;AAWD,eAAO,MAAM,QAAQ,EAAE,cAItB,CAAC;AAOF,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAM3E,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAkBjE;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAGhF;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAQxD;AAKD,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;AAEvD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAInE"}
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/core/render.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;CACvB;AAWD,eAAO,MAAM,QAAQ,EAAE,cAItB,CAAC;AAOF,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAM3E,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,CAkBjE;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAGhF;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAQxD;AAKD,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;AAEvD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAInE"}
@@ -1,25 +1,7 @@
1
1
  import { readFile } from 'node:fs/promises';
2
- import { readFileSync } from 'node:fs';
3
- import { fileURLToPath } from 'node:url';
4
- import { dirname, join } from 'node:path';
5
2
  import { serializedReviewSchema } from './review-schema.js';
3
+ import { PKG_VERSION } from './version.js';
6
4
  const PLACEHOLDER_RE = /\{\{([A-Z_]+)\}\}/g;
7
- // CLUD_BUG_VERSION (0.0.O / v0.6.22) — read from this package's
8
- // package.json at module-load time. The rendered workflow uses
9
- // `npx --yes clud-bug@<CLUD_BUG_VERSION>` in the post-step that renders
10
- // structured output to markdown. Pinning to the version that ran
11
- // `clud-bug init` guarantees the renderer's output shape matches the
12
- // prompt's expectations.
13
- //
14
- // IMPORTANT (v0.7.0 TS migration): the JS source lived at lib/render.js,
15
- // so `join(__dirname, '..', 'package.json')` reached the package root
16
- // from one level up. The TS port compiles to dist/core/render.js, which
17
- // is TWO levels deep (dist/core/) — so we walk up TWO levels to find
18
- // package.json. Without this adjustment, module-load would throw at
19
- // runtime with "ENOENT dist/package.json". Verify on rebuild via:
20
- // node -e "import('./dist/core/render.js').then(m => console.log(m.DEFAULTS.CLUD_BUG_VERSION))"
21
- const __dirname = dirname(fileURLToPath(import.meta.url));
22
- const PKG_VERSION = JSON.parse(readFileSync(join(__dirname, '..', '..', 'package.json'), 'utf8')).version;
23
5
  // Default values for substitution tokens that every template uses.
24
6
  // Callers can override per-render by passing the same key in `vars`.
25
7
  //
@@ -1 +1 @@
1
- {"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/core/render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C,gEAAgE;AAChE,+DAA+D;AAC/D,wEAAwE;AACxE,iEAAiE;AACjE,qEAAqE;AACrE,yBAAyB;AACzB,EAAE;AACF,yEAAyE;AACzE,sEAAsE;AACtE,wEAAwE;AACxE,qEAAqE;AACrE,oEAAoE;AACpE,kEAAkE;AAClE,kGAAkG;AAClG,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,MAAM,WAAW,GACf,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAC7E,CAAC,OAAO,CAAC;AAWV,mEAAmE;AACnE,qEAAqE;AACrE,EAAE;AACF,wEAAwE;AACxE,sEAAsE;AACtE,wEAAwE;AACxE,0EAA0E;AAC1E,wEAAwE;AACxE,wCAAwC;AACxC,MAAM,CAAC,MAAM,QAAQ,GAAmB;IACtC,WAAW,EAAE,UAAU;IACvB,gBAAgB,EAAE,WAAW;IAC7B,aAAa,EAAE,sBAAsB,EAAE;CACxC,CAAC;AASF,uEAAuE;AACvE,8DAA8D;AAC9D,kEAAkE;AAClE,4EAA4E;AAC5E,MAAM,UAAU,M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gB;IAC7D,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1C,OAAO,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,SAAmB;IAC9C,IAAI,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;QACzE,OAAO,sBAAsB,CAAC;IAChC,CAAC;IACD,IAAI,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACjC,OAAO,sBAAsB,CAAC;IAChC,CAAC;IACD,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAOD,MAAM,UAAU,gBAAgB,CAAC,QAAgB;IAC/C,IAAI,QAAQ,KAAK,sBAAsB;QAAE,OAAO,IAAI,CAAC;IACrD,IAAI,QAAQ,KAAK,sBAAsB;QAAE,OAAO,IAAI,CAAC;IACrD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const PKG_VERSION = "0.7.0-rc.5";
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/core/version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ // Generated by scripts/gen-version.mjs at build time. Do not edit.
2
+ // Regenerated automatically on every `npm run build` via "prebuild" hook.
3
+ export const PKG_VERSION = '0.7.0-rc.5';
4
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/core/version.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,0EAA0E;AAC1E,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clud-bug",
3
- "version": "0.7.0-rc.4",
3
+ "version": "0.7.0-rc.5",
4
4
  "description": "Skill-driven Claude PR review. Ship a brand-voice skill, get brand reviews. Each finding cites the skill that motivated it. CLI installs the workflow + a baseline kit; add more from skills.sh.",
5
5
  "homepage": "https://cludbug.dev",
6
6
  "bugs": "https://github.com/thrillmade/clud-bug/issues",
@@ -20,7 +20,9 @@
20
20
  "ai",
21
21
  "skills"
22
22
  ],
23
- "bin": "bin/clud-bug.js",
23
+ "bin": {
24
+ "clud-bug": "bin/clud-bug.js"
25
+ },
24
26
  "files": [
25
27
  "bin",
26
28
  "data",
@@ -46,18 +48,21 @@
46
48
  "node": ">=20"
47
49
  },
48
50
  "scripts": {
51
+ "prebuild": "node scripts/gen-version.mjs",
49
52
  "build": "tsc -p tsconfig.json",
53
+ "predev": "node scripts/gen-version.mjs",
50
54
  "dev": "tsx src/cli/index.ts",
55
+ "pretest": "node scripts/gen-version.mjs",
51
56
  "test": "vitest run",
52
57
  "test:watch": "vitest",
53
58
  "test:fixtures": "node scripts/fixture-check.mjs",
54
59
  "prepublishOnly": "npm run build && npm test"
55
60
  },
56
61
  "devDependencies": {
57
- "@types/node": "^22.0.0",
62
+ "@types/node": "^26.0.0",
58
63
  "tsx": "^4.19.0",
59
- "typescript": "^5.5.0",
60
- "vitest": "^2.1.0"
64
+ "typescript": "^6.0.3",
65
+ "vitest": "^4.1.9"
61
66
  },
62
67
  "dependencies": {
63
68
  "zod": "^4.4.3"
@@ -1,29 +1,23 @@
1
1
  import { readFile } from 'node:fs/promises';
2
- import { readFileSync } from 'node:fs';
3
- import { fileURLToPath } from 'node:url';
4
- import { dirname, join } from 'node:path';
5
2
  import { serializedReviewSchema } from './review-schema.js';
3
+ import { PKG_VERSION } from './version.js';
6
4
 
7
5
  const PLACEHOLDER_RE = /\{\{([A-Z_]+)\}\}/g;
8
6
 
9
- // CLUD_BUG_VERSION (0.0.O / v0.6.22) read from this package's
10
- // package.json at module-load time. The rendered workflow uses
7
+ // CLUD_BUG_VERSION is baked at build time by scripts/gen-version.mjs into
8
+ // src/core/version.ts (a git-ignored file, regenerated on every `npm run
9
+ // build` via the "prebuild" hook). The rendered workflow uses
11
10
  // `npx --yes clud-bug@<CLUD_BUG_VERSION>` in the post-step that renders
12
11
  // structured output to markdown. Pinning to the version that ran
13
12
  // `clud-bug init` guarantees the renderer's output shape matches the
14
13
  // prompt's expectations.
15
14
  //
16
- // IMPORTANT (v0.7.0 TS migration): the JS source lived at lib/render.js,
17
- // so `join(__dirname, '..', 'package.json')` reached the package root
18
- // from one level up. The TS port compiles to dist/core/render.js, which
19
- // is TWO levels deep (dist/core/) so we walk up TWO levels to find
20
- // package.json. Without this adjustment, module-load would throw at
21
- // runtime with "ENOENT dist/package.json". Verify on rebuild via:
22
- // node -e "import('./dist/core/render.js').then(m => console.log(m.DEFAULTS.CLUD_BUG_VERSION))"
23
- const __dirname = dirname(fileURLToPath(import.meta.url));
24
- const PKG_VERSION: string = (
25
- JSON.parse(readFileSync(join(__dirname, '..', '..', 'package.json'), 'utf8')) as { version: string }
26
- ).version;
15
+ // History (v0.7.0-rc.5): previously this module did
16
+ // `readFileSync(package.json)` at module-load. Under Next.js bundling in
17
+ // clud-bug-app, `import.meta.url` resolved to `.next/server/...` not the
18
+ // node_modules layout, so the fs call threw ENOENT (Phase 5.1 hotfix in
19
+ // clud-bug-app PR #50 worked around with `serverExternalPackages`).
20
+ // Codegen eliminates the runtime fs lookup entirely.
27
21
 
28
22
  // Public shape of the DEFAULTS map. Tests assert presence of CCA_VERSION
29
23
  // and CLUD_BUG_VERSION; REVIEW_SCHEMA is the serialized schema string the
@@ -0,0 +1,3 @@
1
+ // Generated by scripts/gen-version.mjs at build time. Do not edit.
2
+ // Regenerated automatically on every `npm run build` via "prebuild" hook.
3
+ export const PKG_VERSION = '0.7.0-rc.5';
@@ -366,7 +366,7 @@ jobs:
366
366
  # Strict-mode gate — composite action; see workflow.yml.tmpl for design notes.
367
367
  - name: Strict mode — fail check on critical findings
368
368
  if: success()
369
- uses: thrillmade/clud-bug/.github/actions/strict-mode-gate@v0.7.0-rc.4
369
+ uses: thrillmade/clud-bug/.github/actions/strict-mode-gate@v0.7.0-rc.5
370
370
  with:
371
371
  github-token: ${{ secrets.GITHUB_TOKEN }}
372
372
  # v0.6.22 / 0.0.O: summary now posted by github-actions[bot].
@@ -366,7 +366,7 @@ jobs:
366
366
  # Strict-mode gate — composite action; see workflow.yml.tmpl for design notes.
367
367
  - name: Strict mode — fail check on critical findings
368
368
  if: success()
369
- uses: thrillmade/clud-bug/.github/actions/strict-mode-gate@v0.7.0-rc.4
369
+ uses: thrillmade/clud-bug/.github/actions/strict-mode-gate@v0.7.0-rc.5
370
370
  with:
371
371
  github-token: ${{ secrets.GITHUB_TOKEN }}
372
372
  # v0.6.22 / 0.0.O: summary now posted by github-actions[bot].
@@ -641,7 +641,7 @@ jobs:
641
641
  # Letting the action's own failure fail the check is louder and right.
642
642
  - name: Strict mode — fail check on critical findings
643
643
  if: success()
644
- uses: thrillmade/clud-bug/.github/actions/strict-mode-gate@v0.7.0-rc.4
644
+ uses: thrillmade/clud-bug/.github/actions/strict-mode-gate@v0.7.0-rc.5
645
645
  with:
646
646
  github-token: ${{ secrets.GITHUB_TOKEN }}
647
647
  # v0.6.22 / 0.0.O: the summary is now posted by the workflow