@mutineerjs/mutineer 0.2.1 → 0.2.3
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/README.md +22 -7
- package/dist/runner/vitest/adapter.js +6 -1
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -64,12 +64,27 @@ npm i @mutineerjs/mutineer
|
|
|
64
64
|
|
|
65
65
|
### Quick Start
|
|
66
66
|
|
|
67
|
+
Try it immediately with `npx`:
|
|
68
|
+
|
|
67
69
|
```bash
|
|
68
|
-
|
|
69
|
-
mutineer
|
|
70
|
+
npx @mutineerjs/mutineer init
|
|
71
|
+
npx @mutineerjs/mutineer run
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Or add scripts to your `package.json` (recommended for team projects):
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"scripts": {
|
|
79
|
+
"mutineer": "mutineer run",
|
|
80
|
+
"mutineer:init": "mutineer init"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
70
84
|
|
|
71
|
-
|
|
72
|
-
|
|
85
|
+
```bash
|
|
86
|
+
npm run mutineer:init
|
|
87
|
+
npm run mutineer
|
|
73
88
|
```
|
|
74
89
|
|
|
75
90
|
### CLI Options (for `mutineer run`)
|
|
@@ -92,19 +107,19 @@ mutineer run
|
|
|
92
107
|
Run mutations on only the files you changed:
|
|
93
108
|
|
|
94
109
|
```bash
|
|
95
|
-
|
|
110
|
+
npm run mutineer -- --changed
|
|
96
111
|
```
|
|
97
112
|
|
|
98
113
|
Run with Jest and a minimum kill rate:
|
|
99
114
|
|
|
100
115
|
```bash
|
|
101
|
-
|
|
116
|
+
npm run mutineer -- --runner jest --min-kill-percent 80
|
|
102
117
|
```
|
|
103
118
|
|
|
104
119
|
Focus on covered code with 2 parallel workers:
|
|
105
120
|
|
|
106
121
|
```bash
|
|
107
|
-
|
|
122
|
+
npm run mutineer -- --only-covered-lines --concurrency 2
|
|
108
123
|
```
|
|
109
124
|
|
|
110
125
|
## Configuration
|
|
@@ -108,7 +108,12 @@ export class VitestAdapter {
|
|
|
108
108
|
this.pool = null;
|
|
109
109
|
this.baseArgs = [];
|
|
110
110
|
this.options = options;
|
|
111
|
-
|
|
111
|
+
try {
|
|
112
|
+
this.vitestPath = resolveVitestPath();
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
throw new Error("Cannot find 'vitest'. Install it with: npm i -D vitest");
|
|
116
|
+
}
|
|
112
117
|
// Prepare base args by stripping mutineer-specific flags
|
|
113
118
|
const stripped = stripMutineerArgs(options.cliArgs);
|
|
114
119
|
this.baseArgs = ensureConfigArg(stripped, options.config.vitestConfig, options.cwd);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mutineerjs/mutineer",
|
|
3
|
-
"version": "v0.2.
|
|
3
|
+
"version": "v0.2.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"bin": {
|
|
@@ -62,6 +62,8 @@
|
|
|
62
62
|
"eslint": "^9.39.1",
|
|
63
63
|
"jsdom": "^27.0.0",
|
|
64
64
|
"typescript": "^5.5.4",
|
|
65
|
+
"vite": "^6.3.6",
|
|
66
|
+
"vitest": "^4.0.15",
|
|
65
67
|
"vue": "^3.5.12"
|
|
66
68
|
}
|
|
67
69
|
}
|