@miroshnik/elves 2026.1026.2 → 2026.1026.3
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.
|
@@ -15631,9 +15631,10 @@ function testFileAt(stack, root) {
|
|
|
15631
15631
|
for (const m of stack.matchAll(STACK_FILE)) {
|
|
15632
15632
|
const abs = m[1];
|
|
15633
15633
|
const rel = path2.relative(root, abs).split(path2.sep).join("/");
|
|
15634
|
-
if (!rel.startsWith(".."))
|
|
15635
|
-
return { rel, abs };
|
|
15636
15634
|
const i = abs.indexOf("/tests/");
|
|
15635
|
+
const inTests = i >= 0 && !path2.relative(abs.slice(0, i + "/tests".length), root).startsWith("..");
|
|
15636
|
+
if (!rel.startsWith("..") && !inTests)
|
|
15637
|
+
return { rel, abs };
|
|
15637
15638
|
if (i >= 0)
|
|
15638
15639
|
return { rel: abs.slice(i + 1), abs };
|
|
15639
15640
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miroshnik/elves",
|
|
3
|
-
"version": "2026.1026.
|
|
3
|
+
"version": "2026.1026.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Elves — a development flow with AI agents: shared rules and skills for any agent; install — bunx @miroshnik/elves install -g; the installer and skill scripts — TypeScript under Bun, tests — bun test in tests/",
|
|
6
6
|
"repository": {
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"eslint-plugin-boundaries": "^7.2.0",
|
|
73
73
|
"knip": "^6.41.0"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "dc0511ec6dc2569d601baa3490d19fd386bffd26"
|
|
76
76
|
}
|
|
@@ -892,13 +892,18 @@ export function testFileIn(stack: string, root: string): string | null {
|
|
|
892
892
|
return testFileAt(stack, root)?.rel ?? null;
|
|
893
893
|
}
|
|
894
894
|
|
|
895
|
-
/**
|
|
895
|
+
/**
|
|
896
|
+
* The same plus the file's absolute path: `rel` — from the project root, `abs` ends with `rel`. A runner outside the
|
|
897
|
+
* project root (a monorepo package's directory) or inside its `tests/` (a package of tests, #754) — `rel` from the
|
|
898
|
+
* directory with that `tests/`, not from the runner's cwd.
|
|
899
|
+
*/
|
|
896
900
|
function testFileAt(stack: string, root: string): { rel: string; abs: string } | null {
|
|
897
901
|
for (const m of stack.matchAll(STACK_FILE)) {
|
|
898
902
|
const abs = m[1]!;
|
|
899
903
|
const rel = path.relative(root, abs).split(path.sep).join("/");
|
|
900
|
-
if (!rel.startsWith("..")) return { rel, abs };
|
|
901
904
|
const i = abs.indexOf("/tests/");
|
|
905
|
+
const inTests = i >= 0 && !path.relative(abs.slice(0, i + "/tests".length), root).startsWith("..");
|
|
906
|
+
if (!rel.startsWith("..") && !inTests) return { rel, abs };
|
|
902
907
|
if (i >= 0) return { rel: abs.slice(i + 1), abs };
|
|
903
908
|
}
|
|
904
909
|
return null;
|