prettier 3.0.1 → 3.0.3
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 +68 -22
- package/doc.d.ts +3 -0
- package/index.cjs +1 -1
- package/index.d.ts +9 -0
- package/index.mjs +166 -87
- package/internal/cli.mjs +310 -10
- package/internal/internal.mjs +61 -37
- package/package.json +3 -2
- package/plugins/babel.js +11 -11
- package/plugins/babel.mjs +11 -11
- package/plugins/estree.js +23 -23
- package/plugins/estree.mjs +23 -23
- package/plugins/flow.js +17 -17
- package/plugins/flow.mjs +17 -17
- package/plugins/html.js +15 -15
- package/plugins/html.mjs +15 -15
- package/plugins/markdown.js +38 -38
- package/plugins/markdown.mjs +38 -38
- package/plugins/postcss.js +5 -5
- package/plugins/postcss.mjs +5 -5
- package/plugins/typescript.js +20 -20
- package/plugins/typescript.mjs +20 -20
- package/standalone.js +24 -24
- package/standalone.mjs +24 -24
package/index.mjs
CHANGED
|
@@ -125,10 +125,15 @@ var require_path = __commonJS({
|
|
|
125
125
|
"node_modules/fast-glob/out/utils/path.js"(exports) {
|
|
126
126
|
"use strict";
|
|
127
127
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
128
|
-
exports.
|
|
128
|
+
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
|
|
129
|
+
var os2 = __require("os");
|
|
129
130
|
var path9 = __require("path");
|
|
131
|
+
var IS_WINDOWS_PLATFORM = os2.platform() === "win32";
|
|
130
132
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
131
|
-
var
|
|
133
|
+
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
134
|
+
var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([(){}]|^!|[!+@](?=\())/g;
|
|
135
|
+
var DOS_DEVICE_PATH_RE = /^\\\\([.?])/;
|
|
136
|
+
var WINDOWS_BACKSLASHES_RE = /\\(?![!()+@{}])/g;
|
|
132
137
|
function unixify(filepath) {
|
|
133
138
|
return filepath.replace(/\\/g, "/");
|
|
134
139
|
}
|
|
@@ -137,10 +142,6 @@ var require_path = __commonJS({
|
|
|
137
142
|
return path9.resolve(cwd, filepath);
|
|
138
143
|
}
|
|
139
144
|
exports.makeAbsolute = makeAbsolute;
|
|
140
|
-
function escape(pattern) {
|
|
141
|
-
return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
142
|
-
}
|
|
143
|
-
exports.escape = escape;
|
|
144
145
|
function removeLeadingDotSegment(entry) {
|
|
145
146
|
if (entry.charAt(0) === ".") {
|
|
146
147
|
const secondCharactery = entry.charAt(1);
|
|
@@ -151,6 +152,24 @@ var require_path = __commonJS({
|
|
|
151
152
|
return entry;
|
|
152
153
|
}
|
|
153
154
|
exports.removeLeadingDotSegment = removeLeadingDotSegment;
|
|
155
|
+
exports.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;
|
|
156
|
+
function escapeWindowsPath(pattern) {
|
|
157
|
+
return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
158
|
+
}
|
|
159
|
+
exports.escapeWindowsPath = escapeWindowsPath;
|
|
160
|
+
function escapePosixPath(pattern) {
|
|
161
|
+
return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
162
|
+
}
|
|
163
|
+
exports.escapePosixPath = escapePosixPath;
|
|
164
|
+
exports.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;
|
|
165
|
+
function convertWindowsPathToPattern(filepath) {
|
|
166
|
+
return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/");
|
|
167
|
+
}
|
|
168
|
+
exports.convertWindowsPathToPattern = convertWindowsPathToPattern;
|
|
169
|
+
function convertPosixPathToPattern(filepath) {
|
|
170
|
+
return escapePosixPath(filepath);
|
|
171
|
+
}
|
|
172
|
+
exports.convertPosixPathToPattern = convertPosixPathToPattern;
|
|
154
173
|
}
|
|
155
174
|
});
|
|
156
175
|
|
|
@@ -3130,7 +3149,7 @@ var require_pattern = __commonJS({
|
|
|
3130
3149
|
"node_modules/fast-glob/out/utils/pattern.js"(exports) {
|
|
3131
3150
|
"use strict";
|
|
3132
3151
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3133
|
-
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;
|
|
3152
|
+
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;
|
|
3134
3153
|
var path9 = __require("path");
|
|
3135
3154
|
var globParent = require_glob_parent();
|
|
3136
3155
|
var micromatch2 = require_micromatch();
|
|
@@ -3141,6 +3160,7 @@ var require_pattern = __commonJS({
|
|
|
3141
3160
|
var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;
|
|
3142
3161
|
var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/;
|
|
3143
3162
|
var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./;
|
|
3163
|
+
var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
|
|
3144
3164
|
function isStaticPattern(pattern, options8 = {}) {
|
|
3145
3165
|
return !isDynamicPattern(pattern, options8);
|
|
3146
3166
|
}
|
|
@@ -3236,10 +3256,9 @@ var require_pattern = __commonJS({
|
|
|
3236
3256
|
}
|
|
3237
3257
|
exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
|
|
3238
3258
|
function expandBraceExpansion(pattern) {
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
});
|
|
3259
|
+
const patterns = micromatch2.braces(pattern, { expand: true, nodupes: true });
|
|
3260
|
+
patterns.sort((a, b) => a.length - b.length);
|
|
3261
|
+
return patterns.filter((pattern2) => pattern2 !== "");
|
|
3243
3262
|
}
|
|
3244
3263
|
exports.expandBraceExpansion = expandBraceExpansion;
|
|
3245
3264
|
function getPatternParts(pattern, options8) {
|
|
@@ -3266,6 +3285,10 @@ var require_pattern = __commonJS({
|
|
|
3266
3285
|
return patternsRe.some((patternRe) => patternRe.test(entry));
|
|
3267
3286
|
}
|
|
3268
3287
|
exports.matchAny = matchAny;
|
|
3288
|
+
function removeDuplicateSlashes(pattern) {
|
|
3289
|
+
return pattern.replace(DOUBLE_SLASH_RE, "/");
|
|
3290
|
+
}
|
|
3291
|
+
exports.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
3269
3292
|
}
|
|
3270
3293
|
});
|
|
3271
3294
|
|
|
@@ -3458,9 +3481,11 @@ var require_tasks = __commonJS({
|
|
|
3458
3481
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3459
3482
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
|
|
3460
3483
|
var utils = require_utils3();
|
|
3461
|
-
function generate(
|
|
3484
|
+
function generate(input, settings) {
|
|
3485
|
+
const patterns = processPatterns(input, settings);
|
|
3486
|
+
const ignore = processPatterns(settings.ignore, settings);
|
|
3462
3487
|
const positivePatterns = getPositivePatterns(patterns);
|
|
3463
|
-
const negativePatterns = getNegativePatternsAsPositive(patterns,
|
|
3488
|
+
const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
|
|
3464
3489
|
const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
|
|
3465
3490
|
const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
|
|
3466
3491
|
const staticTasks = convertPatternsToTasks(
|
|
@@ -3478,6 +3503,16 @@ var require_tasks = __commonJS({
|
|
|
3478
3503
|
return staticTasks.concat(dynamicTasks);
|
|
3479
3504
|
}
|
|
3480
3505
|
exports.generate = generate;
|
|
3506
|
+
function processPatterns(input, settings) {
|
|
3507
|
+
let patterns = input;
|
|
3508
|
+
if (settings.braceExpansion) {
|
|
3509
|
+
patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
|
|
3510
|
+
}
|
|
3511
|
+
if (settings.baseNameMatch) {
|
|
3512
|
+
patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`);
|
|
3513
|
+
}
|
|
3514
|
+
return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
|
|
3515
|
+
}
|
|
3481
3516
|
function convertPatternsToTasks(positive, negative, dynamic) {
|
|
3482
3517
|
const tasks = [];
|
|
3483
3518
|
const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive);
|
|
@@ -3535,24 +3570,6 @@ var require_tasks = __commonJS({
|
|
|
3535
3570
|
}
|
|
3536
3571
|
});
|
|
3537
3572
|
|
|
3538
|
-
// node_modules/fast-glob/out/managers/patterns.js
|
|
3539
|
-
var require_patterns = __commonJS({
|
|
3540
|
-
"node_modules/fast-glob/out/managers/patterns.js"(exports) {
|
|
3541
|
-
"use strict";
|
|
3542
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3543
|
-
exports.removeDuplicateSlashes = exports.transform = void 0;
|
|
3544
|
-
var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
|
|
3545
|
-
function transform2(patterns) {
|
|
3546
|
-
return patterns.map((pattern) => removeDuplicateSlashes(pattern));
|
|
3547
|
-
}
|
|
3548
|
-
exports.transform = transform2;
|
|
3549
|
-
function removeDuplicateSlashes(pattern) {
|
|
3550
|
-
return pattern.replace(DOUBLE_SLASH_RE, "/");
|
|
3551
|
-
}
|
|
3552
|
-
exports.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
3553
|
-
}
|
|
3554
|
-
});
|
|
3555
|
-
|
|
3556
3573
|
// node_modules/@nodelib/fs.stat/out/providers/async.js
|
|
3557
3574
|
var require_async = __commonJS({
|
|
3558
3575
|
"node_modules/@nodelib/fs.stat/out/providers/async.js"(exports) {
|
|
@@ -4900,8 +4917,7 @@ var require_matcher = __commonJS({
|
|
|
4900
4917
|
this._fillStorage();
|
|
4901
4918
|
}
|
|
4902
4919
|
_fillStorage() {
|
|
4903
|
-
const
|
|
4904
|
-
for (const pattern of patterns) {
|
|
4920
|
+
for (const pattern of this._patterns) {
|
|
4905
4921
|
const segments = this._getPatternSegments(pattern);
|
|
4906
4922
|
const sections = this._splitSegmentsIntoSections(segments);
|
|
4907
4923
|
this._storage.push({
|
|
@@ -5053,32 +5069,32 @@ var require_entry = __commonJS({
|
|
|
5053
5069
|
}
|
|
5054
5070
|
getFilter(positive, negative) {
|
|
5055
5071
|
const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions);
|
|
5056
|
-
const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions);
|
|
5072
|
+
const negativeRe = utils.pattern.convertPatternsToRe(negative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }));
|
|
5057
5073
|
return (entry) => this._filter(entry, positiveRe, negativeRe);
|
|
5058
5074
|
}
|
|
5059
5075
|
_filter(entry, positiveRe, negativeRe) {
|
|
5060
|
-
|
|
5076
|
+
const filepath = utils.path.removeLeadingDotSegment(entry.path);
|
|
5077
|
+
if (this._settings.unique && this._isDuplicateEntry(filepath)) {
|
|
5061
5078
|
return false;
|
|
5062
5079
|
}
|
|
5063
5080
|
if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
|
|
5064
5081
|
return false;
|
|
5065
5082
|
}
|
|
5066
|
-
if (this._isSkippedByAbsoluteNegativePatterns(
|
|
5083
|
+
if (this._isSkippedByAbsoluteNegativePatterns(filepath, negativeRe)) {
|
|
5067
5084
|
return false;
|
|
5068
5085
|
}
|
|
5069
|
-
const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
|
|
5070
5086
|
const isDirectory = entry.dirent.isDirectory();
|
|
5071
|
-
const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(
|
|
5087
|
+
const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(filepath, negativeRe, isDirectory);
|
|
5072
5088
|
if (this._settings.unique && isMatched) {
|
|
5073
|
-
this._createIndexRecord(
|
|
5089
|
+
this._createIndexRecord(filepath);
|
|
5074
5090
|
}
|
|
5075
5091
|
return isMatched;
|
|
5076
5092
|
}
|
|
5077
|
-
_isDuplicateEntry(
|
|
5078
|
-
return this.index.has(
|
|
5093
|
+
_isDuplicateEntry(filepath) {
|
|
5094
|
+
return this.index.has(filepath);
|
|
5079
5095
|
}
|
|
5080
|
-
_createIndexRecord(
|
|
5081
|
-
this.index.set(
|
|
5096
|
+
_createIndexRecord(filepath) {
|
|
5097
|
+
this.index.set(filepath, void 0);
|
|
5082
5098
|
}
|
|
5083
5099
|
_onlyFileFilter(entry) {
|
|
5084
5100
|
return this._settings.onlyFiles && !entry.dirent.isFile();
|
|
@@ -5093,8 +5109,7 @@ var require_entry = __commonJS({
|
|
|
5093
5109
|
const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath);
|
|
5094
5110
|
return utils.pattern.matchAny(fullpath, patternsRe);
|
|
5095
5111
|
}
|
|
5096
|
-
_isMatchToPatterns(
|
|
5097
|
-
const filepath = utils.path.removeLeadingDotSegment(entryPath);
|
|
5112
|
+
_isMatchToPatterns(filepath, patternsRe, isDirectory) {
|
|
5098
5113
|
const isMatched = utils.pattern.matchAny(filepath, patternsRe);
|
|
5099
5114
|
if (!isMatched && isDirectory) {
|
|
5100
5115
|
return utils.pattern.matchAny(filepath + "/", patternsRe);
|
|
@@ -5400,6 +5415,7 @@ var require_settings4 = __commonJS({
|
|
|
5400
5415
|
if (this.stats) {
|
|
5401
5416
|
this.objectMode = true;
|
|
5402
5417
|
}
|
|
5418
|
+
this.ignore = [].concat(this.ignore);
|
|
5403
5419
|
}
|
|
5404
5420
|
_getValue(option, value) {
|
|
5405
5421
|
return option === void 0 ? value : option;
|
|
@@ -5417,7 +5433,6 @@ var require_out4 = __commonJS({
|
|
|
5417
5433
|
"node_modules/fast-glob/out/index.js"(exports, module) {
|
|
5418
5434
|
"use strict";
|
|
5419
5435
|
var taskManager = require_tasks();
|
|
5420
|
-
var patternManager = require_patterns();
|
|
5421
5436
|
var async_1 = require_async6();
|
|
5422
5437
|
var stream_1 = require_stream4();
|
|
5423
5438
|
var sync_1 = require_sync6();
|
|
@@ -5430,6 +5445,10 @@ var require_out4 = __commonJS({
|
|
|
5430
5445
|
return utils.array.flatten(result);
|
|
5431
5446
|
}
|
|
5432
5447
|
(function(FastGlob2) {
|
|
5448
|
+
FastGlob2.glob = FastGlob2;
|
|
5449
|
+
FastGlob2.globSync = sync;
|
|
5450
|
+
FastGlob2.globStream = stream;
|
|
5451
|
+
FastGlob2.async = FastGlob2;
|
|
5433
5452
|
function sync(source, options8) {
|
|
5434
5453
|
assertPatternsInput(source);
|
|
5435
5454
|
const works = getWorks(source, sync_1.default, options8);
|
|
@@ -5444,7 +5463,7 @@ var require_out4 = __commonJS({
|
|
|
5444
5463
|
FastGlob2.stream = stream;
|
|
5445
5464
|
function generateTasks(source, options8) {
|
|
5446
5465
|
assertPatternsInput(source);
|
|
5447
|
-
const patterns =
|
|
5466
|
+
const patterns = [].concat(source);
|
|
5448
5467
|
const settings = new settings_1.default(options8);
|
|
5449
5468
|
return taskManager.generate(patterns, settings);
|
|
5450
5469
|
}
|
|
@@ -5460,9 +5479,40 @@ var require_out4 = __commonJS({
|
|
|
5460
5479
|
return utils.path.escape(source);
|
|
5461
5480
|
}
|
|
5462
5481
|
FastGlob2.escapePath = escapePath;
|
|
5482
|
+
function convertPathToPattern(source) {
|
|
5483
|
+
assertPatternsInput(source);
|
|
5484
|
+
return utils.path.convertPathToPattern(source);
|
|
5485
|
+
}
|
|
5486
|
+
FastGlob2.convertPathToPattern = convertPathToPattern;
|
|
5487
|
+
let posix;
|
|
5488
|
+
(function(posix2) {
|
|
5489
|
+
function escapePath2(source) {
|
|
5490
|
+
assertPatternsInput(source);
|
|
5491
|
+
return utils.path.escapePosixPath(source);
|
|
5492
|
+
}
|
|
5493
|
+
posix2.escapePath = escapePath2;
|
|
5494
|
+
function convertPathToPattern2(source) {
|
|
5495
|
+
assertPatternsInput(source);
|
|
5496
|
+
return utils.path.convertPosixPathToPattern(source);
|
|
5497
|
+
}
|
|
5498
|
+
posix2.convertPathToPattern = convertPathToPattern2;
|
|
5499
|
+
})(posix = FastGlob2.posix || (FastGlob2.posix = {}));
|
|
5500
|
+
let win32;
|
|
5501
|
+
(function(win322) {
|
|
5502
|
+
function escapePath2(source) {
|
|
5503
|
+
assertPatternsInput(source);
|
|
5504
|
+
return utils.path.escapeWindowsPath(source);
|
|
5505
|
+
}
|
|
5506
|
+
win322.escapePath = escapePath2;
|
|
5507
|
+
function convertPathToPattern2(source) {
|
|
5508
|
+
assertPatternsInput(source);
|
|
5509
|
+
return utils.path.convertWindowsPathToPattern(source);
|
|
5510
|
+
}
|
|
5511
|
+
win322.convertPathToPattern = convertPathToPattern2;
|
|
5512
|
+
})(win32 = FastGlob2.win32 || (FastGlob2.win32 = {}));
|
|
5463
5513
|
})(FastGlob || (FastGlob = {}));
|
|
5464
5514
|
function getWorks(source, _Provider, options8) {
|
|
5465
|
-
const patterns =
|
|
5515
|
+
const patterns = [].concat(source);
|
|
5466
5516
|
const settings = new settings_1.default(options8);
|
|
5467
5517
|
const tasks = taskManager.generate(patterns, settings);
|
|
5468
5518
|
const provider = new _Provider(settings);
|
|
@@ -6068,9 +6118,9 @@ var require_lib = __commonJS({
|
|
|
6068
6118
|
}
|
|
6069
6119
|
});
|
|
6070
6120
|
|
|
6071
|
-
// node_modules/@babel/
|
|
6121
|
+
// node_modules/@babel/code-frame/node_modules/escape-string-regexp/index.js
|
|
6072
6122
|
var require_escape_string_regexp = __commonJS({
|
|
6073
|
-
"node_modules/@babel/
|
|
6123
|
+
"node_modules/@babel/code-frame/node_modules/escape-string-regexp/index.js"(exports, module) {
|
|
6074
6124
|
"use strict";
|
|
6075
6125
|
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
|
|
6076
6126
|
module.exports = function(str) {
|
|
@@ -7224,9 +7274,9 @@ var require_ansi_styles = __commonJS({
|
|
|
7224
7274
|
}
|
|
7225
7275
|
});
|
|
7226
7276
|
|
|
7227
|
-
// node_modules/@babel/
|
|
7277
|
+
// node_modules/@babel/code-frame/node_modules/has-flag/index.js
|
|
7228
7278
|
var require_has_flag = __commonJS({
|
|
7229
|
-
"node_modules/@babel/
|
|
7279
|
+
"node_modules/@babel/code-frame/node_modules/has-flag/index.js"(exports, module) {
|
|
7230
7280
|
"use strict";
|
|
7231
7281
|
module.exports = (flag, argv) => {
|
|
7232
7282
|
argv = argv || process.argv;
|
|
@@ -7238,9 +7288,9 @@ var require_has_flag = __commonJS({
|
|
|
7238
7288
|
}
|
|
7239
7289
|
});
|
|
7240
7290
|
|
|
7241
|
-
// node_modules/@babel/
|
|
7291
|
+
// node_modules/@babel/code-frame/node_modules/supports-color/index.js
|
|
7242
7292
|
var require_supports_color = __commonJS({
|
|
7243
|
-
"node_modules/@babel/
|
|
7293
|
+
"node_modules/@babel/code-frame/node_modules/supports-color/index.js"(exports, module) {
|
|
7244
7294
|
"use strict";
|
|
7245
7295
|
var os2 = __require("os");
|
|
7246
7296
|
var hasFlag2 = require_has_flag();
|
|
@@ -7333,9 +7383,9 @@ var require_supports_color = __commonJS({
|
|
|
7333
7383
|
}
|
|
7334
7384
|
});
|
|
7335
7385
|
|
|
7336
|
-
// node_modules/@babel/
|
|
7386
|
+
// node_modules/@babel/code-frame/node_modules/chalk/templates.js
|
|
7337
7387
|
var require_templates = __commonJS({
|
|
7338
|
-
"node_modules/@babel/
|
|
7388
|
+
"node_modules/@babel/code-frame/node_modules/chalk/templates.js"(exports, module) {
|
|
7339
7389
|
"use strict";
|
|
7340
7390
|
var TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
7341
7391
|
var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
@@ -7444,9 +7494,9 @@ var require_templates = __commonJS({
|
|
|
7444
7494
|
}
|
|
7445
7495
|
});
|
|
7446
7496
|
|
|
7447
|
-
// node_modules/@babel/
|
|
7497
|
+
// node_modules/@babel/code-frame/node_modules/chalk/index.js
|
|
7448
7498
|
var require_chalk = __commonJS({
|
|
7449
|
-
"node_modules/@babel/
|
|
7499
|
+
"node_modules/@babel/code-frame/node_modules/chalk/index.js"(exports, module) {
|
|
7450
7500
|
"use strict";
|
|
7451
7501
|
var escapeStringRegexp2 = require_escape_string_regexp();
|
|
7452
7502
|
var ansiStyles2 = require_ansi_styles();
|
|
@@ -7619,23 +7669,23 @@ var require_lib2 = __commonJS({
|
|
|
7619
7669
|
value: true
|
|
7620
7670
|
});
|
|
7621
7671
|
exports.default = highlight;
|
|
7622
|
-
exports.getChalk = getChalk;
|
|
7623
7672
|
exports.shouldHighlight = shouldHighlight;
|
|
7624
7673
|
var _jsTokens = require_js_tokens();
|
|
7625
7674
|
var _helperValidatorIdentifier = require_lib();
|
|
7626
|
-
var
|
|
7675
|
+
var _chalk2 = require_chalk();
|
|
7676
|
+
var chalk2 = _chalk2;
|
|
7627
7677
|
var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
|
|
7628
|
-
function getDefs(
|
|
7678
|
+
function getDefs(chalk3) {
|
|
7629
7679
|
return {
|
|
7630
|
-
keyword:
|
|
7631
|
-
capitalized:
|
|
7632
|
-
jsxIdentifier:
|
|
7633
|
-
punctuator:
|
|
7634
|
-
number:
|
|
7635
|
-
string:
|
|
7636
|
-
regex:
|
|
7637
|
-
comment:
|
|
7638
|
-
invalid:
|
|
7680
|
+
keyword: chalk3.cyan,
|
|
7681
|
+
capitalized: chalk3.yellow,
|
|
7682
|
+
jsxIdentifier: chalk3.yellow,
|
|
7683
|
+
punctuator: chalk3.yellow,
|
|
7684
|
+
number: chalk3.magenta,
|
|
7685
|
+
string: chalk3.green,
|
|
7686
|
+
regex: chalk3.magenta,
|
|
7687
|
+
comment: chalk3.grey,
|
|
7688
|
+
invalid: chalk3.white.bgRed.bold
|
|
7639
7689
|
};
|
|
7640
7690
|
}
|
|
7641
7691
|
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
@@ -7690,18 +7740,28 @@ var require_lib2 = __commonJS({
|
|
|
7690
7740
|
return highlighted;
|
|
7691
7741
|
}
|
|
7692
7742
|
function shouldHighlight(options8) {
|
|
7693
|
-
return !!
|
|
7743
|
+
return !!chalk2.supportsColor || options8.forceColor;
|
|
7744
|
+
}
|
|
7745
|
+
var chalkWithForcedColor = void 0;
|
|
7746
|
+
function getChalk(forceColor) {
|
|
7747
|
+
if (forceColor) {
|
|
7748
|
+
var _chalkWithForcedColor;
|
|
7749
|
+
(_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new chalk2.constructor({
|
|
7750
|
+
enabled: true,
|
|
7751
|
+
level: 1
|
|
7752
|
+
});
|
|
7753
|
+
return chalkWithForcedColor;
|
|
7754
|
+
}
|
|
7755
|
+
return chalk2;
|
|
7694
7756
|
}
|
|
7695
|
-
|
|
7696
|
-
|
|
7697
|
-
|
|
7698
|
-
|
|
7699
|
-
}) : _chalk;
|
|
7757
|
+
{
|
|
7758
|
+
{
|
|
7759
|
+
exports.getChalk = (options8) => getChalk(options8.forceColor);
|
|
7760
|
+
}
|
|
7700
7761
|
}
|
|
7701
7762
|
function highlight(code, options8 = {}) {
|
|
7702
7763
|
if (code !== "" && shouldHighlight(options8)) {
|
|
7703
|
-
const
|
|
7704
|
-
const defs = getDefs(chalk2);
|
|
7764
|
+
const defs = getDefs(getChalk(options8.forceColor));
|
|
7705
7765
|
return highlightTokens(defs, code);
|
|
7706
7766
|
} else {
|
|
7707
7767
|
return code;
|
|
@@ -7720,12 +7780,26 @@ var require_lib3 = __commonJS({
|
|
|
7720
7780
|
exports.codeFrameColumns = codeFrameColumns2;
|
|
7721
7781
|
exports.default = _default;
|
|
7722
7782
|
var _highlight = require_lib2();
|
|
7783
|
+
var _chalk2 = require_chalk();
|
|
7784
|
+
var chalk2 = _chalk2;
|
|
7785
|
+
var chalkWithForcedColor = void 0;
|
|
7786
|
+
function getChalk(forceColor) {
|
|
7787
|
+
if (forceColor) {
|
|
7788
|
+
var _chalkWithForcedColor;
|
|
7789
|
+
(_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new chalk2.constructor({
|
|
7790
|
+
enabled: true,
|
|
7791
|
+
level: 1
|
|
7792
|
+
});
|
|
7793
|
+
return chalkWithForcedColor;
|
|
7794
|
+
}
|
|
7795
|
+
return chalk2;
|
|
7796
|
+
}
|
|
7723
7797
|
var deprecationWarningShown = false;
|
|
7724
|
-
function getDefs(
|
|
7798
|
+
function getDefs(chalk3) {
|
|
7725
7799
|
return {
|
|
7726
|
-
gutter:
|
|
7727
|
-
marker:
|
|
7728
|
-
message:
|
|
7800
|
+
gutter: chalk3.grey,
|
|
7801
|
+
marker: chalk3.red.bold,
|
|
7802
|
+
message: chalk3.red.bold
|
|
7729
7803
|
};
|
|
7730
7804
|
}
|
|
7731
7805
|
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
@@ -7787,8 +7861,8 @@ var require_lib3 = __commonJS({
|
|
|
7787
7861
|
}
|
|
7788
7862
|
function codeFrameColumns2(rawLines, loc, opts = {}) {
|
|
7789
7863
|
const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
|
|
7790
|
-
const
|
|
7791
|
-
const defs = getDefs(
|
|
7864
|
+
const chalk3 = getChalk(opts.forceColor);
|
|
7865
|
+
const defs = getDefs(chalk3);
|
|
7792
7866
|
const maybeHighlight = (chalkFn, string) => {
|
|
7793
7867
|
return highlighted ? chalkFn(string) : string;
|
|
7794
7868
|
};
|
|
@@ -7827,7 +7901,7 @@ var require_lib3 = __commonJS({
|
|
|
7827
7901
|
${frame}`;
|
|
7828
7902
|
}
|
|
7829
7903
|
if (highlighted) {
|
|
7830
|
-
return
|
|
7904
|
+
return chalk3.reset(frame);
|
|
7831
7905
|
} else {
|
|
7832
7906
|
return frame;
|
|
7833
7907
|
}
|
|
@@ -19841,11 +19915,16 @@ function importFromFile(specifier, parent) {
|
|
|
19841
19915
|
var import_from_file_default = importFromFile;
|
|
19842
19916
|
|
|
19843
19917
|
// src/config/load-external-config.js
|
|
19918
|
+
var requireErrorCodesShouldBeIgnored = /* @__PURE__ */ new Set([
|
|
19919
|
+
"MODULE_NOT_FOUND",
|
|
19920
|
+
"ERR_REQUIRE_ESM",
|
|
19921
|
+
"ERR_PACKAGE_PATH_NOT_EXPORTED"
|
|
19922
|
+
]);
|
|
19844
19923
|
async function loadExternalConfig(config, filepath) {
|
|
19845
19924
|
try {
|
|
19846
19925
|
return require_from_file_default(config, filepath);
|
|
19847
19926
|
} catch (error) {
|
|
19848
|
-
if (
|
|
19927
|
+
if (!requireErrorCodesShouldBeIgnored.has(error == null ? void 0 : error.code)) {
|
|
19849
19928
|
throw error;
|
|
19850
19929
|
}
|
|
19851
19930
|
}
|
|
@@ -21402,7 +21481,7 @@ function isNextLineEmpty2(text, startIndex) {
|
|
|
21402
21481
|
import * as doc from "./doc.mjs";
|
|
21403
21482
|
|
|
21404
21483
|
// src/main/version.evaluate.cjs
|
|
21405
|
-
var version_evaluate_default = "3.0.
|
|
21484
|
+
var version_evaluate_default = "3.0.3";
|
|
21406
21485
|
|
|
21407
21486
|
// src/index.js
|
|
21408
21487
|
function withPlugins(fn, optionsArgumentIndex = 1) {
|