/** * @file Private internals for `globs/*` modules — lazy module accessors, * normalization helpers, and the matcher LRU cache. The `defaultIgnore` list * lives in the public `defaults.ts` file; this file re-exports it so * co-located helpers can import everything through one path. */ import { defaultIgnore } from './defaults.js'; import type * as fastGlobType from '../external/fast-glob.js'; import type picomatchType from '../external/picomatch.js'; export { defaultIgnore }; export declare const MATCHER_CACHE_MAX_SIZE = 100; export declare const matcherCache: Map boolean>; export declare function getFastGlob(): typeof fastGlobType; export declare function getPicomatch(): typeof picomatchType; /** * Glob results are normalized to forward slashes regardless of the backend * (node:fs.glob returns native-OS separators on Windows; fast-glob already * returns forward slashes). Single contract: callers don't have to think about * separators per platform. Routes through `paths/normalize.normalizePath` so * this stays consistent with every other path-shaped string in the lib. */ export declare function normalizeGlobResults(out: string[]): string[]; /** * Normalize a user-provided ignore array by running every entry through * stripTrailingSlash. Returns undefined when `ignore` is not an array so * callers can skip merging the option entirely. * * Uses a pre-sized for-loop instead of `.map`: socket-lib uses primordials (the * prototype `Array.prototype.map` can be intercepted or replaced by user code * at module load), and a hand-rolled loop is also marginally faster — no * callback indirection, no growth of the result array. */ export declare function normalizeIgnorePatterns(ignore: unknown): string[] | undefined; /** * Strip a trailing `/` from a glob pattern so fast-glob's deep filter matches * it. See header comment in `glob.ts` for the full rationale — shortest * summary: a `dist/` ignore pattern lets fast-glob walk the whole subtree * before filtering, while a slashless `dist` skips the walk entirely. * * CharCode 47 is `/`. Comparing the char code keeps the check on a primordial * so a monkey-patched `String.prototype.endsWith` cannot change the answer. * The result matches `pattern.endsWith('/')`. */ export declare function stripTrailingSlash(pattern: string): string;