@testdriverai/mcp 7.9.134-test → 7.9.136-test
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/init-project.js +12 -4
- package/package.json +1 -1
package/lib/init-project.js
CHANGED
|
@@ -524,21 +524,29 @@ jobs:
|
|
|
524
524
|
}
|
|
525
525
|
|
|
526
526
|
// 11. Install dependencies (unless skipped)
|
|
527
|
+
// Pin testdriverai to the SAME channel this CLI is running from (the npm
|
|
528
|
+
// dist-tags match the channel names: test | canary | stable). Otherwise a
|
|
529
|
+
// bare `testdriverai` resolves to `latest` (= stable) even when init was run
|
|
530
|
+
// via `npx testdriverai@test`, so the scaffolded project — and the vitest
|
|
531
|
+
// run in the generated GitHub action — would target stable instead. `dev`
|
|
532
|
+
// isn't a published tag, so fall back to `test` (matches the actionRef logic above).
|
|
533
|
+
const installTag = channel === "dev" ? "test" : channel;
|
|
534
|
+
const testdriveraiSpec = `testdriverai@${installTag}`;
|
|
527
535
|
if (!options.skipInstall) {
|
|
528
536
|
progress("\n📦 Installing dependencies...");
|
|
529
537
|
try {
|
|
530
|
-
await runInstall("npm", ["install", "-D", "vitest",
|
|
531
|
-
progress(
|
|
538
|
+
await runInstall("npm", ["install", "-D", "vitest", testdriveraiSpec], targetDir, `vitest ${testdriveraiSpec}`);
|
|
539
|
+
progress(`✓ Installed vitest, ${testdriveraiSpec}`);
|
|
532
540
|
await runInstall("npm", ["install", "dotenv"], targetDir, "dotenv");
|
|
533
541
|
progress("✓ Installed dotenv");
|
|
534
542
|
} catch (error) {
|
|
535
543
|
errors.push("Failed to install dependencies. Run manually:");
|
|
536
|
-
errors.push(
|
|
544
|
+
errors.push(` npm install -D vitest ${testdriveraiSpec}`);
|
|
537
545
|
errors.push(" npm install dotenv");
|
|
538
546
|
}
|
|
539
547
|
} else {
|
|
540
548
|
progress("\nℹ Skipped dependency installation. Run manually:");
|
|
541
|
-
progress(
|
|
549
|
+
progress(` npm install -D vitest ${testdriveraiSpec}`);
|
|
542
550
|
progress(" npm install dotenv");
|
|
543
551
|
}
|
|
544
552
|
|