@argos-ci/util 2.3.3 → 3.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/dist/index.js +8 -8
- package/package.json +4 -4
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.0.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": "807e4a9f3c4bfddd4197ed7394b032a39bc1c58e"
|
|
51
51
|
}
|