@rstest/core 0.9.5 → 0.9.7
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/LICENSE.md +80 -0
- package/dist/0~8843.js +15 -1
- package/dist/{0~lib.js → 0~@babel/code-frame.js} +2 -2
- package/dist/0~@clack/prompts.js +1044 -0
- package/dist/0~browserLoader.js +1 -1
- package/dist/0~browser~1.js +17 -17
- package/dist/0~checkThresholds.js +1 -1
- package/dist/0~chokidar.js +43 -42
- package/dist/0~fake-timers.js +381 -228
- package/dist/0~generate.js +1 -2
- package/dist/0~listTests.js +67 -7
- package/dist/0~magic-string.es.js +1 -181
- package/dist/0~restart.js +1 -1
- package/dist/0~snapshot.js +1 -1
- package/dist/1255.js +11 -11
- package/dist/3145.js +275 -25
- package/dist/4411.js +127 -139
- package/dist/6830.js +1 -1
- package/dist/7290.js +15 -0
- package/dist/9743.js +1 -1
- package/dist/9784.js +1 -1
- package/dist/browser-runtime/2~fake-timers.js +389 -403
- package/dist/browser-runtime/2~magic-string.es.js +5 -191
- package/dist/browser-runtime/2~snapshot.js +2 -2
- package/dist/browser-runtime/723.js +77 -15
- package/dist/browser-runtime/index.d.ts +32 -62
- package/dist/browser.d.ts +32 -62
- package/dist/globalSetupWorker.js +1 -1
- package/dist/index.d.ts +56 -68
- package/dist/index.js +1 -1
- package/dist/worker.d.ts +18 -6
- package/dist/worker.js +1 -1
- package/globals.d.ts +1 -0
- package/package.json +13 -14
- package/dist/0~dist.js +0 -1014
- package/dist/4899.js +0 -11
- package/dist/browser-runtime/rslib-runtime.js +0 -49
- /package/dist/{rslib-runtime.js → 0~rslib-runtime.js} +0 -0
package/dist/4411.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
3
2
|
import promises from "node:fs/promises";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import * as __rspack_external_node_fs_5ea92f0c from "node:fs";
|
|
4
|
+
import { readdir, readdirSync, realpath, realpathSync, stat as external_node_fs_stat, statSync } from "node:fs";
|
|
5
|
+
import { basename, dirname, isAbsolute, normalize, posix, relative as external_node_path_relative, resolve, sep } from "node:path";
|
|
6
6
|
import { fileURLToPath } from "url";
|
|
7
7
|
import { createRequire } from "module";
|
|
8
|
+
import { __webpack_require__ } from "./0~rslib-runtime.js";
|
|
8
9
|
import { logger as logger_logger, parsePosix, color as logger_color, castArray } from "./6830.js";
|
|
9
10
|
import { posix as dist_posix } from "./7011.js";
|
|
10
11
|
__webpack_require__.add({
|
|
@@ -2115,36 +2116,36 @@ var Builder = class {
|
|
|
2115
2116
|
};
|
|
2116
2117
|
const picomatch = __webpack_require__("../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/index.js");
|
|
2117
2118
|
const isReadonlyArray = Array.isArray;
|
|
2119
|
+
const BACKSLASHES = /\\/g;
|
|
2118
2120
|
const isWin = "win32" === process.platform;
|
|
2119
2121
|
const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
|
|
2120
2122
|
function getPartialMatcher(patterns, options = {}) {
|
|
2121
2123
|
const patternsCount = patterns.length;
|
|
2122
2124
|
const patternsParts = Array(patternsCount);
|
|
2123
2125
|
const matchers = Array(patternsCount);
|
|
2124
|
-
|
|
2125
|
-
for(
|
|
2126
|
+
let i, j;
|
|
2127
|
+
for(i = 0; i < patternsCount; i++){
|
|
2126
2128
|
const parts = splitPattern(patterns[i]);
|
|
2127
2129
|
patternsParts[i] = parts;
|
|
2128
2130
|
const partsCount = parts.length;
|
|
2129
2131
|
const partMatchers = Array(partsCount);
|
|
2130
|
-
for(
|
|
2132
|
+
for(j = 0; j < partsCount; j++)partMatchers[j] = picomatch(parts[j], options);
|
|
2131
2133
|
matchers[i] = partMatchers;
|
|
2132
2134
|
}
|
|
2133
2135
|
return (input)=>{
|
|
2134
2136
|
const inputParts = input.split("/");
|
|
2135
2137
|
if (".." === inputParts[0] && ONLY_PARENT_DIRECTORIES.test(input)) return true;
|
|
2136
|
-
for(
|
|
2138
|
+
for(i = 0; i < patternsCount; i++){
|
|
2137
2139
|
const patternParts = patternsParts[i];
|
|
2138
2140
|
const matcher = matchers[i];
|
|
2139
2141
|
const inputPatternCount = inputParts.length;
|
|
2140
2142
|
const minParts = Math.min(inputPatternCount, patternParts.length);
|
|
2141
|
-
|
|
2143
|
+
j = 0;
|
|
2142
2144
|
while(j < minParts){
|
|
2143
2145
|
const part = patternParts[j];
|
|
2144
2146
|
if (part.includes("/")) return true;
|
|
2145
|
-
|
|
2146
|
-
if (!
|
|
2147
|
-
if (globstarEnabled && "**" === part) return true;
|
|
2147
|
+
if (!matcher[j](inputParts[j])) break;
|
|
2148
|
+
if (!options.noglobstar && "**" === part) return true;
|
|
2148
2149
|
j++;
|
|
2149
2150
|
}
|
|
2150
2151
|
if (j === inputPatternCount) return true;
|
|
@@ -2157,7 +2158,7 @@ const isRoot = isWin ? (p)=>WIN32_ROOT_DIR.test(p) : (p)=>"/" === p;
|
|
|
2157
2158
|
function buildFormat(cwd, root, absolute) {
|
|
2158
2159
|
if (cwd === root || root.startsWith(`${cwd}/`)) {
|
|
2159
2160
|
if (absolute) {
|
|
2160
|
-
const start =
|
|
2161
|
+
const start = cwd.length + +!isRoot(cwd);
|
|
2161
2162
|
return (p, isDir)=>p.slice(start, isDir ? -1 : void 0) || ".";
|
|
2162
2163
|
}
|
|
2163
2164
|
const prefix = root.slice(cwd.length + 1);
|
|
@@ -2178,24 +2179,23 @@ function buildRelative(cwd, root) {
|
|
|
2178
2179
|
}
|
|
2179
2180
|
return (p)=>{
|
|
2180
2181
|
const result = posix.relative(cwd, `${root}/${p}`);
|
|
2181
|
-
|
|
2182
|
-
return result || ".";
|
|
2182
|
+
return "/" === p[p.length - 1] && "" !== result ? `${result}/` : result || ".";
|
|
2183
2183
|
};
|
|
2184
2184
|
}
|
|
2185
2185
|
const splitPatternOptions = {
|
|
2186
2186
|
parts: true
|
|
2187
2187
|
};
|
|
2188
|
-
function splitPattern(path
|
|
2188
|
+
function splitPattern(path) {
|
|
2189
2189
|
var _result$parts;
|
|
2190
|
-
const result = picomatch.scan(path
|
|
2190
|
+
const result = picomatch.scan(path, splitPatternOptions);
|
|
2191
2191
|
return (null == (_result$parts = result.parts) ? void 0 : _result$parts.length) ? result.parts : [
|
|
2192
|
-
path
|
|
2192
|
+
path
|
|
2193
2193
|
];
|
|
2194
2194
|
}
|
|
2195
2195
|
const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
|
|
2196
2196
|
const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
|
|
2197
|
-
const escapePosixPath = (path
|
|
2198
|
-
const escapeWin32Path = (path
|
|
2197
|
+
const escapePosixPath = (path)=>path.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
|
2198
|
+
const escapeWin32Path = (path)=>path.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
|
|
2199
2199
|
const escapePath = isWin ? escapeWin32Path : escapePosixPath;
|
|
2200
2200
|
function isDynamicPattern(pattern, options) {
|
|
2201
2201
|
if ((null == options ? void 0 : options.caseSensitiveMatch) === false) return true;
|
|
@@ -2205,27 +2205,33 @@ function isDynamicPattern(pattern, options) {
|
|
|
2205
2205
|
function log(...tasks) {
|
|
2206
2206
|
console.log(`[tinyglobby ${/* @__PURE__ */ new Date().toLocaleTimeString("es")}]`, ...tasks);
|
|
2207
2207
|
}
|
|
2208
|
+
function ensureStringArray(value) {
|
|
2209
|
+
return "string" == typeof value ? [
|
|
2210
|
+
value
|
|
2211
|
+
] : null != value ? value : [];
|
|
2212
|
+
}
|
|
2208
2213
|
const PARENT_DIRECTORY = /^(\/?\.\.)+/;
|
|
2209
2214
|
const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
|
|
2210
|
-
|
|
2211
|
-
|
|
2215
|
+
function normalizePattern(pattern, opts, props, isIgnore) {
|
|
2216
|
+
var _PARENT_DIRECTORY$exe;
|
|
2217
|
+
const cwd = opts.cwd;
|
|
2212
2218
|
let result = pattern;
|
|
2213
|
-
if (
|
|
2214
|
-
if (
|
|
2219
|
+
if ("/" === pattern[pattern.length - 1]) result = pattern.slice(0, -1);
|
|
2220
|
+
if ("*" !== result[result.length - 1] && opts.expandDirectories) result += "/**";
|
|
2215
2221
|
const escapedCwd = escapePath(cwd);
|
|
2216
|
-
result =
|
|
2217
|
-
const
|
|
2222
|
+
result = isAbsolute(result.replace(ESCAPING_BACKSLASHES, "")) ? posix.relative(escapedCwd, result) : posix.normalize(result);
|
|
2223
|
+
const parentDir = null == (_PARENT_DIRECTORY$exe = PARENT_DIRECTORY.exec(result)) ? void 0 : _PARENT_DIRECTORY$exe[0];
|
|
2218
2224
|
const parts = splitPattern(result);
|
|
2219
|
-
if (
|
|
2220
|
-
const n = (
|
|
2225
|
+
if (parentDir) {
|
|
2226
|
+
const n = (parentDir.length + 1) / 3;
|
|
2221
2227
|
let i = 0;
|
|
2222
2228
|
const cwdParts = escapedCwd.split("/");
|
|
2223
2229
|
while(i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]){
|
|
2224
2230
|
result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
|
|
2225
2231
|
i++;
|
|
2226
2232
|
}
|
|
2227
|
-
const potentialRoot = posix.join(cwd,
|
|
2228
|
-
if (
|
|
2233
|
+
const potentialRoot = posix.join(cwd, parentDir.slice(3 * i));
|
|
2234
|
+
if ("." !== potentialRoot[0] && props.root.length > potentialRoot.length) {
|
|
2229
2235
|
props.root = potentialRoot;
|
|
2230
2236
|
props.depthOffset = -n + i;
|
|
2231
2237
|
}
|
|
@@ -2240,7 +2246,7 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
|
|
|
2240
2246
|
newCommonPath.pop();
|
|
2241
2247
|
break;
|
|
2242
2248
|
}
|
|
2243
|
-
if (part !== props.commonPath[i] || isDynamicPattern(part)
|
|
2249
|
+
if (i === parts.length - 1 || part !== props.commonPath[i] || isDynamicPattern(part)) break;
|
|
2244
2250
|
newCommonPath.push(part);
|
|
2245
2251
|
}
|
|
2246
2252
|
props.depthOffset = newCommonPath.length;
|
|
@@ -2249,147 +2255,129 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
|
|
|
2249
2255
|
}
|
|
2250
2256
|
return result;
|
|
2251
2257
|
}
|
|
2252
|
-
function processPatterns(
|
|
2253
|
-
"**/*"
|
|
2254
|
-
], ignore = [], expandDirectories = true }, cwd, props) {
|
|
2255
|
-
if ("string" == typeof patterns) patterns = [
|
|
2256
|
-
patterns
|
|
2257
|
-
];
|
|
2258
|
-
if ("string" == typeof ignore) ignore = [
|
|
2259
|
-
ignore
|
|
2260
|
-
];
|
|
2258
|
+
function processPatterns(options, patterns, props) {
|
|
2261
2259
|
const matchPatterns = [];
|
|
2262
2260
|
const ignorePatterns = [];
|
|
2263
|
-
for (const pattern of ignore)if (pattern) {
|
|
2264
|
-
if ("!" !== pattern[0] || "(" === pattern[1]) ignorePatterns.push(normalizePattern(pattern,
|
|
2261
|
+
for (const pattern of options.ignore)if (pattern) {
|
|
2262
|
+
if ("!" !== pattern[0] || "(" === pattern[1]) ignorePatterns.push(normalizePattern(pattern, options, props, true));
|
|
2265
2263
|
}
|
|
2266
2264
|
for (const pattern of patterns)if (pattern) {
|
|
2267
|
-
if ("!" !== pattern[0] || "(" === pattern[1]) matchPatterns.push(normalizePattern(pattern,
|
|
2268
|
-
else if ("!" !== pattern[1] || "(" === pattern[2]) ignorePatterns.push(normalizePattern(pattern.slice(1),
|
|
2265
|
+
if ("!" !== pattern[0] || "(" === pattern[1]) matchPatterns.push(normalizePattern(pattern, options, props, false));
|
|
2266
|
+
else if ("!" !== pattern[1] || "(" === pattern[2]) ignorePatterns.push(normalizePattern(pattern.slice(1), options, props, true));
|
|
2269
2267
|
}
|
|
2270
2268
|
return {
|
|
2271
2269
|
match: matchPatterns,
|
|
2272
2270
|
ignore: ignorePatterns
|
|
2273
2271
|
};
|
|
2274
2272
|
}
|
|
2275
|
-
function
|
|
2276
|
-
|
|
2277
|
-
const path$1 = paths[i];
|
|
2278
|
-
paths[i] = relative(path$1);
|
|
2279
|
-
}
|
|
2280
|
-
return paths;
|
|
2281
|
-
}
|
|
2282
|
-
function normalizeCwd(cwd) {
|
|
2283
|
-
if (!cwd) return process.cwd().replace(BACKSLASHES, "/");
|
|
2284
|
-
if (cwd instanceof URL) return fileURLToPath(cwd).replace(BACKSLASHES, "/");
|
|
2285
|
-
return node_path.resolve(cwd).replace(BACKSLASHES, "/");
|
|
2286
|
-
}
|
|
2287
|
-
function getCrawler(patterns, inputOptions = {}) {
|
|
2288
|
-
const options = process.env.TINYGLOBBY_DEBUG ? {
|
|
2289
|
-
...inputOptions,
|
|
2290
|
-
debug: true
|
|
2291
|
-
} : inputOptions;
|
|
2292
|
-
const cwd = normalizeCwd(options.cwd);
|
|
2293
|
-
if (options.debug) log("globbing with:", {
|
|
2294
|
-
patterns,
|
|
2295
|
-
options,
|
|
2296
|
-
cwd
|
|
2297
|
-
});
|
|
2298
|
-
if (Array.isArray(patterns) && 0 === patterns.length) return [
|
|
2299
|
-
{
|
|
2300
|
-
sync: ()=>[],
|
|
2301
|
-
withPromise: async ()=>[]
|
|
2302
|
-
},
|
|
2303
|
-
false
|
|
2304
|
-
];
|
|
2273
|
+
function buildCrawler(options, patterns) {
|
|
2274
|
+
const cwd = options.cwd;
|
|
2305
2275
|
const props = {
|
|
2306
2276
|
root: cwd,
|
|
2307
|
-
commonPath: null,
|
|
2308
2277
|
depthOffset: 0
|
|
2309
2278
|
};
|
|
2310
|
-
const processed = processPatterns(
|
|
2311
|
-
...options,
|
|
2312
|
-
patterns
|
|
2313
|
-
}, cwd, props);
|
|
2279
|
+
const processed = processPatterns(options, patterns, props);
|
|
2314
2280
|
if (options.debug) log("internal processing patterns:", processed);
|
|
2281
|
+
const { absolute, caseSensitiveMatch, debug, dot, followSymbolicLinks, onlyDirectories } = options;
|
|
2282
|
+
const root = props.root.replace(BACKSLASHES, "");
|
|
2315
2283
|
const matchOptions = {
|
|
2316
|
-
dot
|
|
2284
|
+
dot,
|
|
2317
2285
|
nobrace: false === options.braceExpansion,
|
|
2318
|
-
nocase:
|
|
2286
|
+
nocase: !caseSensitiveMatch,
|
|
2319
2287
|
noextglob: false === options.extglob,
|
|
2320
2288
|
noglobstar: false === options.globstar,
|
|
2321
2289
|
posix: true
|
|
2322
2290
|
};
|
|
2323
|
-
const matcher = picomatch(processed.match,
|
|
2324
|
-
...matchOptions,
|
|
2325
|
-
ignore: processed.ignore
|
|
2326
|
-
});
|
|
2291
|
+
const matcher = picomatch(processed.match, matchOptions);
|
|
2327
2292
|
const ignore = picomatch(processed.ignore, matchOptions);
|
|
2328
2293
|
const partialMatcher = getPartialMatcher(processed.match, matchOptions);
|
|
2329
|
-
const format = buildFormat(cwd,
|
|
2330
|
-
const
|
|
2331
|
-
const
|
|
2294
|
+
const format = buildFormat(cwd, root, absolute);
|
|
2295
|
+
const excludeFormatter = absolute ? format : buildFormat(cwd, root, true);
|
|
2296
|
+
const excludePredicate = (_, p)=>{
|
|
2297
|
+
const relativePath = excludeFormatter(p, true);
|
|
2298
|
+
return "." !== relativePath && !partialMatcher(relativePath) || ignore(relativePath);
|
|
2299
|
+
};
|
|
2300
|
+
let maxDepth;
|
|
2301
|
+
if (void 0 !== options.deep) maxDepth = Math.round(options.deep - props.depthOffset);
|
|
2302
|
+
const crawler = new Builder({
|
|
2332
2303
|
filters: [
|
|
2333
|
-
|
|
2334
|
-
const path
|
|
2335
|
-
const matches = matcher(path
|
|
2336
|
-
if (matches) log(`matched ${path
|
|
2304
|
+
debug ? (p, isDirectory)=>{
|
|
2305
|
+
const path = format(p, isDirectory);
|
|
2306
|
+
const matches = matcher(path) && !ignore(path);
|
|
2307
|
+
if (matches) log(`matched ${path}`);
|
|
2337
2308
|
return matches;
|
|
2338
|
-
} : (p, isDirectory)=>
|
|
2309
|
+
} : (p, isDirectory)=>{
|
|
2310
|
+
const path = format(p, isDirectory);
|
|
2311
|
+
return matcher(path) && !ignore(path);
|
|
2312
|
+
}
|
|
2339
2313
|
],
|
|
2340
|
-
exclude:
|
|
2341
|
-
const
|
|
2342
|
-
|
|
2343
|
-
skipped ? log(`skipped ${p}`) : log(`crawling ${p}`);
|
|
2314
|
+
exclude: debug ? (_, p)=>{
|
|
2315
|
+
const skipped = excludePredicate(_, p);
|
|
2316
|
+
log(`${skipped ? "skipped" : "crawling"} ${p}`);
|
|
2344
2317
|
return skipped;
|
|
2345
|
-
} :
|
|
2346
|
-
|
|
2347
|
-
return "." !== relativePath && !partialMatcher(relativePath) || ignore(relativePath);
|
|
2348
|
-
},
|
|
2349
|
-
fs: options.fs ? {
|
|
2350
|
-
readdir: options.fs.readdir || node_fs.readdir,
|
|
2351
|
-
readdirSync: options.fs.readdirSync || node_fs.readdirSync,
|
|
2352
|
-
realpath: options.fs.realpath || node_fs.realpath,
|
|
2353
|
-
realpathSync: options.fs.realpathSync || node_fs.realpathSync,
|
|
2354
|
-
stat: options.fs.stat || node_fs.stat,
|
|
2355
|
-
statSync: options.fs.statSync || node_fs.statSync
|
|
2356
|
-
} : void 0,
|
|
2318
|
+
} : excludePredicate,
|
|
2319
|
+
fs: options.fs,
|
|
2357
2320
|
pathSeparator: "/",
|
|
2358
|
-
relativePaths:
|
|
2359
|
-
|
|
2321
|
+
relativePaths: !absolute,
|
|
2322
|
+
resolvePaths: absolute,
|
|
2323
|
+
includeBasePath: absolute,
|
|
2324
|
+
resolveSymlinks: followSymbolicLinks,
|
|
2325
|
+
excludeSymlinks: !followSymbolicLinks,
|
|
2326
|
+
excludeFiles: onlyDirectories,
|
|
2327
|
+
includeDirs: onlyDirectories || !options.onlyFiles,
|
|
2328
|
+
maxDepth,
|
|
2360
2329
|
signal: options.signal
|
|
2361
|
-
};
|
|
2362
|
-
if (
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
fdirOptions.includeBasePath = true;
|
|
2367
|
-
}
|
|
2368
|
-
if (false === options.followSymbolicLinks) {
|
|
2369
|
-
fdirOptions.resolveSymlinks = false;
|
|
2370
|
-
fdirOptions.excludeSymlinks = true;
|
|
2371
|
-
}
|
|
2372
|
-
if (options.onlyDirectories) {
|
|
2373
|
-
fdirOptions.excludeFiles = true;
|
|
2374
|
-
fdirOptions.includeDirs = true;
|
|
2375
|
-
} else if (false === options.onlyFiles) fdirOptions.includeDirs = true;
|
|
2376
|
-
props.root = props.root.replace(BACKSLASHES, "");
|
|
2377
|
-
const root = props.root;
|
|
2378
|
-
if (options.debug) log("internal properties:", props);
|
|
2379
|
-
const relative = cwd !== root && !options.absolute && buildRelative(cwd, props.root);
|
|
2330
|
+
}).crawl(root);
|
|
2331
|
+
if (options.debug) log("internal properties:", {
|
|
2332
|
+
...props,
|
|
2333
|
+
root
|
|
2334
|
+
});
|
|
2380
2335
|
return [
|
|
2381
|
-
|
|
2382
|
-
|
|
2336
|
+
crawler,
|
|
2337
|
+
cwd !== root && !absolute && buildRelative(cwd, root)
|
|
2383
2338
|
];
|
|
2384
2339
|
}
|
|
2385
|
-
|
|
2386
|
-
if (
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2340
|
+
function formatPaths(paths, mapper) {
|
|
2341
|
+
if (mapper) for(let i = paths.length - 1; i >= 0; i--)paths[i] = mapper(paths[i]);
|
|
2342
|
+
return paths;
|
|
2343
|
+
}
|
|
2344
|
+
const defaultOptions = {
|
|
2345
|
+
caseSensitiveMatch: true,
|
|
2346
|
+
cwd: process.cwd(),
|
|
2347
|
+
debug: !!process.env.TINYGLOBBY_DEBUG,
|
|
2348
|
+
expandDirectories: true,
|
|
2349
|
+
followSymbolicLinks: true,
|
|
2350
|
+
onlyFiles: true
|
|
2351
|
+
};
|
|
2352
|
+
function getOptions(options) {
|
|
2353
|
+
const opts = {
|
|
2354
|
+
...defaultOptions,
|
|
2355
|
+
...options
|
|
2356
|
+
};
|
|
2357
|
+
opts.cwd = (opts.cwd instanceof URL ? fileURLToPath(opts.cwd) : resolve(opts.cwd)).replace(BACKSLASHES, "/");
|
|
2358
|
+
opts.ignore = ensureStringArray(opts.ignore);
|
|
2359
|
+
opts.fs && (opts.fs = {
|
|
2360
|
+
readdir: opts.fs.readdir || readdir,
|
|
2361
|
+
readdirSync: opts.fs.readdirSync || readdirSync,
|
|
2362
|
+
realpath: opts.fs.realpath || realpath,
|
|
2363
|
+
realpathSync: opts.fs.realpathSync || realpathSync,
|
|
2364
|
+
stat: opts.fs.stat || external_node_fs_stat,
|
|
2365
|
+
statSync: opts.fs.statSync || statSync
|
|
2366
|
+
});
|
|
2367
|
+
if (opts.debug) log("globbing with options:", opts);
|
|
2368
|
+
return opts;
|
|
2369
|
+
}
|
|
2370
|
+
function getCrawler(globInput, inputOptions = {}) {
|
|
2371
|
+
var _ref;
|
|
2372
|
+
if (globInput && (null == inputOptions ? void 0 : inputOptions.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
|
|
2373
|
+
const isModern = isReadonlyArray(globInput) || "string" == typeof globInput;
|
|
2374
|
+
const patterns = ensureStringArray(null != (_ref = isModern ? globInput : globInput.patterns) ? _ref : "**/*");
|
|
2375
|
+
const options = getOptions(isModern ? inputOptions : globInput);
|
|
2376
|
+
return patterns.length > 0 ? buildCrawler(options, patterns) : [];
|
|
2377
|
+
}
|
|
2378
|
+
async function glob(globInput, options) {
|
|
2379
|
+
const [crawler, relative] = getCrawler(globInput, options);
|
|
2380
|
+
return crawler ? formatPaths(await crawler.withPromise(), relative) : [];
|
|
2393
2381
|
}
|
|
2394
2382
|
const filterFiles = (testFiles, filters, dir)=>{
|
|
2395
2383
|
if (!filters.length) return testFiles;
|
package/dist/6830.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
3
2
|
import node_util from "node:util";
|
|
4
3
|
import node_process from "node:process";
|
|
5
4
|
import node_os from "node:os";
|
|
6
5
|
import node_tty from "node:tty";
|
|
6
|
+
import { __webpack_require__ } from "./0~rslib-runtime.js";
|
|
7
7
|
__webpack_require__.add({
|
|
8
8
|
"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js" (module) {
|
|
9
9
|
let p = process || {}, argv = p.argv || [], env = p.env || {};
|
package/dist/7290.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
import { __webpack_require__ } from "./0~rslib-runtime.js";
|
|
3
|
+
import { createRequire as __rspack_createRequire } from "node:module";
|
|
4
|
+
const __rspack_createRequire_require = __rspack_createRequire(import.meta.url);
|
|
5
|
+
__webpack_require__.add({
|
|
6
|
+
util (module) {
|
|
7
|
+
module.exports = __rspack_createRequire_require("node:util");
|
|
8
|
+
},
|
|
9
|
+
timers (module) {
|
|
10
|
+
module.exports = __rspack_createRequire_require("timers");
|
|
11
|
+
},
|
|
12
|
+
"timers/promises" (module) {
|
|
13
|
+
module.exports = __rspack_createRequire_require("timers/promises");
|
|
14
|
+
}
|
|
15
|
+
});
|
package/dist/9743.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
2
|
+
import { __webpack_require__ } from "./0~rslib-runtime.js";
|
|
3
3
|
import { format as dist_format, dist_plugins, node_u } from "./9784.js";
|
|
4
4
|
var diff_namespaceObject = {};
|
|
5
5
|
__webpack_require__.r(diff_namespaceObject);
|
package/dist/9784.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! LICENSE: 9784.js.LICENSE.txt */
|
|
2
2
|
import "node:module";
|
|
3
|
-
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
3
|
+
import { __webpack_require__ } from "./0~rslib-runtime.js";
|
|
4
4
|
import { isatty } from "node:tty";
|
|
5
5
|
var dist_namespaceObject = {};
|
|
6
6
|
__webpack_require__.r(dist_namespaceObject);
|