@spardutti/claude-skills 2.12.0 → 2.12.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/lib/setup-hook.mjs +21 -3
  2. package/package.json +1 -1
@@ -586,6 +586,17 @@ fi
586
586
  # ---------------------------------------------------------- which project owns
587
587
  # A monorepo holds several projects, each with its own runner and its own
588
588
  # mutation tool. Walk up from each changed file to the nearest manifest.
589
+ # mutmut is installed into the project's environment, not onto PATH. Ask the
590
+ # project how to run its own tools before falling back to a bare binary.
591
+ py_mutmut() {
592
+ d="$1"
593
+ # Returned relative to the PROJECT, because the command runs from inside it.
594
+ if [ -x "$d.venv/bin/mutmut" ]; then printf './.venv/bin/mutmut\\n'; return; fi
595
+ if [ -f "$d""uv.lock" ] && command -v uv >/dev/null 2>&1; then printf 'uv run mutmut\\n'; return; fi
596
+ if [ -f "$d""poetry.lock" ] && command -v poetry >/dev/null 2>&1; then printf 'poetry run mutmut\\n'; return; fi
597
+ command -v mutmut >/dev/null 2>&1 && printf 'mutmut\\n'
598
+ }
599
+
589
600
  owner_of() {
590
601
  d=$(dirname "$1")
591
602
  while :; do
@@ -640,15 +651,22 @@ for owner in $OWNERS; do
640
651
  {\\"testRunner\\":\\"vitest\\",\\"plugins\\":[\\"@stryker-mutator/vitest-runner\\"],\\"coverageAnalysis\\":\\"perTest\\"}
641
652
  "
642
653
  continue
643
- elif command -v mutmut >/dev/null 2>&1; then
654
+ elif [ -n "$(py_mutmut "$base")" ]; then
644
655
  TOOL="mutmut"
645
656
  # mutmut takes its scope from [tool.mutmut] in pyproject, not from a flag:
646
657
  # --paths-to-mutate was 2.x, and 3.x filters by fnmatch globs over mutant
647
658
  # NAMES (app.balance.reserve.*). There is no per-line scoping at all.
648
- CMD="\${RUN}mutmut run"
659
+ #
660
+ # \`mutmut run\` prints 🙁 for a survivor and exits 0 either way — parsing it
661
+ # reports clean with survivors sitting there, which is a false green and
662
+ # worse than reporting nothing. \`mutmut results\` is the readable source:
663
+ # it prints "<mutant name>: survived" per survivor.
664
+ M="$(py_mutmut "$base")"
665
+ # One cd for both: the second command runs in the same shell, already there.
666
+ CMD="\${RUN}$M run >/dev/null 2>&1; $M results"
649
667
  else
650
668
  MISSING="$MISSING $label needs mutmut:
651
- pip install mutmut
669
+ uv add --dev mutmut # or: poetry add --group dev mutmut, pip install mutmut
652
670
  then \${base}pyproject.toml:
653
671
  [tool.mutmut]
654
672
  source_paths = [\\"src/\\"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spardutti/claude-skills",
3
- "version": "2.12.0",
3
+ "version": "2.12.1",
4
4
  "description": "CLI to install Claude Code skills from the claude-skills collection",
5
5
  "type": "module",
6
6
  "bin": {