@qaguardian/playwright-score 0.5.0 → 2.0.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.
@@ -24,9 +24,17 @@ import { PROFILE_WEIGHTS } from './profiles.js';
24
24
  * scored e.g. a 3-test suite with two hard-wait errors, two assertion-free
25
25
  * tests, and a skipped test at 78/C; model v3 scores it 53/F, which is
26
26
  * what it is.
27
+ *
28
+ * v4 (2.0.0) keeps this exact formula unchanged — the version bump is
29
+ * about which findings feed it, not how they're aggregated: the four
30
+ * QAG-196 gameability rules and the eslint-disable-comment finding are
31
+ * now unconditional demerits (previously report-only under `standard`,
32
+ * scored only under the now-removed `strict` profile), and
33
+ * no-coordinate-click is a warning (0.4), not an error (1.0). See
34
+ * METHODOLOGY.md's "Why v4" and CHANGELOG.md.
27
35
  */
28
36
  export const MODEL = {
29
- scoreVersion: 'v3',
37
+ scoreVersion: 'v4',
30
38
  ERROR_DEMERIT: 1.0,
31
39
  WARNING_DEMERIT: 0.4,
32
40
  INFO_DEMERIT: 0.0,
package/dist/types.d.ts CHANGED
@@ -1,4 +1,16 @@
1
- export type ScoreVersion = 'v3';
1
+ export type ScoreVersion = 'v3' | 'v4';
2
+ /**
3
+ * `standard` is the only public profile, first published as of 2.0.0
4
+ * (model v4). A separate `strict` profile was planned for 1.1.0 (never
5
+ * published) to count the QAG-196 gameability rules toward the score
6
+ * while `standard` only reported them; dropped before publishing once
7
+ * `standard` started scoring them directly instead — with nothing left
8
+ * to gate, `strict` would have been identical to `standard`. See
9
+ * profiles.ts and CHANGELOG.md's 2.0.0 entry. `ProfileName` keeps room
10
+ * for a future profile; a legacy `'strict'` string degrades gracefully to
11
+ * `standard` weights via scorePaths (same fallback as the removed
12
+ * `guardian` profile), and the CLI gives an explicit migration error.
13
+ */
2
14
  export type ProfileName = 'standard';
3
15
  export type Grade = 'A' | 'B' | 'C' | 'D' | 'F';
4
16
  export type Severity = 'error' | 'warning' | 'info';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qaguardian/playwright-score",
3
- "version": "0.5.0",
4
- "description": "Deterministic, AI-free Playwright spec quality score (sqs-v2).",
3
+ "version": "2.0.0",
4
+ "description": "Deterministic, AI-free Playwright spec quality score — the weighted share of your tests that are clean.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -19,10 +19,11 @@
19
19
  "dist",
20
20
  "METHODOLOGY.md",
21
21
  "README.md",
22
+ "CHANGELOG.md",
22
23
  "LICENSE"
23
24
  ],
24
25
  "scripts": {
25
- "build": "tsc && node -e \"require('fs').chmodSync('dist/cli.js',0o755); require('fs').chmodSync('bin/playwright-score.js',0o755)\"",
26
+ "build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc && node -e \"require('fs').chmodSync('dist/cli.js',0o755); require('fs').chmodSync('bin/playwright-score.js',0o755)\"",
26
27
  "build:tests": "tsc -p tsconfig.tests.json",
27
28
  "test": "npm run build && npm run build:tests && node --test dist-tests/tests/*.js",
28
29
  "score": "npm run build && node bin/playwright-score.js",