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/dist/scan.d.ts CHANGED
@@ -9,6 +9,7 @@ export interface Config {
9
9
  export interface ScanOptions {
10
10
  config?: Config;
11
11
  cliDisable?: Set<string>;
12
+ cliEnable?: Set<string>;
12
13
  diagnostics?: boolean;
13
14
  }
14
15
  export declare function isTestFile(file: string): boolean;
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 ?? CASES[code].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.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", "vitest", "mocha", "testing", "test-smells", "false-positive",
7
- "static-analysis", "typescript", "javascript", "tsx", "jsx", "code-quality",
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": { "node": ">=18" },
14
- "bin": { "falsegreen-js": "dist/cli.js" },
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
- ".": { "types": "./dist/scan.d.ts", "import": "./dist/scan.js" }
32
+ ".": {
33
+ "types": "./dist/scan.d.ts",
34
+ "import": "./dist/scan.js"
35
+ }
19
36
  },
20
- "publishConfig": { "access": "public" },
21
- "files": ["dist", "CHANGELOG.md", "CREDITS.md"],
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": { "url": "https://github.com/vinicq/falsegreen-js/issues" }
63
+ "bugs": {
64
+ "url": "https://github.com/vinicq/falsegreen-js/issues"
65
+ }
41
66
  }