@vercel/build-utils 14.0.2 → 14.0.4
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 +12 -0
- package/dist/fs/read-config-file.js +6 -1
- package/dist/index.js +7 -2
- package/dist/node-diagnostics.js +1 -1
- package/package.json +5 -6
- package/turbo.json +56 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @vercel/build-utils
|
|
2
2
|
|
|
3
|
+
## 14.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 13f81ac: Support pnpm lockfiles containing multiple YAML documents.
|
|
8
|
+
|
|
9
|
+
## 14.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- d72826e: Prevented unit tests and generated outputs from changing Turborepo task inputs during CI, and removed the redundant affected Unit test retry.
|
|
14
|
+
|
|
3
15
|
## 14.0.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -63,7 +63,12 @@ async function readConfigFile(files) {
|
|
|
63
63
|
} else if (name.endsWith(".toml")) {
|
|
64
64
|
return (0, import_smol_toml.parse)(str);
|
|
65
65
|
} else if (name.endsWith(".yaml") || name.endsWith(".yml")) {
|
|
66
|
-
|
|
66
|
+
const docs = [];
|
|
67
|
+
import_js_yaml.default.safeLoadAll(str, (doc) => docs.push(doc), {
|
|
68
|
+
filename: name
|
|
69
|
+
});
|
|
70
|
+
const parsedYaml = docs.at(-1);
|
|
71
|
+
return parsedYaml ?? null;
|
|
67
72
|
}
|
|
68
73
|
} catch (_error) {
|
|
69
74
|
console.log(`Error while parsing config file: "${name}"`);
|
package/dist/index.js
CHANGED
|
@@ -33873,7 +33873,12 @@ async function readConfigFile(files) {
|
|
|
33873
33873
|
} else if (name.endsWith(".toml")) {
|
|
33874
33874
|
return parse(str);
|
|
33875
33875
|
} else if (name.endsWith(".yaml") || name.endsWith(".yml")) {
|
|
33876
|
-
|
|
33876
|
+
const docs = [];
|
|
33877
|
+
import_js_yaml.default.safeLoadAll(str, (doc) => docs.push(doc), {
|
|
33878
|
+
filename: name
|
|
33879
|
+
});
|
|
33880
|
+
const parsedYaml = docs.at(-1);
|
|
33881
|
+
return parsedYaml ?? null;
|
|
33877
33882
|
}
|
|
33878
33883
|
} catch (_error) {
|
|
33879
33884
|
console.log(`Error while parsing config file: "${name}"`);
|
|
@@ -35819,7 +35824,7 @@ function parsePnpmLock(content, lockfileVersion) {
|
|
|
35819
35824
|
content,
|
|
35820
35825
|
(doc) => docs.push(doc)
|
|
35821
35826
|
);
|
|
35822
|
-
const parsedYaml = docs
|
|
35827
|
+
const parsedYaml = docs.at(-1);
|
|
35823
35828
|
if (!parsedYaml)
|
|
35824
35829
|
return lockMap;
|
|
35825
35830
|
const lv = lockfileVersion ?? Number(parsedYaml.lockfileVersion ?? "0");
|
package/dist/node-diagnostics.js
CHANGED
|
@@ -223,7 +223,7 @@ function parsePnpmLock(content, lockfileVersion) {
|
|
|
223
223
|
content,
|
|
224
224
|
(doc) => docs.push(doc)
|
|
225
225
|
);
|
|
226
|
-
const parsedYaml = docs
|
|
226
|
+
const parsedYaml = docs.at(-1);
|
|
227
227
|
if (!parsedYaml)
|
|
228
228
|
return lockMap;
|
|
229
229
|
const lv = lockfileVersion ?? Number(parsedYaml.lockfileVersion ?? "0");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/build-utils",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"multistream": "2.1.1",
|
|
51
51
|
"semver": "6.3.1",
|
|
52
52
|
"smol-toml": "1.5.2",
|
|
53
|
-
"vitest": "
|
|
53
|
+
"vitest": "4.1.10",
|
|
54
54
|
"typescript": "4.9.5",
|
|
55
55
|
"yazl": "2.5.1",
|
|
56
56
|
"@vercel/error-utils": "2.2.1",
|
|
@@ -59,9 +59,8 @@
|
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "node build.mjs",
|
|
61
61
|
"test": "vitest run --config ../../vitest.config.mts",
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"type-check": "tsc --noEmit"
|
|
62
|
+
"test-e2e": "vitest run --config ../../vitest.config.mts test/integration",
|
|
63
|
+
"type-check": "tsc --noEmit",
|
|
64
|
+
"test-unit": "vitest run --config ../../vitest.config.mts test/unit."
|
|
66
65
|
}
|
|
67
66
|
}
|
package/turbo.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://turborepo.org/schema.json",
|
|
3
|
+
"extends": ["//"],
|
|
4
|
+
"tasks": {
|
|
5
|
+
"test": {
|
|
6
|
+
"dependsOn": ["build"]
|
|
7
|
+
},
|
|
8
|
+
"test-unit": {
|
|
9
|
+
"dependsOn": ["build"]
|
|
10
|
+
},
|
|
11
|
+
"test-e2e": {
|
|
12
|
+
"command": ["node", "-e", "process.exit(0)"],
|
|
13
|
+
"dependsOn": ["test-e2e:1", "test-e2e:2", "test-e2e:3", "test-e2e:4"]
|
|
14
|
+
},
|
|
15
|
+
"test-e2e:1": {
|
|
16
|
+
"command": ["node", "test/run-integration-group.mjs", "1"],
|
|
17
|
+
"dependsOn": ["build"],
|
|
18
|
+
"inputs": [
|
|
19
|
+
"$TURBO_DEFAULT$",
|
|
20
|
+
"$TURBO_ROOT$/test/lib/**",
|
|
21
|
+
"$TURBO_ROOT$/vitest.config.mts"
|
|
22
|
+
],
|
|
23
|
+
"outputLogs": "new-only"
|
|
24
|
+
},
|
|
25
|
+
"test-e2e:2": {
|
|
26
|
+
"command": ["node", "test/run-integration-group.mjs", "2"],
|
|
27
|
+
"dependsOn": ["build"],
|
|
28
|
+
"inputs": [
|
|
29
|
+
"$TURBO_DEFAULT$",
|
|
30
|
+
"$TURBO_ROOT$/test/lib/**",
|
|
31
|
+
"$TURBO_ROOT$/vitest.config.mts"
|
|
32
|
+
],
|
|
33
|
+
"outputLogs": "new-only"
|
|
34
|
+
},
|
|
35
|
+
"test-e2e:3": {
|
|
36
|
+
"command": ["node", "test/run-integration-group.mjs", "3"],
|
|
37
|
+
"dependsOn": ["build"],
|
|
38
|
+
"inputs": [
|
|
39
|
+
"$TURBO_DEFAULT$",
|
|
40
|
+
"$TURBO_ROOT$/test/lib/**",
|
|
41
|
+
"$TURBO_ROOT$/vitest.config.mts"
|
|
42
|
+
],
|
|
43
|
+
"outputLogs": "new-only"
|
|
44
|
+
},
|
|
45
|
+
"test-e2e:4": {
|
|
46
|
+
"command": ["node", "test/run-integration-group.mjs", "4"],
|
|
47
|
+
"dependsOn": ["build"],
|
|
48
|
+
"inputs": [
|
|
49
|
+
"$TURBO_DEFAULT$",
|
|
50
|
+
"$TURBO_ROOT$/test/lib/**",
|
|
51
|
+
"$TURBO_ROOT$/vitest.config.mts"
|
|
52
|
+
],
|
|
53
|
+
"outputLogs": "new-only"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|