@kitschpatrol/shared-config 5.1.0 → 5.3.0
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 +152 -107
- package/package.json +10 -10
- package/readme.md +1 -1
package/bin/cli.js
CHANGED
|
@@ -208,7 +208,7 @@ var require_path = __commonJS({
|
|
|
208
208
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
209
209
|
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
|
|
210
210
|
var os2 = __require("os");
|
|
211
|
-
var
|
|
211
|
+
var path10 = __require("path");
|
|
212
212
|
var IS_WINDOWS_PLATFORM = os2.platform() === "win32";
|
|
213
213
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
214
214
|
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
@@ -220,7 +220,7 @@ var require_path = __commonJS({
|
|
|
220
220
|
}
|
|
221
221
|
exports.unixify = unixify;
|
|
222
222
|
function makeAbsolute(cwd, filepath) {
|
|
223
|
-
return
|
|
223
|
+
return path10.resolve(cwd, filepath);
|
|
224
224
|
}
|
|
225
225
|
exports.makeAbsolute = makeAbsolute;
|
|
226
226
|
function removeLeadingDotSegment(entry) {
|
|
@@ -1517,7 +1517,7 @@ var require_braces = __commonJS({
|
|
|
1517
1517
|
var require_constants2 = __commonJS({
|
|
1518
1518
|
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"(exports, module) {
|
|
1519
1519
|
"use strict";
|
|
1520
|
-
var
|
|
1520
|
+
var path10 = __require("path");
|
|
1521
1521
|
var WIN_SLASH = "\\\\/";
|
|
1522
1522
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
1523
1523
|
var DOT_LITERAL = "\\.";
|
|
@@ -1687,7 +1687,7 @@ var require_constants2 = __commonJS({
|
|
|
1687
1687
|
/* | */
|
|
1688
1688
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
1689
1689
|
/* \uFEFF */
|
|
1690
|
-
SEP:
|
|
1690
|
+
SEP: path10.sep,
|
|
1691
1691
|
/**
|
|
1692
1692
|
* Create EXTGLOB_CHARS
|
|
1693
1693
|
*/
|
|
@@ -1714,7 +1714,7 @@ var require_constants2 = __commonJS({
|
|
|
1714
1714
|
var require_utils2 = __commonJS({
|
|
1715
1715
|
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"(exports) {
|
|
1716
1716
|
"use strict";
|
|
1717
|
-
var
|
|
1717
|
+
var path10 = __require("path");
|
|
1718
1718
|
var win32 = process.platform === "win32";
|
|
1719
1719
|
var {
|
|
1720
1720
|
REGEX_BACKSLASH,
|
|
@@ -1743,7 +1743,7 @@ var require_utils2 = __commonJS({
|
|
|
1743
1743
|
if (options && typeof options.windows === "boolean") {
|
|
1744
1744
|
return options.windows;
|
|
1745
1745
|
}
|
|
1746
|
-
return win32 === true ||
|
|
1746
|
+
return win32 === true || path10.sep === "\\";
|
|
1747
1747
|
};
|
|
1748
1748
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
1749
1749
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -2878,7 +2878,7 @@ var require_parse2 = __commonJS({
|
|
|
2878
2878
|
var require_picomatch = __commonJS({
|
|
2879
2879
|
"../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js"(exports, module) {
|
|
2880
2880
|
"use strict";
|
|
2881
|
-
var
|
|
2881
|
+
var path10 = __require("path");
|
|
2882
2882
|
var scan = require_scan();
|
|
2883
2883
|
var parse = require_parse2();
|
|
2884
2884
|
var utils = require_utils2();
|
|
@@ -2963,7 +2963,7 @@ var require_picomatch = __commonJS({
|
|
|
2963
2963
|
};
|
|
2964
2964
|
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
2965
2965
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
2966
|
-
return regex.test(
|
|
2966
|
+
return regex.test(path10.basename(input));
|
|
2967
2967
|
};
|
|
2968
2968
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
2969
2969
|
picomatch.parse = (pattern, options) => {
|
|
@@ -3190,7 +3190,7 @@ var require_pattern = __commonJS({
|
|
|
3190
3190
|
"use strict";
|
|
3191
3191
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3192
3192
|
exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
|
|
3193
|
-
var
|
|
3193
|
+
var path10 = __require("path");
|
|
3194
3194
|
var globParent = require_glob_parent();
|
|
3195
3195
|
var micromatch = require_micromatch();
|
|
3196
3196
|
var GLOBSTAR = "**";
|
|
@@ -3285,7 +3285,7 @@ var require_pattern = __commonJS({
|
|
|
3285
3285
|
}
|
|
3286
3286
|
exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
3287
3287
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
3288
|
-
const basename2 =
|
|
3288
|
+
const basename2 = path10.basename(pattern);
|
|
3289
3289
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename2);
|
|
3290
3290
|
}
|
|
3291
3291
|
exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
@@ -3343,7 +3343,7 @@ var require_pattern = __commonJS({
|
|
|
3343
3343
|
}
|
|
3344
3344
|
exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
3345
3345
|
function isAbsolute(pattern) {
|
|
3346
|
-
return
|
|
3346
|
+
return path10.isAbsolute(pattern);
|
|
3347
3347
|
}
|
|
3348
3348
|
exports.isAbsolute = isAbsolute;
|
|
3349
3349
|
}
|
|
@@ -3520,8 +3520,8 @@ var require_utils3 = __commonJS({
|
|
|
3520
3520
|
exports.errno = errno;
|
|
3521
3521
|
var fs8 = require_fs();
|
|
3522
3522
|
exports.fs = fs8;
|
|
3523
|
-
var
|
|
3524
|
-
exports.path =
|
|
3523
|
+
var path10 = require_path();
|
|
3524
|
+
exports.path = path10;
|
|
3525
3525
|
var pattern = require_pattern();
|
|
3526
3526
|
exports.pattern = pattern;
|
|
3527
3527
|
var stream = require_stream();
|
|
@@ -3633,8 +3633,8 @@ var require_async = __commonJS({
|
|
|
3633
3633
|
"use strict";
|
|
3634
3634
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3635
3635
|
exports.read = void 0;
|
|
3636
|
-
function read(
|
|
3637
|
-
settings.fs.lstat(
|
|
3636
|
+
function read(path10, settings, callback) {
|
|
3637
|
+
settings.fs.lstat(path10, (lstatError, lstat) => {
|
|
3638
3638
|
if (lstatError !== null) {
|
|
3639
3639
|
callFailureCallback(callback, lstatError);
|
|
3640
3640
|
return;
|
|
@@ -3643,7 +3643,7 @@ var require_async = __commonJS({
|
|
|
3643
3643
|
callSuccessCallback(callback, lstat);
|
|
3644
3644
|
return;
|
|
3645
3645
|
}
|
|
3646
|
-
settings.fs.stat(
|
|
3646
|
+
settings.fs.stat(path10, (statError, stat) => {
|
|
3647
3647
|
if (statError !== null) {
|
|
3648
3648
|
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
3649
3649
|
callFailureCallback(callback, statError);
|
|
@@ -3675,13 +3675,13 @@ var require_sync = __commonJS({
|
|
|
3675
3675
|
"use strict";
|
|
3676
3676
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3677
3677
|
exports.read = void 0;
|
|
3678
|
-
function read(
|
|
3679
|
-
const lstat = settings.fs.lstatSync(
|
|
3678
|
+
function read(path10, settings) {
|
|
3679
|
+
const lstat = settings.fs.lstatSync(path10);
|
|
3680
3680
|
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
|
|
3681
3681
|
return lstat;
|
|
3682
3682
|
}
|
|
3683
3683
|
try {
|
|
3684
|
-
const stat = settings.fs.statSync(
|
|
3684
|
+
const stat = settings.fs.statSync(path10);
|
|
3685
3685
|
if (settings.markSymbolicLink) {
|
|
3686
3686
|
stat.isSymbolicLink = () => true;
|
|
3687
3687
|
}
|
|
@@ -3752,17 +3752,17 @@ var require_out = __commonJS({
|
|
|
3752
3752
|
var sync = require_sync();
|
|
3753
3753
|
var settings_1 = require_settings();
|
|
3754
3754
|
exports.Settings = settings_1.default;
|
|
3755
|
-
function stat(
|
|
3755
|
+
function stat(path10, optionsOrSettingsOrCallback, callback) {
|
|
3756
3756
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
3757
|
-
async.read(
|
|
3757
|
+
async.read(path10, getSettings(), optionsOrSettingsOrCallback);
|
|
3758
3758
|
return;
|
|
3759
3759
|
}
|
|
3760
|
-
async.read(
|
|
3760
|
+
async.read(path10, getSettings(optionsOrSettingsOrCallback), callback);
|
|
3761
3761
|
}
|
|
3762
3762
|
exports.stat = stat;
|
|
3763
|
-
function statSync3(
|
|
3763
|
+
function statSync3(path10, optionsOrSettings) {
|
|
3764
3764
|
const settings = getSettings(optionsOrSettings);
|
|
3765
|
-
return sync.read(
|
|
3765
|
+
return sync.read(path10, settings);
|
|
3766
3766
|
}
|
|
3767
3767
|
exports.statSync = statSync3;
|
|
3768
3768
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -3978,16 +3978,16 @@ var require_async2 = __commonJS({
|
|
|
3978
3978
|
return;
|
|
3979
3979
|
}
|
|
3980
3980
|
const tasks = names.map((name) => {
|
|
3981
|
-
const
|
|
3981
|
+
const path10 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
3982
3982
|
return (done) => {
|
|
3983
|
-
fsStat.stat(
|
|
3983
|
+
fsStat.stat(path10, settings.fsStatSettings, (error, stats) => {
|
|
3984
3984
|
if (error !== null) {
|
|
3985
3985
|
done(error);
|
|
3986
3986
|
return;
|
|
3987
3987
|
}
|
|
3988
3988
|
const entry = {
|
|
3989
3989
|
name,
|
|
3990
|
-
path:
|
|
3990
|
+
path: path10,
|
|
3991
3991
|
dirent: utils.fs.createDirentFromStats(name, stats)
|
|
3992
3992
|
};
|
|
3993
3993
|
if (settings.stats) {
|
|
@@ -4105,7 +4105,7 @@ var require_settings2 = __commonJS({
|
|
|
4105
4105
|
"../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js"(exports) {
|
|
4106
4106
|
"use strict";
|
|
4107
4107
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4108
|
-
var
|
|
4108
|
+
var path10 = __require("path");
|
|
4109
4109
|
var fsStat = require_out();
|
|
4110
4110
|
var fs8 = require_fs4();
|
|
4111
4111
|
var Settings = class {
|
|
@@ -4113,7 +4113,7 @@ var require_settings2 = __commonJS({
|
|
|
4113
4113
|
this._options = _options;
|
|
4114
4114
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
4115
4115
|
this.fs = fs8.createFileSystemAdapter(this._options.fs);
|
|
4116
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
4116
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path10.sep);
|
|
4117
4117
|
this.stats = this._getValue(this._options.stats, false);
|
|
4118
4118
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
4119
4119
|
this.fsStatSettings = new fsStat.Settings({
|
|
@@ -4140,17 +4140,17 @@ var require_out2 = __commonJS({
|
|
|
4140
4140
|
var sync = require_sync2();
|
|
4141
4141
|
var settings_1 = require_settings2();
|
|
4142
4142
|
exports.Settings = settings_1.default;
|
|
4143
|
-
function scandir(
|
|
4143
|
+
function scandir(path10, optionsOrSettingsOrCallback, callback) {
|
|
4144
4144
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
4145
|
-
async.read(
|
|
4145
|
+
async.read(path10, getSettings(), optionsOrSettingsOrCallback);
|
|
4146
4146
|
return;
|
|
4147
4147
|
}
|
|
4148
|
-
async.read(
|
|
4148
|
+
async.read(path10, getSettings(optionsOrSettingsOrCallback), callback);
|
|
4149
4149
|
}
|
|
4150
4150
|
exports.scandir = scandir;
|
|
4151
|
-
function scandirSync(
|
|
4151
|
+
function scandirSync(path10, optionsOrSettings) {
|
|
4152
4152
|
const settings = getSettings(optionsOrSettings);
|
|
4153
|
-
return sync.read(
|
|
4153
|
+
return sync.read(path10, settings);
|
|
4154
4154
|
}
|
|
4155
4155
|
exports.scandirSync = scandirSync;
|
|
4156
4156
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -4774,7 +4774,7 @@ var require_settings3 = __commonJS({
|
|
|
4774
4774
|
"../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js"(exports) {
|
|
4775
4775
|
"use strict";
|
|
4776
4776
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4777
|
-
var
|
|
4777
|
+
var path10 = __require("path");
|
|
4778
4778
|
var fsScandir = require_out2();
|
|
4779
4779
|
var Settings = class {
|
|
4780
4780
|
constructor(_options = {}) {
|
|
@@ -4784,7 +4784,7 @@ var require_settings3 = __commonJS({
|
|
|
4784
4784
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
4785
4785
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
4786
4786
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
4787
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
4787
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path10.sep);
|
|
4788
4788
|
this.fsScandirSettings = new fsScandir.Settings({
|
|
4789
4789
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
4790
4790
|
fs: this._options.fs,
|
|
@@ -4846,7 +4846,7 @@ var require_reader2 = __commonJS({
|
|
|
4846
4846
|
"../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js"(exports) {
|
|
4847
4847
|
"use strict";
|
|
4848
4848
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4849
|
-
var
|
|
4849
|
+
var path10 = __require("path");
|
|
4850
4850
|
var fsStat = require_out();
|
|
4851
4851
|
var utils = require_utils3();
|
|
4852
4852
|
var Reader = class {
|
|
@@ -4859,7 +4859,7 @@ var require_reader2 = __commonJS({
|
|
|
4859
4859
|
});
|
|
4860
4860
|
}
|
|
4861
4861
|
_getFullEntryPath(filepath) {
|
|
4862
|
-
return
|
|
4862
|
+
return path10.resolve(this._settings.cwd, filepath);
|
|
4863
4863
|
}
|
|
4864
4864
|
_makeEntry(stats, pattern) {
|
|
4865
4865
|
const entry = {
|
|
@@ -5275,7 +5275,7 @@ var require_provider = __commonJS({
|
|
|
5275
5275
|
"../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js"(exports) {
|
|
5276
5276
|
"use strict";
|
|
5277
5277
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5278
|
-
var
|
|
5278
|
+
var path10 = __require("path");
|
|
5279
5279
|
var deep_1 = require_deep();
|
|
5280
5280
|
var entry_1 = require_entry();
|
|
5281
5281
|
var error_1 = require_error();
|
|
@@ -5289,7 +5289,7 @@ var require_provider = __commonJS({
|
|
|
5289
5289
|
this.entryTransformer = new entry_2.default(this._settings);
|
|
5290
5290
|
}
|
|
5291
5291
|
_getRootDirectory(task) {
|
|
5292
|
-
return
|
|
5292
|
+
return path10.resolve(this._settings.cwd, task.base);
|
|
5293
5293
|
}
|
|
5294
5294
|
_getReaderOptions(task) {
|
|
5295
5295
|
const basePath = task.base === "." ? "" : task.base;
|
|
@@ -5922,7 +5922,7 @@ var require_ignore = __commonJS({
|
|
|
5922
5922
|
// path matching.
|
|
5923
5923
|
// - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
|
|
5924
5924
|
// @returns {TestResult} true if a file is ignored
|
|
5925
|
-
test(
|
|
5925
|
+
test(path10, checkUnignored, mode) {
|
|
5926
5926
|
let ignored = false;
|
|
5927
5927
|
let unignored = false;
|
|
5928
5928
|
let matchedRule;
|
|
@@ -5931,7 +5931,7 @@ var require_ignore = __commonJS({
|
|
|
5931
5931
|
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
|
|
5932
5932
|
return;
|
|
5933
5933
|
}
|
|
5934
|
-
const matched = rule[mode].test(
|
|
5934
|
+
const matched = rule[mode].test(path10);
|
|
5935
5935
|
if (!matched) {
|
|
5936
5936
|
return;
|
|
5937
5937
|
}
|
|
@@ -5952,17 +5952,17 @@ var require_ignore = __commonJS({
|
|
|
5952
5952
|
var throwError = (message, Ctor) => {
|
|
5953
5953
|
throw new Ctor(message);
|
|
5954
5954
|
};
|
|
5955
|
-
var checkPath = (
|
|
5956
|
-
if (!isString(
|
|
5955
|
+
var checkPath = (path10, originalPath, doThrow) => {
|
|
5956
|
+
if (!isString(path10)) {
|
|
5957
5957
|
return doThrow(
|
|
5958
5958
|
`path must be a string, but got \`${originalPath}\``,
|
|
5959
5959
|
TypeError
|
|
5960
5960
|
);
|
|
5961
5961
|
}
|
|
5962
|
-
if (!
|
|
5962
|
+
if (!path10) {
|
|
5963
5963
|
return doThrow(`path must not be empty`, TypeError);
|
|
5964
5964
|
}
|
|
5965
|
-
if (checkPath.isNotRelative(
|
|
5965
|
+
if (checkPath.isNotRelative(path10)) {
|
|
5966
5966
|
const r = "`path.relative()`d";
|
|
5967
5967
|
return doThrow(
|
|
5968
5968
|
`path should be a ${r} string, but got "${originalPath}"`,
|
|
@@ -5971,7 +5971,7 @@ var require_ignore = __commonJS({
|
|
|
5971
5971
|
}
|
|
5972
5972
|
return true;
|
|
5973
5973
|
};
|
|
5974
|
-
var isNotRelative = (
|
|
5974
|
+
var isNotRelative = (path10) => REGEX_TEST_INVALID_PATH.test(path10);
|
|
5975
5975
|
checkPath.isNotRelative = isNotRelative;
|
|
5976
5976
|
checkPath.convert = (p) => p;
|
|
5977
5977
|
var Ignore = class {
|
|
@@ -6001,19 +6001,19 @@ var require_ignore = __commonJS({
|
|
|
6001
6001
|
}
|
|
6002
6002
|
// @returns {TestResult}
|
|
6003
6003
|
_test(originalPath, cache, checkUnignored, slices) {
|
|
6004
|
-
const
|
|
6004
|
+
const path10 = originalPath && checkPath.convert(originalPath);
|
|
6005
6005
|
checkPath(
|
|
6006
|
-
|
|
6006
|
+
path10,
|
|
6007
6007
|
originalPath,
|
|
6008
6008
|
this._strictPathCheck ? throwError : RETURN_FALSE
|
|
6009
6009
|
);
|
|
6010
|
-
return this._t(
|
|
6010
|
+
return this._t(path10, cache, checkUnignored, slices);
|
|
6011
6011
|
}
|
|
6012
|
-
checkIgnore(
|
|
6013
|
-
if (!REGEX_TEST_TRAILING_SLASH.test(
|
|
6014
|
-
return this.test(
|
|
6012
|
+
checkIgnore(path10) {
|
|
6013
|
+
if (!REGEX_TEST_TRAILING_SLASH.test(path10)) {
|
|
6014
|
+
return this.test(path10);
|
|
6015
6015
|
}
|
|
6016
|
-
const slices =
|
|
6016
|
+
const slices = path10.split(SLASH).filter(Boolean);
|
|
6017
6017
|
slices.pop();
|
|
6018
6018
|
if (slices.length) {
|
|
6019
6019
|
const parent = this._t(
|
|
@@ -6026,18 +6026,18 @@ var require_ignore = __commonJS({
|
|
|
6026
6026
|
return parent;
|
|
6027
6027
|
}
|
|
6028
6028
|
}
|
|
6029
|
-
return this._rules.test(
|
|
6029
|
+
return this._rules.test(path10, false, MODE_CHECK_IGNORE);
|
|
6030
6030
|
}
|
|
6031
|
-
_t(
|
|
6032
|
-
if (
|
|
6033
|
-
return cache[
|
|
6031
|
+
_t(path10, cache, checkUnignored, slices) {
|
|
6032
|
+
if (path10 in cache) {
|
|
6033
|
+
return cache[path10];
|
|
6034
6034
|
}
|
|
6035
6035
|
if (!slices) {
|
|
6036
|
-
slices =
|
|
6036
|
+
slices = path10.split(SLASH).filter(Boolean);
|
|
6037
6037
|
}
|
|
6038
6038
|
slices.pop();
|
|
6039
6039
|
if (!slices.length) {
|
|
6040
|
-
return cache[
|
|
6040
|
+
return cache[path10] = this._rules.test(path10, checkUnignored, MODE_IGNORE);
|
|
6041
6041
|
}
|
|
6042
6042
|
const parent = this._t(
|
|
6043
6043
|
slices.join(SLASH) + SLASH,
|
|
@@ -6045,24 +6045,24 @@ var require_ignore = __commonJS({
|
|
|
6045
6045
|
checkUnignored,
|
|
6046
6046
|
slices
|
|
6047
6047
|
);
|
|
6048
|
-
return cache[
|
|
6048
|
+
return cache[path10] = parent.ignored ? parent : this._rules.test(path10, checkUnignored, MODE_IGNORE);
|
|
6049
6049
|
}
|
|
6050
|
-
ignores(
|
|
6051
|
-
return this._test(
|
|
6050
|
+
ignores(path10) {
|
|
6051
|
+
return this._test(path10, this._ignoreCache, false).ignored;
|
|
6052
6052
|
}
|
|
6053
6053
|
createFilter() {
|
|
6054
|
-
return (
|
|
6054
|
+
return (path10) => !this.ignores(path10);
|
|
6055
6055
|
}
|
|
6056
6056
|
filter(paths) {
|
|
6057
6057
|
return makeArray(paths).filter(this.createFilter());
|
|
6058
6058
|
}
|
|
6059
6059
|
// @returns {TestResult}
|
|
6060
|
-
test(
|
|
6061
|
-
return this._test(
|
|
6060
|
+
test(path10) {
|
|
6061
|
+
return this._test(path10, this._testCache, true);
|
|
6062
6062
|
}
|
|
6063
6063
|
};
|
|
6064
6064
|
var factory = (options) => new Ignore(options);
|
|
6065
|
-
var isPathValid = (
|
|
6065
|
+
var isPathValid = (path10) => checkPath(path10 && checkPath.convert(path10), path10, RETURN_FALSE);
|
|
6066
6066
|
if (
|
|
6067
6067
|
// Detect `process` so that it can run in browsers.
|
|
6068
6068
|
typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32")
|
|
@@ -6070,7 +6070,7 @@ var require_ignore = __commonJS({
|
|
|
6070
6070
|
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
6071
6071
|
checkPath.convert = makePosix;
|
|
6072
6072
|
const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
6073
|
-
checkPath.isNotRelative = (
|
|
6073
|
+
checkPath.isNotRelative = (path10) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path10) || isNotRelative(path10);
|
|
6074
6074
|
}
|
|
6075
6075
|
module.exports = factory;
|
|
6076
6076
|
factory.default = factory;
|
|
@@ -7920,11 +7920,11 @@ var parser = new YargsParser({
|
|
|
7920
7920
|
resolve: resolve2,
|
|
7921
7921
|
// TODO: figure out a way to combine ESM and CJS coverage, such that
|
|
7922
7922
|
// we can exercise all the lines below:
|
|
7923
|
-
require: (
|
|
7923
|
+
require: (path10) => {
|
|
7924
7924
|
if (typeof __require !== "undefined") {
|
|
7925
|
-
return __require(
|
|
7926
|
-
} else if (
|
|
7927
|
-
return JSON.parse(readFileSync(
|
|
7925
|
+
return __require(path10);
|
|
7926
|
+
} else if (path10.match(/\.json$/)) {
|
|
7927
|
+
return JSON.parse(readFileSync(path10, "utf8"));
|
|
7928
7928
|
} else {
|
|
7929
7929
|
throw Error("only .json config files are supported in ESM");
|
|
7930
7930
|
}
|
|
@@ -11494,7 +11494,7 @@ var Yargs = YargsFactory(esm_default);
|
|
|
11494
11494
|
var yargs_default = Yargs;
|
|
11495
11495
|
|
|
11496
11496
|
// ../../package.json
|
|
11497
|
-
var version = "5.
|
|
11497
|
+
var version = "5.3.0";
|
|
11498
11498
|
|
|
11499
11499
|
// ../../src/execa-utilities.ts
|
|
11500
11500
|
function isErrorExecaError(error) {
|
|
@@ -11507,7 +11507,7 @@ import jsonColorizer from "@pinojs/json-colorizer";
|
|
|
11507
11507
|
// ../../node_modules/.pnpm/decircular@1.0.0/node_modules/decircular/index.js
|
|
11508
11508
|
function decircular(object) {
|
|
11509
11509
|
const seenObjects = /* @__PURE__ */ new WeakMap();
|
|
11510
|
-
function internalDecircular(value,
|
|
11510
|
+
function internalDecircular(value, path10 = []) {
|
|
11511
11511
|
if (!(value !== null && typeof value === "object")) {
|
|
11512
11512
|
return value;
|
|
11513
11513
|
}
|
|
@@ -11515,10 +11515,10 @@ function decircular(object) {
|
|
|
11515
11515
|
if (existingPath) {
|
|
11516
11516
|
return `[Circular *${existingPath.join(".")}]`;
|
|
11517
11517
|
}
|
|
11518
|
-
seenObjects.set(value,
|
|
11518
|
+
seenObjects.set(value, path10);
|
|
11519
11519
|
const newValue = Array.isArray(value) ? [] : {};
|
|
11520
11520
|
for (const [key2, value2] of Object.entries(value)) {
|
|
11521
|
-
newValue[key2] = internalDecircular(value2, [...
|
|
11521
|
+
newValue[key2] = internalDecircular(value2, [...path10, key2]);
|
|
11522
11522
|
}
|
|
11523
11523
|
seenObjects.delete(value);
|
|
11524
11524
|
return newValue;
|
|
@@ -12478,7 +12478,11 @@ var sharedKnipConfig = {
|
|
|
12478
12478
|
"kpi-cspell",
|
|
12479
12479
|
"kpi-knip",
|
|
12480
12480
|
"kpi-remark",
|
|
12481
|
-
"kpi-prettier"
|
|
12481
|
+
"kpi-prettier",
|
|
12482
|
+
// 1Password CLI, typically a global install...
|
|
12483
|
+
"op",
|
|
12484
|
+
// GitHub CLI, typically a global install...
|
|
12485
|
+
"gh"
|
|
12482
12486
|
],
|
|
12483
12487
|
ignoreDependencies: [
|
|
12484
12488
|
"@kitschpatrol/cspell-config",
|
|
@@ -12487,7 +12491,17 @@ var sharedKnipConfig = {
|
|
|
12487
12491
|
"@kitschpatrol/mdat-config",
|
|
12488
12492
|
"@kitschpatrol/prettier-config",
|
|
12489
12493
|
"@kitschpatrol/remark-config",
|
|
12490
|
-
"@kitschpatrol/stylelint-config"
|
|
12494
|
+
"@kitschpatrol/stylelint-config",
|
|
12495
|
+
"@prettier/plugin-php",
|
|
12496
|
+
"@prettier/plugin-ruby",
|
|
12497
|
+
"@prettier/plugin-xml",
|
|
12498
|
+
"prettier-plugin-packagejson",
|
|
12499
|
+
"prettier-plugin-sh",
|
|
12500
|
+
"prettier-plugin-sql",
|
|
12501
|
+
"prettier-plugin-tailwindcss",
|
|
12502
|
+
"prettier-plugin-toml",
|
|
12503
|
+
// Undetected due to string import in cspell.config.js
|
|
12504
|
+
"@kitschpatrol/dict-en-wiktionary"
|
|
12491
12505
|
]
|
|
12492
12506
|
};
|
|
12493
12507
|
var src_default = sharedKnipConfig;
|
|
@@ -12513,22 +12527,26 @@ function getKnipPackageJsonObject() {
|
|
|
12513
12527
|
}
|
|
12514
12528
|
var commandDefinition3 = {
|
|
12515
12529
|
commands: {
|
|
12516
|
-
fix
|
|
12517
|
-
|
|
12518
|
-
|
|
12519
|
-
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
|
|
12530
|
-
|
|
12531
|
-
},
|
|
12530
|
+
// In practice, Knip's auto-fix behavior is too dangerous for most projects.
|
|
12531
|
+
// Since kpi doesn't currently have per-tool configuration options, we'll
|
|
12532
|
+
// just disable `kpi-knip fix` for now.
|
|
12533
|
+
//
|
|
12534
|
+
// fix: {
|
|
12535
|
+
// commands: [
|
|
12536
|
+
// {
|
|
12537
|
+
// cwdOverride: 'workspace-root',
|
|
12538
|
+
// name: 'knip',
|
|
12539
|
+
// optionFlags: [
|
|
12540
|
+
// '--fix',
|
|
12541
|
+
// '--allow-remove-files',
|
|
12542
|
+
// '--no-config-hints',
|
|
12543
|
+
// ...getWorkspaceOptionFlags(),
|
|
12544
|
+
// ],
|
|
12545
|
+
// },
|
|
12546
|
+
// ],
|
|
12547
|
+
// description: `Automatically remove unused code and dependencies. ${DESCRIPTION.packageRun} ${DESCRIPTION.monorepoRun}`,
|
|
12548
|
+
// positionalArgumentMode: 'none',
|
|
12549
|
+
// },
|
|
12532
12550
|
init: {
|
|
12533
12551
|
configFile: "knip.config.ts",
|
|
12534
12552
|
configPackageJson: getKnipPackageJsonObject(),
|
|
@@ -12979,12 +12997,12 @@ import fsPromises3 from "node:fs/promises";
|
|
|
12979
12997
|
import path7 from "node:path";
|
|
12980
12998
|
|
|
12981
12999
|
// ../../node_modules/.pnpm/slash@5.1.0/node_modules/slash/index.js
|
|
12982
|
-
function slash(
|
|
12983
|
-
const isExtendedLengthPath =
|
|
13000
|
+
function slash(path10) {
|
|
13001
|
+
const isExtendedLengthPath = path10.startsWith("\\\\?\\");
|
|
12984
13002
|
if (isExtendedLengthPath) {
|
|
12985
|
-
return
|
|
13003
|
+
return path10;
|
|
12986
13004
|
}
|
|
12987
|
-
return
|
|
13005
|
+
return path10.replace(/\\/g, "/");
|
|
12988
13006
|
}
|
|
12989
13007
|
|
|
12990
13008
|
// ../../node_modules/.pnpm/globby@14.1.0/node_modules/globby/utilities.js
|
|
@@ -13072,8 +13090,8 @@ var assertPatternsInput = (patterns) => {
|
|
|
13072
13090
|
}
|
|
13073
13091
|
};
|
|
13074
13092
|
var normalizePathForDirectoryGlob = (filePath, cwd) => {
|
|
13075
|
-
const
|
|
13076
|
-
return nodePath.isAbsolute(
|
|
13093
|
+
const path10 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
|
|
13094
|
+
return nodePath.isAbsolute(path10) ? path10 : nodePath.join(cwd, path10);
|
|
13077
13095
|
};
|
|
13078
13096
|
var getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
13079
13097
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
@@ -13467,19 +13485,46 @@ var commandDefinition8 = {
|
|
|
13467
13485
|
};
|
|
13468
13486
|
|
|
13469
13487
|
// ../typescript-config/src/command.ts
|
|
13488
|
+
import fse3 from "fs-extra";
|
|
13489
|
+
import path9 from "node:path";
|
|
13490
|
+
async function isSvelteProject() {
|
|
13491
|
+
const packageDirectory = getPackageDirectory();
|
|
13492
|
+
const svelteConfigFiles = ["svelte.config.js", "svelte.config.mjs", "svelte.config.cjs"];
|
|
13493
|
+
const fileChecks = svelteConfigFiles.map(
|
|
13494
|
+
async (configFile) => fse3.exists(path9.join(packageDirectory, configFile))
|
|
13495
|
+
);
|
|
13496
|
+
const results = await Promise.all(fileChecks);
|
|
13497
|
+
return results.some(Boolean);
|
|
13498
|
+
}
|
|
13499
|
+
async function printSvelteWarningCommand(logStream) {
|
|
13500
|
+
logStream.write(
|
|
13501
|
+
"Skipping `tsc` since this is a Svelte project. Consider running `svelte-check` instead.\n"
|
|
13502
|
+
);
|
|
13503
|
+
return 0;
|
|
13504
|
+
}
|
|
13505
|
+
async function generateTypeScriptLintCommand() {
|
|
13506
|
+
return await isSvelteProject() ? [
|
|
13507
|
+
{
|
|
13508
|
+
execute: printSvelteWarningCommand,
|
|
13509
|
+
name: printSvelteWarningCommand.name
|
|
13510
|
+
}
|
|
13511
|
+
] : [
|
|
13512
|
+
{
|
|
13513
|
+
cwdOverride: "package-dir",
|
|
13514
|
+
name: "tsc",
|
|
13515
|
+
optionFlags: ["--noEmit"]
|
|
13516
|
+
}
|
|
13517
|
+
];
|
|
13518
|
+
}
|
|
13470
13519
|
var commandDefinition9 = {
|
|
13471
13520
|
commands: {
|
|
13472
13521
|
init: {
|
|
13473
13522
|
locationOptionFlag: false
|
|
13474
13523
|
},
|
|
13475
13524
|
lint: {
|
|
13476
|
-
|
|
13477
|
-
|
|
13478
|
-
|
|
13479
|
-
name: "tsc",
|
|
13480
|
-
optionFlags: ["--noEmit"]
|
|
13481
|
-
}
|
|
13482
|
-
],
|
|
13525
|
+
// Needs some special logic since tsc doesn't really work in Svelte projects
|
|
13526
|
+
// See https://github.com/sveltejs/language-tools/issues/2527
|
|
13527
|
+
commands: await generateTypeScriptLintCommand(),
|
|
13483
13528
|
// TODO confirm monorepo behavior
|
|
13484
13529
|
description: `Run type checking on your project. ${DESCRIPTION.packageRun} ${DESCRIPTION.monorepoRun}`,
|
|
13485
13530
|
positionalArgumentMode: "none"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/shared-config",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
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",
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
"find-workspaces": "^0.3.1",
|
|
44
44
|
"fs-extra": "^11.3.0",
|
|
45
45
|
"prettier": "^3.5.3",
|
|
46
|
-
"@kitschpatrol/cspell-config": "5.
|
|
47
|
-
"@kitschpatrol/
|
|
48
|
-
"@kitschpatrol/
|
|
49
|
-
"@kitschpatrol/knip-config": "5.
|
|
50
|
-
"@kitschpatrol/
|
|
51
|
-
"@kitschpatrol/
|
|
52
|
-
"@kitschpatrol/
|
|
53
|
-
"@kitschpatrol/
|
|
54
|
-
"@kitschpatrol/
|
|
46
|
+
"@kitschpatrol/cspell-config": "5.3.0",
|
|
47
|
+
"@kitschpatrol/eslint-config": "5.3.0",
|
|
48
|
+
"@kitschpatrol/prettier-config": "5.3.0",
|
|
49
|
+
"@kitschpatrol/knip-config": "5.3.0",
|
|
50
|
+
"@kitschpatrol/typescript-config": "5.3.0",
|
|
51
|
+
"@kitschpatrol/remark-config": "5.3.0",
|
|
52
|
+
"@kitschpatrol/stylelint-config": "5.3.0",
|
|
53
|
+
"@kitschpatrol/repo-config": "5.3.0",
|
|
54
|
+
"@kitschpatrol/mdat-config": "5.3.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"chalk": "^5.4.1",
|
package/readme.md
CHANGED
|
@@ -63,7 +63,7 @@ It takes care of dependencies, configuration, invocation, and reporting for the
|
|
|
63
63
|
|
|
64
64
|
### Packages
|
|
65
65
|
|
|
66
|
-
This particular readme is for the [`@kitschpatrol/shared-config`](https://www.npmjs.com/package/@kitschpatrol/shared-config) package, which depends on a number of tool-specific packages included in the [`kitschpatrol/shared-config`](https://github.com/kitschpatrol/shared-config) monorepo on GitHub, each of which is documented in additional detail its respective readme.
|
|
66
|
+
This particular readme is for the [`@kitschpatrol/shared-config`](https://www.npmjs.com/package/@kitschpatrol/shared-config) package, which depends on a number of tool-specific packages included in the [`kitschpatrol/shared-config`](https://github.com/kitschpatrol/shared-config) monorepo on GitHub, each of which is documented in additional detail in its respective readme.
|
|
67
67
|
|
|
68
68
|
#### Primary package
|
|
69
69
|
|