playwright-performance-regression 0.0.0-stage → 0.1.0-next.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/test.cjs ADDED
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var chunkR2NPYGB7_cjs = require('./chunk-R2NPYGB7.cjs');
4
+ require('./chunk-LV3O2BAT.cjs');
5
+ require('./chunk-GCA73FFP.cjs');
6
+ var test$1 = require('@playwright/test');
7
+
8
+ var test = chunkR2NPYGB7_cjs.withPerfFixtures(test$1.test);
9
+
10
+ Object.defineProperty(exports, "expect", {
11
+ enumerable: true,
12
+ get: function () { return test$1.expect; }
13
+ });
14
+ exports.test = test;
@@ -0,0 +1,7 @@
1
+ import * as _playwright_test from '@playwright/test';
2
+ export { expect } from '@playwright/test';
3
+ import { PerfFixtures } from './fixture.cjs';
4
+
5
+ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArgs & _playwright_test.PlaywrightTestOptions & PerfFixtures, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions>;
6
+
7
+ export { test };
package/dist/test.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ import * as _playwright_test from '@playwright/test';
2
+ export { expect } from '@playwright/test';
3
+ import { PerfFixtures } from './fixture.js';
4
+
5
+ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArgs & _playwright_test.PlaywrightTestOptions & PerfFixtures, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions>;
6
+
7
+ export { test };
package/dist/test.js ADDED
@@ -0,0 +1,10 @@
1
+ import { withPerfFixtures } from './chunk-UTTU4FUC.js';
2
+ import './chunk-DYLCGMI2.js';
3
+ import './chunk-6AB42SPF.js';
4
+ import './chunk-HES6BVZT.js';
5
+ import { test as test$1 } from '@playwright/test';
6
+ export { expect } from '@playwright/test';
7
+
8
+ var test = withPerfFixtures(test$1);
9
+
10
+ export { test };
package/package.json CHANGED
@@ -1,6 +1,148 @@
1
1
  {
2
2
  "name": "playwright-performance-regression",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0-next.0",
4
+ "description": "Catch backend performance regressions from the Playwright tests you already have.",
5
+ "keywords": [
6
+ "playwright",
7
+ "performance",
8
+ "regression",
9
+ "benchmark",
10
+ "response-time",
11
+ "latency",
12
+ "api",
13
+ "e2e",
14
+ "thresholds",
15
+ "performance-budget",
16
+ "ci"
17
+ ],
18
+ "homepage": "https://github.com/Meser6/playwright-performance-regression#readme",
19
+ "bugs": {
20
+ "url": "https://github.com/Meser6/playwright-performance-regression/issues"
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/Meser6/playwright-performance-regression.git"
25
+ },
26
+ "license": "MIT",
27
+ "type": "module",
28
+ "sideEffects": false,
29
+ "exports": {
30
+ ".": {
31
+ "import": {
32
+ "types": "./dist/index.d.ts",
33
+ "default": "./dist/index.js"
34
+ },
35
+ "require": {
36
+ "types": "./dist/index.d.cts",
37
+ "default": "./dist/index.cjs"
38
+ }
39
+ },
40
+ "./config": {
41
+ "import": {
42
+ "types": "./dist/config.d.ts",
43
+ "default": "./dist/config.js"
44
+ },
45
+ "require": {
46
+ "types": "./dist/config.d.cts",
47
+ "default": "./dist/config.cjs"
48
+ }
49
+ },
50
+ "./fixture": {
51
+ "import": {
52
+ "types": "./dist/fixture.d.ts",
53
+ "default": "./dist/fixture.js"
54
+ },
55
+ "require": {
56
+ "types": "./dist/fixture.d.cts",
57
+ "default": "./dist/fixture.cjs"
58
+ }
59
+ },
60
+ "./test": {
61
+ "import": {
62
+ "types": "./dist/test.d.ts",
63
+ "default": "./dist/test.js"
64
+ },
65
+ "require": {
66
+ "types": "./dist/test.d.cts",
67
+ "default": "./dist/test.cjs"
68
+ }
69
+ },
70
+ "./reporter": {
71
+ "import": {
72
+ "types": "./dist/reporter.d.ts",
73
+ "default": "./dist/reporter.js"
74
+ },
75
+ "require": {
76
+ "types": "./dist/reporter.d.cts",
77
+ "default": "./dist/reporter.cjs"
78
+ }
79
+ },
80
+ "./schemas/*": "./schemas/*",
81
+ "./package.json": "./package.json"
82
+ },
83
+ "main": "./dist/index.cjs",
84
+ "module": "./dist/index.js",
85
+ "types": "./dist/index.d.cts",
86
+ "bin": {
87
+ "playwright-performance-regression": "./dist/cli.js",
88
+ "pw-perf": "./dist/cli.js"
89
+ },
90
+ "files": [
91
+ "dist",
92
+ "schemas",
93
+ "README.md",
94
+ "CHANGELOG.md",
95
+ "LICENSE"
96
+ ],
97
+ "scripts": {
98
+ "build": "node -e \"fs.rmSync('dist',{recursive:true,force:true})\" && node scripts/build-html-assets.mjs --check && tsup",
99
+ "typecheck": "tsc --noEmit && tsc --noEmit -p src/html/template",
100
+ "lint": "eslint .",
101
+ "format": "prettier --write .",
102
+ "format:check": "prettier --check .",
103
+ "test": "vitest run",
104
+ "test:watch": "vitest",
105
+ "test:perf": "vitest run --config vitest.perf.config.ts test/perf",
106
+ "test:stats": "vitest run --config vitest.perf.config.ts test/stats",
107
+ "check:ac": "node scripts/check-ac-coverage.mjs",
108
+ "check:pr-title": "node scripts/check-pr-title.mjs",
109
+ "gen:types": "node scripts/generate-types.mjs",
110
+ "check:types-generated": "node scripts/generate-types.mjs --check",
111
+ "gen:html": "node scripts/build-html-assets.mjs",
112
+ "check:html-generated": "node scripts/build-html-assets.mjs --check",
113
+ "gen:ci": "node scripts/build-ci-templates.mjs",
114
+ "check:ci-generated": "node scripts/build-ci-templates.mjs --check",
115
+ "gen:docs": "node scripts/build-config-docs.mjs",
116
+ "check:docs-generated": "node scripts/build-config-docs.mjs --check",
117
+ "check:packages": "node scripts/check-packages.mjs",
118
+ "publint": "publint --strict && publint --strict create",
119
+ "attw": "attw --pack . --profile node16"
120
+ },
121
+ "peerDependencies": {
122
+ "@playwright/test": ">=1.57.0"
123
+ },
124
+ "engines": {
125
+ "node": ">=22.18.0"
126
+ },
127
+ "packageManager": "pnpm@10.16.1",
128
+ "devDependencies": {
129
+ "@arethetypeswrong/cli": "0.18.5",
130
+ "@eslint/js": "^10.0.1",
131
+ "@playwright/test": "1.57.0",
132
+ "@types/node": "^22.20.5",
133
+ "ajv": "8.20.0",
134
+ "axe-core": "4.14.1",
135
+ "esbuild": "0.28.2",
136
+ "eslint": "10.15.0",
137
+ "globals": "^17.14.0",
138
+ "json-schema-to-typescript": "16.0.0",
139
+ "playwright-bdd": "9.2.1",
140
+ "prettier": "3.10.1",
141
+ "publint": "0.3.25",
142
+ "tsup": "9.0.0",
143
+ "typescript": "~6.0.3",
144
+ "typescript-eslint": "8.73.0",
145
+ "vitest": "5.1.1",
146
+ "yaml": "2.9.1"
147
+ }
148
+ }
@@ -0,0 +1,81 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://pkg.invalid/schemas/common.schema.json",
4
+ "title": "Common definitions",
5
+ "description": "Shared definitions referenced by all other schemas. Not a file format on its own.",
6
+ "$defs": {
7
+ "ms": { "description": "Duration in milliseconds, rounded to 0.1 ms (02-REQ-07).", "type": "number", "minimum": 0 },
8
+ "msOrNull": { "description": "Duration in milliseconds rounded to 0.1 ms, or null when unknown.", "oneOf": [{ "$ref": "#/$defs/ms" }, { "type": "null" }] },
9
+ "msLimit": { "description": "Threshold limit in whole milliseconds, rounded up (02-REQ-08).", "type": "integer", "minimum": 0 },
10
+ "ratio": {
11
+ "description": "Value between 0 and 1 inclusive. The thresholds generator writes at most 3 decimal places (02-REQ-08); hand-written values with more decimals are accepted (02-D-11).",
12
+ "type": "number",
13
+ "minimum": 0,
14
+ "maximum": 1
15
+ },
16
+ "count": { "description": "Non-negative integer counter.", "type": "integer", "minimum": 0 },
17
+ "timestamp": {
18
+ "description": "UTC timestamp in ISO 8601 with milliseconds, e.g. 2026-11-18T10:00:00.000Z.",
19
+ "type": "string",
20
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
21
+ },
22
+ "epochMs": { "description": "Wall-clock time as whole milliseconds since the Unix epoch.", "type": "integer", "minimum": 0 },
23
+ "runId": { "description": "Run identifier, generated by the CLI or by the reporter.", "type": "string", "minLength": 1, "maxLength": 128 },
24
+ "mode": { "description": "Perf mode of the run: 'test' (measurement run) or 'thresholds' (thresholds derivation run).", "enum": ["test", "thresholds"] },
25
+ "envLabel": { "description": "Environment label (D-18). Lowercase letters, digits and hyphens.", "type": "string", "pattern": "^[a-z0-9-]+$", "maxLength": 32 },
26
+ "envLabelOrNull": { "description": "Environment label, or null when not set.", "oneOf": [{ "$ref": "#/$defs/envLabel" }, { "type": "null" }] },
27
+ "kind": { "description": "Sample category: 'api' (backend endpoints) or 'custom' (custom measurements).", "enum": ["api", "custom"] },
28
+ "percentileName": {
29
+ "description": "Percentile name: 'p' followed by a number greater than 0 and less than 100 with at most one decimal, e.g. p50, p95, p99.9.",
30
+ "type": "string",
31
+ "pattern": "^p(?:[1-9][0-9]?)(?:\\.[0-9])?$"
32
+ },
33
+ "key": {
34
+ "description": "Aggregate key: normalized endpoint key (07) or custom measurement name (06). The package limits keys to 2000 UTF-16 code units (07-REQ-18); maxLength here counts code points, so every key the package writes satisfies it.",
35
+ "type": "string",
36
+ "minLength": 1,
37
+ "maxLength": 2000
38
+ },
39
+ "tool": {
40
+ "description": "Package that wrote the file.",
41
+ "type": "object",
42
+ "additionalProperties": false,
43
+ "required": ["name", "version"],
44
+ "properties": {
45
+ "name": { "description": "Package name.", "type": "string", "minLength": 1 },
46
+ "version": { "description": "Package version (semver).", "type": "string", "minLength": 1 }
47
+ }
48
+ },
49
+ "issue": {
50
+ "description": "Diagnostic entry: warning, tool error or collector diagnostic (P-12).",
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": ["code", "message"],
54
+ "properties": {
55
+ "code": { "description": "Stable error code, e.g. SCHEMA_VERSION_TOO_NEW.", "type": "string", "pattern": "^[A-Z][A-Z0-9_]*$" },
56
+ "message": { "description": "What happened and why, in English.", "type": "string", "minLength": 1 },
57
+ "hint": { "description": "What to do about it, in English.", "type": "string", "minLength": 1 },
58
+ "count": { "description": "How many times the same issue occurred (repeated issues are collapsed into one entry).", "type": "integer", "minimum": 1 }
59
+ }
60
+ },
61
+ "testsStatus": { "description": "Overall Playwright run status (FullResult.status).", "enum": ["passed", "failed", "timedout", "interrupted"] },
62
+ "evaluationStatus": {
63
+ "description": "Overall evaluation result: passed (no violations), warned (violations tolerated by gate policy), failed (violations the gate treats as blocking), error (evaluation impossible due to a tool error). Rules: 09.",
64
+ "enum": ["passed", "warned", "failed", "error"]
65
+ },
66
+ "fingerprint": { "description": "53-bit hash53 value (08) as 14 lowercase hexadecimal digits, zero-padded.", "type": "string", "pattern": "^[0-9a-f]{14}$" },
67
+ "hostFingerprint": {
68
+ "description": "Machine that ran the tests. Compared between the thresholds source run and the evaluated run (09-REQ-04).",
69
+ "type": "object",
70
+ "additionalProperties": false,
71
+ "required": ["platform", "arch", "ci", "cpuCount", "cpuModel"],
72
+ "properties": {
73
+ "platform": { "description": "process.platform", "type": "string" },
74
+ "arch": { "description": "process.arch", "type": "string" },
75
+ "ci": { "description": "True when the CI environment variable is set.", "type": "boolean" },
76
+ "cpuCount": { "description": "os.availableParallelism()", "type": "integer", "minimum": 1 },
77
+ "cpuModel": { "description": "os.cpus()[0].model, trimmed; empty string when unknown.", "type": "string" }
78
+ }
79
+ }
80
+ }
81
+ }