tewip-ai 0.60.0 → 0.61.0
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.
|
@@ -115,8 +115,27 @@ function mentionsOf(root, file, tests) {
|
|
|
115
115
|
return out;
|
|
116
116
|
}
|
|
117
117
|
/** Does anything at all in the project refer to this file? Used only to tell "unknown" from "unreachable". */
|
|
118
|
+
/**
|
|
119
|
+
* Whether anything in the project refers to this file at all.
|
|
120
|
+
*
|
|
121
|
+
* This searched for the file name *with its extension*, which is a JavaScript habit: a JS import
|
|
122
|
+
* often writes `./sorting.js`, and nothing else does. Python writes `from ..utils.sorting import x`,
|
|
123
|
+
* Java writes `import com.x.Sorting`, C# writes `using X.Sorting`. In all of them the extension
|
|
124
|
+
* never appears, so the search found nothing and the file was taken to be referenced nowhere.
|
|
125
|
+
*
|
|
126
|
+
* That is the most dangerous answer this file can produce. "Nothing refers to it" is the one
|
|
127
|
+
* condition that lets selection proceed past a source file no test imports - and on saleor it let
|
|
128
|
+
* `pick` narrow 1,229 test files down to **one**, skipping every sorting test in the suite, for a
|
|
129
|
+
* change to the GraphQL sorting code that all of them run through. The command's own promise is to
|
|
130
|
+
* refuse to narrow when it cannot show the rest are unaffected, and here it could not.
|
|
131
|
+
*
|
|
132
|
+
* The extension comes off. A name like `utils` or `index` will now match half the repository, and
|
|
133
|
+
* that is the right direction to be wrong in: over-matching means "this is referenced", which stops
|
|
134
|
+
* the narrowing. Under-matching skips the tests that would have caught the change.
|
|
135
|
+
*/
|
|
118
136
|
function mentionedAnywhere(root, file) {
|
|
119
|
-
const
|
|
137
|
+
const base = file.split('/').pop() ?? '';
|
|
138
|
+
const named = base.replace(/\.[A-Za-z0-9]+$/, '') || base;
|
|
120
139
|
const where = spawnSync('git', ['grep', '-l', '--', named], { cwd: root, encoding: 'utf8', timeout: 60_000 });
|
|
121
140
|
const hits = (where.stdout ?? '')
|
|
122
141
|
.split(String.fromCharCode(10))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tewip-ai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.61.0",
|
|
4
4
|
"mcpName": "io.github.hmamut39/tewip",
|
|
5
5
|
"description": "Tewip finds why each failing test failed - real bug, flaky test, environment, test data or changed selector - for any stack, from the command line, CI, or your editor.",
|
|
6
6
|
"keywords": [
|