@spardutti/claude-skills 2.25.1 → 2.25.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/bin/cli.mjs CHANGED
@@ -273,6 +273,7 @@ async function main() {
273
273
  });
274
274
  if (doScaffold) {
275
275
  const installs = [];
276
+ const apiInstalls = [];
276
277
  const vitest = [];
277
278
  for (const n of stryker) {
278
279
  const r = await scaffoldStryker(CWD, n.rel);
@@ -284,7 +285,9 @@ async function main() {
284
285
  }
285
286
  // A project that already runs Stryker needs neither the install nor
286
287
  // the vitest exclude repeated at it; it only lacked the ignorer.
287
- if (!n.ignorerOnly) {
288
+ if (n.ignorerOnly) {
289
+ apiInstalls.push(r.apiInstall);
290
+ } else {
288
291
  installs.push(r.install);
289
292
  vitest.push(r.vitest);
290
293
  }
@@ -300,9 +303,10 @@ async function main() {
300
303
  // The ignorer imports @stryker-mutator/api, which npm hoists by
301
304
  // accident and pnpm does not. Missing, it prints one WARN PluginLoader
302
305
  // line, loads nothing, and every className mutant comes back survived.
303
- if (stryker.some((n) => n.ignorerOnly)) {
306
+ if (apiInstalls.length > 0) {
304
307
  console.log(`\n ${chalk.yellow("!")} ${chalk.bold("The ignorer needs its own dependency:")}`);
305
- console.log(` ${chalk.cyan("add @stryker-mutator/api as a dev dependency")} ${chalk.dim("— pnpm does not hoist it, and without it the ignorer silently does not load")}`);
308
+ for (const c of apiInstalls) console.log(` ${chalk.cyan(c)}`);
309
+ console.log(` ${chalk.dim("without it the ignorer silently does not load")}`);
306
310
  }
307
311
  }
308
312
  }
@@ -78,9 +78,11 @@ async function exists(p) {
78
78
  // npm's flat node_modules hoists it so the import resolves by accident, and
79
79
  // pnpm's isolated store does not. The failure is one WARN PluginLoader line and
80
80
  // an ignorer that never loads, so every class-name mutant comes back survived.
81
- async function installCommand(dir, rel) {
82
- const pnpm = await exists(join(dir, "pnpm-lock.yaml"));
83
- const pkgs = "@stryker-mutator/core @stryker-mutator/vitest-runner @stryker-mutator/api";
81
+ // A workspace keeps its lockfile at the root, not in apps/web, so asking only
82
+ // the sub-project hands a pnpm monorepo an npm command.
83
+ async function installCommand(projectDir, dir, rel, pkgs) {
84
+ const pnpm =
85
+ (await exists(join(projectDir, "pnpm-lock.yaml"))) || (await exists(join(dir, "pnpm-lock.yaml")));
84
86
  return pnpm
85
87
  ? `pnpm --dir ${rel || "."} add -D ${pkgs}`
86
88
  : `npm --prefix ${rel || "."} i -D ${pkgs}`;
@@ -185,7 +187,17 @@ export async function scaffoldStryker(projectDir, rel) {
185
187
  kept,
186
188
  patched,
187
189
  unreadable,
188
- install: await installCommand(dir, rel),
190
+ install: await installCommand(
191
+ projectDir,
192
+ dir,
193
+ rel,
194
+ "@stryker-mutator/core @stryker-mutator/vitest-runner @stryker-mutator/api",
195
+ ),
196
+ // A project that already runs Stryker has the other two packages and needs
197
+ // only this one, which nothing depends on directly. Printed as a command
198
+ // rather than a sentence: the sentence made every reader guess their own
199
+ // package manager and path.
200
+ apiInstall: await installCommand(projectDir, dir, rel, "@stryker-mutator/api"),
189
201
  // Stryker copies the whole project into .stryker-tmp/sandbox-*/, so every
190
202
  // test file briefly exists twice and the runner collects both. They pass,
191
203
  // so a doubled test count is the only symptom. Spread configDefaults.exclude
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spardutti/claude-skills",
3
- "version": "2.25.1",
3
+ "version": "2.25.2",
4
4
  "description": "Guardrails for Claude Code — best-practice skills, planning commands, and delivery gates.",
5
5
  "type": "module",
6
6
  "repository": {