playwright-performance-regression 0.1.0-next.4 → 1.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.
- package/CHANGELOG.md +138 -0
- package/README.md +16 -17
- package/dist/{chunk-E2IX265O.js → chunk-4WX3Z5MJ.js} +2 -2
- package/dist/{chunk-CISGJCFW.js → chunk-5Y34Q4DR.js} +3 -3
- package/dist/{chunk-CXE5IWZY.js → chunk-B4XTLSRN.js} +169 -29
- package/dist/{chunk-KELMALEG.cjs → chunk-PWK5XSP2.cjs} +25 -25
- package/dist/{chunk-IUI4AFE5.cjs → chunk-VREOANPX.cjs} +1 -1
- package/dist/{chunk-LUA4WRIQ.cjs → chunk-W7NEFS5V.cjs} +3 -3
- package/dist/{chunk-RL27E3AB.js → chunk-YKBX6SAT.js} +1 -1
- package/dist/cli.js +398 -786
- package/dist/config.cjs +16 -16
- package/dist/config.js +3 -3
- package/dist/fixture.cjs +6 -6
- package/dist/fixture.js +3 -3
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +1 -1
- package/dist/reporter.cjs +1356 -644
- package/dist/reporter.js +829 -253
- package/dist/test.cjs +4 -4
- package/dist/test.js +3 -3
- package/package.json +1 -3
- package/schemas/config.schema.json +8 -3
package/dist/config.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkVREOANPX_cjs = require('./chunk-VREOANPX.cjs');
|
|
4
|
+
var chunkW7NEFS5V_cjs = require('./chunk-W7NEFS5V.cjs');
|
|
5
5
|
|
|
6
6
|
// src/config/reporter-path.ts
|
|
7
7
|
function currentFile() {
|
|
@@ -20,7 +20,7 @@ function reporterEntryPath() {
|
|
|
20
20
|
// src/config/run-conditions.ts
|
|
21
21
|
var CONSOLE_REPORTERS = /* @__PURE__ */ new Set(["list", "line", "dot", "github"]);
|
|
22
22
|
var ARTIFACTS = ["trace", "video", "screenshot"];
|
|
23
|
-
var PACKAGE_REPORTER = `${
|
|
23
|
+
var PACKAGE_REPORTER = `${chunkVREOANPX_cjs.PACKAGE_NAME}/reporter`;
|
|
24
24
|
function projectName(project) {
|
|
25
25
|
return project.name ?? "";
|
|
26
26
|
}
|
|
@@ -170,21 +170,21 @@ function planPerfRun(config, input) {
|
|
|
170
170
|
|
|
171
171
|
// src/config/with-perf.ts
|
|
172
172
|
function withPerf(config, perfConfig) {
|
|
173
|
-
const first =
|
|
174
|
-
if (!first.ok) throw new
|
|
173
|
+
const first = chunkVREOANPX_cjs.readModeState(process.env);
|
|
174
|
+
if (!first.ok) throw new chunkVREOANPX_cjs.ConfigError(first.issues);
|
|
175
175
|
if (first.value === null) return config;
|
|
176
176
|
const argvIssues = mainProcessSetup(first.value.mode);
|
|
177
|
-
const mode =
|
|
177
|
+
const mode = chunkVREOANPX_cjs.readModeState(process.env);
|
|
178
178
|
if (!mode.ok || mode.value === null) throw new Error("withPerf: the mode state changed");
|
|
179
179
|
const state = mode.value;
|
|
180
|
-
const resolved =
|
|
180
|
+
const resolved = chunkW7NEFS5V_cjs.resolveConfig(perfConfig, {
|
|
181
181
|
mode: state.mode === "check" ? "test" : state.mode,
|
|
182
182
|
...passesOverride(state),
|
|
183
183
|
...state.env === void 0 ? {} : { env: state.env },
|
|
184
184
|
...state.thresholdsDir === void 0 ? {} : { thresholdsDir: state.thresholdsDir },
|
|
185
185
|
...state.minSamples === void 0 ? {} : { minSamples: state.minSamples }
|
|
186
186
|
});
|
|
187
|
-
if (!resolved.ok) throw new
|
|
187
|
+
if (!resolved.ok) throw new chunkVREOANPX_cjs.ConfigError(resolved.issues);
|
|
188
188
|
const { config: perf, snapshot, warnings } = resolved.value;
|
|
189
189
|
const plan = planPerfRun(config, {
|
|
190
190
|
keepReporters: perf.run.keepReporters,
|
|
@@ -192,11 +192,11 @@ function withPerf(config, perfConfig) {
|
|
|
192
192
|
overrideSlowMo: perf.run.overrideSlowMo,
|
|
193
193
|
reporterPath: reporterEntryPath()
|
|
194
194
|
});
|
|
195
|
-
|
|
195
|
+
chunkVREOANPX_cjs.setRegistered({
|
|
196
196
|
config: perf,
|
|
197
197
|
snapshot,
|
|
198
198
|
mode: state,
|
|
199
|
-
packageVersion:
|
|
199
|
+
packageVersion: chunkVREOANPX_cjs.version,
|
|
200
200
|
measuredProjects: plan.value.measuredProjects,
|
|
201
201
|
runConditions: plan.value.runConditions,
|
|
202
202
|
warnings: [...warnings, ...argvIssues],
|
|
@@ -215,16 +215,16 @@ function mainProcessSetup(mode) {
|
|
|
215
215
|
const store = globalThis;
|
|
216
216
|
const done = store[SETUP_DONE];
|
|
217
217
|
if (done !== void 0) return done;
|
|
218
|
-
if ((process.env[
|
|
219
|
-
process.env[
|
|
218
|
+
if ((process.env[chunkVREOANPX_cjs.RUN_ID_ENV] ?? "") === "") {
|
|
219
|
+
process.env[chunkVREOANPX_cjs.RUN_ID_ENV] = chunkVREOANPX_cjs.generateRunId(/* @__PURE__ */ new Date(), Math.random);
|
|
220
220
|
}
|
|
221
|
-
const found =
|
|
222
|
-
if (found.reporter !== null && mode !== "check") throw new
|
|
221
|
+
const found = chunkVREOANPX_cjs.argvWarnings(process.argv, chunkVREOANPX_cjs.PACKAGE_NAME, mode);
|
|
222
|
+
if (found.reporter !== null && mode !== "check") throw new chunkVREOANPX_cjs.ConfigError([found.reporter]);
|
|
223
223
|
const report = [];
|
|
224
224
|
for (const issue of [found.reporter, found.unsupported]) {
|
|
225
225
|
if (issue === null) continue;
|
|
226
226
|
process.stderr.write(
|
|
227
|
-
`${
|
|
227
|
+
`${chunkVREOANPX_cjs.PACKAGE_NAME}: warning ${issue.code}: ${issue.message}
|
|
228
228
|
Hint: ${issue.hint}
|
|
229
229
|
`
|
|
230
230
|
);
|
|
@@ -236,6 +236,6 @@ function mainProcessSetup(mode) {
|
|
|
236
236
|
|
|
237
237
|
Object.defineProperty(exports, "definePerfConfig", {
|
|
238
238
|
enumerable: true,
|
|
239
|
-
get: function () { return
|
|
239
|
+
get: function () { return chunkW7NEFS5V_cjs.definePerfConfig; }
|
|
240
240
|
});
|
|
241
241
|
exports.withPerf = withPerf;
|
package/dist/config.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setRegistered } from './chunk-S6UH6QPK.js';
|
|
2
|
-
import { readModeState, ConfigError, version, RUN_ID_ENV, generateRunId, argvWarnings, PACKAGE_NAME } from './chunk-
|
|
3
|
-
import { resolveConfig } from './chunk-
|
|
4
|
-
export { definePerfConfig } from './chunk-
|
|
2
|
+
import { readModeState, ConfigError, version, RUN_ID_ENV, generateRunId, argvWarnings, PACKAGE_NAME } from './chunk-YKBX6SAT.js';
|
|
3
|
+
import { resolveConfig } from './chunk-5Y34Q4DR.js';
|
|
4
|
+
export { definePerfConfig } from './chunk-5Y34Q4DR.js';
|
|
5
5
|
|
|
6
6
|
// src/config/reporter-path.ts
|
|
7
7
|
function currentFile() {
|
package/dist/fixture.cjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var chunkPWK5XSP2_cjs = require('./chunk-PWK5XSP2.cjs');
|
|
4
|
+
require('./chunk-VREOANPX.cjs');
|
|
5
|
+
require('./chunk-W7NEFS5V.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "trackContext", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkPWK5XSP2_cjs.trackContext; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "trackRequestContext", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkPWK5XSP2_cjs.trackRequestContext; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "withPerfFixtures", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkPWK5XSP2_cjs.withPerfFixtures; }
|
|
20
20
|
});
|
package/dist/fixture.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { trackContext, trackRequestContext, withPerfFixtures } from './chunk-
|
|
1
|
+
export { trackContext, trackRequestContext, withPerfFixtures } from './chunk-4WX3Z5MJ.js';
|
|
2
2
|
import './chunk-S6UH6QPK.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-YKBX6SAT.js';
|
|
4
|
+
import './chunk-5Y34Q4DR.js';
|
package/dist/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkW7NEFS5V_cjs = require('./chunk-W7NEFS5V.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "definePerfConfig", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkW7NEFS5V_cjs.definePerfConfig; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "perfDefaults", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkW7NEFS5V_cjs.perfDefaults; }
|
|
14
14
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -71,7 +71,7 @@ interface PackageConfig {
|
|
|
71
71
|
flags?: string;
|
|
72
72
|
})[];
|
|
73
73
|
/**
|
|
74
|
-
* Requests whose URL matches any pattern are skipped. Applied after include.
|
|
74
|
+
* Requests whose URL matches any pattern are skipped. Applied after include. The default skips the HTTP transports of socket.io, SockJS, SignalR and Blazor Server (handshakes, long polling, streaming).
|
|
75
75
|
*
|
|
76
76
|
* Items: A string matches as a case-sensitive substring of the full URL; {regex, flags} is a JavaScript regular expression.
|
|
77
77
|
*/
|
|
@@ -595,13 +595,17 @@ interface PackageConfig {
|
|
|
595
595
|
*/
|
|
596
596
|
report?: {
|
|
597
597
|
/**
|
|
598
|
-
* Directory of report.json and
|
|
598
|
+
* Directory of report.json, report.html and junit.xml, relative to the Playwright config directory. Emptied when the first test of a test or thresholds run starts; never the project directory or a folder with thresholds files.
|
|
599
599
|
*/
|
|
600
600
|
dir?: string;
|
|
601
601
|
/**
|
|
602
602
|
* Write the HTML report.
|
|
603
603
|
*/
|
|
604
604
|
html?: boolean;
|
|
605
|
+
/**
|
|
606
|
+
* Write junit.xml next to report.json in test mode (16).
|
|
607
|
+
*/
|
|
608
|
+
junit?: boolean;
|
|
605
609
|
/**
|
|
606
610
|
* Include raw URLs of the slowest samples in the run report (D-11).
|
|
607
611
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ interface PackageConfig {
|
|
|
71
71
|
flags?: string;
|
|
72
72
|
})[];
|
|
73
73
|
/**
|
|
74
|
-
* Requests whose URL matches any pattern are skipped. Applied after include.
|
|
74
|
+
* Requests whose URL matches any pattern are skipped. Applied after include. The default skips the HTTP transports of socket.io, SockJS, SignalR and Blazor Server (handshakes, long polling, streaming).
|
|
75
75
|
*
|
|
76
76
|
* Items: A string matches as a case-sensitive substring of the full URL; {regex, flags} is a JavaScript regular expression.
|
|
77
77
|
*/
|
|
@@ -595,13 +595,17 @@ interface PackageConfig {
|
|
|
595
595
|
*/
|
|
596
596
|
report?: {
|
|
597
597
|
/**
|
|
598
|
-
* Directory of report.json and
|
|
598
|
+
* Directory of report.json, report.html and junit.xml, relative to the Playwright config directory. Emptied when the first test of a test or thresholds run starts; never the project directory or a folder with thresholds files.
|
|
599
599
|
*/
|
|
600
600
|
dir?: string;
|
|
601
601
|
/**
|
|
602
602
|
* Write the HTML report.
|
|
603
603
|
*/
|
|
604
604
|
html?: boolean;
|
|
605
|
+
/**
|
|
606
|
+
* Write junit.xml next to report.json in test mode (16).
|
|
607
|
+
*/
|
|
608
|
+
junit?: boolean;
|
|
605
609
|
/**
|
|
606
610
|
* Include raw URLs of the slowest samples in the run report (D-11).
|
|
607
611
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { definePerfConfig, perfDefaults } from './chunk-
|
|
1
|
+
export { definePerfConfig, perfDefaults } from './chunk-5Y34Q4DR.js';
|