@activate-core/test-forge 0.18.0 → 0.18.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.
Files changed (2) hide show
  1. package/dist/core/lint.js +15 -2
  2. package/package.json +1 -1
package/dist/core/lint.js CHANGED
@@ -16,11 +16,18 @@
16
16
  * repository, not to impose a preference.
17
17
  */
18
18
  import { spawnSync } from 'node:child_process';
19
+ import { resolve } from 'node:path';
19
20
  import { existsSync } from 'node:fs';
20
21
  import { join, dirname } from 'node:path';
21
22
  /** Walk up from a file to the nearest package that has ESLint installed. */
22
23
  function eslintFor(file) {
23
- let dir = dirname(file);
24
+ // Absolute throughout. The binary is spawned WITH cwd set to the package that
25
+ // owns it, so a relative bin path is re-resolved from there:
26
+ // "packages/api/node_modules/.bin/eslint" becomes
27
+ // "packages/api/packages/api/node_modules/.bin/eslint", the spawn fails with
28
+ // ENOENT, stdout is empty, and the empty JSON parses as zero problems. The
29
+ // gate then reported every generated file clean without ever running.
30
+ let dir = dirname(resolve(file));
24
31
  for (let i = 0; i < 8; i++) {
25
32
  const bin = join(dir, 'node_modules', '.bin', 'eslint');
26
33
  if (existsSync(bin))
@@ -48,7 +55,13 @@ export function lintGenerated(files) {
48
55
  if (!found)
49
56
  continue;
50
57
  const g = groups.get(found.cwd) || { bin: found.bin, files: [] };
51
- g.files.push(f);
58
+ // ABSOLUTE, always. ESLint runs with cwd set to the package that owns it,
59
+ // so a path relative to the repo root ("packages/api/helpers/x.js")
60
+ // resolved there becomes "packages/api/packages/api/helpers/x.js" — a file
61
+ // that does not exist. With --no-error-on-unmatched-pattern that is not an
62
+ // error, it is silence: the gate reported zero problems on files it had
63
+ // never opened, and the lint errors it exists to stop reached CI anyway.
64
+ g.files.push(resolve(f));
52
65
  groups.set(found.cwd, g);
53
66
  }
54
67
  if (!groups.size) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activate-core/test-forge",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "description": "AI-powered QA automation. Scans a project, drafts journey docs, and generates seeded Jest/Playwright tests. Works in any project, with any AI CLI.",
5
5
  "type": "module",
6
6
  "bin": {