prettier 2.6.1 → 2.6.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/LICENSE +13 -47
- package/cli.js +159 -96
- package/esm/parser-flow.mjs +18 -18
- package/esm/parser-html.mjs +15 -15
- package/esm/parser-markdown.mjs +30 -30
- package/esm/parser-meriyah.mjs +2 -2
- package/esm/parser-typescript.mjs +38 -38
- package/esm/standalone.mjs +66 -66
- package/index.js +65 -28
- package/package.json +1 -1
- package/parser-flow.js +18 -18
- package/parser-html.js +20 -20
- package/parser-markdown.js +32 -32
- package/parser-meriyah.js +2 -2
- package/parser-typescript.js +38 -38
- package/standalone.js +60 -60
package/LICENSE
CHANGED
|
@@ -337,7 +337,7 @@ License: MIT
|
|
|
337
337
|
|
|
338
338
|
----------------------------------------
|
|
339
339
|
|
|
340
|
-
### @typescript-eslint/types@v5.
|
|
340
|
+
### @typescript-eslint/types@v5.17.0
|
|
341
341
|
|
|
342
342
|
License: MIT
|
|
343
343
|
Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
|
|
@@ -366,7 +366,7 @@ Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
|
|
|
366
366
|
|
|
367
367
|
----------------------------------------
|
|
368
368
|
|
|
369
|
-
### @typescript-eslint/typescript-estree@v5.
|
|
369
|
+
### @typescript-eslint/typescript-estree@v5.17.0
|
|
370
370
|
|
|
371
371
|
License: BSD-2-Clause
|
|
372
372
|
Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
|
|
@@ -400,7 +400,7 @@ Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
|
|
|
400
400
|
|
|
401
401
|
----------------------------------------
|
|
402
402
|
|
|
403
|
-
### @typescript-eslint/visitor-keys@v5.
|
|
403
|
+
### @typescript-eslint/visitor-keys@v5.17.0
|
|
404
404
|
|
|
405
405
|
License: MIT
|
|
406
406
|
Repository: <https://github.com/typescript-eslint/typescript-eslint.git>
|
|
@@ -560,23 +560,6 @@ By: Ika
|
|
|
560
560
|
|
|
561
561
|
----------------------------------------
|
|
562
562
|
|
|
563
|
-
### ansi-regex@v5.0.1
|
|
564
|
-
|
|
565
|
-
License: MIT
|
|
566
|
-
By: Sindre Sorhus
|
|
567
|
-
|
|
568
|
-
> MIT License
|
|
569
|
-
>
|
|
570
|
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
571
|
-
>
|
|
572
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
573
|
-
>
|
|
574
|
-
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
575
|
-
>
|
|
576
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
577
|
-
|
|
578
|
-
----------------------------------------
|
|
579
|
-
|
|
580
563
|
### ansi-regex@v6.0.1
|
|
581
564
|
|
|
582
565
|
License: MIT
|
|
@@ -1440,7 +1423,7 @@ By: Sindre Sorhus
|
|
|
1440
1423
|
|
|
1441
1424
|
----------------------------------------
|
|
1442
1425
|
|
|
1443
|
-
### escape-string-regexp@
|
|
1426
|
+
### escape-string-regexp@v5.0.0
|
|
1444
1427
|
|
|
1445
1428
|
License: MIT
|
|
1446
1429
|
By: Sindre Sorhus
|
|
@@ -1946,7 +1929,7 @@ Repository: <git+https://github.com/mk-pmb/flatten-js.git>
|
|
|
1946
1929
|
|
|
1947
1930
|
----------------------------------------
|
|
1948
1931
|
|
|
1949
|
-
### flow-parser@v0.
|
|
1932
|
+
### flow-parser@v0.175.0
|
|
1950
1933
|
|
|
1951
1934
|
License: MIT
|
|
1952
1935
|
By: Flow Team
|
|
@@ -2237,7 +2220,7 @@ By: Sindre Sorhus
|
|
|
2237
2220
|
|
|
2238
2221
|
----------------------------------------
|
|
2239
2222
|
|
|
2240
|
-
### html-element-attributes@
|
|
2223
|
+
### html-element-attributes@v3.1.0
|
|
2241
2224
|
|
|
2242
2225
|
License: MIT
|
|
2243
2226
|
By: Titus Wormer
|
|
@@ -2267,7 +2250,7 @@ By: Titus Wormer
|
|
|
2267
2250
|
|
|
2268
2251
|
----------------------------------------
|
|
2269
2252
|
|
|
2270
|
-
### html-tag-names@
|
|
2253
|
+
### html-tag-names@v2.0.1
|
|
2271
2254
|
|
|
2272
2255
|
License: MIT
|
|
2273
2256
|
By: Titus Wormer
|
|
@@ -2297,7 +2280,7 @@ By: Titus Wormer
|
|
|
2297
2280
|
|
|
2298
2281
|
----------------------------------------
|
|
2299
2282
|
|
|
2300
|
-
### html-void-elements@
|
|
2283
|
+
### html-void-elements@v2.0.1
|
|
2301
2284
|
|
|
2302
2285
|
License: MIT
|
|
2303
2286
|
By: Titus Wormer
|
|
@@ -3294,14 +3277,14 @@ By: Sindre Sorhus
|
|
|
3294
3277
|
|
|
3295
3278
|
----------------------------------------
|
|
3296
3279
|
|
|
3297
|
-
### leven@
|
|
3280
|
+
### leven@v4.0.0
|
|
3298
3281
|
|
|
3299
3282
|
License: MIT
|
|
3300
3283
|
By: Sindre Sorhus
|
|
3301
3284
|
|
|
3302
3285
|
> MIT License
|
|
3303
3286
|
>
|
|
3304
|
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
3287
|
+
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
3305
3288
|
>
|
|
3306
3289
|
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
3307
3290
|
>
|
|
@@ -3623,7 +3606,7 @@ Repository: <git@github.com:teambition/merge2.git>
|
|
|
3623
3606
|
|
|
3624
3607
|
----------------------------------------
|
|
3625
3608
|
|
|
3626
|
-
### meriyah@v4.2.
|
|
3609
|
+
### meriyah@v4.2.1
|
|
3627
3610
|
|
|
3628
3611
|
License: ISC
|
|
3629
3612
|
By: Kenny F.
|
|
@@ -3639,7 +3622,7 @@ Repository: <https://github.com/meriyah/meriyah>
|
|
|
3639
3622
|
|
|
3640
3623
|
----------------------------------------
|
|
3641
3624
|
|
|
3642
|
-
### micromatch@v4.0.
|
|
3625
|
+
### micromatch@v4.0.5
|
|
3643
3626
|
|
|
3644
3627
|
License: MIT
|
|
3645
3628
|
By: Jon Schlinkert
|
|
@@ -4802,23 +4785,6 @@ By: Sindre Sorhus
|
|
|
4802
4785
|
|
|
4803
4786
|
----------------------------------------
|
|
4804
4787
|
|
|
4805
|
-
### strip-ansi@v6.0.0
|
|
4806
|
-
|
|
4807
|
-
License: MIT
|
|
4808
|
-
By: Sindre Sorhus
|
|
4809
|
-
|
|
4810
|
-
> MIT License
|
|
4811
|
-
>
|
|
4812
|
-
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
4813
|
-
>
|
|
4814
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4815
|
-
>
|
|
4816
|
-
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
4817
|
-
>
|
|
4818
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
4819
|
-
|
|
4820
|
-
----------------------------------------
|
|
4821
|
-
|
|
4822
4788
|
### strip-ansi@v7.0.1
|
|
4823
4789
|
|
|
4824
4790
|
License: MIT
|
|
@@ -5049,7 +5015,7 @@ Repository: <https://github.com/ajafff/tsutils>
|
|
|
5049
5015
|
|
|
5050
5016
|
----------------------------------------
|
|
5051
5017
|
|
|
5052
|
-
### typescript@v4.6.
|
|
5018
|
+
### typescript@v4.6.3
|
|
5053
5019
|
|
|
5054
5020
|
License: Apache-2.0
|
|
5055
5021
|
By: Microsoft Corp.
|
package/cli.js
CHANGED
|
@@ -1593,24 +1593,6 @@ var require_fast_json_stable_stringify = __commonJS2({
|
|
|
1593
1593
|
};
|
|
1594
1594
|
}
|
|
1595
1595
|
});
|
|
1596
|
-
var require_ansi_regex = __commonJS2({
|
|
1597
|
-
"node_modules/ansi-regex/index.js"(exports2, module2) {
|
|
1598
|
-
"use strict";
|
|
1599
|
-
module2.exports = ({
|
|
1600
|
-
onlyFirst = false
|
|
1601
|
-
} = {}) => {
|
|
1602
|
-
const pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
|
|
1603
|
-
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
1604
|
-
};
|
|
1605
|
-
}
|
|
1606
|
-
});
|
|
1607
|
-
var require_strip_ansi = __commonJS2({
|
|
1608
|
-
"node_modules/strip-ansi/index.js"(exports2, module2) {
|
|
1609
|
-
"use strict";
|
|
1610
|
-
var ansiRegex = require_ansi_regex();
|
|
1611
|
-
module2.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
|
|
1612
|
-
}
|
|
1613
|
-
});
|
|
1614
1596
|
var require_clone = __commonJS2({
|
|
1615
1597
|
"node_modules/clone/clone.js"(exports2, module2) {
|
|
1616
1598
|
var clone = function() {
|
|
@@ -1811,6 +1793,52 @@ var require_wcwidth = __commonJS2({
|
|
|
1811
1793
|
}
|
|
1812
1794
|
}
|
|
1813
1795
|
});
|
|
1796
|
+
var require_strip_ansi = __commonJS2({
|
|
1797
|
+
"vendors/strip-ansi.js"(exports2, module2) {
|
|
1798
|
+
var __defProp = Object.defineProperty;
|
|
1799
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
1800
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
1801
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
1802
|
+
var __export = (target, all) => {
|
|
1803
|
+
for (var name in all)
|
|
1804
|
+
__defProp(target, name, {
|
|
1805
|
+
get: all[name],
|
|
1806
|
+
enumerable: true
|
|
1807
|
+
});
|
|
1808
|
+
};
|
|
1809
|
+
var __copyProps = (to, from, except, desc) => {
|
|
1810
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
1811
|
+
for (let key of __getOwnPropNames22(from))
|
|
1812
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
1813
|
+
__defProp(to, key, {
|
|
1814
|
+
get: () => from[key],
|
|
1815
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
1816
|
+
});
|
|
1817
|
+
}
|
|
1818
|
+
return to;
|
|
1819
|
+
};
|
|
1820
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", {
|
|
1821
|
+
value: true
|
|
1822
|
+
}), mod);
|
|
1823
|
+
var strip_ansi_exports = {};
|
|
1824
|
+
__export(strip_ansi_exports, {
|
|
1825
|
+
default: () => stripAnsi
|
|
1826
|
+
});
|
|
1827
|
+
module2.exports = __toCommonJS(strip_ansi_exports);
|
|
1828
|
+
function ansiRegex({
|
|
1829
|
+
onlyFirst = false
|
|
1830
|
+
} = {}) {
|
|
1831
|
+
const pattern = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
|
|
1832
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
1833
|
+
}
|
|
1834
|
+
function stripAnsi(string) {
|
|
1835
|
+
if (typeof string !== "string") {
|
|
1836
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
1837
|
+
}
|
|
1838
|
+
return string.replace(ansiRegex(), "");
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
});
|
|
1814
1842
|
var require_chalk = __commonJS2({
|
|
1815
1843
|
"vendors/chalk.js"(exports2, module2) {
|
|
1816
1844
|
var __create = Object.create;
|
|
@@ -2362,8 +2390,10 @@ var require_logger = __commonJS2({
|
|
|
2362
2390
|
"src/cli/logger.js"(exports2, module2) {
|
|
2363
2391
|
"use strict";
|
|
2364
2392
|
var readline = require("readline");
|
|
2365
|
-
var stripAnsi = require_strip_ansi();
|
|
2366
2393
|
var wcwidth = require_wcwidth();
|
|
2394
|
+
var {
|
|
2395
|
+
default: stripAnsi
|
|
2396
|
+
} = require_strip_ansi();
|
|
2367
2397
|
var {
|
|
2368
2398
|
default: chalk
|
|
2369
2399
|
} = require_chalk();
|
|
@@ -4020,61 +4050,6 @@ var require_camelcase = __commonJS2({
|
|
|
4020
4050
|
module2.exports.default = camelCase;
|
|
4021
4051
|
}
|
|
4022
4052
|
});
|
|
4023
|
-
var require_leven = __commonJS2({
|
|
4024
|
-
"node_modules/leven/index.js"(exports2, module2) {
|
|
4025
|
-
"use strict";
|
|
4026
|
-
var array = [];
|
|
4027
|
-
var charCodeCache = [];
|
|
4028
|
-
var leven = (left, right) => {
|
|
4029
|
-
if (left === right) {
|
|
4030
|
-
return 0;
|
|
4031
|
-
}
|
|
4032
|
-
const swap = left;
|
|
4033
|
-
if (left.length > right.length) {
|
|
4034
|
-
left = right;
|
|
4035
|
-
right = swap;
|
|
4036
|
-
}
|
|
4037
|
-
let leftLength = left.length;
|
|
4038
|
-
let rightLength = right.length;
|
|
4039
|
-
while (leftLength > 0 && left.charCodeAt(~-leftLength) === right.charCodeAt(~-rightLength)) {
|
|
4040
|
-
leftLength--;
|
|
4041
|
-
rightLength--;
|
|
4042
|
-
}
|
|
4043
|
-
let start = 0;
|
|
4044
|
-
while (start < leftLength && left.charCodeAt(start) === right.charCodeAt(start)) {
|
|
4045
|
-
start++;
|
|
4046
|
-
}
|
|
4047
|
-
leftLength -= start;
|
|
4048
|
-
rightLength -= start;
|
|
4049
|
-
if (leftLength === 0) {
|
|
4050
|
-
return rightLength;
|
|
4051
|
-
}
|
|
4052
|
-
let bCharCode;
|
|
4053
|
-
let result;
|
|
4054
|
-
let temp;
|
|
4055
|
-
let temp2;
|
|
4056
|
-
let i = 0;
|
|
4057
|
-
let j = 0;
|
|
4058
|
-
while (i < leftLength) {
|
|
4059
|
-
charCodeCache[i] = left.charCodeAt(start + i);
|
|
4060
|
-
array[i] = ++i;
|
|
4061
|
-
}
|
|
4062
|
-
while (j < rightLength) {
|
|
4063
|
-
bCharCode = right.charCodeAt(start + j);
|
|
4064
|
-
temp = j++;
|
|
4065
|
-
result = j;
|
|
4066
|
-
for (i = 0; i < leftLength; i++) {
|
|
4067
|
-
temp2 = bCharCode === charCodeCache[i] ? temp : temp + 1;
|
|
4068
|
-
temp = array[i];
|
|
4069
|
-
result = array[i] = temp > result ? temp2 > result ? result + 1 : temp2 : temp2 > temp ? temp + 1 : temp2;
|
|
4070
|
-
}
|
|
4071
|
-
}
|
|
4072
|
-
return result;
|
|
4073
|
-
};
|
|
4074
|
-
module2.exports = leven;
|
|
4075
|
-
module2.exports.default = leven;
|
|
4076
|
-
}
|
|
4077
|
-
});
|
|
4078
4053
|
var require_minimist = __commonJS2({
|
|
4079
4054
|
"node_modules/minimist/index.js"(exports2, module2) {
|
|
4080
4055
|
module2.exports = function(args, opts) {
|
|
@@ -5372,23 +5347,118 @@ var require_create_minimist_options = __commonJS2({
|
|
|
5372
5347
|
};
|
|
5373
5348
|
}
|
|
5374
5349
|
});
|
|
5375
|
-
var
|
|
5376
|
-
"
|
|
5350
|
+
var require_leven = __commonJS2({
|
|
5351
|
+
"vendors/leven.js"(exports2, module2) {
|
|
5352
|
+
var __defProp = Object.defineProperty;
|
|
5353
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5354
|
+
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
5355
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5356
|
+
var __export = (target, all) => {
|
|
5357
|
+
for (var name in all)
|
|
5358
|
+
__defProp(target, name, {
|
|
5359
|
+
get: all[name],
|
|
5360
|
+
enumerable: true
|
|
5361
|
+
});
|
|
5362
|
+
};
|
|
5363
|
+
var __copyProps = (to, from, except, desc) => {
|
|
5364
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
5365
|
+
for (let key of __getOwnPropNames22(from))
|
|
5366
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
5367
|
+
__defProp(to, key, {
|
|
5368
|
+
get: () => from[key],
|
|
5369
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
5370
|
+
});
|
|
5371
|
+
}
|
|
5372
|
+
return to;
|
|
5373
|
+
};
|
|
5374
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", {
|
|
5375
|
+
value: true
|
|
5376
|
+
}), mod);
|
|
5377
|
+
var leven_exports = {};
|
|
5378
|
+
__export(leven_exports, {
|
|
5379
|
+
default: () => leven
|
|
5380
|
+
});
|
|
5381
|
+
module2.exports = __toCommonJS(leven_exports);
|
|
5382
|
+
var array = [];
|
|
5383
|
+
var characterCodeCache = [];
|
|
5384
|
+
function leven(first, second) {
|
|
5385
|
+
if (first === second) {
|
|
5386
|
+
return 0;
|
|
5387
|
+
}
|
|
5388
|
+
const swap = first;
|
|
5389
|
+
if (first.length > second.length) {
|
|
5390
|
+
first = second;
|
|
5391
|
+
second = swap;
|
|
5392
|
+
}
|
|
5393
|
+
let firstLength = first.length;
|
|
5394
|
+
let secondLength = second.length;
|
|
5395
|
+
while (firstLength > 0 && first.charCodeAt(~-firstLength) === second.charCodeAt(~-secondLength)) {
|
|
5396
|
+
firstLength--;
|
|
5397
|
+
secondLength--;
|
|
5398
|
+
}
|
|
5399
|
+
let start = 0;
|
|
5400
|
+
while (start < firstLength && first.charCodeAt(start) === second.charCodeAt(start)) {
|
|
5401
|
+
start++;
|
|
5402
|
+
}
|
|
5403
|
+
firstLength -= start;
|
|
5404
|
+
secondLength -= start;
|
|
5405
|
+
if (firstLength === 0) {
|
|
5406
|
+
return secondLength;
|
|
5407
|
+
}
|
|
5408
|
+
let bCharacterCode;
|
|
5409
|
+
let result;
|
|
5410
|
+
let temporary;
|
|
5411
|
+
let temporary2;
|
|
5412
|
+
let index = 0;
|
|
5413
|
+
let index2 = 0;
|
|
5414
|
+
while (index < firstLength) {
|
|
5415
|
+
characterCodeCache[index] = first.charCodeAt(start + index);
|
|
5416
|
+
array[index] = ++index;
|
|
5417
|
+
}
|
|
5418
|
+
while (index2 < secondLength) {
|
|
5419
|
+
bCharacterCode = second.charCodeAt(start + index2);
|
|
5420
|
+
temporary = index2++;
|
|
5421
|
+
result = index2;
|
|
5422
|
+
for (index = 0; index < firstLength; index++) {
|
|
5423
|
+
temporary2 = bCharacterCode === characterCodeCache[index] ? temporary : temporary + 1;
|
|
5424
|
+
temporary = array[index];
|
|
5425
|
+
result = array[index] = temporary > result ? temporary2 > result ? result + 1 : temporary2 : temporary2 > temporary ? temporary + 1 : temporary2;
|
|
5426
|
+
}
|
|
5427
|
+
}
|
|
5428
|
+
return result;
|
|
5429
|
+
}
|
|
5430
|
+
}
|
|
5431
|
+
});
|
|
5432
|
+
var require_normalize_cli_options = __commonJS2({
|
|
5433
|
+
"src/cli/options/normalize-cli-options.js"(exports2, module2) {
|
|
5377
5434
|
"use strict";
|
|
5378
|
-
var pick = require_pick();
|
|
5379
|
-
var camelCase = require_camelcase();
|
|
5380
|
-
var leven = require_leven();
|
|
5381
5435
|
var {
|
|
5382
5436
|
default: chalk
|
|
5383
5437
|
} = require_chalk();
|
|
5384
5438
|
var {
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5439
|
+
default: leven
|
|
5440
|
+
} = require_leven();
|
|
5441
|
+
var {
|
|
5442
|
+
optionsNormalizer
|
|
5388
5443
|
} = require_prettier_internal();
|
|
5444
|
+
function normalizeCliOptions(options, optionInfos, opts) {
|
|
5445
|
+
return optionsNormalizer.normalizeCliOptions(options, optionInfos, Object.assign({
|
|
5446
|
+
colorsModule: chalk,
|
|
5447
|
+
levenshteinDistance: leven
|
|
5448
|
+
}, opts));
|
|
5449
|
+
}
|
|
5450
|
+
module2.exports = normalizeCliOptions;
|
|
5451
|
+
}
|
|
5452
|
+
});
|
|
5453
|
+
var require_parse_cli_arguments = __commonJS2({
|
|
5454
|
+
"src/cli/options/parse-cli-arguments.js"(exports2, module2) {
|
|
5455
|
+
"use strict";
|
|
5456
|
+
var pick = require_pick();
|
|
5457
|
+
var camelCase = require_camelcase();
|
|
5389
5458
|
var getContextOptions = require_get_context_options();
|
|
5390
5459
|
var minimist = require_minimist2();
|
|
5391
5460
|
var createMinimistOptions = require_create_minimist_options();
|
|
5461
|
+
var normalizeCliOptions = require_normalize_cli_options();
|
|
5392
5462
|
function parseArgv(rawArguments, detailedOptions, logger, keys) {
|
|
5393
5463
|
const minimistOptions = createMinimistOptions(detailedOptions);
|
|
5394
5464
|
let argv = minimist(rawArguments, minimistOptions);
|
|
@@ -5400,9 +5470,7 @@ var require_parse_cli_arguments = __commonJS2({
|
|
|
5400
5470
|
argv = pick(argv, keys);
|
|
5401
5471
|
}
|
|
5402
5472
|
const normalized = normalizeCliOptions(argv, detailedOptions, {
|
|
5403
|
-
logger
|
|
5404
|
-
colorsModule: chalk,
|
|
5405
|
-
levenshteinDistance: leven
|
|
5473
|
+
logger
|
|
5406
5474
|
});
|
|
5407
5475
|
return Object.assign(Object.assign({}, Object.fromEntries(Object.entries(normalized).map(([key, value]) => {
|
|
5408
5476
|
const option = detailedOptions.find(({
|
|
@@ -8702,11 +8770,11 @@ var require_micromatch = __commonJS2({
|
|
|
8702
8770
|
options.onResult(state);
|
|
8703
8771
|
items.push(state.output);
|
|
8704
8772
|
};
|
|
8705
|
-
let matches = micromatch(list, patterns, Object.assign(Object.assign({}, options), {}, {
|
|
8773
|
+
let matches = new Set(micromatch(list, patterns, Object.assign(Object.assign({}, options), {}, {
|
|
8706
8774
|
onResult
|
|
8707
|
-
}));
|
|
8775
|
+
})));
|
|
8708
8776
|
for (let item of items) {
|
|
8709
|
-
if (!matches.
|
|
8777
|
+
if (!matches.has(item)) {
|
|
8710
8778
|
result.add(item);
|
|
8711
8779
|
}
|
|
8712
8780
|
}
|
|
@@ -11273,16 +11341,13 @@ var require_get_options_for_file = __commonJS2({
|
|
|
11273
11341
|
"src/cli/options/get-options-for-file.js"(exports2, module2) {
|
|
11274
11342
|
"use strict";
|
|
11275
11343
|
var dashify = require_dashify();
|
|
11276
|
-
var leven = require_leven();
|
|
11277
|
-
var {
|
|
11278
|
-
default: chalk
|
|
11279
|
-
} = require_chalk();
|
|
11280
11344
|
var prettier2 = require("./index.js");
|
|
11281
11345
|
var {
|
|
11282
11346
|
optionsNormalizer
|
|
11283
11347
|
} = require_prettier_internal();
|
|
11284
11348
|
var minimist = require_minimist2();
|
|
11285
11349
|
var createMinimistOptions = require_create_minimist_options();
|
|
11350
|
+
var normalizeCliOptions = require_normalize_cli_options();
|
|
11286
11351
|
function getOptions(argv, detailedOptions) {
|
|
11287
11352
|
return Object.fromEntries(detailedOptions.filter(({
|
|
11288
11353
|
forwardToApi
|
|
@@ -11304,14 +11369,12 @@ var require_get_options_for_file = __commonJS2({
|
|
|
11304
11369
|
function parseArgsToOptions(context, overrideDefaults) {
|
|
11305
11370
|
const minimistOptions = createMinimistOptions(context.detailedOptions);
|
|
11306
11371
|
const apiDetailedOptionMap = createApiDetailedOptionMap(context.detailedOptions);
|
|
11307
|
-
return getOptions(
|
|
11372
|
+
return getOptions(normalizeCliOptions(minimist(context.rawArguments, {
|
|
11308
11373
|
string: minimistOptions.string,
|
|
11309
11374
|
boolean: minimistOptions.boolean,
|
|
11310
11375
|
default: cliifyOptions(overrideDefaults, apiDetailedOptionMap)
|
|
11311
11376
|
}), context.detailedOptions, {
|
|
11312
|
-
logger: false
|
|
11313
|
-
colorsModule: chalk,
|
|
11314
|
-
levenshteinDistance: leven
|
|
11377
|
+
logger: false
|
|
11315
11378
|
}), context.detailedOptions);
|
|
11316
11379
|
}
|
|
11317
11380
|
async function getOptionsOrDie(context, filePath) {
|