@vercel/build-utils
Advanced tools
Comparing version 5.8.3 to 5.9.0
import vanillaGlob_ from 'glob'; | ||
import FileFsRef from '../file-fs-ref'; | ||
export declare type GlobOptions = vanillaGlob_.IOptions; | ||
export interface GlobOptions extends vanillaGlob_.IOptions { | ||
includeDirectories?: boolean; | ||
} | ||
export default function glob(pattern: string, opts: GlobOptions | string, mountpoint?: string): Promise<Record<string, FileFsRef>>; |
@@ -58,12 +58,14 @@ "use strict"; | ||
// Add empty directory entries | ||
for (const relativePath of dirs) { | ||
if (dirsWithEntries.has(relativePath)) | ||
continue; | ||
let finalPath = relativePath; | ||
if (mountpoint) { | ||
finalPath = path_1.default.join(mountpoint, finalPath); | ||
if (options.includeDirectories) { | ||
for (const relativePath of dirs) { | ||
if (dirsWithEntries.has(relativePath)) | ||
continue; | ||
let finalPath = relativePath; | ||
if (mountpoint) { | ||
finalPath = path_1.default.join(mountpoint, finalPath); | ||
} | ||
const fsPath = normalize_path_1.normalizePath(path_1.default.join(options.cwd, relativePath)); | ||
const stat = statCache[fsPath]; | ||
results[finalPath] = new file_fs_ref_1.default({ mode: stat.mode, fsPath }); | ||
} | ||
const fsPath = normalize_path_1.normalizePath(path_1.default.join(options.cwd, relativePath)); | ||
const stat = statCache[fsPath]; | ||
results[finalPath] = new file_fs_ref_1.default({ mode: stat.mode, fsPath }); | ||
} | ||
@@ -70,0 +72,0 @@ return results; |
{ | ||
"name": "@vercel/build-utils", | ||
"version": "5.8.3", | ||
"version": "5.9.0", | ||
"license": "MIT", | ||
@@ -54,3 +54,3 @@ "main": "./dist/index.js", | ||
}, | ||
"gitHead": "b5cdc82a1cca4d0b3369490f8a19fd8f8478fe94" | ||
"gitHead": "4ccdcde463560dc44da89edf52523419fc56ab62" | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1537388
31550