@argos-ci/playwright 5.0.11 → 6.0.1
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/index.js +7 -7
- package/dist/reporter.js +7 -7
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/screenshot.ts
|
|
2
|
-
import { mkdir } from "
|
|
3
|
-
import { resolve, dirname } from "
|
|
2
|
+
import { mkdir } from "fs/promises";
|
|
3
|
+
import { resolve, dirname } from "path";
|
|
4
4
|
import {
|
|
5
5
|
resolveViewport,
|
|
6
6
|
getGlobalScript
|
|
@@ -22,9 +22,9 @@ import {
|
|
|
22
22
|
getGitRepositoryPath,
|
|
23
23
|
readVersionFromPackage
|
|
24
24
|
} from "@argos-ci/util";
|
|
25
|
-
import { relative } from "
|
|
26
|
-
import { createRequire } from "
|
|
27
|
-
import { AsyncLocalStorage } from "
|
|
25
|
+
import { relative } from "path";
|
|
26
|
+
import { createRequire } from "module";
|
|
27
|
+
import { AsyncLocalStorage } from "async_hooks";
|
|
28
28
|
var require2 = createRequire(import.meta.url);
|
|
29
29
|
function tryResolve(pkg) {
|
|
30
30
|
try {
|
|
@@ -126,7 +126,7 @@ async function getTestMetadata(testInfo) {
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
// src/util.ts
|
|
129
|
-
import { createRequire as createRequire2 } from "
|
|
129
|
+
import { createRequire as createRequire2 } from "module";
|
|
130
130
|
var require3 = createRequire2(import.meta.url);
|
|
131
131
|
function checkIsUsingArgosReporter(testInfo) {
|
|
132
132
|
const reporterPath = require3.resolve("@argos-ci/playwright/reporter");
|
|
@@ -425,7 +425,7 @@ async function argosScreenshot(handler, name, options = {}) {
|
|
|
425
425
|
|
|
426
426
|
// src/csp.ts
|
|
427
427
|
import { getGlobalScript as getGlobalScript2 } from "@argos-ci/browser";
|
|
428
|
-
import { createHash } from "
|
|
428
|
+
import { createHash } from "crypto";
|
|
429
429
|
function getCSPScriptHash() {
|
|
430
430
|
const hash = createHash("sha256").update(getGlobalScript2()).digest("base64");
|
|
431
431
|
return `'sha256-${hash}'`;
|
package/dist/reporter.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/reporter.ts
|
|
2
2
|
import chalk from "chalk";
|
|
3
3
|
import { readConfig, upload } from "@argos-ci/core";
|
|
4
|
-
import { copyFile, readdir, writeFile } from "
|
|
5
|
-
import { dirname, join } from "
|
|
4
|
+
import { copyFile, readdir, writeFile } from "fs/promises";
|
|
5
|
+
import { dirname, join } from "path";
|
|
6
6
|
|
|
7
7
|
// src/attachment.ts
|
|
8
8
|
function getOriginalAttachmentName(name) {
|
|
@@ -35,9 +35,9 @@ import {
|
|
|
35
35
|
getGitRepositoryPath,
|
|
36
36
|
readVersionFromPackage
|
|
37
37
|
} from "@argos-ci/util";
|
|
38
|
-
import { relative } from "
|
|
39
|
-
import { createRequire } from "
|
|
40
|
-
import { AsyncLocalStorage } from "
|
|
38
|
+
import { relative } from "path";
|
|
39
|
+
import { createRequire } from "module";
|
|
40
|
+
import { AsyncLocalStorage } from "async_hooks";
|
|
41
41
|
var require2 = createRequire(import.meta.url);
|
|
42
42
|
function tryResolve(pkg) {
|
|
43
43
|
try {
|
|
@@ -146,9 +146,9 @@ async function getParallelFromConfig(config) {
|
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
148
|
return {
|
|
149
|
-
total: config.shard.total,
|
|
149
|
+
total: argosConfig.parallelTotal ?? config.shard.total,
|
|
150
150
|
nonce: argosConfig.parallelNonce,
|
|
151
|
-
index: config.shard.current
|
|
151
|
+
index: argosConfig.parallelIndex ?? config.shard.current
|
|
152
152
|
};
|
|
153
153
|
}
|
|
154
154
|
function getAutomaticScreenshotName(test, result) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argos-ci/playwright",
|
|
3
3
|
"description": "Playwright SDK for visual testing with Argos.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "6.0.1",
|
|
5
5
|
"author": "Smooth Code",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -44,19 +44,19 @@
|
|
|
44
44
|
"./package.json": "./package.json"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
|
-
"node": ">=
|
|
47
|
+
"node": ">=20.0.0"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@argos-ci/browser": "
|
|
51
|
-
"@argos-ci/core": "
|
|
52
|
-
"@argos-ci/util": "
|
|
50
|
+
"@argos-ci/browser": "5.0.0",
|
|
51
|
+
"@argos-ci/core": "4.0.0",
|
|
52
|
+
"@argos-ci/util": "3.0.0",
|
|
53
53
|
"chalk": "^5.4.1",
|
|
54
54
|
"debug": "^4.4.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@playwright/test": "^1.
|
|
57
|
+
"@playwright/test": "^1.54.2",
|
|
58
58
|
"@types/debug": "^4.1.12",
|
|
59
|
-
"@types/node": "
|
|
59
|
+
"@types/node": "catalog:"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "tsup && cp ./src/index.cjs ./dist",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"check-format": "prettier --check --ignore-unknown --ignore-path=../../.gitignore --ignore-path=../../.prettierignore .",
|
|
68
68
|
"lint": "eslint ."
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "e570f873fbde4ceb7139ccdfa6dfeed2b2305f53"
|
|
71
71
|
}
|