fix(scripts): stryker-diff.mjs spawns the extensionless .bin shim and cannot run on Windows

Aperta Adatta ai principianti
#2,514 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

@easonLiangWorldedtech ci sta già lavorando.

Dal 13/11/2026.

  • #2450 di @easonLiangWorldedtech — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
node.js, typescript

Direzione di ricerca

Leggi scripts/stryker-diff.mjs intorno alla riga 412 e verifica come avvia il binario Stryker. Controlla le voci node_modules/.bin del pacchetto e confronta il modo in cui lo script gestisce Windows e POSIX. Il lavoro è completato quando il controllo preliminare locale delle mutazioni può avviare Stryker su Windows continuando a funzionare su Linux.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Symptom

node scripts/stryker-diff.mjs cannot start Stryker on Windows: spawnSync ... ENOENT for node_modules\.bin\stryker, even though the file exists and stryker --version reports 10.0.0. The local preflight described in the mutation-gate protocol therefore only works on Linux, and every Windows contributor has to fall back to CI for the changed-line mutation report.

Cause

scripts/stryker-diff.mjs:421 passes the extensionless POSIX shim straight to spawnSync - no shell, no process.platform branch - and the sibling call at line 373 does the same for vitest. The installed set is stryker, stryker.CMD, stryker.ps1 (measured at main 410e5ad3d5, blob 7dfe0006d2d5, unchanged since a15ba8c8); only the latter two are runnable.

Expected

Do not branch on the suffix: spawning node_modules\.bin\stryker.CMD without a shell was probed and returns EINVAL (-4071), where the extensionless shim returns ENOENT (-4058). Resolve the entry the owning package declares - @stryker-mutator/core ships bin: {"stryker": "./bin/stryker.js"} - and run that file through process.execPath: status 0 with 10.0.0 in 1000 ms; vitest's declared vitest.mjs starts in 64 ms the same way. #2450 implements exactly that for both calls.

Workaround meanwhile

Run the gate's Stryker step through cmd /c node_modules\.bin\stryker.CMD with the six STRYKER_* variables the script already sets, and keep reading the CI mutation-diff run as the authority.

Lingua principale
TypeScript
Stelle
2k
Fork
301
Merge medio
3g 14h
PR unite (30g)
103

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Zoo-Code-Org/Zoo-Code

Tutte le issue di Zoo-Code-Org/Zoo-Code

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.