@argos-ci/util 2.3.3 → 3.1.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/browser.d.ts +17 -1
- package/dist/index.js +8 -8
- package/package.json +4 -4
package/dist/browser.d.ts
CHANGED
|
@@ -28,13 +28,29 @@ type ScreenshotMetadata = {
|
|
|
28
28
|
repeat?: number | null;
|
|
29
29
|
/** @description The location of the test in the source code */
|
|
30
30
|
location?: {
|
|
31
|
-
/** @description The file
|
|
31
|
+
/** @description The located file */
|
|
32
32
|
file: string;
|
|
33
33
|
/** @description The line number in the file */
|
|
34
34
|
line: number;
|
|
35
35
|
/** @description The column number in the file */
|
|
36
36
|
column: number;
|
|
37
37
|
};
|
|
38
|
+
/** @description Annotations associated to the test */
|
|
39
|
+
annotations?: {
|
|
40
|
+
/** @description The type of annotation */
|
|
41
|
+
type: string;
|
|
42
|
+
/** @description The description of the annotation */
|
|
43
|
+
description?: string;
|
|
44
|
+
/** @description The location of the annotation in the source code */
|
|
45
|
+
location?: {
|
|
46
|
+
/** @description The located file */
|
|
47
|
+
file: string;
|
|
48
|
+
/** @description The line number in the file */
|
|
49
|
+
line: number;
|
|
50
|
+
/** @description The column number in the file */
|
|
51
|
+
column: number;
|
|
52
|
+
};
|
|
53
|
+
}[];
|
|
38
54
|
} | null) | null;
|
|
39
55
|
browser?: {
|
|
40
56
|
/** @description The name of the browser */
|
package/dist/index.js
CHANGED
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
} from "./chunk-VMM7XHBS.js";
|
|
6
6
|
|
|
7
7
|
// src/fs.ts
|
|
8
|
-
import { randomBytes } from "
|
|
9
|
-
import { mkdir } from "
|
|
10
|
-
import { tmpdir } from "
|
|
11
|
-
import { join } from "
|
|
8
|
+
import { randomBytes } from "crypto";
|
|
9
|
+
import { mkdir } from "fs/promises";
|
|
10
|
+
import { tmpdir } from "os";
|
|
11
|
+
import { join } from "path";
|
|
12
12
|
var createDirectoryPromises = /* @__PURE__ */ new Map();
|
|
13
13
|
async function createDirectory(pathname) {
|
|
14
14
|
let promise = createDirectoryPromises.get(pathname);
|
|
@@ -28,7 +28,7 @@ async function createTemporaryDirectory() {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
// src/git.ts
|
|
31
|
-
import { exec } from "
|
|
31
|
+
import { exec } from "child_process";
|
|
32
32
|
var cached;
|
|
33
33
|
function getGitRepositoryPath() {
|
|
34
34
|
if (!cached) {
|
|
@@ -48,7 +48,7 @@ function getGitRepositoryPath() {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
// src/introspection.ts
|
|
51
|
-
import { readFile } from "
|
|
51
|
+
import { readFile } from "fs/promises";
|
|
52
52
|
var versionCache = /* @__PURE__ */ new Map();
|
|
53
53
|
function readVersionFromPackage(pkgPath) {
|
|
54
54
|
const readVersion = async () => {
|
|
@@ -69,7 +69,7 @@ function readVersionFromPackage(pkgPath) {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
// src/metadata-io.ts
|
|
72
|
-
import { readFile as readFile2, writeFile } from "
|
|
72
|
+
import { readFile as readFile2, writeFile } from "fs/promises";
|
|
73
73
|
async function writeMetadata(screenshotPath, metadata) {
|
|
74
74
|
await writeFile(getMetadataPath(screenshotPath), JSON.stringify(metadata));
|
|
75
75
|
}
|
|
@@ -86,7 +86,7 @@ async function readMetadata(screenshotPath) {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
// src/playwright-trace.ts
|
|
89
|
-
import { access } from "
|
|
89
|
+
import { access } from "fs/promises";
|
|
90
90
|
function getTracePath(screenshotPath) {
|
|
91
91
|
return screenshotPath + ".pw-trace.zip";
|
|
92
92
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argos-ci/util",
|
|
3
3
|
"description": "Set of utilities used across all Argos SDKs.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.1.0",
|
|
5
5
|
"author": "Smooth Code",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"./package.json": "./package.json"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
|
-
"node": ">=
|
|
38
|
+
"node": ">=20.0.0"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "tsup",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"lint": "eslint ."
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@types/node": "
|
|
47
|
+
"@types/node": "catalog:",
|
|
48
48
|
"vitest": "catalog:"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "dfad527145f58037c1991c2a85ad8cdc0d8a1a3f"
|
|
51
51
|
}
|