@vercel/build-utils 5.3.0 → 5.3.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/fs/glob.d.ts +1 -5
- package/dist/fs/glob.js +3 -2
- package/dist/index.js +3 -2
- package/dist/types.d.ts +1 -0
- package/package.json +2 -2
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
@@ -30618,14 +30618,15 @@ async function glob(pattern, opts, mountpoint) {
|
|
30618
30618
|
throw new Error(`basePath/cwd must be an absolute path (${options.cwd})`);
|
30619
30619
|
}
|
30620
30620
|
const results = {};
|
30621
|
+
const statCache = {};
|
30621
30622
|
options.symlinks = {};
|
30622
|
-
options.statCache =
|
30623
|
+
options.statCache = statCache;
|
30623
30624
|
options.stat = true;
|
30624
30625
|
options.dot = true;
|
30625
30626
|
const files = await vanillaGlob(pattern, options);
|
30626
30627
|
for (const relativePath of files) {
|
30627
30628
|
const fsPath = normalize_path_1.normalizePath(path_1.default.join(options.cwd, relativePath));
|
30628
|
-
let stat =
|
30629
|
+
let stat = statCache[fsPath];
|
30629
30630
|
assert_1.default(stat, `statCache does not contain value for ${relativePath} (resolved to ${fsPath})`);
|
30630
30631
|
const isSymlink = options.symlinks[fsPath];
|
30631
30632
|
if (isSymlink || stat.isFile()) {
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/build-utils",
|
3
|
-
"version": "5.3.
|
3
|
+
"version": "5.3.1",
|
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": "b52d01f809b80734ed1ab61df82f299f11a04720"
|
51
51
|
}
|