falsegreen-js 0.3.0 → 0.5.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.
- package/CHANGELOG.md +140 -1
- package/README.md +72 -13
- package/dist/cases.d.ts +51 -3
- package/dist/cases.js +91 -43
- package/dist/cfg.d.ts +32 -0
- package/dist/cfg.js +237 -0
- package/dist/cli.d.ts +27 -1
- package/dist/cli.js +136 -41
- package/dist/oracles.d.ts +52 -0
- package/dist/oracles.js +87 -0
- package/dist/report.d.ts +31 -0
- package/dist/report.js +177 -0
- package/dist/rules.js +538 -90
- package/dist/scan.d.ts +1 -0
- package/dist/scan.js +0 -0
- package/dist/types.js +2 -2
- package/package.json +34 -9
package/dist/scan.d.ts
CHANGED
package/dist/scan.js
CHANGED
|
Binary file
|
package/dist/types.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { CASES } from "./cases.js";
|
|
1
|
+
import { baseConfidence, CASES } from "./cases.js";
|
|
2
2
|
export function makeFinding(file, line, code, detail = "", confidence) {
|
|
3
3
|
return {
|
|
4
4
|
file,
|
|
5
5
|
line,
|
|
6
6
|
code,
|
|
7
7
|
detail,
|
|
8
|
-
confidence: confidence ??
|
|
8
|
+
confidence: confidence ?? baseConfidence(code),
|
|
9
9
|
title: CASES[code].title,
|
|
10
10
|
level: "unit",
|
|
11
11
|
};
|
package/package.json
CHANGED
|
@@ -1,24 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "falsegreen-js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Find JavaScript/TypeScript unit tests that give false positives: green tests that protect nothing, and tests that pass while asserting the wrong thing. Deterministic AST scanner, sibling of falsegreen (Python).",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"jest",
|
|
7
|
-
"
|
|
6
|
+
"jest",
|
|
7
|
+
"vitest",
|
|
8
|
+
"mocha",
|
|
9
|
+
"testing",
|
|
10
|
+
"test-smells",
|
|
11
|
+
"false-positive",
|
|
12
|
+
"static-analysis",
|
|
13
|
+
"typescript",
|
|
14
|
+
"javascript",
|
|
15
|
+
"tsx",
|
|
16
|
+
"jsx",
|
|
17
|
+
"code-quality",
|
|
8
18
|
"ai-generated-tests"
|
|
9
19
|
],
|
|
10
20
|
"license": "MIT",
|
|
11
21
|
"author": "Vinicius Queiroz",
|
|
12
22
|
"type": "module",
|
|
13
|
-
"engines": {
|
|
14
|
-
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18"
|
|
25
|
+
},
|
|
26
|
+
"bin": {
|
|
27
|
+
"falsegreen-js": "dist/cli.js"
|
|
28
|
+
},
|
|
15
29
|
"main": "dist/scan.js",
|
|
16
30
|
"types": "dist/scan.d.ts",
|
|
17
31
|
"exports": {
|
|
18
|
-
".": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/scan.d.ts",
|
|
34
|
+
"import": "./dist/scan.js"
|
|
35
|
+
}
|
|
19
36
|
},
|
|
20
|
-
"publishConfig": {
|
|
21
|
-
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"dist",
|
|
42
|
+
"CHANGELOG.md",
|
|
43
|
+
"CREDITS.md"
|
|
44
|
+
],
|
|
22
45
|
"scripts": {
|
|
23
46
|
"build": "tsc -p tsconfig.json",
|
|
24
47
|
"test": "vitest run",
|
|
@@ -37,5 +60,7 @@
|
|
|
37
60
|
"url": "https://github.com/vinicq/falsegreen-js.git"
|
|
38
61
|
},
|
|
39
62
|
"homepage": "https://github.com/vinicq/falsegreen-js#readme",
|
|
40
|
-
"bugs": {
|
|
63
|
+
"bugs": {
|
|
64
|
+
"url": "https://github.com/vinicq/falsegreen-js/issues"
|
|
65
|
+
}
|
|
41
66
|
}
|