@kitschpatrol/shared-config 5.7.0 → 5.7.2
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/bin/cli.js +151 -69
- package/package.json +12 -12
package/bin/cli.js
CHANGED
|
@@ -11084,7 +11084,7 @@ var Yargs = YargsFactory(esm_default);
|
|
|
11084
11084
|
var yargs_default = Yargs;
|
|
11085
11085
|
|
|
11086
11086
|
// ../../package.json
|
|
11087
|
-
var version = "5.7.
|
|
11087
|
+
var version = "5.7.2";
|
|
11088
11088
|
|
|
11089
11089
|
// ../../src/execa-utilities.ts
|
|
11090
11090
|
function isErrorExecaError(error) {
|
|
@@ -12356,14 +12356,15 @@ var commandDefinition6 = {
|
|
|
12356
12356
|
order: 8
|
|
12357
12357
|
};
|
|
12358
12358
|
|
|
12359
|
-
// ../../node_modules/.pnpm/globby@
|
|
12359
|
+
// ../../node_modules/.pnpm/globby@15.0.0/node_modules/globby/index.js
|
|
12360
12360
|
import process5 from "node:process";
|
|
12361
12361
|
import fs6 from "node:fs";
|
|
12362
12362
|
import nodePath from "node:path";
|
|
12363
|
+
import { Readable } from "node:stream";
|
|
12363
12364
|
|
|
12364
|
-
// ../../node_modules/.pnpm/@sindresorhus+merge-streams@
|
|
12365
|
+
// ../../node_modules/.pnpm/@sindresorhus+merge-streams@4.0.0/node_modules/@sindresorhus/merge-streams/index.js
|
|
12365
12366
|
import { on, once } from "node:events";
|
|
12366
|
-
import { PassThrough as PassThroughStream } from "node:stream";
|
|
12367
|
+
import { PassThrough as PassThroughStream, getDefaultHighWaterMark } from "node:stream";
|
|
12367
12368
|
import { finished } from "node:stream/promises";
|
|
12368
12369
|
function mergeStreams(streams) {
|
|
12369
12370
|
if (!Array.isArray(streams)) {
|
|
@@ -12382,14 +12383,11 @@ function mergeStreams(streams) {
|
|
|
12382
12383
|
for (const stream of streams) {
|
|
12383
12384
|
passThroughStream.add(stream);
|
|
12384
12385
|
}
|
|
12385
|
-
if (streams.length === 0) {
|
|
12386
|
-
endStream(passThroughStream);
|
|
12387
|
-
}
|
|
12388
12386
|
return passThroughStream;
|
|
12389
12387
|
}
|
|
12390
12388
|
var getHighWaterMark = (streams, objectMode) => {
|
|
12391
12389
|
if (streams.length === 0) {
|
|
12392
|
-
return
|
|
12390
|
+
return getDefaultHighWaterMark(objectMode);
|
|
12393
12391
|
}
|
|
12394
12392
|
const highWaterMarks = streams.filter(({ readableObjectMode }) => readableObjectMode === objectMode).map(({ readableHighWaterMark }) => readableHighWaterMark);
|
|
12395
12393
|
return Math.max(...highWaterMarks);
|
|
@@ -12399,39 +12397,49 @@ var MergedStream = class extends PassThroughStream {
|
|
|
12399
12397
|
#ended = /* @__PURE__ */ new Set([]);
|
|
12400
12398
|
#aborted = /* @__PURE__ */ new Set([]);
|
|
12401
12399
|
#onFinished;
|
|
12400
|
+
#unpipeEvent = Symbol("unpipe");
|
|
12401
|
+
#streamPromises = /* @__PURE__ */ new WeakMap();
|
|
12402
12402
|
add(stream) {
|
|
12403
12403
|
validateStream(stream);
|
|
12404
12404
|
if (this.#streams.has(stream)) {
|
|
12405
12405
|
return;
|
|
12406
12406
|
}
|
|
12407
12407
|
this.#streams.add(stream);
|
|
12408
|
-
this.#onFinished ??= onMergedStreamFinished(this, this.#streams);
|
|
12409
|
-
endWhenStreamsDone({
|
|
12408
|
+
this.#onFinished ??= onMergedStreamFinished(this, this.#streams, this.#unpipeEvent);
|
|
12409
|
+
const streamPromise = endWhenStreamsDone({
|
|
12410
12410
|
passThroughStream: this,
|
|
12411
12411
|
stream,
|
|
12412
12412
|
streams: this.#streams,
|
|
12413
12413
|
ended: this.#ended,
|
|
12414
12414
|
aborted: this.#aborted,
|
|
12415
|
-
onFinished: this.#onFinished
|
|
12415
|
+
onFinished: this.#onFinished,
|
|
12416
|
+
unpipeEvent: this.#unpipeEvent
|
|
12416
12417
|
});
|
|
12418
|
+
this.#streamPromises.set(stream, streamPromise);
|
|
12417
12419
|
stream.pipe(this, { end: false });
|
|
12418
12420
|
}
|
|
12419
|
-
remove(stream) {
|
|
12421
|
+
async remove(stream) {
|
|
12420
12422
|
validateStream(stream);
|
|
12421
12423
|
if (!this.#streams.has(stream)) {
|
|
12422
12424
|
return false;
|
|
12423
12425
|
}
|
|
12426
|
+
const streamPromise = this.#streamPromises.get(stream);
|
|
12427
|
+
if (streamPromise === void 0) {
|
|
12428
|
+
return false;
|
|
12429
|
+
}
|
|
12430
|
+
this.#streamPromises.delete(stream);
|
|
12424
12431
|
stream.unpipe(this);
|
|
12432
|
+
await streamPromise;
|
|
12425
12433
|
return true;
|
|
12426
12434
|
}
|
|
12427
12435
|
};
|
|
12428
|
-
var onMergedStreamFinished = async (passThroughStream, streams) => {
|
|
12436
|
+
var onMergedStreamFinished = async (passThroughStream, streams, unpipeEvent) => {
|
|
12429
12437
|
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_COUNT);
|
|
12430
12438
|
const controller = new AbortController();
|
|
12431
12439
|
try {
|
|
12432
12440
|
await Promise.race([
|
|
12433
12441
|
onMergedStreamEnd(passThroughStream, controller),
|
|
12434
|
-
onInputStreamsUnpipe(passThroughStream, streams, controller)
|
|
12442
|
+
onInputStreamsUnpipe(passThroughStream, streams, unpipeEvent, controller)
|
|
12435
12443
|
]);
|
|
12436
12444
|
} finally {
|
|
12437
12445
|
controller.abort();
|
|
@@ -12439,9 +12447,14 @@ var onMergedStreamFinished = async (passThroughStream, streams) => {
|
|
|
12439
12447
|
}
|
|
12440
12448
|
};
|
|
12441
12449
|
var onMergedStreamEnd = async (passThroughStream, { signal }) => {
|
|
12442
|
-
|
|
12450
|
+
try {
|
|
12451
|
+
await finished(passThroughStream, { signal, cleanup: true });
|
|
12452
|
+
} catch (error) {
|
|
12453
|
+
errorOrAbortStream(passThroughStream, error);
|
|
12454
|
+
throw error;
|
|
12455
|
+
}
|
|
12443
12456
|
};
|
|
12444
|
-
var onInputStreamsUnpipe = async (passThroughStream, streams, { signal }) => {
|
|
12457
|
+
var onInputStreamsUnpipe = async (passThroughStream, streams, unpipeEvent, { signal }) => {
|
|
12445
12458
|
for await (const [unpipedStream] of on(passThroughStream, "unpipe", { signal })) {
|
|
12446
12459
|
if (streams.has(unpipedStream)) {
|
|
12447
12460
|
unpipedStream.emit(unpipeEvent);
|
|
@@ -12453,20 +12466,34 @@ var validateStream = (stream) => {
|
|
|
12453
12466
|
throw new TypeError(`Expected a readable stream, got: \`${typeof stream}\`.`);
|
|
12454
12467
|
}
|
|
12455
12468
|
};
|
|
12456
|
-
var endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted, onFinished }) => {
|
|
12469
|
+
var endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, aborted, onFinished, unpipeEvent }) => {
|
|
12457
12470
|
updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
12458
12471
|
const controller = new AbortController();
|
|
12459
12472
|
try {
|
|
12460
12473
|
await Promise.race([
|
|
12461
|
-
afterMergedStreamFinished(onFinished, stream),
|
|
12462
|
-
onInputStreamEnd({
|
|
12463
|
-
|
|
12474
|
+
afterMergedStreamFinished(onFinished, stream, controller),
|
|
12475
|
+
onInputStreamEnd({
|
|
12476
|
+
passThroughStream,
|
|
12477
|
+
stream,
|
|
12478
|
+
streams,
|
|
12479
|
+
ended,
|
|
12480
|
+
aborted,
|
|
12481
|
+
controller
|
|
12482
|
+
}),
|
|
12483
|
+
onInputStreamUnpipe({
|
|
12484
|
+
stream,
|
|
12485
|
+
streams,
|
|
12486
|
+
ended,
|
|
12487
|
+
aborted,
|
|
12488
|
+
unpipeEvent,
|
|
12489
|
+
controller
|
|
12490
|
+
})
|
|
12464
12491
|
]);
|
|
12465
12492
|
} finally {
|
|
12466
12493
|
controller.abort();
|
|
12467
12494
|
updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM);
|
|
12468
12495
|
}
|
|
12469
|
-
if (streams.size === ended.size + aborted.size) {
|
|
12496
|
+
if (streams.size > 0 && streams.size === ended.size + aborted.size) {
|
|
12470
12497
|
if (ended.size === 0 && aborted.size > 0) {
|
|
12471
12498
|
abortStream(passThroughStream);
|
|
12472
12499
|
} else {
|
|
@@ -12474,22 +12501,26 @@ var endWhenStreamsDone = async ({ passThroughStream, stream, streams, ended, abo
|
|
|
12474
12501
|
}
|
|
12475
12502
|
}
|
|
12476
12503
|
};
|
|
12477
|
-
var
|
|
12478
|
-
var afterMergedStreamFinished = async (onFinished, stream) => {
|
|
12504
|
+
var afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
|
|
12479
12505
|
try {
|
|
12480
12506
|
await onFinished;
|
|
12481
|
-
|
|
12482
|
-
} catch (error) {
|
|
12483
|
-
if (isAbortError(error)) {
|
|
12507
|
+
if (!signal.aborted) {
|
|
12484
12508
|
abortStream(stream);
|
|
12485
|
-
}
|
|
12486
|
-
|
|
12509
|
+
}
|
|
12510
|
+
} catch (error) {
|
|
12511
|
+
if (!signal.aborted) {
|
|
12512
|
+
errorOrAbortStream(stream, error);
|
|
12487
12513
|
}
|
|
12488
12514
|
}
|
|
12489
12515
|
};
|
|
12490
12516
|
var onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted, controller: { signal } }) => {
|
|
12491
12517
|
try {
|
|
12492
|
-
await finished(stream, {
|
|
12518
|
+
await finished(stream, {
|
|
12519
|
+
signal,
|
|
12520
|
+
cleanup: true,
|
|
12521
|
+
readable: true,
|
|
12522
|
+
writable: false
|
|
12523
|
+
});
|
|
12493
12524
|
if (streams.has(stream)) {
|
|
12494
12525
|
ended.add(stream);
|
|
12495
12526
|
}
|
|
@@ -12504,18 +12535,28 @@ var onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, abort
|
|
|
12504
12535
|
}
|
|
12505
12536
|
}
|
|
12506
12537
|
};
|
|
12507
|
-
var onInputStreamUnpipe = async ({ stream, streams, ended, aborted, controller: { signal } }) => {
|
|
12538
|
+
var onInputStreamUnpipe = async ({ stream, streams, ended, aborted, unpipeEvent, controller: { signal } }) => {
|
|
12508
12539
|
await once(stream, unpipeEvent, { signal });
|
|
12540
|
+
if (!stream.readable) {
|
|
12541
|
+
return once(signal, "abort", { signal });
|
|
12542
|
+
}
|
|
12509
12543
|
streams.delete(stream);
|
|
12510
12544
|
ended.delete(stream);
|
|
12511
12545
|
aborted.delete(stream);
|
|
12512
12546
|
};
|
|
12513
|
-
var unpipeEvent = Symbol("unpipe");
|
|
12514
12547
|
var endStream = (stream) => {
|
|
12515
12548
|
if (stream.writable) {
|
|
12516
12549
|
stream.end();
|
|
12517
12550
|
}
|
|
12518
12551
|
};
|
|
12552
|
+
var errorOrAbortStream = (stream, error) => {
|
|
12553
|
+
if (isAbortError(error)) {
|
|
12554
|
+
abortStream(stream);
|
|
12555
|
+
} else {
|
|
12556
|
+
errorStream(stream, error);
|
|
12557
|
+
}
|
|
12558
|
+
};
|
|
12559
|
+
var isAbortError = (error) => error?.code === "ERR_STREAM_PREMATURE_CLOSE";
|
|
12519
12560
|
var abortStream = (stream) => {
|
|
12520
12561
|
if (stream.readable || stream.writable) {
|
|
12521
12562
|
stream.destroy();
|
|
@@ -12538,7 +12579,7 @@ var updateMaxListeners = (passThroughStream, increment2) => {
|
|
|
12538
12579
|
var PASSTHROUGH_LISTENERS_COUNT = 2;
|
|
12539
12580
|
var PASSTHROUGH_LISTENERS_PER_STREAM = 1;
|
|
12540
12581
|
|
|
12541
|
-
// ../../node_modules/.pnpm/globby@
|
|
12582
|
+
// ../../node_modules/.pnpm/globby@15.0.0/node_modules/globby/index.js
|
|
12542
12583
|
var import_fast_glob2 = __toESM(require_out4(), 1);
|
|
12543
12584
|
|
|
12544
12585
|
// ../../node_modules/.pnpm/path-type@6.0.0/node_modules/path-type/index.js
|
|
@@ -12588,7 +12629,7 @@ function toPath2(urlOrPath) {
|
|
|
12588
12629
|
}
|
|
12589
12630
|
var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
12590
12631
|
|
|
12591
|
-
// ../../node_modules/.pnpm/globby@
|
|
12632
|
+
// ../../node_modules/.pnpm/globby@15.0.0/node_modules/globby/ignore.js
|
|
12592
12633
|
var import_fast_glob = __toESM(require_out4(), 1);
|
|
12593
12634
|
var import_ignore = __toESM(require_ignore(), 1);
|
|
12594
12635
|
import process4 from "node:process";
|
|
@@ -12605,10 +12646,10 @@ function slash(path10) {
|
|
|
12605
12646
|
return path10.replace(/\\/g, "/");
|
|
12606
12647
|
}
|
|
12607
12648
|
|
|
12608
|
-
// ../../node_modules/.pnpm/globby@
|
|
12649
|
+
// ../../node_modules/.pnpm/globby@15.0.0/node_modules/globby/utilities.js
|
|
12609
12650
|
var isNegativePattern = (pattern) => pattern[0] === "!";
|
|
12610
12651
|
|
|
12611
|
-
// ../../node_modules/.pnpm/globby@
|
|
12652
|
+
// ../../node_modules/.pnpm/globby@15.0.0/node_modules/globby/ignore.js
|
|
12612
12653
|
var defaultIgnoredDirectories = [
|
|
12613
12654
|
"**/node_modules",
|
|
12614
12655
|
"**/flow-typed",
|
|
@@ -12620,7 +12661,24 @@ var ignoreFilesGlobOptions = {
|
|
|
12620
12661
|
dot: true
|
|
12621
12662
|
};
|
|
12622
12663
|
var GITIGNORE_FILES_PATTERN = "**/.gitignore";
|
|
12623
|
-
var applyBaseToPattern = (pattern, base) =>
|
|
12664
|
+
var applyBaseToPattern = (pattern, base) => {
|
|
12665
|
+
if (!base) {
|
|
12666
|
+
return pattern;
|
|
12667
|
+
}
|
|
12668
|
+
const isNegative = isNegativePattern(pattern);
|
|
12669
|
+
const cleanPattern = isNegative ? pattern.slice(1) : pattern;
|
|
12670
|
+
const slashIndex = cleanPattern.indexOf("/");
|
|
12671
|
+
const hasNonTrailingSlash = slashIndex !== -1 && slashIndex !== cleanPattern.length - 1;
|
|
12672
|
+
let result;
|
|
12673
|
+
if (!hasNonTrailingSlash) {
|
|
12674
|
+
result = path7.posix.join(base, "**", cleanPattern);
|
|
12675
|
+
} else if (cleanPattern.startsWith("/")) {
|
|
12676
|
+
result = path7.posix.join(base, cleanPattern.slice(1));
|
|
12677
|
+
} else {
|
|
12678
|
+
result = path7.posix.join(base, cleanPattern);
|
|
12679
|
+
}
|
|
12680
|
+
return isNegative ? "!" + result : result;
|
|
12681
|
+
};
|
|
12624
12682
|
var parseIgnoreFile = (file, cwd) => {
|
|
12625
12683
|
const base = slash(path7.relative(cwd, path7.dirname(file.filePath)));
|
|
12626
12684
|
return file.content.split(/\r?\n/).filter((line) => line && !line.startsWith("#")).map((pattern) => applyBaseToPattern(pattern, base));
|
|
@@ -12633,6 +12691,12 @@ var toRelativePath = (fileOrDirectory, cwd) => {
|
|
|
12633
12691
|
}
|
|
12634
12692
|
throw new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`);
|
|
12635
12693
|
}
|
|
12694
|
+
if (fileOrDirectory.startsWith("./")) {
|
|
12695
|
+
return fileOrDirectory.slice(2);
|
|
12696
|
+
}
|
|
12697
|
+
if (fileOrDirectory.startsWith("../")) {
|
|
12698
|
+
return void 0;
|
|
12699
|
+
}
|
|
12636
12700
|
return fileOrDirectory;
|
|
12637
12701
|
};
|
|
12638
12702
|
var getIsIgnoredPredicate = (files, cwd) => {
|
|
@@ -12641,6 +12705,9 @@ var getIsIgnoredPredicate = (files, cwd) => {
|
|
|
12641
12705
|
return (fileOrDirectory) => {
|
|
12642
12706
|
fileOrDirectory = toPath2(fileOrDirectory);
|
|
12643
12707
|
fileOrDirectory = toRelativePath(fileOrDirectory, cwd);
|
|
12708
|
+
if (fileOrDirectory === void 0) {
|
|
12709
|
+
return false;
|
|
12710
|
+
}
|
|
12644
12711
|
return fileOrDirectory ? ignores.ignores(slash(fileOrDirectory)) : false;
|
|
12645
12712
|
};
|
|
12646
12713
|
};
|
|
@@ -12659,12 +12726,10 @@ var isIgnoredByIgnoreFiles = async (patterns, options) => {
|
|
|
12659
12726
|
ignore,
|
|
12660
12727
|
...ignoreFilesGlobOptions
|
|
12661
12728
|
});
|
|
12662
|
-
const files = await Promise.all(
|
|
12663
|
-
|
|
12664
|
-
|
|
12665
|
-
|
|
12666
|
-
}))
|
|
12667
|
-
);
|
|
12729
|
+
const files = await Promise.all(paths.map(async (filePath) => ({
|
|
12730
|
+
filePath,
|
|
12731
|
+
content: await fsPromises3.readFile(filePath, "utf8")
|
|
12732
|
+
})));
|
|
12668
12733
|
return getIsIgnoredPredicate(files, cwd);
|
|
12669
12734
|
};
|
|
12670
12735
|
var isIgnoredByIgnoreFilesSync = (patterns, options) => {
|
|
@@ -12683,7 +12748,7 @@ var isIgnoredByIgnoreFilesSync = (patterns, options) => {
|
|
|
12683
12748
|
return getIsIgnoredPredicate(files, cwd);
|
|
12684
12749
|
};
|
|
12685
12750
|
|
|
12686
|
-
// ../../node_modules/.pnpm/globby@
|
|
12751
|
+
// ../../node_modules/.pnpm/globby@15.0.0/node_modules/globby/index.js
|
|
12687
12752
|
var assertPatternsInput = (patterns) => {
|
|
12688
12753
|
if (patterns.some((pattern) => typeof pattern !== "string")) {
|
|
12689
12754
|
throw new TypeError("Patterns must be a string or an array of strings");
|
|
@@ -12693,6 +12758,16 @@ var normalizePathForDirectoryGlob = (filePath, cwd) => {
|
|
|
12693
12758
|
const path10 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
|
|
12694
12759
|
return nodePath.isAbsolute(path10) ? path10 : nodePath.join(cwd, path10);
|
|
12695
12760
|
};
|
|
12761
|
+
var shouldExpandGlobstarDirectory = (pattern) => {
|
|
12762
|
+
const match = pattern?.match(/\*\*\/([^/]+)$/);
|
|
12763
|
+
if (!match) {
|
|
12764
|
+
return false;
|
|
12765
|
+
}
|
|
12766
|
+
const dirname3 = match[1];
|
|
12767
|
+
const hasWildcards = /[*?[\]{}]/.test(dirname3);
|
|
12768
|
+
const hasExtension = nodePath.extname(dirname3) && !dirname3.startsWith(".");
|
|
12769
|
+
return !hasWildcards && !hasExtension;
|
|
12770
|
+
};
|
|
12696
12771
|
var getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
12697
12772
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
12698
12773
|
return files ? files.map((file) => nodePath.posix.join(directoryPath, `**/${nodePath.extname(file) ? file : `${file}${extensionGlob}`}`)) : [nodePath.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
|
|
@@ -12702,16 +12777,28 @@ var directoryToGlob = async (directoryPaths, {
|
|
|
12702
12777
|
files,
|
|
12703
12778
|
extensions
|
|
12704
12779
|
} = {}) => {
|
|
12705
|
-
const globs = await Promise.all(
|
|
12706
|
-
|
|
12707
|
-
|
|
12780
|
+
const globs = await Promise.all(directoryPaths.map(async (directoryPath) => {
|
|
12781
|
+
const checkPattern = isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath;
|
|
12782
|
+
if (shouldExpandGlobstarDirectory(checkPattern)) {
|
|
12783
|
+
return getDirectoryGlob({ directoryPath, files, extensions });
|
|
12784
|
+
}
|
|
12785
|
+
const pathToCheck = normalizePathForDirectoryGlob(directoryPath, cwd);
|
|
12786
|
+
return await isDirectory(pathToCheck) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath;
|
|
12787
|
+
}));
|
|
12708
12788
|
return globs.flat();
|
|
12709
12789
|
};
|
|
12710
12790
|
var directoryToGlobSync = (directoryPaths, {
|
|
12711
12791
|
cwd = process5.cwd(),
|
|
12712
12792
|
files,
|
|
12713
12793
|
extensions
|
|
12714
|
-
} = {}) => directoryPaths.flatMap((directoryPath) =>
|
|
12794
|
+
} = {}) => directoryPaths.flatMap((directoryPath) => {
|
|
12795
|
+
const checkPattern = isNegativePattern(directoryPath) ? directoryPath.slice(1) : directoryPath;
|
|
12796
|
+
if (shouldExpandGlobstarDirectory(checkPattern)) {
|
|
12797
|
+
return getDirectoryGlob({ directoryPath, files, extensions });
|
|
12798
|
+
}
|
|
12799
|
+
const pathToCheck = normalizePathForDirectoryGlob(directoryPath, cwd);
|
|
12800
|
+
return isDirectorySync(pathToCheck) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath;
|
|
12801
|
+
});
|
|
12715
12802
|
var toPatternsArray = (patterns) => {
|
|
12716
12803
|
patterns = [...new Set([patterns].flat())];
|
|
12717
12804
|
assertPatternsInput(patterns);
|
|
@@ -12753,15 +12840,11 @@ var getIgnoreFilesPatterns = (options) => {
|
|
|
12753
12840
|
};
|
|
12754
12841
|
var getFilter = async (options) => {
|
|
12755
12842
|
const ignoreFilesPatterns = getIgnoreFilesPatterns(options);
|
|
12756
|
-
return createFilterFunction(
|
|
12757
|
-
ignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, options)
|
|
12758
|
-
);
|
|
12843
|
+
return createFilterFunction(ignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, options));
|
|
12759
12844
|
};
|
|
12760
12845
|
var getFilterSync = (options) => {
|
|
12761
12846
|
const ignoreFilesPatterns = getIgnoreFilesPatterns(options);
|
|
12762
|
-
return createFilterFunction(
|
|
12763
|
-
ignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, options)
|
|
12764
|
-
);
|
|
12847
|
+
return createFilterFunction(ignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, options));
|
|
12765
12848
|
};
|
|
12766
12849
|
var createFilterFunction = (isIgnored) => {
|
|
12767
12850
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -12814,19 +12897,17 @@ var generateTasks = async (patterns, options) => {
|
|
|
12814
12897
|
return globTasks;
|
|
12815
12898
|
}
|
|
12816
12899
|
const directoryToGlobOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd);
|
|
12817
|
-
return Promise.all(
|
|
12818
|
-
|
|
12819
|
-
|
|
12820
|
-
|
|
12821
|
-
|
|
12822
|
-
|
|
12823
|
-
|
|
12824
|
-
|
|
12825
|
-
|
|
12826
|
-
|
|
12827
|
-
|
|
12828
|
-
})
|
|
12829
|
-
);
|
|
12900
|
+
return Promise.all(globTasks.map(async (task) => {
|
|
12901
|
+
let { patterns: patterns2, options: options2 } = task;
|
|
12902
|
+
[
|
|
12903
|
+
patterns2,
|
|
12904
|
+
options2.ignore
|
|
12905
|
+
] = await Promise.all([
|
|
12906
|
+
directoryToGlob(patterns2, directoryToGlobOptions),
|
|
12907
|
+
directoryToGlob(options2.ignore, { cwd })
|
|
12908
|
+
]);
|
|
12909
|
+
return { patterns: patterns2, options: options2 };
|
|
12910
|
+
}));
|
|
12830
12911
|
};
|
|
12831
12912
|
var generateTasksSync = (patterns, options) => {
|
|
12832
12913
|
const globTasks = convertNegativePatterns(patterns, options);
|
|
@@ -12863,12 +12944,13 @@ var globbyStream = normalizeArgumentsSync((patterns, options) => {
|
|
|
12863
12944
|
const tasks = generateTasksSync(patterns, options);
|
|
12864
12945
|
const filter = getFilterSync(options);
|
|
12865
12946
|
const streams = tasks.map((task) => import_fast_glob2.default.stream(task.patterns, task.options));
|
|
12947
|
+
if (streams.length === 0) {
|
|
12948
|
+
return Readable.from([]);
|
|
12949
|
+
}
|
|
12866
12950
|
const stream = mergeStreams(streams).filter((fastGlobResult) => filter(fastGlobResult));
|
|
12867
12951
|
return stream;
|
|
12868
12952
|
});
|
|
12869
|
-
var isDynamicPattern = normalizeArgumentsSync(
|
|
12870
|
-
(patterns, options) => patterns.some((pattern) => import_fast_glob2.default.isDynamicPattern(pattern, options))
|
|
12871
|
-
);
|
|
12953
|
+
var isDynamicPattern = normalizeArgumentsSync((patterns, options) => patterns.some((pattern) => import_fast_glob2.default.isDynamicPattern(pattern, options)));
|
|
12872
12954
|
var generateGlobTasks = normalizeArguments(generateTasks);
|
|
12873
12955
|
var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);
|
|
12874
12956
|
var { convertPathToPattern } = import_fast_glob2.default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/shared-config",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.2",
|
|
4
4
|
"description": "A collection of shared configurations, linters, and formatting tools for TypeScript projects. All managed as a single dependency, and invoked via a single CLI command.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shared-config",
|
|
@@ -42,20 +42,20 @@
|
|
|
42
42
|
"cosmiconfig-typescript-loader": "^6.1.0",
|
|
43
43
|
"execa": "^9.6.0",
|
|
44
44
|
"find-workspaces": "^0.3.1",
|
|
45
|
-
"fs-extra": "^11.3.
|
|
45
|
+
"fs-extra": "^11.3.2",
|
|
46
46
|
"prettier": "^3.6.2",
|
|
47
|
-
"@kitschpatrol/cspell-config": "5.7.
|
|
48
|
-
"@kitschpatrol/
|
|
49
|
-
"@kitschpatrol/
|
|
50
|
-
"@kitschpatrol/
|
|
51
|
-
"@kitschpatrol/
|
|
52
|
-
"@kitschpatrol/
|
|
53
|
-
"@kitschpatrol/
|
|
54
|
-
"@kitschpatrol/
|
|
55
|
-
"@kitschpatrol/
|
|
47
|
+
"@kitschpatrol/cspell-config": "5.7.2",
|
|
48
|
+
"@kitschpatrol/eslint-config": "5.7.2",
|
|
49
|
+
"@kitschpatrol/mdat-config": "5.7.2",
|
|
50
|
+
"@kitschpatrol/prettier-config": "5.7.2",
|
|
51
|
+
"@kitschpatrol/stylelint-config": "5.7.2",
|
|
52
|
+
"@kitschpatrol/remark-config": "5.7.2",
|
|
53
|
+
"@kitschpatrol/knip-config": "5.7.2",
|
|
54
|
+
"@kitschpatrol/repo-config": "5.7.2",
|
|
55
|
+
"@kitschpatrol/typescript-config": "5.7.2"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"globby": "^
|
|
58
|
+
"globby": "^15.0.0",
|
|
59
59
|
"picocolors": "^1.1.1"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|