@vercel/build-utils 5.3.0 → 5.4.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/debug.js +3 -0
- package/dist/fs/glob.d.ts +1 -5
- package/dist/fs/glob.js +3 -2
- package/dist/index.js +6 -2
- package/package.json +2 -2
package/dist/debug.js
CHANGED
@@ -5,5 +5,8 @@ function debug(message, ...additional) {
|
|
5
5
|
if (get_platform_env_1.getPlatformEnv('BUILDER_DEBUG')) {
|
6
6
|
console.log(message, ...additional);
|
7
7
|
}
|
8
|
+
else if (process.env.VERCEL_DEBUG_PREFIX) {
|
9
|
+
console.log(`${process.env.VERCEL_DEBUG_PREFIX}${message}`, ...additional);
|
10
|
+
}
|
8
11
|
}
|
9
12
|
exports.default = debug;
|
package/dist/fs/glob.d.ts
CHANGED
@@ -1,8 +1,4 @@
|
|
1
1
|
import vanillaGlob_ from 'glob';
|
2
2
|
import FileFsRef from '../file-fs-ref';
|
3
3
|
export declare type GlobOptions = vanillaGlob_.IOptions;
|
4
|
-
|
5
|
-
[filePath: string]: FileFsRef;
|
6
|
-
}
|
7
|
-
export default function glob(pattern: string, opts: GlobOptions | string, mountpoint?: string): Promise<FsFiles>;
|
8
|
-
export {};
|
4
|
+
export default function glob(pattern: string, opts: GlobOptions | string, mountpoint?: string): Promise<Record<string, FileFsRef>>;
|
package/dist/fs/glob.js
CHANGED
@@ -26,14 +26,15 @@ async function glob(pattern, opts, mountpoint) {
|
|
26
26
|
throw new Error(`basePath/cwd must be an absolute path (${options.cwd})`);
|
27
27
|
}
|
28
28
|
const results = {};
|
29
|
+
const statCache = {};
|
29
30
|
options.symlinks = {};
|
30
|
-
options.statCache =
|
31
|
+
options.statCache = statCache;
|
31
32
|
options.stat = true;
|
32
33
|
options.dot = true;
|
33
34
|
const files = await vanillaGlob(pattern, options);
|
34
35
|
for (const relativePath of files) {
|
35
36
|
const fsPath = normalize_path_1.normalizePath(path_1.default.join(options.cwd, relativePath));
|
36
|
-
let stat =
|
37
|
+
let stat = statCache[fsPath];
|
37
38
|
assert_1.default(stat, `statCache does not contain value for ${relativePath} (resolved to ${fsPath})`);
|
38
39
|
const isSymlink = options.symlinks[fsPath];
|
39
40
|
if (isSymlink || stat.isFile()) {
|
package/dist/index.js
CHANGED
@@ -30121,6 +30121,9 @@ function debug(message, ...additional) {
|
|
30121
30121
|
if (get_platform_env_1.getPlatformEnv('BUILDER_DEBUG')) {
|
30122
30122
|
console.log(message, ...additional);
|
30123
30123
|
}
|
30124
|
+
else if (process.env.VERCEL_DEBUG_PREFIX) {
|
30125
|
+
console.log(`${process.env.VERCEL_DEBUG_PREFIX}${message}`, ...additional);
|
30126
|
+
}
|
30124
30127
|
}
|
30125
30128
|
exports.default = debug;
|
30126
30129
|
|
@@ -30618,14 +30621,15 @@ async function glob(pattern, opts, mountpoint) {
|
|
30618
30621
|
throw new Error(`basePath/cwd must be an absolute path (${options.cwd})`);
|
30619
30622
|
}
|
30620
30623
|
const results = {};
|
30624
|
+
const statCache = {};
|
30621
30625
|
options.symlinks = {};
|
30622
|
-
options.statCache =
|
30626
|
+
options.statCache = statCache;
|
30623
30627
|
options.stat = true;
|
30624
30628
|
options.dot = true;
|
30625
30629
|
const files = await vanillaGlob(pattern, options);
|
30626
30630
|
for (const relativePath of files) {
|
30627
30631
|
const fsPath = normalize_path_1.normalizePath(path_1.default.join(options.cwd, relativePath));
|
30628
|
-
let stat =
|
30632
|
+
let stat = statCache[fsPath];
|
30629
30633
|
assert_1.default(stat, `statCache does not contain value for ${relativePath} (resolved to ${fsPath})`);
|
30630
30634
|
const isSymlink = options.symlinks[fsPath];
|
30631
30635
|
if (isSymlink || stat.isFile()) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/build-utils",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.4.0",
|
4
4
|
"license": "MIT",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"types": "./dist/index.d.js",
|
@@ -47,5 +47,5 @@
|
|
47
47
|
"typescript": "4.3.4",
|
48
48
|
"yazl": "2.5.1"
|
49
49
|
},
|
50
|
-
"gitHead": "
|
50
|
+
"gitHead": "e7e0a55b72bc73c26661f7b2a3caa0884a5d1764"
|
51
51
|
}
|