@spardutti/claude-skills 2.39.0 → 2.39.2
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/lib/local.mjs +0 -25
- package/lib/tool-needs.mjs +24 -0
- package/package.json +1 -1
package/lib/local.mjs
CHANGED
|
@@ -58,28 +58,3 @@ export function makeLocalSource(root) {
|
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
// mutmut's config has to name the real source and test directories, and the
|
|
62
|
-
// install command has to match how the project actually manages dependencies —
|
|
63
|
-
// `pip install` into a uv project puts it somewhere the container rebuild loses.
|
|
64
|
-
async function pythonAdvice(dir, rel, entries) {
|
|
65
|
-
const has = (n) => entries.some((e) => e.name === n);
|
|
66
|
-
const pyproject = has("pyproject.toml") ? await readFile(join(dir, "pyproject.toml"), "utf-8") : "";
|
|
67
|
-
|
|
68
|
-
let install = "pip install mutmut";
|
|
69
|
-
if (has("uv.lock") || /^\[tool\.uv\]/m.test(pyproject)) install = "uv add --dev mutmut";
|
|
70
|
-
else if (has("poetry.lock")) install = "poetry add --group dev mutmut";
|
|
71
|
-
|
|
72
|
-
// Source: the package directory, not a guess. Skip the ones that are never it.
|
|
73
|
-
const ignore = ["tests", "test", "alembic", "migrations", "db", "e2e", "__pycache__", ".venv", "venv", "scripts"];
|
|
74
|
-
const dirs = entries.filter((e) => e.isDirectory() && !e.name.startsWith(".") && !ignore.includes(e.name));
|
|
75
|
-
const source = (dirs.find((d) => d.name === "src") || dirs.find((d) => d.name === "app") || dirs[0])?.name || "src";
|
|
76
|
-
|
|
77
|
-
// Tests: pytest already knows where they are.
|
|
78
|
-
const testpaths = pyproject.match(/testpaths\s*=\s*\[([^\]]*)\]/);
|
|
79
|
-
const tests = testpaths ? testpaths[1].replace(/["'\s]/g, "").split(",")[0] : "tests";
|
|
80
|
-
|
|
81
|
-
return {
|
|
82
|
-
install,
|
|
83
|
-
config: `${rel ? rel + "/" : ""}pyproject.toml [tool.mutmut] source_paths=["${source}/"] pytest_add_cli_args_test_selection=["${tests}/"]`,
|
|
84
|
-
};
|
|
85
|
-
}
|
package/lib/tool-needs.mjs
CHANGED
|
@@ -32,7 +32,31 @@ async function gitIgnoredDirs(projectDir) {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
// mutmut's config has to name the real source and test directories, and the
|
|
36
|
+
// install command has to match how the project actually manages dependencies —
|
|
37
|
+
// `pip install` into a uv project puts it somewhere the container rebuild loses.
|
|
38
|
+
async function pythonAdvice(dir, rel, entries) {
|
|
39
|
+
const has = (n) => entries.some((e) => e.name === n);
|
|
40
|
+
const pyproject = has("pyproject.toml") ? await readFile(join(dir, "pyproject.toml"), "utf-8") : "";
|
|
35
41
|
|
|
42
|
+
let install = "pip install mutmut";
|
|
43
|
+
if (has("uv.lock") || /^\[tool\.uv\]/m.test(pyproject)) install = "uv add --dev mutmut";
|
|
44
|
+
else if (has("poetry.lock")) install = "poetry add --group dev mutmut";
|
|
45
|
+
|
|
46
|
+
// Source: the package directory, not a guess. Skip the ones that are never it.
|
|
47
|
+
const ignore = ["tests", "test", "alembic", "migrations", "db", "e2e", "__pycache__", ".venv", "venv", "scripts"];
|
|
48
|
+
const dirs = entries.filter((e) => e.isDirectory() && !e.name.startsWith(".") && !ignore.includes(e.name));
|
|
49
|
+
const source = (dirs.find((d) => d.name === "src") || dirs.find((d) => d.name === "app") || dirs[0])?.name || "src";
|
|
50
|
+
|
|
51
|
+
// Tests: pytest already knows where they are.
|
|
52
|
+
const testpaths = pyproject.match(/testpaths\s*=\s*\[([^\]]*)\]/);
|
|
53
|
+
const tests = testpaths ? testpaths[1].replace(/["'\s]/g, "").split(",")[0] : "tests";
|
|
54
|
+
|
|
55
|
+
return {
|
|
56
|
+
install,
|
|
57
|
+
config: `${rel ? rel + "/" : ""}pyproject.toml [tool.mutmut] source_paths=["${source}/"] pytest_add_cli_args_test_selection=["${tests}/"]`,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
36
60
|
|
|
37
61
|
// What the installed commands need that this project does not have yet.
|
|
38
62
|
// ship-gate.sh's own detection drives a single-package repo; a monorepo whose
|