prettier 0.18.1 → 0.18.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -2
- data/LICENSE +1 -1
- data/README.md +9 -0
- data/node_modules/prettier/bin-prettier.js +1298 -373
- data/node_modules/prettier/index.js +1271 -346
- data/package.json +9 -2
- data/src/nodes/conditionals.js +2 -1
- data/src/nodes/rescue.js +5 -1
- data/src/ruby.js +2 -1
- metadata +2 -2
@@ -2,17 +2,17 @@
|
|
2
2
|
|
3
3
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
4
4
|
|
5
|
-
var fs$
|
6
|
-
var path$
|
7
|
-
var os = _interopDefault(require('os'));
|
8
|
-
var tty = _interopDefault(require('tty'));
|
9
|
-
var assert = _interopDefault(require('assert'));
|
10
|
-
var util$
|
11
|
-
var stream$
|
12
|
-
var events = _interopDefault(require('events'));
|
5
|
+
var fs$3 = _interopDefault(require('fs'));
|
6
|
+
var path$2 = _interopDefault(require('path'));
|
7
|
+
var os$1 = _interopDefault(require('os'));
|
8
|
+
var tty$1 = _interopDefault(require('tty'));
|
9
|
+
var assert$1 = _interopDefault(require('assert'));
|
10
|
+
var util$3 = _interopDefault(require('util'));
|
11
|
+
var stream$6 = _interopDefault(require('stream'));
|
12
|
+
var events$1 = _interopDefault(require('events'));
|
13
13
|
|
14
14
|
var name = "prettier";
|
15
|
-
var version = "2.0.
|
15
|
+
var version = "2.0.5";
|
16
16
|
var description = "Prettier is an opinionated code formatter";
|
17
17
|
var bin = "./bin/prettier.js";
|
18
18
|
var repository = "prettier/prettier";
|
@@ -26,14 +26,14 @@ var engines = {
|
|
26
26
|
var dependencies = {
|
27
27
|
"@angular/compiler": "9.0.5",
|
28
28
|
"@babel/code-frame": "7.8.0",
|
29
|
-
"@babel/parser": "7.9.
|
30
|
-
"@glimmer/syntax": "0.
|
29
|
+
"@babel/parser": "7.9.4",
|
30
|
+
"@glimmer/syntax": "0.50.0",
|
31
31
|
"@iarna/toml": "2.2.3",
|
32
|
-
"@typescript-eslint/typescript-estree": "2.
|
32
|
+
"@typescript-eslint/typescript-estree": "2.26.0",
|
33
33
|
"angular-estree-parser": "1.3.0",
|
34
34
|
"angular-html-parser": "1.4.0",
|
35
35
|
camelcase: "5.3.1",
|
36
|
-
chalk: "
|
36
|
+
chalk: "4.0.0",
|
37
37
|
"ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540",
|
38
38
|
"cjk-regex": "2.0.0",
|
39
39
|
cosmiconfig: "6.0.0",
|
@@ -47,15 +47,15 @@ var dependencies = {
|
|
47
47
|
"fast-glob": "3.2.2",
|
48
48
|
"find-parent-dir": "0.3.0",
|
49
49
|
"find-project-root": "1.1.1",
|
50
|
-
"flow-parser": "0.
|
50
|
+
"flow-parser": "0.122.0",
|
51
51
|
"get-stream": "5.1.0",
|
52
52
|
globby: "11.0.0",
|
53
|
-
graphql: "
|
53
|
+
graphql: "15.0.0",
|
54
54
|
"html-element-attributes": "2.2.1",
|
55
55
|
"html-styles": "1.0.0",
|
56
56
|
"html-tag-names": "1.1.5",
|
57
57
|
ignore: "4.0.6",
|
58
|
-
"jest-docblock": "25.
|
58
|
+
"jest-docblock": "25.2.6",
|
59
59
|
"json-stable-stringify": "1.0.1",
|
60
60
|
leven: "3.1.0",
|
61
61
|
"lines-and-columns": "1.1.6",
|
@@ -74,12 +74,13 @@ var dependencies = {
|
|
74
74
|
"regexp-util": "1.2.2",
|
75
75
|
"remark-math": "1.0.6",
|
76
76
|
"remark-parse": "5.0.0",
|
77
|
+
resolve: "1.16.1",
|
77
78
|
semver: "7.1.3",
|
78
79
|
srcset: "2.0.1",
|
79
80
|
"string-width": "4.2.0",
|
80
81
|
typescript: "3.8.3",
|
81
82
|
"unicode-regex": "3.0.0",
|
82
|
-
unified: "
|
83
|
+
unified: "9.0.0",
|
83
84
|
vnopts: "1.0.2",
|
84
85
|
"yaml-unist-parser": "1.1.1"
|
85
86
|
};
|
@@ -100,18 +101,18 @@ var devDependencies = {
|
|
100
101
|
eslint: "6.8.0",
|
101
102
|
"eslint-config-prettier": "6.10.1",
|
102
103
|
"eslint-formatter-friendly": "7.0.0",
|
103
|
-
"eslint-plugin-import": "2.20.
|
104
|
+
"eslint-plugin-import": "2.20.2",
|
104
105
|
"eslint-plugin-prettier": "3.1.2",
|
105
106
|
"eslint-plugin-react": "7.19.0",
|
106
|
-
"eslint-plugin-unicorn": "
|
107
|
+
"eslint-plugin-unicorn": "18.0.1",
|
107
108
|
execa: "4.0.0",
|
108
|
-
jest: "25.
|
109
|
+
jest: "25.2.7",
|
109
110
|
"jest-snapshot-serializer-ansi": "1.0.0",
|
110
111
|
"jest-snapshot-serializer-raw": "1.1.0",
|
111
|
-
"jest-watch-typeahead": "0.
|
112
|
-
prettier: "2.0.
|
112
|
+
"jest-watch-typeahead": "0.5.0",
|
113
|
+
prettier: "2.0.4",
|
113
114
|
rimraf: "3.0.2",
|
114
|
-
rollup: "2.
|
115
|
+
rollup: "2.3.2",
|
115
116
|
"rollup-plugin-babel": "4.4.0",
|
116
117
|
"rollup-plugin-node-globals": "1.4.0",
|
117
118
|
"rollup-plugin-terser": "5.3.0",
|
@@ -121,13 +122,14 @@ var devDependencies = {
|
|
121
122
|
"synchronous-promise": "2.0.10",
|
122
123
|
tempy: "0.5.0",
|
123
124
|
"terser-webpack-plugin": "2.3.5",
|
124
|
-
webpack: "4.42.
|
125
|
+
webpack: "4.42.1"
|
125
126
|
};
|
126
127
|
var scripts = {
|
127
128
|
prepublishOnly: "echo \"Error: must publish from dist/\" && exit 1",
|
128
129
|
"prepare-release": "yarn && yarn build && yarn test:dist",
|
129
130
|
test: "jest",
|
130
|
-
"test:dist": "
|
131
|
+
"test:dist": "cross-env NODE_ENV=production jest",
|
132
|
+
"test:dist-standalone": "cross-env NODE_ENV=production TEST_STANDALONE=1 jest tests/",
|
131
133
|
"test:integration": "jest tests_integration",
|
132
134
|
"perf:repeat": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null",
|
133
135
|
"perf:repeat-inspect": "yarn && yarn build && cross-env NODE_ENV=production node --inspect-brk ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null",
|
@@ -1744,7 +1746,7 @@ class LineByLine {
|
|
1744
1746
|
if (typeof file === 'number') {
|
1745
1747
|
this.fd = file;
|
1746
1748
|
} else {
|
1747
|
-
this.fd = fs$
|
1749
|
+
this.fd = fs$3.openSync(file, 'r');
|
1748
1750
|
}
|
1749
1751
|
|
1750
1752
|
this.options = options;
|
@@ -1774,7 +1776,7 @@ class LineByLine {
|
|
1774
1776
|
}
|
1775
1777
|
|
1776
1778
|
close() {
|
1777
|
-
fs$
|
1779
|
+
fs$3.closeSync(this.fd);
|
1778
1780
|
this.fd = null;
|
1779
1781
|
}
|
1780
1782
|
|
@@ -1812,7 +1814,7 @@ class LineByLine {
|
|
1812
1814
|
|
1813
1815
|
do {
|
1814
1816
|
const readBuffer = new Buffer(this.options.readChunk);
|
1815
|
-
bytesRead = fs$
|
1817
|
+
bytesRead = fs$3.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition);
|
1816
1818
|
totalBytesRead = totalBytesRead + bytesRead;
|
1817
1819
|
this.fdPosition = this.fdPosition + bytesRead;
|
1818
1820
|
buffers.push(readBuffer);
|
@@ -4787,7 +4789,7 @@ function supportsColor(stream) {
|
|
4787
4789
|
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
4788
4790
|
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
4789
4791
|
// that supports 16m/TrueColor.
|
4790
|
-
const osRelease = os.release().split('.');
|
4792
|
+
const osRelease = os$1.release().split('.');
|
4791
4793
|
|
4792
4794
|
if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
4793
4795
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
@@ -7714,7 +7716,7 @@ function supportsColor$1(haveStream, streamIsTTY) {
|
|
7714
7716
|
if (process.platform === 'win32') {
|
7715
7717
|
// Windows 10 build 10586 is the first Windows release that supports 256 colors.
|
7716
7718
|
// Windows 10 build 14931 is the first release that supports 16m/TrueColor.
|
7717
|
-
const osRelease = os.release().split('.');
|
7719
|
+
const osRelease = os$1.release().split('.');
|
7718
7720
|
|
7719
7721
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
7720
7722
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
@@ -7778,8 +7780,8 @@ function getSupportLevel$1(stream) {
|
|
7778
7780
|
|
7779
7781
|
var supportsColor_1$1 = {
|
7780
7782
|
supportsColor: getSupportLevel$1,
|
7781
|
-
stdout: translateLevel$1(supportsColor$1(true, tty.isatty(1))),
|
7782
|
-
stderr: translateLevel$1(supportsColor$1(true, tty.isatty(2)))
|
7783
|
+
stdout: translateLevel$1(supportsColor$1(true, tty$1.isatty(1))),
|
7784
|
+
stderr: translateLevel$1(supportsColor$1(true, tty$1.isatty(2)))
|
7783
7785
|
};
|
7784
7786
|
|
7785
7787
|
const stringReplaceAll = (string, substring, replacer) => {
|
@@ -7826,7 +7828,7 @@ var util = {
|
|
7826
7828
|
const TEMPLATE_REGEX$1 = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
7827
7829
|
const STYLE_REGEX$1 = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
7828
7830
|
const STRING_REGEX$1 = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
7829
|
-
const ESCAPE_REGEX$1 = /\\(u(?:[a-f\d]{4}
|
7831
|
+
const ESCAPE_REGEX$1 = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
|
7830
7832
|
const ESCAPES$1 = new Map([['n', '\n'], ['r', '\r'], ['t', '\t'], ['b', '\b'], ['f', '\f'], ['v', '\v'], ['0', '\0'], ['\\', '\\'], ['e', '\u001B'], ['a', '\u0007']]);
|
7831
7833
|
|
7832
7834
|
function unescape$1(c) {
|
@@ -7940,8 +7942,8 @@ var templates$1 = (chalk, temporary) => {
|
|
7940
7942
|
chunks.push(chunk.join(''));
|
7941
7943
|
|
7942
7944
|
if (styles.length > 0) {
|
7943
|
-
const
|
7944
|
-
throw new Error(
|
7945
|
+
const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
|
7946
|
+
throw new Error(errMessage);
|
7945
7947
|
}
|
7946
7948
|
|
7947
7949
|
return chunks.join('');
|
@@ -7960,7 +7962,7 @@ const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];
|
|
7960
7962
|
const styles = Object.create(null);
|
7961
7963
|
|
7962
7964
|
const applyOptions = (object, options = {}) => {
|
7963
|
-
if (options.level
|
7965
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
7964
7966
|
throw new Error('The `level` option should be an integer from 0 to 3');
|
7965
7967
|
} // Detect level if not set manually
|
7966
7968
|
|
@@ -7971,6 +7973,7 @@ const applyOptions = (object, options = {}) => {
|
|
7971
7973
|
|
7972
7974
|
class ChalkClass {
|
7973
7975
|
constructor(options) {
|
7976
|
+
// eslint-disable-next-line no-constructor-return
|
7974
7977
|
return chalkFactory(options);
|
7975
7978
|
}
|
7976
7979
|
|
@@ -8094,12 +8097,11 @@ const createBuilder = (self, _styler, _isEmpty) => {
|
|
8094
8097
|
// Single argument is hot path, implicit coercion is faster than anything
|
8095
8098
|
// eslint-disable-next-line no-implicit-coercion
|
8096
8099
|
return applyStyle(builder, arguments_.length === 1 ? '' + arguments_[0] : arguments_.join(' '));
|
8097
|
-
}; //
|
8100
|
+
}; // We alter the prototype because we must return a function, but there is
|
8098
8101
|
// no way to create a function with a different prototype
|
8099
8102
|
|
8100
8103
|
|
8101
|
-
builder
|
8102
|
-
|
8104
|
+
Object.setPrototypeOf(builder, proto);
|
8103
8105
|
builder._generator = self;
|
8104
8106
|
builder._styler = _styler;
|
8105
8107
|
builder._isEmpty = _isEmpty;
|
@@ -8177,18 +8179,7 @@ chalk$1.stderr = Chalk({
|
|
8177
8179
|
level: stderrColor ? stderrColor.level : 0
|
8178
8180
|
}); // eslint-disable-line new-cap
|
8179
8181
|
|
8180
|
-
chalk$1.stderr.supportsColor = stderrColor;
|
8181
|
-
|
8182
|
-
chalk$1.Level = {
|
8183
|
-
None: 0,
|
8184
|
-
Basic: 1,
|
8185
|
-
Ansi256: 2,
|
8186
|
-
TrueColor: 3,
|
8187
|
-
0: 'None',
|
8188
|
-
1: 'Basic',
|
8189
|
-
2: 'Ansi256',
|
8190
|
-
3: 'TrueColor'
|
8191
|
-
};
|
8182
|
+
chalk$1.stderr.supportsColor = stderrColor;
|
8192
8183
|
var source = chalk$1;
|
8193
8184
|
|
8194
8185
|
const cliDescriptor = {
|
@@ -10498,7 +10489,7 @@ function supportsColor$2(stream) {
|
|
10498
10489
|
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
10499
10490
|
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
10500
10491
|
// that supports 16m/TrueColor.
|
10501
|
-
const osRelease = os.release().split('.');
|
10492
|
+
const osRelease = os$1.release().split('.');
|
10502
10493
|
|
10503
10494
|
if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
10504
10495
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
@@ -11342,7 +11333,7 @@ function resolveParser(opts, parsers) {
|
|
11342
11333
|
{
|
11343
11334
|
try {
|
11344
11335
|
return {
|
11345
|
-
parse: require(path$
|
11336
|
+
parse: require(path$2.resolve(process.cwd(), opts.parser)),
|
11346
11337
|
astFormat: "estree",
|
11347
11338
|
locStart: locStart$1,
|
11348
11339
|
locEnd: locEnd$1
|
@@ -11498,7 +11489,7 @@ function getInterpreter(filepath) {
|
|
11498
11489
|
let fd;
|
11499
11490
|
|
11500
11491
|
try {
|
11501
|
-
fd = fs$
|
11492
|
+
fd = fs$3.openSync(filepath, "r");
|
11502
11493
|
} catch (err) {
|
11503
11494
|
// istanbul ignore next
|
11504
11495
|
return "";
|
@@ -11530,14 +11521,14 @@ function getInterpreter(filepath) {
|
|
11530
11521
|
try {
|
11531
11522
|
// There are some weird cases where paths are missing, causing Jest
|
11532
11523
|
// failures. It's unclear what these correspond to in the real world.
|
11533
|
-
fs$
|
11524
|
+
fs$3.closeSync(fd);
|
11534
11525
|
} catch (err) {// nop
|
11535
11526
|
}
|
11536
11527
|
}
|
11537
11528
|
}
|
11538
11529
|
|
11539
11530
|
function inferParser(filepath, plugins) {
|
11540
|
-
const filename = path$
|
11531
|
+
const filename = path$2.basename(filepath).toLowerCase();
|
11541
11532
|
const languages = getSupportInfo$1({
|
11542
11533
|
plugins
|
11543
11534
|
}).languages.filter(language => language.since !== null); // If the file has no extension, we can try to infer the language from the
|
@@ -13061,8 +13052,9 @@ function printDocToString(doc, options) {
|
|
13061
13052
|
const [ind, mode, doc] = cmds.pop();
|
13062
13053
|
|
13063
13054
|
if (typeof doc === "string") {
|
13064
|
-
|
13065
|
-
|
13055
|
+
const formatted = newLine !== "\n" && doc.includes("\n") ? doc.replace(/\n/g, newLine) : doc;
|
13056
|
+
out.push(formatted);
|
13057
|
+
pos += getStringWidth$1(formatted);
|
13066
13058
|
} else {
|
13067
13059
|
switch (doc.type) {
|
13068
13060
|
case "cursor":
|
@@ -14042,8 +14034,8 @@ function breakTies(tiesToBreak, text, options) {
|
|
14042
14034
|
|
14043
14035
|
for (indexOfFirstLeadingComment = tieCount; indexOfFirstLeadingComment > 0; --indexOfFirstLeadingComment) {
|
14044
14036
|
const comment = tiesToBreak[indexOfFirstLeadingComment - 1];
|
14045
|
-
assert.strictEqual(comment.precedingNode, precedingNode);
|
14046
|
-
assert.strictEqual(comment.followingNode, followingNode);
|
14037
|
+
assert$1.strictEqual(comment.precedingNode, precedingNode);
|
14038
|
+
assert$1.strictEqual(comment.followingNode, followingNode);
|
14047
14039
|
const gap = text.slice(options.locEnd(comment), gapEndPos);
|
14048
14040
|
|
14049
14041
|
if (gapRegExp.test(gap)) {
|
@@ -14551,7 +14543,7 @@ function printAstToDoc(ast, options, alignmentSize = 0) {
|
|
14551
14543
|
}
|
14552
14544
|
|
14553
14545
|
function callPluginPrintFunction(path, options, printPath, args) {
|
14554
|
-
assert.ok(path instanceof fastPath);
|
14546
|
+
assert$1.ok(path instanceof fastPath);
|
14555
14547
|
const node = path.getValue();
|
14556
14548
|
const {
|
14557
14549
|
printer
|
@@ -14730,9 +14722,6 @@ const {
|
|
14730
14722
|
convertEndOfLineToChars: convertEndOfLineToChars$2
|
14731
14723
|
} = endOfLine;
|
14732
14724
|
const {
|
14733
|
-
utils: {
|
14734
|
-
mapDoc: mapDoc$1
|
14735
|
-
},
|
14736
14725
|
printer: {
|
14737
14726
|
printDocToString: printDocToString$1
|
14738
14727
|
},
|
@@ -14808,8 +14797,7 @@ function coreFormat(text, opts, addAlignmentSize) {
|
|
14808
14797
|
|
14809
14798
|
const astComments = attachComments(text, ast, opts);
|
14810
14799
|
const doc = astToDoc(ast, opts, addAlignmentSize);
|
14811
|
-
const
|
14812
|
-
const result = printDocToString$1(opts.endOfLine === "lf" ? doc : mapDoc$1(doc, currentDoc => typeof currentDoc === "string" && currentDoc.includes("\n") ? currentDoc.replace(/\n/g, eol) : currentDoc), opts);
|
14800
|
+
const result = printDocToString$1(doc, opts);
|
14813
14801
|
ensureAllCommentsPrinted(astComments); // Remove extra leading indentation as well as the added indentation after last newline
|
14814
14802
|
|
14815
14803
|
if (addAlignmentSize > 0) {
|
@@ -15414,7 +15402,7 @@ var ignore = options => new IgnoreBase(options);
|
|
15414
15402
|
|
15415
15403
|
function getFileContentOrNull(filename) {
|
15416
15404
|
return new Promise((resolve, reject) => {
|
15417
|
-
fs$
|
15405
|
+
fs$3.readFile(filename, "utf8", (error, data) => {
|
15418
15406
|
if (error && error.code !== "ENOENT") {
|
15419
15407
|
reject(createError(filename, error));
|
15420
15408
|
} else {
|
@@ -15431,7 +15419,7 @@ function getFileContentOrNull(filename) {
|
|
15431
15419
|
|
15432
15420
|
getFileContentOrNull.sync = function (filename) {
|
15433
15421
|
try {
|
15434
|
-
return fs$
|
15422
|
+
return fs$3.readFileSync(filename, "utf8");
|
15435
15423
|
} catch (error) {
|
15436
15424
|
if (error && error.code === "ENOENT") {
|
15437
15425
|
return null;
|
@@ -15454,7 +15442,7 @@ var getFileContentOrNull_1 = getFileContentOrNull;
|
|
15454
15442
|
|
15455
15443
|
|
15456
15444
|
async function createIgnorer(ignorePath, withNodeModules) {
|
15457
|
-
const ignoreContent = ignorePath ? await getFileContentOrNull_1(path$
|
15445
|
+
const ignoreContent = ignorePath ? await getFileContentOrNull_1(path$2.resolve(ignorePath)) : null;
|
15458
15446
|
return _createIgnorer(ignoreContent, withNodeModules);
|
15459
15447
|
}
|
15460
15448
|
/**
|
@@ -15464,7 +15452,7 @@ async function createIgnorer(ignorePath, withNodeModules) {
|
|
15464
15452
|
|
15465
15453
|
|
15466
15454
|
createIgnorer.sync = function (ignorePath, withNodeModules) {
|
15467
|
-
const ignoreContent = !ignorePath ? null : getFileContentOrNull_1.sync(path$
|
15455
|
+
const ignoreContent = !ignorePath ? null : getFileContentOrNull_1.sync(path$2.resolve(ignorePath));
|
15468
15456
|
return _createIgnorer(ignoreContent, withNodeModules);
|
15469
15457
|
};
|
15470
15458
|
/**
|
@@ -15742,7 +15730,7 @@ var path = {
|
|
15742
15730
|
};
|
15743
15731
|
|
15744
15732
|
try {
|
15745
|
-
path = path$
|
15733
|
+
path = path$2;
|
15746
15734
|
} catch (er) {}
|
15747
15735
|
|
15748
15736
|
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
|
@@ -19168,7 +19156,7 @@ LRUCache.prototype.inspect = function (n, opts) {
|
|
19168
19156
|
str += ',';
|
19169
19157
|
}
|
19170
19158
|
|
19171
|
-
str += '\n max: ' + util$
|
19159
|
+
str += '\n max: ' + util$3.inspect(max, opts);
|
19172
19160
|
extras = true;
|
19173
19161
|
}
|
19174
19162
|
|
@@ -19179,7 +19167,7 @@ LRUCache.prototype.inspect = function (n, opts) {
|
|
19179
19167
|
str += ',';
|
19180
19168
|
}
|
19181
19169
|
|
19182
|
-
str += '\n maxAge: ' + util$
|
19170
|
+
str += '\n maxAge: ' + util$3.inspect(maxAge, opts);
|
19183
19171
|
extras = true;
|
19184
19172
|
}
|
19185
19173
|
|
@@ -19190,7 +19178,7 @@ LRUCache.prototype.inspect = function (n, opts) {
|
|
19190
19178
|
str += ',';
|
19191
19179
|
}
|
19192
19180
|
|
19193
|
-
str += '\n length: ' + util$
|
19181
|
+
str += '\n length: ' + util$3.inspect(this[LENGTH], opts);
|
19194
19182
|
extras = true;
|
19195
19183
|
}
|
19196
19184
|
|
@@ -19207,7 +19195,7 @@ LRUCache.prototype.inspect = function (n, opts) {
|
|
19207
19195
|
str += '\n ';
|
19208
19196
|
}
|
19209
19197
|
|
19210
|
-
var key = util$
|
19198
|
+
var key = util$3.inspect(item.key).split('\n').join('\n ');
|
19211
19199
|
var val = {
|
19212
19200
|
value: item.value
|
19213
19201
|
};
|
@@ -19224,7 +19212,7 @@ LRUCache.prototype.inspect = function (n, opts) {
|
|
19224
19212
|
val.stale = true;
|
19225
19213
|
}
|
19226
19214
|
|
19227
|
-
val = util$
|
19215
|
+
val = util$3.inspect(val, opts).split('\n').join('\n ');
|
19228
19216
|
str += key + ' => ' + val;
|
19229
19217
|
});
|
19230
19218
|
|
@@ -20283,7 +20271,7 @@ var fnmatch = createCommonjsModule(function (module, exports) {
|
|
20283
20271
|
}
|
20284
20272
|
|
20285
20273
|
if (options.matchBase && pattern.length === 1) {
|
20286
|
-
file = path$
|
20274
|
+
file = path$2.basename(file.join("/")).split("/");
|
20287
20275
|
}
|
20288
20276
|
|
20289
20277
|
if (options.debug) {
|
@@ -20608,7 +20596,7 @@ var ini = createCommonjsModule(function (module, exports) {
|
|
20608
20596
|
value: true
|
20609
20597
|
});
|
20610
20598
|
|
20611
|
-
var fs = __importStar(fs$
|
20599
|
+
var fs = __importStar(fs$3);
|
20612
20600
|
/**
|
20613
20601
|
* define the possible values:
|
20614
20602
|
* section: [section]
|
@@ -20938,9 +20926,9 @@ var src = createCommonjsModule(function (module, exports) {
|
|
20938
20926
|
value: true
|
20939
20927
|
});
|
20940
20928
|
|
20941
|
-
var fs = __importStar(fs$
|
20929
|
+
var fs = __importStar(fs$3);
|
20942
20930
|
|
20943
|
-
var path = __importStar(path$
|
20931
|
+
var path = __importStar(path$2);
|
20944
20932
|
|
20945
20933
|
var semver = __importStar(semver$2);
|
20946
20934
|
|
@@ -21307,14 +21295,14 @@ function markerExists(files, markers) {
|
|
21307
21295
|
}
|
21308
21296
|
|
21309
21297
|
function traverseFolder(directory, levels, markers) {
|
21310
|
-
var files = fs$
|
21298
|
+
var files = fs$3.readdirSync(directory);
|
21311
21299
|
|
21312
21300
|
if (levels === 0) {
|
21313
21301
|
return null;
|
21314
21302
|
} else if (markerExists(files, markers)) {
|
21315
21303
|
return directory;
|
21316
21304
|
} else {
|
21317
|
-
return traverseFolder(path$
|
21305
|
+
return traverseFolder(path$2.resolve(directory, '..'), levels - 1, markers);
|
21318
21306
|
}
|
21319
21307
|
}
|
21320
21308
|
|
@@ -21340,11 +21328,11 @@ const maybeParse = (filePath, parse) => {
|
|
21340
21328
|
// it, which is possible, for example, when the path is given via
|
21341
21329
|
// --stdin-filepath. So, first, traverse up until we find an existing
|
21342
21330
|
// directory.
|
21343
|
-
let dirPath = path$
|
21344
|
-
const fsRoot = path$
|
21331
|
+
let dirPath = path$2.dirname(path$2.resolve(filePath));
|
21332
|
+
const fsRoot = path$2.parse(dirPath).root;
|
21345
21333
|
|
21346
|
-
while (dirPath !== fsRoot && !fs$
|
21347
|
-
dirPath = path$
|
21334
|
+
while (dirPath !== fsRoot && !fs$3.existsSync(dirPath)) {
|
21335
|
+
dirPath = path$2.dirname(dirPath);
|
21348
21336
|
}
|
21349
21337
|
|
21350
21338
|
const root = findProjectRoot(dirPath);
|
@@ -21831,7 +21819,7 @@ function isList(obj) {
|
|
21831
21819
|
let _custom;
|
21832
21820
|
|
21833
21821
|
try {
|
21834
|
-
const utilInspect = util$
|
21822
|
+
const utilInspect = util$3.inspect;
|
21835
21823
|
_custom = utilInspect.custom;
|
21836
21824
|
} catch (_) {}
|
21837
21825
|
/* eval require not available in transpiled bundle */
|
@@ -23270,6 +23258,962 @@ var loadToml = function (filePath, content) {
|
|
23270
23258
|
}
|
23271
23259
|
};
|
23272
23260
|
|
23261
|
+
var caller = function () {
|
23262
|
+
// see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
|
23263
|
+
var origPrepareStackTrace = Error.prepareStackTrace;
|
23264
|
+
|
23265
|
+
Error.prepareStackTrace = function (_, stack) {
|
23266
|
+
return stack;
|
23267
|
+
};
|
23268
|
+
|
23269
|
+
var stack = new Error().stack;
|
23270
|
+
Error.prepareStackTrace = origPrepareStackTrace;
|
23271
|
+
return stack[2].getFileName();
|
23272
|
+
};
|
23273
|
+
|
23274
|
+
var pathParse = createCommonjsModule(function (module) {
|
23275
|
+
|
23276
|
+
var isWindows = process.platform === 'win32'; // Regex to split a windows path into three parts: [*, device, slash,
|
23277
|
+
// tail] windows-only
|
23278
|
+
|
23279
|
+
var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; // Regex to split the tail part of the above into [*, dir, basename, ext]
|
23280
|
+
|
23281
|
+
var splitTailRe = /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/;
|
23282
|
+
var win32 = {}; // Function to split a filename into [root, dir, basename, ext]
|
23283
|
+
|
23284
|
+
function win32SplitPath(filename) {
|
23285
|
+
// Separate device+slash from tail
|
23286
|
+
var result = splitDeviceRe.exec(filename),
|
23287
|
+
device = (result[1] || '') + (result[2] || ''),
|
23288
|
+
tail = result[3] || ''; // Split the tail into dir, basename and extension
|
23289
|
+
|
23290
|
+
var result2 = splitTailRe.exec(tail),
|
23291
|
+
dir = result2[1],
|
23292
|
+
basename = result2[2],
|
23293
|
+
ext = result2[3];
|
23294
|
+
return [device, dir, basename, ext];
|
23295
|
+
}
|
23296
|
+
|
23297
|
+
win32.parse = function (pathString) {
|
23298
|
+
if (typeof pathString !== 'string') {
|
23299
|
+
throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString);
|
23300
|
+
}
|
23301
|
+
|
23302
|
+
var allParts = win32SplitPath(pathString);
|
23303
|
+
|
23304
|
+
if (!allParts || allParts.length !== 4) {
|
23305
|
+
throw new TypeError("Invalid path '" + pathString + "'");
|
23306
|
+
}
|
23307
|
+
|
23308
|
+
return {
|
23309
|
+
root: allParts[0],
|
23310
|
+
dir: allParts[0] + allParts[1].slice(0, -1),
|
23311
|
+
base: allParts[2],
|
23312
|
+
ext: allParts[3],
|
23313
|
+
name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
|
23314
|
+
};
|
23315
|
+
}; // Split a filename into [root, dir, basename, ext], unix version
|
23316
|
+
// 'root' is just a slash, or nothing.
|
23317
|
+
|
23318
|
+
|
23319
|
+
var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
|
23320
|
+
var posix = {};
|
23321
|
+
|
23322
|
+
function posixSplitPath(filename) {
|
23323
|
+
return splitPathRe.exec(filename).slice(1);
|
23324
|
+
}
|
23325
|
+
|
23326
|
+
posix.parse = function (pathString) {
|
23327
|
+
if (typeof pathString !== 'string') {
|
23328
|
+
throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString);
|
23329
|
+
}
|
23330
|
+
|
23331
|
+
var allParts = posixSplitPath(pathString);
|
23332
|
+
|
23333
|
+
if (!allParts || allParts.length !== 4) {
|
23334
|
+
throw new TypeError("Invalid path '" + pathString + "'");
|
23335
|
+
}
|
23336
|
+
|
23337
|
+
allParts[1] = allParts[1] || '';
|
23338
|
+
allParts[2] = allParts[2] || '';
|
23339
|
+
allParts[3] = allParts[3] || '';
|
23340
|
+
return {
|
23341
|
+
root: allParts[0],
|
23342
|
+
dir: allParts[0] + allParts[1].slice(0, -1),
|
23343
|
+
base: allParts[2],
|
23344
|
+
ext: allParts[3],
|
23345
|
+
name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
|
23346
|
+
};
|
23347
|
+
};
|
23348
|
+
|
23349
|
+
if (isWindows) module.exports = win32.parse;else
|
23350
|
+
/* posix */
|
23351
|
+
module.exports = posix.parse;
|
23352
|
+
module.exports.posix = posix.parse;
|
23353
|
+
module.exports.win32 = win32.parse;
|
23354
|
+
});
|
23355
|
+
var pathParse_1 = pathParse.posix;
|
23356
|
+
var pathParse_2 = pathParse.win32;
|
23357
|
+
|
23358
|
+
var parse$2 = path$2.parse || pathParse;
|
23359
|
+
|
23360
|
+
var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {
|
23361
|
+
var prefix = '/';
|
23362
|
+
|
23363
|
+
if (/^([A-Za-z]:)/.test(absoluteStart)) {
|
23364
|
+
prefix = '';
|
23365
|
+
} else if (/^\\\\/.test(absoluteStart)) {
|
23366
|
+
prefix = '\\\\';
|
23367
|
+
}
|
23368
|
+
|
23369
|
+
var paths = [absoluteStart];
|
23370
|
+
var parsed = parse$2(absoluteStart);
|
23371
|
+
|
23372
|
+
while (parsed.dir !== paths[paths.length - 1]) {
|
23373
|
+
paths.push(parsed.dir);
|
23374
|
+
parsed = parse$2(parsed.dir);
|
23375
|
+
}
|
23376
|
+
|
23377
|
+
return paths.reduce(function (dirs, aPath) {
|
23378
|
+
return dirs.concat(modules.map(function (moduleDir) {
|
23379
|
+
return path$2.resolve(prefix, aPath, moduleDir);
|
23380
|
+
}));
|
23381
|
+
}, []);
|
23382
|
+
};
|
23383
|
+
|
23384
|
+
var nodeModulesPaths = function nodeModulesPaths(start, opts, request) {
|
23385
|
+
var modules = opts && opts.moduleDirectory ? [].concat(opts.moduleDirectory) : ['node_modules'];
|
23386
|
+
|
23387
|
+
if (opts && typeof opts.paths === 'function') {
|
23388
|
+
return opts.paths(request, start, function () {
|
23389
|
+
return getNodeModulesDirs(start, modules);
|
23390
|
+
}, opts);
|
23391
|
+
}
|
23392
|
+
|
23393
|
+
var dirs = getNodeModulesDirs(start, modules);
|
23394
|
+
return opts && opts.paths ? dirs.concat(opts.paths) : dirs;
|
23395
|
+
};
|
23396
|
+
|
23397
|
+
var normalizeOptions$2 = function (x, opts) {
|
23398
|
+
/**
|
23399
|
+
* This file is purposefully a passthrough. It's expected that third-party
|
23400
|
+
* environments will override it at runtime in order to inject special logic
|
23401
|
+
* into `resolve` (by manipulating the options). One such example is the PnP
|
23402
|
+
* code path in Yarn.
|
23403
|
+
*/
|
23404
|
+
return opts || {};
|
23405
|
+
};
|
23406
|
+
|
23407
|
+
var assert = true;
|
23408
|
+
var async_hooks = ">= 8";
|
23409
|
+
var buffer_ieee754 = "< 0.9.7";
|
23410
|
+
var buffer = true;
|
23411
|
+
var child_process = true;
|
23412
|
+
var cluster = true;
|
23413
|
+
var console$1 = true;
|
23414
|
+
var constants$1 = true;
|
23415
|
+
var crypto = true;
|
23416
|
+
var _debug_agent = ">= 1 && < 8";
|
23417
|
+
var _debugger = "< 8";
|
23418
|
+
var dgram = true;
|
23419
|
+
var dns = true;
|
23420
|
+
var domain = true;
|
23421
|
+
var events = true;
|
23422
|
+
var freelist = "< 6";
|
23423
|
+
var fs = true;
|
23424
|
+
var _http_agent = ">= 0.11.1";
|
23425
|
+
var _http_client = ">= 0.11.1";
|
23426
|
+
var _http_common = ">= 0.11.1";
|
23427
|
+
var _http_incoming = ">= 0.11.1";
|
23428
|
+
var _http_outgoing = ">= 0.11.1";
|
23429
|
+
var _http_server = ">= 0.11.1";
|
23430
|
+
var http = true;
|
23431
|
+
var http2 = ">= 8.8";
|
23432
|
+
var https = true;
|
23433
|
+
var inspector = ">= 8.0.0";
|
23434
|
+
var _linklist = "< 8";
|
23435
|
+
var module$1 = true;
|
23436
|
+
var net = true;
|
23437
|
+
var os = true;
|
23438
|
+
var path$1 = true;
|
23439
|
+
var perf_hooks = ">= 8.5";
|
23440
|
+
var process$1 = ">= 1";
|
23441
|
+
var punycode = true;
|
23442
|
+
var querystring = true;
|
23443
|
+
var readline = true;
|
23444
|
+
var repl = true;
|
23445
|
+
var smalloc = ">= 0.11.5 && < 3";
|
23446
|
+
var _stream_duplex = ">= 0.9.4";
|
23447
|
+
var _stream_transform = ">= 0.9.4";
|
23448
|
+
var _stream_wrap = ">= 1.4.1";
|
23449
|
+
var _stream_passthrough = ">= 0.9.4";
|
23450
|
+
var _stream_readable = ">= 0.9.4";
|
23451
|
+
var _stream_writable = ">= 0.9.4";
|
23452
|
+
var stream = true;
|
23453
|
+
var string_decoder = true;
|
23454
|
+
var sys = true;
|
23455
|
+
var timers = true;
|
23456
|
+
var _tls_common = ">= 0.11.13";
|
23457
|
+
var _tls_legacy = ">= 0.11.3 && < 10";
|
23458
|
+
var _tls_wrap = ">= 0.11.3";
|
23459
|
+
var tls = true;
|
23460
|
+
var trace_events = ">= 10";
|
23461
|
+
var tty = true;
|
23462
|
+
var url = true;
|
23463
|
+
var util$2 = true;
|
23464
|
+
var v8 = ">= 1";
|
23465
|
+
var vm = true;
|
23466
|
+
var wasi = ">= 13.4 && < 13.5";
|
23467
|
+
var worker_threads = ">= 11.7";
|
23468
|
+
var zlib = true;
|
23469
|
+
var core$1 = {
|
23470
|
+
assert: assert,
|
23471
|
+
async_hooks: async_hooks,
|
23472
|
+
buffer_ieee754: buffer_ieee754,
|
23473
|
+
buffer: buffer,
|
23474
|
+
child_process: child_process,
|
23475
|
+
cluster: cluster,
|
23476
|
+
console: console$1,
|
23477
|
+
constants: constants$1,
|
23478
|
+
crypto: crypto,
|
23479
|
+
_debug_agent: _debug_agent,
|
23480
|
+
_debugger: _debugger,
|
23481
|
+
dgram: dgram,
|
23482
|
+
dns: dns,
|
23483
|
+
domain: domain,
|
23484
|
+
events: events,
|
23485
|
+
freelist: freelist,
|
23486
|
+
fs: fs,
|
23487
|
+
"fs/promises": [
|
23488
|
+
">= 10 && < 10.1",
|
23489
|
+
">= 14"
|
23490
|
+
],
|
23491
|
+
_http_agent: _http_agent,
|
23492
|
+
_http_client: _http_client,
|
23493
|
+
_http_common: _http_common,
|
23494
|
+
_http_incoming: _http_incoming,
|
23495
|
+
_http_outgoing: _http_outgoing,
|
23496
|
+
_http_server: _http_server,
|
23497
|
+
http: http,
|
23498
|
+
http2: http2,
|
23499
|
+
https: https,
|
23500
|
+
inspector: inspector,
|
23501
|
+
_linklist: _linklist,
|
23502
|
+
module: module$1,
|
23503
|
+
net: net,
|
23504
|
+
"node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
|
23505
|
+
"node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
|
23506
|
+
"node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
|
23507
|
+
os: os,
|
23508
|
+
path: path$1,
|
23509
|
+
perf_hooks: perf_hooks,
|
23510
|
+
process: process$1,
|
23511
|
+
punycode: punycode,
|
23512
|
+
querystring: querystring,
|
23513
|
+
readline: readline,
|
23514
|
+
repl: repl,
|
23515
|
+
smalloc: smalloc,
|
23516
|
+
_stream_duplex: _stream_duplex,
|
23517
|
+
_stream_transform: _stream_transform,
|
23518
|
+
_stream_wrap: _stream_wrap,
|
23519
|
+
_stream_passthrough: _stream_passthrough,
|
23520
|
+
_stream_readable: _stream_readable,
|
23521
|
+
_stream_writable: _stream_writable,
|
23522
|
+
stream: stream,
|
23523
|
+
string_decoder: string_decoder,
|
23524
|
+
sys: sys,
|
23525
|
+
timers: timers,
|
23526
|
+
_tls_common: _tls_common,
|
23527
|
+
_tls_legacy: _tls_legacy,
|
23528
|
+
_tls_wrap: _tls_wrap,
|
23529
|
+
tls: tls,
|
23530
|
+
trace_events: trace_events,
|
23531
|
+
tty: tty,
|
23532
|
+
url: url,
|
23533
|
+
util: util$2,
|
23534
|
+
"v8/tools/arguments": ">= 10 && < 12",
|
23535
|
+
"v8/tools/codemap": [
|
23536
|
+
">= 4.4.0 && < 5",
|
23537
|
+
">= 5.2.0 && < 12"
|
23538
|
+
],
|
23539
|
+
"v8/tools/consarray": [
|
23540
|
+
">= 4.4.0 && < 5",
|
23541
|
+
">= 5.2.0 && < 12"
|
23542
|
+
],
|
23543
|
+
"v8/tools/csvparser": [
|
23544
|
+
">= 4.4.0 && < 5",
|
23545
|
+
">= 5.2.0 && < 12"
|
23546
|
+
],
|
23547
|
+
"v8/tools/logreader": [
|
23548
|
+
">= 4.4.0 && < 5",
|
23549
|
+
">= 5.2.0 && < 12"
|
23550
|
+
],
|
23551
|
+
"v8/tools/profile_view": [
|
23552
|
+
">= 4.4.0 && < 5",
|
23553
|
+
">= 5.2.0 && < 12"
|
23554
|
+
],
|
23555
|
+
"v8/tools/splaytree": [
|
23556
|
+
">= 4.4.0 && < 5",
|
23557
|
+
">= 5.2.0 && < 12"
|
23558
|
+
],
|
23559
|
+
v8: v8,
|
23560
|
+
vm: vm,
|
23561
|
+
wasi: wasi,
|
23562
|
+
worker_threads: worker_threads,
|
23563
|
+
zlib: zlib
|
23564
|
+
};
|
23565
|
+
|
23566
|
+
var core$2 = /*#__PURE__*/Object.freeze({
|
23567
|
+
__proto__: null,
|
23568
|
+
assert: assert,
|
23569
|
+
async_hooks: async_hooks,
|
23570
|
+
buffer_ieee754: buffer_ieee754,
|
23571
|
+
buffer: buffer,
|
23572
|
+
child_process: child_process,
|
23573
|
+
cluster: cluster,
|
23574
|
+
console: console$1,
|
23575
|
+
constants: constants$1,
|
23576
|
+
crypto: crypto,
|
23577
|
+
_debug_agent: _debug_agent,
|
23578
|
+
_debugger: _debugger,
|
23579
|
+
dgram: dgram,
|
23580
|
+
dns: dns,
|
23581
|
+
domain: domain,
|
23582
|
+
events: events,
|
23583
|
+
freelist: freelist,
|
23584
|
+
fs: fs,
|
23585
|
+
_http_agent: _http_agent,
|
23586
|
+
_http_client: _http_client,
|
23587
|
+
_http_common: _http_common,
|
23588
|
+
_http_incoming: _http_incoming,
|
23589
|
+
_http_outgoing: _http_outgoing,
|
23590
|
+
_http_server: _http_server,
|
23591
|
+
http: http,
|
23592
|
+
http2: http2,
|
23593
|
+
https: https,
|
23594
|
+
inspector: inspector,
|
23595
|
+
_linklist: _linklist,
|
23596
|
+
module: module$1,
|
23597
|
+
net: net,
|
23598
|
+
os: os,
|
23599
|
+
path: path$1,
|
23600
|
+
perf_hooks: perf_hooks,
|
23601
|
+
process: process$1,
|
23602
|
+
punycode: punycode,
|
23603
|
+
querystring: querystring,
|
23604
|
+
readline: readline,
|
23605
|
+
repl: repl,
|
23606
|
+
smalloc: smalloc,
|
23607
|
+
_stream_duplex: _stream_duplex,
|
23608
|
+
_stream_transform: _stream_transform,
|
23609
|
+
_stream_wrap: _stream_wrap,
|
23610
|
+
_stream_passthrough: _stream_passthrough,
|
23611
|
+
_stream_readable: _stream_readable,
|
23612
|
+
_stream_writable: _stream_writable,
|
23613
|
+
stream: stream,
|
23614
|
+
string_decoder: string_decoder,
|
23615
|
+
sys: sys,
|
23616
|
+
timers: timers,
|
23617
|
+
_tls_common: _tls_common,
|
23618
|
+
_tls_legacy: _tls_legacy,
|
23619
|
+
_tls_wrap: _tls_wrap,
|
23620
|
+
tls: tls,
|
23621
|
+
trace_events: trace_events,
|
23622
|
+
tty: tty,
|
23623
|
+
url: url,
|
23624
|
+
util: util$2,
|
23625
|
+
v8: v8,
|
23626
|
+
vm: vm,
|
23627
|
+
wasi: wasi,
|
23628
|
+
worker_threads: worker_threads,
|
23629
|
+
zlib: zlib,
|
23630
|
+
'default': core$1
|
23631
|
+
});
|
23632
|
+
|
23633
|
+
var data = getCjsExportFromNamespace(core$2);
|
23634
|
+
|
23635
|
+
var current = process.versions && process.versions.node && process.versions.node.split('.') || [];
|
23636
|
+
|
23637
|
+
function specifierIncluded(specifier) {
|
23638
|
+
var parts = specifier.split(' ');
|
23639
|
+
var op = parts.length > 1 ? parts[0] : '=';
|
23640
|
+
var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
|
23641
|
+
|
23642
|
+
for (var i = 0; i < 3; ++i) {
|
23643
|
+
var cur = Number(current[i] || 0);
|
23644
|
+
var ver = Number(versionParts[i] || 0);
|
23645
|
+
|
23646
|
+
if (cur === ver) {
|
23647
|
+
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
23648
|
+
}
|
23649
|
+
|
23650
|
+
if (op === '<') {
|
23651
|
+
return cur < ver;
|
23652
|
+
} else if (op === '>=') {
|
23653
|
+
return cur >= ver;
|
23654
|
+
} else {
|
23655
|
+
return false;
|
23656
|
+
}
|
23657
|
+
}
|
23658
|
+
|
23659
|
+
return op === '>=';
|
23660
|
+
}
|
23661
|
+
|
23662
|
+
function matchesRange(range) {
|
23663
|
+
var specifiers = range.split(/ ?&& ?/);
|
23664
|
+
|
23665
|
+
if (specifiers.length === 0) {
|
23666
|
+
return false;
|
23667
|
+
}
|
23668
|
+
|
23669
|
+
for (var i = 0; i < specifiers.length; ++i) {
|
23670
|
+
if (!specifierIncluded(specifiers[i])) {
|
23671
|
+
return false;
|
23672
|
+
}
|
23673
|
+
}
|
23674
|
+
|
23675
|
+
return true;
|
23676
|
+
}
|
23677
|
+
|
23678
|
+
function versionIncluded(specifierValue) {
|
23679
|
+
if (typeof specifierValue === 'boolean') {
|
23680
|
+
return specifierValue;
|
23681
|
+
}
|
23682
|
+
|
23683
|
+
if (specifierValue && typeof specifierValue === 'object') {
|
23684
|
+
for (var i = 0; i < specifierValue.length; ++i) {
|
23685
|
+
if (matchesRange(specifierValue[i])) {
|
23686
|
+
return true;
|
23687
|
+
}
|
23688
|
+
}
|
23689
|
+
|
23690
|
+
return false;
|
23691
|
+
}
|
23692
|
+
|
23693
|
+
return matchesRange(specifierValue);
|
23694
|
+
}
|
23695
|
+
|
23696
|
+
var core$3 = {};
|
23697
|
+
|
23698
|
+
for (var mod in data) {
|
23699
|
+
// eslint-disable-line no-restricted-syntax
|
23700
|
+
if (Object.prototype.hasOwnProperty.call(data, mod)) {
|
23701
|
+
core$3[mod] = versionIncluded(data[mod]);
|
23702
|
+
}
|
23703
|
+
}
|
23704
|
+
|
23705
|
+
var core_1 = core$3;
|
23706
|
+
|
23707
|
+
var isCore = function isCore(x) {
|
23708
|
+
return Object.prototype.hasOwnProperty.call(core_1, x);
|
23709
|
+
};
|
23710
|
+
|
23711
|
+
var realpath = fs$3.realpath && typeof fs$3.realpath.native === 'function' ? fs$3.realpath.native : fs$3.realpath;
|
23712
|
+
|
23713
|
+
var defaultIsFile = function isFile(file, cb) {
|
23714
|
+
fs$3.stat(file, function (err, stat) {
|
23715
|
+
if (!err) {
|
23716
|
+
return cb(null, stat.isFile() || stat.isFIFO());
|
23717
|
+
}
|
23718
|
+
|
23719
|
+
if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
|
23720
|
+
return cb(err);
|
23721
|
+
});
|
23722
|
+
};
|
23723
|
+
|
23724
|
+
var defaultIsDir = function isDirectory(dir, cb) {
|
23725
|
+
fs$3.stat(dir, function (err, stat) {
|
23726
|
+
if (!err) {
|
23727
|
+
return cb(null, stat.isDirectory());
|
23728
|
+
}
|
23729
|
+
|
23730
|
+
if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
|
23731
|
+
return cb(err);
|
23732
|
+
});
|
23733
|
+
};
|
23734
|
+
|
23735
|
+
var maybeUnwrapSymlink = function maybeUnwrapSymlink(x, opts, cb) {
|
23736
|
+
if (opts && opts.preserveSymlinks === false) {
|
23737
|
+
realpath(x, function (realPathErr, realPath) {
|
23738
|
+
if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr);else cb(null, realPathErr ? x : realPath);
|
23739
|
+
});
|
23740
|
+
} else {
|
23741
|
+
cb(null, x);
|
23742
|
+
}
|
23743
|
+
};
|
23744
|
+
|
23745
|
+
var getPackageCandidates = function getPackageCandidates(x, start, opts) {
|
23746
|
+
var dirs = nodeModulesPaths(start, opts, x);
|
23747
|
+
|
23748
|
+
for (var i = 0; i < dirs.length; i++) {
|
23749
|
+
dirs[i] = path$2.join(dirs[i], x);
|
23750
|
+
}
|
23751
|
+
|
23752
|
+
return dirs;
|
23753
|
+
};
|
23754
|
+
|
23755
|
+
var async = function resolve(x, options, callback) {
|
23756
|
+
var cb = callback;
|
23757
|
+
var opts = options;
|
23758
|
+
|
23759
|
+
if (typeof options === 'function') {
|
23760
|
+
cb = opts;
|
23761
|
+
opts = {};
|
23762
|
+
}
|
23763
|
+
|
23764
|
+
if (typeof x !== 'string') {
|
23765
|
+
var err = new TypeError('Path must be a string.');
|
23766
|
+
return process.nextTick(function () {
|
23767
|
+
cb(err);
|
23768
|
+
});
|
23769
|
+
}
|
23770
|
+
|
23771
|
+
opts = normalizeOptions$2(x, opts);
|
23772
|
+
var isFile = opts.isFile || defaultIsFile;
|
23773
|
+
var isDirectory = opts.isDirectory || defaultIsDir;
|
23774
|
+
var readFile = opts.readFile || fs$3.readFile;
|
23775
|
+
var packageIterator = opts.packageIterator;
|
23776
|
+
var extensions = opts.extensions || ['.js'];
|
23777
|
+
var basedir = opts.basedir || path$2.dirname(caller());
|
23778
|
+
var parent = opts.filename || basedir;
|
23779
|
+
opts.paths = opts.paths || []; // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
|
23780
|
+
|
23781
|
+
var absoluteStart = path$2.resolve(basedir);
|
23782
|
+
maybeUnwrapSymlink(absoluteStart, opts, function (err, realStart) {
|
23783
|
+
if (err) cb(err);else init(realStart);
|
23784
|
+
});
|
23785
|
+
var res;
|
23786
|
+
|
23787
|
+
function init(basedir) {
|
23788
|
+
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
|
23789
|
+
res = path$2.resolve(basedir, x);
|
23790
|
+
if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
|
23791
|
+
|
23792
|
+
if (/\/$/.test(x) && res === basedir) {
|
23793
|
+
loadAsDirectory(res, opts.package, onfile);
|
23794
|
+
} else loadAsFile(res, opts.package, onfile);
|
23795
|
+
} else if (isCore(x)) {
|
23796
|
+
return cb(null, x);
|
23797
|
+
} else loadNodeModules(x, basedir, function (err, n, pkg) {
|
23798
|
+
if (err) cb(err);else if (n) {
|
23799
|
+
return maybeUnwrapSymlink(n, opts, function (err, realN) {
|
23800
|
+
if (err) {
|
23801
|
+
cb(err);
|
23802
|
+
} else {
|
23803
|
+
cb(null, realN, pkg);
|
23804
|
+
}
|
23805
|
+
});
|
23806
|
+
} else {
|
23807
|
+
var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
|
23808
|
+
moduleError.code = 'MODULE_NOT_FOUND';
|
23809
|
+
cb(moduleError);
|
23810
|
+
}
|
23811
|
+
});
|
23812
|
+
}
|
23813
|
+
|
23814
|
+
function onfile(err, m, pkg) {
|
23815
|
+
if (err) cb(err);else if (m) cb(null, m, pkg);else loadAsDirectory(res, function (err, d, pkg) {
|
23816
|
+
if (err) cb(err);else if (d) {
|
23817
|
+
maybeUnwrapSymlink(d, opts, function (err, realD) {
|
23818
|
+
if (err) {
|
23819
|
+
cb(err);
|
23820
|
+
} else {
|
23821
|
+
cb(null, realD, pkg);
|
23822
|
+
}
|
23823
|
+
});
|
23824
|
+
} else {
|
23825
|
+
var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
|
23826
|
+
moduleError.code = 'MODULE_NOT_FOUND';
|
23827
|
+
cb(moduleError);
|
23828
|
+
}
|
23829
|
+
});
|
23830
|
+
}
|
23831
|
+
|
23832
|
+
function loadAsFile(x, thePackage, callback) {
|
23833
|
+
var loadAsFilePackage = thePackage;
|
23834
|
+
var cb = callback;
|
23835
|
+
|
23836
|
+
if (typeof loadAsFilePackage === 'function') {
|
23837
|
+
cb = loadAsFilePackage;
|
23838
|
+
loadAsFilePackage = undefined;
|
23839
|
+
}
|
23840
|
+
|
23841
|
+
var exts = [''].concat(extensions);
|
23842
|
+
load(exts, x, loadAsFilePackage);
|
23843
|
+
|
23844
|
+
function load(exts, x, loadPackage) {
|
23845
|
+
if (exts.length === 0) return cb(null, undefined, loadPackage);
|
23846
|
+
var file = x + exts[0];
|
23847
|
+
var pkg = loadPackage;
|
23848
|
+
if (pkg) onpkg(null, pkg);else loadpkg(path$2.dirname(file), onpkg);
|
23849
|
+
|
23850
|
+
function onpkg(err, pkg_, dir) {
|
23851
|
+
pkg = pkg_;
|
23852
|
+
if (err) return cb(err);
|
23853
|
+
|
23854
|
+
if (dir && pkg && opts.pathFilter) {
|
23855
|
+
var rfile = path$2.relative(dir, file);
|
23856
|
+
var rel = rfile.slice(0, rfile.length - exts[0].length);
|
23857
|
+
var r = opts.pathFilter(pkg, x, rel);
|
23858
|
+
if (r) return load([''].concat(extensions.slice()), path$2.resolve(dir, r), pkg);
|
23859
|
+
}
|
23860
|
+
|
23861
|
+
isFile(file, onex);
|
23862
|
+
}
|
23863
|
+
|
23864
|
+
function onex(err, ex) {
|
23865
|
+
if (err) return cb(err);
|
23866
|
+
if (ex) return cb(null, file, pkg);
|
23867
|
+
load(exts.slice(1), x, pkg);
|
23868
|
+
}
|
23869
|
+
}
|
23870
|
+
}
|
23871
|
+
|
23872
|
+
function loadpkg(dir, cb) {
|
23873
|
+
if (dir === '' || dir === '/') return cb(null);
|
23874
|
+
|
23875
|
+
if (process.platform === 'win32' && /^\w:[/\\]*$/.test(dir)) {
|
23876
|
+
return cb(null);
|
23877
|
+
}
|
23878
|
+
|
23879
|
+
if (/[/\\]node_modules[/\\]*$/.test(dir)) return cb(null);
|
23880
|
+
maybeUnwrapSymlink(dir, opts, function (unwrapErr, pkgdir) {
|
23881
|
+
if (unwrapErr) return loadpkg(path$2.dirname(dir), cb);
|
23882
|
+
var pkgfile = path$2.join(pkgdir, 'package.json');
|
23883
|
+
isFile(pkgfile, function (err, ex) {
|
23884
|
+
// on err, ex is false
|
23885
|
+
if (!ex) return loadpkg(path$2.dirname(dir), cb);
|
23886
|
+
readFile(pkgfile, function (err, body) {
|
23887
|
+
if (err) cb(err);
|
23888
|
+
|
23889
|
+
try {
|
23890
|
+
var pkg = JSON.parse(body);
|
23891
|
+
} catch (jsonErr) {}
|
23892
|
+
|
23893
|
+
if (pkg && opts.packageFilter) {
|
23894
|
+
pkg = opts.packageFilter(pkg, pkgfile);
|
23895
|
+
}
|
23896
|
+
|
23897
|
+
cb(null, pkg, dir);
|
23898
|
+
});
|
23899
|
+
});
|
23900
|
+
});
|
23901
|
+
}
|
23902
|
+
|
23903
|
+
function loadAsDirectory(x, loadAsDirectoryPackage, callback) {
|
23904
|
+
var cb = callback;
|
23905
|
+
var fpkg = loadAsDirectoryPackage;
|
23906
|
+
|
23907
|
+
if (typeof fpkg === 'function') {
|
23908
|
+
cb = fpkg;
|
23909
|
+
fpkg = opts.package;
|
23910
|
+
}
|
23911
|
+
|
23912
|
+
maybeUnwrapSymlink(x, opts, function (unwrapErr, pkgdir) {
|
23913
|
+
if (unwrapErr) return cb(unwrapErr);
|
23914
|
+
var pkgfile = path$2.join(pkgdir, 'package.json');
|
23915
|
+
isFile(pkgfile, function (err, ex) {
|
23916
|
+
if (err) return cb(err);
|
23917
|
+
if (!ex) return loadAsFile(path$2.join(x, 'index'), fpkg, cb);
|
23918
|
+
readFile(pkgfile, function (err, body) {
|
23919
|
+
if (err) return cb(err);
|
23920
|
+
|
23921
|
+
try {
|
23922
|
+
var pkg = JSON.parse(body);
|
23923
|
+
} catch (jsonErr) {}
|
23924
|
+
|
23925
|
+
if (pkg && opts.packageFilter) {
|
23926
|
+
pkg = opts.packageFilter(pkg, pkgfile);
|
23927
|
+
}
|
23928
|
+
|
23929
|
+
if (pkg && pkg.main) {
|
23930
|
+
if (typeof pkg.main !== 'string') {
|
23931
|
+
var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
|
23932
|
+
mainError.code = 'INVALID_PACKAGE_MAIN';
|
23933
|
+
return cb(mainError);
|
23934
|
+
}
|
23935
|
+
|
23936
|
+
if (pkg.main === '.' || pkg.main === './') {
|
23937
|
+
pkg.main = 'index';
|
23938
|
+
}
|
23939
|
+
|
23940
|
+
loadAsFile(path$2.resolve(x, pkg.main), pkg, function (err, m, pkg) {
|
23941
|
+
if (err) return cb(err);
|
23942
|
+
if (m) return cb(null, m, pkg);
|
23943
|
+
if (!pkg) return loadAsFile(path$2.join(x, 'index'), pkg, cb);
|
23944
|
+
var dir = path$2.resolve(x, pkg.main);
|
23945
|
+
loadAsDirectory(dir, pkg, function (err, n, pkg) {
|
23946
|
+
if (err) return cb(err);
|
23947
|
+
if (n) return cb(null, n, pkg);
|
23948
|
+
loadAsFile(path$2.join(x, 'index'), pkg, cb);
|
23949
|
+
});
|
23950
|
+
});
|
23951
|
+
return;
|
23952
|
+
}
|
23953
|
+
|
23954
|
+
loadAsFile(path$2.join(x, '/index'), pkg, cb);
|
23955
|
+
});
|
23956
|
+
});
|
23957
|
+
});
|
23958
|
+
}
|
23959
|
+
|
23960
|
+
function processDirs(cb, dirs) {
|
23961
|
+
if (dirs.length === 0) return cb(null, undefined);
|
23962
|
+
var dir = dirs[0];
|
23963
|
+
isDirectory(path$2.dirname(dir), isdir);
|
23964
|
+
|
23965
|
+
function isdir(err, isdir) {
|
23966
|
+
if (err) return cb(err);
|
23967
|
+
if (!isdir) return processDirs(cb, dirs.slice(1));
|
23968
|
+
loadAsFile(dir, opts.package, onfile);
|
23969
|
+
}
|
23970
|
+
|
23971
|
+
function onfile(err, m, pkg) {
|
23972
|
+
if (err) return cb(err);
|
23973
|
+
if (m) return cb(null, m, pkg);
|
23974
|
+
loadAsDirectory(dir, opts.package, ondir);
|
23975
|
+
}
|
23976
|
+
|
23977
|
+
function ondir(err, n, pkg) {
|
23978
|
+
if (err) return cb(err);
|
23979
|
+
if (n) return cb(null, n, pkg);
|
23980
|
+
processDirs(cb, dirs.slice(1));
|
23981
|
+
}
|
23982
|
+
}
|
23983
|
+
|
23984
|
+
function loadNodeModules(x, start, cb) {
|
23985
|
+
var thunk = function () {
|
23986
|
+
return getPackageCandidates(x, start, opts);
|
23987
|
+
};
|
23988
|
+
|
23989
|
+
processDirs(cb, packageIterator ? packageIterator(x, start, thunk, opts) : thunk());
|
23990
|
+
}
|
23991
|
+
};
|
23992
|
+
|
23993
|
+
var realpath$1 = fs$3.realpathSync && typeof fs$3.realpathSync.native === 'function' ? fs$3.realpathSync.native : fs$3.realpathSync;
|
23994
|
+
|
23995
|
+
var defaultIsFile$1 = function isFile(file) {
|
23996
|
+
try {
|
23997
|
+
var stat = fs$3.statSync(file);
|
23998
|
+
} catch (e) {
|
23999
|
+
if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
|
24000
|
+
throw e;
|
24001
|
+
}
|
24002
|
+
|
24003
|
+
return stat.isFile() || stat.isFIFO();
|
24004
|
+
};
|
24005
|
+
|
24006
|
+
var defaultIsDir$1 = function isDirectory(dir) {
|
24007
|
+
try {
|
24008
|
+
var stat = fs$3.statSync(dir);
|
24009
|
+
} catch (e) {
|
24010
|
+
if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
|
24011
|
+
throw e;
|
24012
|
+
}
|
24013
|
+
|
24014
|
+
return stat.isDirectory();
|
24015
|
+
};
|
24016
|
+
|
24017
|
+
var maybeUnwrapSymlink$1 = function maybeUnwrapSymlink(x, opts) {
|
24018
|
+
if (opts && opts.preserveSymlinks === false) {
|
24019
|
+
try {
|
24020
|
+
return realpath$1(x);
|
24021
|
+
} catch (realPathErr) {
|
24022
|
+
if (realPathErr.code !== 'ENOENT') {
|
24023
|
+
throw realPathErr;
|
24024
|
+
}
|
24025
|
+
}
|
24026
|
+
}
|
24027
|
+
|
24028
|
+
return x;
|
24029
|
+
};
|
24030
|
+
|
24031
|
+
var getPackageCandidates$1 = function getPackageCandidates(x, start, opts) {
|
24032
|
+
var dirs = nodeModulesPaths(start, opts, x);
|
24033
|
+
|
24034
|
+
for (var i = 0; i < dirs.length; i++) {
|
24035
|
+
dirs[i] = path$2.join(dirs[i], x);
|
24036
|
+
}
|
24037
|
+
|
24038
|
+
return dirs;
|
24039
|
+
};
|
24040
|
+
|
24041
|
+
var sync = function resolveSync(x, options) {
|
24042
|
+
if (typeof x !== 'string') {
|
24043
|
+
throw new TypeError('Path must be a string.');
|
24044
|
+
}
|
24045
|
+
|
24046
|
+
var opts = normalizeOptions$2(x, options);
|
24047
|
+
var isFile = opts.isFile || defaultIsFile$1;
|
24048
|
+
var readFileSync = opts.readFileSync || fs$3.readFileSync;
|
24049
|
+
var isDirectory = opts.isDirectory || defaultIsDir$1;
|
24050
|
+
var packageIterator = opts.packageIterator;
|
24051
|
+
var extensions = opts.extensions || ['.js'];
|
24052
|
+
var basedir = opts.basedir || path$2.dirname(caller());
|
24053
|
+
var parent = opts.filename || basedir;
|
24054
|
+
opts.paths = opts.paths || []; // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
|
24055
|
+
|
24056
|
+
var absoluteStart = maybeUnwrapSymlink$1(path$2.resolve(basedir), opts);
|
24057
|
+
|
24058
|
+
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
|
24059
|
+
var res = path$2.resolve(absoluteStart, x);
|
24060
|
+
if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
|
24061
|
+
var m = loadAsFileSync(res) || loadAsDirectorySync(res);
|
24062
|
+
if (m) return maybeUnwrapSymlink$1(m, opts);
|
24063
|
+
} else if (isCore(x)) {
|
24064
|
+
return x;
|
24065
|
+
} else {
|
24066
|
+
var n = loadNodeModulesSync(x, absoluteStart);
|
24067
|
+
if (n) return maybeUnwrapSymlink$1(n, opts);
|
24068
|
+
}
|
24069
|
+
|
24070
|
+
var err = new Error("Cannot find module '" + x + "' from '" + parent + "'");
|
24071
|
+
err.code = 'MODULE_NOT_FOUND';
|
24072
|
+
throw err;
|
24073
|
+
|
24074
|
+
function loadAsFileSync(x) {
|
24075
|
+
var pkg = loadpkg(path$2.dirname(x));
|
24076
|
+
|
24077
|
+
if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
|
24078
|
+
var rfile = path$2.relative(pkg.dir, x);
|
24079
|
+
var r = opts.pathFilter(pkg.pkg, x, rfile);
|
24080
|
+
|
24081
|
+
if (r) {
|
24082
|
+
x = path$2.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign
|
24083
|
+
}
|
24084
|
+
}
|
24085
|
+
|
24086
|
+
if (isFile(x)) {
|
24087
|
+
return x;
|
24088
|
+
}
|
24089
|
+
|
24090
|
+
for (var i = 0; i < extensions.length; i++) {
|
24091
|
+
var file = x + extensions[i];
|
24092
|
+
|
24093
|
+
if (isFile(file)) {
|
24094
|
+
return file;
|
24095
|
+
}
|
24096
|
+
}
|
24097
|
+
}
|
24098
|
+
|
24099
|
+
function loadpkg(dir) {
|
24100
|
+
if (dir === '' || dir === '/') return;
|
24101
|
+
|
24102
|
+
if (process.platform === 'win32' && /^\w:[/\\]*$/.test(dir)) {
|
24103
|
+
return;
|
24104
|
+
}
|
24105
|
+
|
24106
|
+
if (/[/\\]node_modules[/\\]*$/.test(dir)) return;
|
24107
|
+
var pkgfile = path$2.join(maybeUnwrapSymlink$1(dir, opts), 'package.json');
|
24108
|
+
|
24109
|
+
if (!isFile(pkgfile)) {
|
24110
|
+
return loadpkg(path$2.dirname(dir));
|
24111
|
+
}
|
24112
|
+
|
24113
|
+
var body = readFileSync(pkgfile);
|
24114
|
+
|
24115
|
+
try {
|
24116
|
+
var pkg = JSON.parse(body);
|
24117
|
+
} catch (jsonErr) {}
|
24118
|
+
|
24119
|
+
if (pkg && opts.packageFilter) {
|
24120
|
+
// v2 will pass pkgfile
|
24121
|
+
pkg = opts.packageFilter(pkg,
|
24122
|
+
/*pkgfile,*/
|
24123
|
+
dir); // eslint-disable-line spaced-comment
|
24124
|
+
}
|
24125
|
+
|
24126
|
+
return {
|
24127
|
+
pkg: pkg,
|
24128
|
+
dir: dir
|
24129
|
+
};
|
24130
|
+
}
|
24131
|
+
|
24132
|
+
function loadAsDirectorySync(x) {
|
24133
|
+
var pkgfile = path$2.join(maybeUnwrapSymlink$1(x, opts), '/package.json');
|
24134
|
+
|
24135
|
+
if (isFile(pkgfile)) {
|
24136
|
+
try {
|
24137
|
+
var body = readFileSync(pkgfile, 'UTF8');
|
24138
|
+
var pkg = JSON.parse(body);
|
24139
|
+
} catch (e) {}
|
24140
|
+
|
24141
|
+
if (pkg && opts.packageFilter) {
|
24142
|
+
// v2 will pass pkgfile
|
24143
|
+
pkg = opts.packageFilter(pkg,
|
24144
|
+
/*pkgfile,*/
|
24145
|
+
x); // eslint-disable-line spaced-comment
|
24146
|
+
}
|
24147
|
+
|
24148
|
+
if (pkg && pkg.main) {
|
24149
|
+
if (typeof pkg.main !== 'string') {
|
24150
|
+
var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
|
24151
|
+
mainError.code = 'INVALID_PACKAGE_MAIN';
|
24152
|
+
throw mainError;
|
24153
|
+
}
|
24154
|
+
|
24155
|
+
if (pkg.main === '.' || pkg.main === './') {
|
24156
|
+
pkg.main = 'index';
|
24157
|
+
}
|
24158
|
+
|
24159
|
+
try {
|
24160
|
+
var m = loadAsFileSync(path$2.resolve(x, pkg.main));
|
24161
|
+
if (m) return m;
|
24162
|
+
var n = loadAsDirectorySync(path$2.resolve(x, pkg.main));
|
24163
|
+
if (n) return n;
|
24164
|
+
} catch (e) {}
|
24165
|
+
}
|
24166
|
+
}
|
24167
|
+
|
24168
|
+
return loadAsFileSync(path$2.join(x, '/index'));
|
24169
|
+
}
|
24170
|
+
|
24171
|
+
function loadNodeModulesSync(x, start) {
|
24172
|
+
var thunk = function () {
|
24173
|
+
return getPackageCandidates$1(x, start, opts);
|
24174
|
+
};
|
24175
|
+
|
24176
|
+
var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk();
|
24177
|
+
|
24178
|
+
for (var i = 0; i < dirs.length; i++) {
|
24179
|
+
var dir = dirs[i];
|
24180
|
+
|
24181
|
+
if (isDirectory(path$2.dirname(dir))) {
|
24182
|
+
var m = loadAsFileSync(dir);
|
24183
|
+
if (m) return m;
|
24184
|
+
var n = loadAsDirectorySync(dir);
|
24185
|
+
if (n) return n;
|
24186
|
+
}
|
24187
|
+
}
|
24188
|
+
}
|
24189
|
+
};
|
24190
|
+
|
24191
|
+
async.core = core_1;
|
24192
|
+
async.isCore = isCore;
|
24193
|
+
async.sync = sync;
|
24194
|
+
var resolve = async;
|
24195
|
+
|
24196
|
+
// eslint-disable-next-line prefer-destructuring
|
24197
|
+
|
24198
|
+
|
24199
|
+
let resolve$1 = require.resolve; // In the VS Code and Atom extensions `require` is overridden and `require.resolve` doesn't support the 2nd argument.
|
24200
|
+
|
24201
|
+
if (resolve$1.length === 1 || process.env.PRETTIER_FALLBACK_RESOLVE) {
|
24202
|
+
resolve$1 = (id, options) => {
|
24203
|
+
let basedir;
|
24204
|
+
|
24205
|
+
if (options && options.paths && options.paths.length === 1) {
|
24206
|
+
basedir = options.paths[0];
|
24207
|
+
}
|
24208
|
+
|
24209
|
+
return resolve.sync(id, {
|
24210
|
+
basedir
|
24211
|
+
});
|
24212
|
+
};
|
24213
|
+
}
|
24214
|
+
|
24215
|
+
var resolve_1 = resolve$1;
|
24216
|
+
|
23273
24217
|
const getExplorerMemoized = mem_1(opts => {
|
23274
24218
|
const cosmiconfig = thirdParty["cosmiconfig" + (opts.sync ? "Sync" : "")];
|
23275
24219
|
const explorer = cosmiconfig("prettier", {
|
@@ -23277,13 +24221,12 @@ const getExplorerMemoized = mem_1(opts => {
|
|
23277
24221
|
transform: result => {
|
23278
24222
|
if (result && result.config) {
|
23279
24223
|
if (typeof result.config === "string") {
|
23280
|
-
const dir = path$
|
24224
|
+
const dir = path$2.dirname(result.filepath);
|
23281
24225
|
|
23282
24226
|
try {
|
23283
|
-
const modulePath =
|
24227
|
+
const modulePath = resolve_1(result.config, {
|
23284
24228
|
paths: [dir]
|
23285
24229
|
});
|
23286
|
-
|
23287
24230
|
result.config = require(modulePath);
|
23288
24231
|
} catch (error) {
|
23289
24232
|
// Original message contains `__filename`, can't pass tests
|
@@ -23342,7 +24285,7 @@ function _resolveConfig(filePath, opts, sync) {
|
|
23342
24285
|
["plugins", "pluginSearchDirs"].forEach(optionName => {
|
23343
24286
|
if (Array.isArray(merged[optionName])) {
|
23344
24287
|
merged[optionName] = merged[optionName].map(value => typeof value === "string" && value.startsWith(".") // relative path
|
23345
|
-
? path$
|
24288
|
+
? path$2.resolve(path$2.dirname(result.filepath), value) : value);
|
23346
24289
|
}
|
23347
24290
|
});
|
23348
24291
|
|
@@ -23402,7 +24345,7 @@ function mergeOverrides(configResult, filePath) {
|
|
23402
24345
|
options = _objectWithoutPropertiesLoose(_ref, ["overrides"]);
|
23403
24346
|
|
23404
24347
|
if (filePath && overrides) {
|
23405
|
-
const relativeFilePath = path$
|
24348
|
+
const relativeFilePath = path$2.relative(path$2.dirname(configPath), filePath);
|
23406
24349
|
|
23407
24350
|
for (const override of overrides) {
|
23408
24351
|
if (pathMatchesGlobs(relativeFilePath, override.files, override.excludeFiles)) {
|
@@ -23517,7 +24460,7 @@ function _getFileInfo({
|
|
23517
24460
|
}
|
23518
24461
|
|
23519
24462
|
function normalizeFilePath(filePath, ignorePath) {
|
23520
|
-
return ignorePath ? path$
|
24463
|
+
return ignorePath ? path$2.relative(path$2.dirname(ignorePath), filePath) : filePath;
|
23521
24464
|
}
|
23522
24465
|
|
23523
24466
|
var getFileInfo_1 = getFileInfo;
|
@@ -26935,7 +27878,7 @@ var arrayUnion = (...arguments_) => {
|
|
26935
27878
|
*/
|
26936
27879
|
|
26937
27880
|
|
26938
|
-
const PassThrough = stream$
|
27881
|
+
const PassThrough = stream$6.PassThrough;
|
26939
27882
|
const slice = Array.prototype.slice;
|
26940
27883
|
var merge2_1 = merge2;
|
26941
27884
|
|
@@ -27084,7 +28027,7 @@ var errno = createCommonjsModule(function (module, exports) {
|
|
27084
28027
|
unwrapExports(errno);
|
27085
28028
|
var errno_1 = errno.isEnoentCodeError;
|
27086
28029
|
|
27087
|
-
var fs = createCommonjsModule(function (module, exports) {
|
28030
|
+
var fs$1 = createCommonjsModule(function (module, exports) {
|
27088
28031
|
|
27089
28032
|
Object.defineProperty(exports, "__esModule", {
|
27090
28033
|
value: true
|
@@ -27110,8 +28053,8 @@ var fs = createCommonjsModule(function (module, exports) {
|
|
27110
28053
|
|
27111
28054
|
exports.createDirentFromStats = createDirentFromStats;
|
27112
28055
|
});
|
27113
|
-
unwrapExports(fs);
|
27114
|
-
var fs_1 = fs.createDirentFromStats;
|
28056
|
+
unwrapExports(fs$1);
|
28057
|
+
var fs_1 = fs$1.createDirentFromStats;
|
27115
28058
|
|
27116
28059
|
var path_1 = createCommonjsModule(function (module, exports) {
|
27117
28060
|
|
@@ -27132,7 +28075,7 @@ var path_1 = createCommonjsModule(function (module, exports) {
|
|
27132
28075
|
exports.unixify = unixify;
|
27133
28076
|
|
27134
28077
|
function makeAbsolute(cwd, filepath) {
|
27135
|
-
return path$
|
28078
|
+
return path$2.resolve(cwd, filepath);
|
27136
28079
|
}
|
27137
28080
|
|
27138
28081
|
exports.makeAbsolute = makeAbsolute;
|
@@ -27239,8 +28182,8 @@ var isGlob = function isGlob(str, options) {
|
|
27239
28182
|
return false;
|
27240
28183
|
};
|
27241
28184
|
|
27242
|
-
var pathPosixDirname = path$
|
27243
|
-
var isWin32 = os.platform() === 'win32';
|
28185
|
+
var pathPosixDirname = path$2.posix.dirname;
|
28186
|
+
var isWin32 = os$1.platform() === 'win32';
|
27244
28187
|
var slash = '/';
|
27245
28188
|
var backslash = /\\/g;
|
27246
28189
|
var enclosure = /[\{\[].*[\/]*.*[\}\]]$/;
|
@@ -27876,7 +28819,7 @@ const toRegex = (start, end, options) => {
|
|
27876
28819
|
};
|
27877
28820
|
|
27878
28821
|
const rangeError = (...args) => {
|
27879
|
-
return new RangeError('Invalid range arguments: ' + util$
|
28822
|
+
return new RangeError('Invalid range arguments: ' + util$3.inspect(...args));
|
27880
28823
|
};
|
27881
28824
|
|
27882
28825
|
const invalidRange = (start, end, options) => {
|
@@ -28187,7 +29130,7 @@ const expand$1 = (ast, options = {}) => {
|
|
28187
29130
|
|
28188
29131
|
var expand_1 = expand$1;
|
28189
29132
|
|
28190
|
-
var constants$
|
29133
|
+
var constants$2 = {
|
28191
29134
|
MAX_LENGTH: 1024 * 64,
|
28192
29135
|
// Digits
|
28193
29136
|
CHAR_0: '0',
|
@@ -28371,12 +29314,12 @@ const {
|
|
28371
29314
|
/* ' */
|
28372
29315
|
CHAR_NO_BREAK_SPACE,
|
28373
29316
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE
|
28374
|
-
} = constants$
|
29317
|
+
} = constants$2;
|
28375
29318
|
/**
|
28376
29319
|
* parse
|
28377
29320
|
*/
|
28378
29321
|
|
28379
|
-
const parse$
|
29322
|
+
const parse$3 = (input, options = {}) => {
|
28380
29323
|
if (typeof input !== 'string') {
|
28381
29324
|
throw new TypeError('Expected a string');
|
28382
29325
|
}
|
@@ -28726,7 +29669,7 @@ const parse$2 = (input, options = {}) => {
|
|
28726
29669
|
return ast;
|
28727
29670
|
};
|
28728
29671
|
|
28729
|
-
var parse_1 = parse$
|
29672
|
+
var parse_1 = parse$3;
|
28730
29673
|
|
28731
29674
|
/**
|
28732
29675
|
* Expand the given pattern or create a regex-compatible string.
|
@@ -28969,7 +29912,7 @@ const POSIX_REGEX_SOURCE = {
|
|
28969
29912
|
word: 'A-Za-z0-9_',
|
28970
29913
|
xdigit: 'A-Fa-f0-9'
|
28971
29914
|
};
|
28972
|
-
var constants$
|
29915
|
+
var constants$3 = {
|
28973
29916
|
MAX_LENGTH: 1024 * 64,
|
28974
29917
|
POSIX_REGEX_SOURCE,
|
28975
29918
|
// regular expressions
|
@@ -29117,7 +30060,7 @@ var constants$2 = {
|
|
29117
30060
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
29118
30061
|
|
29119
30062
|
/* \uFEFF */
|
29120
|
-
SEP: path$
|
30063
|
+
SEP: path$2.sep,
|
29121
30064
|
|
29122
30065
|
/**
|
29123
30066
|
* Create EXTGLOB_CHARS
|
@@ -29169,7 +30112,7 @@ var utils$3 = createCommonjsModule(function (module, exports) {
|
|
29169
30112
|
REGEX_REMOVE_BACKSLASH,
|
29170
30113
|
REGEX_SPECIAL_CHARS,
|
29171
30114
|
REGEX_SPECIAL_CHARS_GLOBAL
|
29172
|
-
} = constants$
|
30115
|
+
} = constants$3;
|
29173
30116
|
|
29174
30117
|
exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
29175
30118
|
|
@@ -29202,7 +30145,7 @@ var utils$3 = createCommonjsModule(function (module, exports) {
|
|
29202
30145
|
return options.windows;
|
29203
30146
|
}
|
29204
30147
|
|
29205
|
-
return win32 === true || path$
|
30148
|
+
return win32 === true || path$2.sep === '\\';
|
29206
30149
|
};
|
29207
30150
|
|
29208
30151
|
exports.escapeLast = (input, char, lastIdx) => {
|
@@ -29293,7 +30236,7 @@ const {
|
|
29293
30236
|
CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET$1
|
29294
30237
|
/* ] */
|
29295
30238
|
|
29296
|
-
} = constants$
|
30239
|
+
} = constants$3;
|
29297
30240
|
|
29298
30241
|
const isPathSeparator = code => {
|
29299
30242
|
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
|
@@ -29685,7 +30628,7 @@ const {
|
|
29685
30628
|
REGEX_NON_SPECIAL_CHARS,
|
29686
30629
|
REGEX_SPECIAL_CHARS_BACKREF,
|
29687
30630
|
REPLACEMENTS
|
29688
|
-
} = constants$
|
30631
|
+
} = constants$3;
|
29689
30632
|
/**
|
29690
30633
|
* Helpers
|
29691
30634
|
*/
|
@@ -29723,7 +30666,7 @@ const syntaxError = (type, char) => {
|
|
29723
30666
|
*/
|
29724
30667
|
|
29725
30668
|
|
29726
|
-
const parse$
|
30669
|
+
const parse$4 = (input, options) => {
|
29727
30670
|
if (typeof input !== 'string') {
|
29728
30671
|
throw new TypeError('Expected a string');
|
29729
30672
|
}
|
@@ -29746,8 +30689,8 @@ const parse$3 = (input, options) => {
|
|
29746
30689
|
const capture = opts.capture ? '' : '?:';
|
29747
30690
|
const win32 = utils$3.isWindows(options); // create constants based on platform, for windows or posix
|
29748
30691
|
|
29749
|
-
const PLATFORM_CHARS = constants$
|
29750
|
-
const EXTGLOB_CHARS = constants$
|
30692
|
+
const PLATFORM_CHARS = constants$3.globChars(win32);
|
30693
|
+
const EXTGLOB_CHARS = constants$3.extglobChars(PLATFORM_CHARS);
|
29751
30694
|
const {
|
29752
30695
|
DOT_LITERAL,
|
29753
30696
|
PLUS_LITERAL,
|
@@ -30803,7 +31746,7 @@ const parse$3 = (input, options) => {
|
|
30803
31746
|
*/
|
30804
31747
|
|
30805
31748
|
|
30806
|
-
parse$
|
31749
|
+
parse$4.fastpaths = (input, options) => {
|
30807
31750
|
const opts = Object.assign({}, options);
|
30808
31751
|
const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH$3, opts.maxLength) : MAX_LENGTH$3;
|
30809
31752
|
const len = input.length;
|
@@ -30825,7 +31768,7 @@ parse$3.fastpaths = (input, options) => {
|
|
30825
31768
|
NO_DOTS_SLASH,
|
30826
31769
|
STAR,
|
30827
31770
|
START_ANCHOR
|
30828
|
-
} = constants$
|
31771
|
+
} = constants$3.globChars(win32);
|
30829
31772
|
const nodot = opts.dot ? NO_DOTS : NO_DOT;
|
30830
31773
|
const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
|
30831
31774
|
const capture = opts.capture ? '' : '?:';
|
@@ -30891,7 +31834,7 @@ parse$3.fastpaths = (input, options) => {
|
|
30891
31834
|
return source;
|
30892
31835
|
};
|
30893
31836
|
|
30894
|
-
var parse_1$1 = parse$
|
31837
|
+
var parse_1$1 = parse$4;
|
30895
31838
|
|
30896
31839
|
const isObject$2 = val => val && typeof val === 'object' && !Array.isArray(val);
|
30897
31840
|
/**
|
@@ -31081,7 +32024,7 @@ picomatch.test = (input, regex, options, {
|
|
31081
32024
|
|
31082
32025
|
picomatch.matchBase = (input, glob, options, posix = utils$3.isWindows(options)) => {
|
31083
32026
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
31084
|
-
return regex.test(path$
|
32027
|
+
return regex.test(path$2.basename(input));
|
31085
32028
|
};
|
31086
32029
|
/**
|
31087
32030
|
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|
@@ -31256,7 +32199,7 @@ picomatch.toRegex = (source, options) => {
|
|
31256
32199
|
*/
|
31257
32200
|
|
31258
32201
|
|
31259
|
-
picomatch.constants = constants$
|
32202
|
+
picomatch.constants = constants$3;
|
31260
32203
|
/**
|
31261
32204
|
* Expose "picomatch"
|
31262
32205
|
*/
|
@@ -31450,7 +32393,7 @@ micromatch.not = (list, patterns, options = {}) => {
|
|
31450
32393
|
|
31451
32394
|
micromatch.contains = (str, pattern, options) => {
|
31452
32395
|
if (typeof str !== 'string') {
|
31453
|
-
throw new TypeError(`Expected a string: "${util$
|
32396
|
+
throw new TypeError(`Expected a string: "${util$3.inspect(str)}"`);
|
31454
32397
|
}
|
31455
32398
|
|
31456
32399
|
if (Array.isArray(pattern)) {
|
@@ -31605,7 +32548,7 @@ micromatch.every = (list, patterns, options) => {
|
|
31605
32548
|
|
31606
32549
|
micromatch.all = (str, patterns, options) => {
|
31607
32550
|
if (typeof str !== 'string') {
|
31608
|
-
throw new TypeError(`Expected a string: "${util$
|
32551
|
+
throw new TypeError(`Expected a string: "${util$3.inspect(str)}"`);
|
31609
32552
|
}
|
31610
32553
|
|
31611
32554
|
return [].concat(patterns).every(p => picomatch$1(p, options)(str));
|
@@ -31848,7 +32791,7 @@ var pattern = createCommonjsModule(function (module, exports) {
|
|
31848
32791
|
exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
31849
32792
|
|
31850
32793
|
function isAffectDepthOfReadingPattern(pattern) {
|
31851
|
-
const basename = path$
|
32794
|
+
const basename = path$2.basename(pattern);
|
31852
32795
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
31853
32796
|
}
|
31854
32797
|
|
@@ -31923,7 +32866,7 @@ var pattern_16 = pattern.makeRe;
|
|
31923
32866
|
var pattern_17 = pattern.convertPatternsToRe;
|
31924
32867
|
var pattern_18 = pattern.matchAny;
|
31925
32868
|
|
31926
|
-
var stream = createCommonjsModule(function (module, exports) {
|
32869
|
+
var stream$1 = createCommonjsModule(function (module, exports) {
|
31927
32870
|
|
31928
32871
|
Object.defineProperty(exports, "__esModule", {
|
31929
32872
|
value: true
|
@@ -31945,8 +32888,8 @@ var stream = createCommonjsModule(function (module, exports) {
|
|
31945
32888
|
streams.forEach(stream => stream.emit('close'));
|
31946
32889
|
}
|
31947
32890
|
});
|
31948
|
-
unwrapExports(stream);
|
31949
|
-
var stream_1 = stream.merge;
|
32891
|
+
unwrapExports(stream$1);
|
32892
|
+
var stream_1 = stream$1.merge;
|
31950
32893
|
|
31951
32894
|
var string$1 = createCommonjsModule(function (module, exports) {
|
31952
32895
|
|
@@ -31977,10 +32920,10 @@ var utils$4 = createCommonjsModule(function (module, exports) {
|
|
31977
32920
|
});
|
31978
32921
|
exports.array = array$2;
|
31979
32922
|
exports.errno = errno;
|
31980
|
-
exports.fs = fs;
|
32923
|
+
exports.fs = fs$1;
|
31981
32924
|
exports.path = path_1;
|
31982
32925
|
exports.pattern = pattern;
|
31983
|
-
exports.stream = stream;
|
32926
|
+
exports.stream = stream$1;
|
31984
32927
|
exports.string = string$1;
|
31985
32928
|
});
|
31986
32929
|
unwrapExports(utils$4);
|
@@ -32088,7 +33031,7 @@ var tasks_5 = tasks.groupPatternsByBaseDirectory;
|
|
32088
33031
|
var tasks_6 = tasks.convertPatternGroupsToTasks;
|
32089
33032
|
var tasks_7 = tasks.convertPatternGroupToTask;
|
32090
33033
|
|
32091
|
-
var async = createCommonjsModule(function (module, exports) {
|
33034
|
+
var async$1 = createCommonjsModule(function (module, exports) {
|
32092
33035
|
|
32093
33036
|
Object.defineProperty(exports, "__esModule", {
|
32094
33037
|
value: true
|
@@ -32132,10 +33075,10 @@ var async = createCommonjsModule(function (module, exports) {
|
|
32132
33075
|
callback(null, result);
|
32133
33076
|
}
|
32134
33077
|
});
|
32135
|
-
unwrapExports(async);
|
32136
|
-
var async_1 = async.read;
|
33078
|
+
unwrapExports(async$1);
|
33079
|
+
var async_1 = async$1.read;
|
32137
33080
|
|
32138
|
-
var sync = createCommonjsModule(function (module, exports) {
|
33081
|
+
var sync$1 = createCommonjsModule(function (module, exports) {
|
32139
33082
|
|
32140
33083
|
Object.defineProperty(exports, "__esModule", {
|
32141
33084
|
value: true
|
@@ -32167,8 +33110,8 @@ var sync = createCommonjsModule(function (module, exports) {
|
|
32167
33110
|
|
32168
33111
|
exports.read = read;
|
32169
33112
|
});
|
32170
|
-
unwrapExports(sync);
|
32171
|
-
var sync_1 = sync.read;
|
33113
|
+
unwrapExports(sync$1);
|
33114
|
+
var sync_1 = sync$1.read;
|
32172
33115
|
|
32173
33116
|
var fs_1$1 = createCommonjsModule(function (module, exports) {
|
32174
33117
|
|
@@ -32176,10 +33119,10 @@ var fs_1$1 = createCommonjsModule(function (module, exports) {
|
|
32176
33119
|
value: true
|
32177
33120
|
});
|
32178
33121
|
exports.FILE_SYSTEM_ADAPTER = {
|
32179
|
-
lstat: fs$
|
32180
|
-
stat: fs$
|
32181
|
-
lstatSync: fs$
|
32182
|
-
statSync: fs$
|
33122
|
+
lstat: fs$3.lstat,
|
33123
|
+
stat: fs$3.stat,
|
33124
|
+
lstatSync: fs$3.lstatSync,
|
33125
|
+
statSync: fs$3.statSync
|
32183
33126
|
};
|
32184
33127
|
|
32185
33128
|
function createFileSystemAdapter(fsMethods) {
|
@@ -32230,17 +33173,17 @@ var out = createCommonjsModule(function (module, exports) {
|
|
32230
33173
|
|
32231
33174
|
function stat(path, optionsOrSettingsOrCallback, callback) {
|
32232
33175
|
if (typeof optionsOrSettingsOrCallback === 'function') {
|
32233
|
-
return async.read(path, getSettings(), optionsOrSettingsOrCallback);
|
33176
|
+
return async$1.read(path, getSettings(), optionsOrSettingsOrCallback);
|
32234
33177
|
}
|
32235
33178
|
|
32236
|
-
async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
|
33179
|
+
async$1.read(path, getSettings(optionsOrSettingsOrCallback), callback);
|
32237
33180
|
}
|
32238
33181
|
|
32239
33182
|
exports.stat = stat;
|
32240
33183
|
|
32241
33184
|
function statSync(path, optionsOrSettings) {
|
32242
33185
|
const settings = getSettings(optionsOrSettings);
|
32243
|
-
return sync.read(path, settings);
|
33186
|
+
return sync$1.read(path, settings);
|
32244
33187
|
}
|
32245
33188
|
|
32246
33189
|
exports.statSync = statSync;
|
@@ -32312,7 +33255,7 @@ function runParallel(tasks, cb) {
|
|
32312
33255
|
isSync = false;
|
32313
33256
|
}
|
32314
33257
|
|
32315
|
-
var constants$
|
33258
|
+
var constants$4 = createCommonjsModule(function (module, exports) {
|
32316
33259
|
|
32317
33260
|
Object.defineProperty(exports, "__esModule", {
|
32318
33261
|
value: true
|
@@ -32330,10 +33273,10 @@ var constants$3 = createCommonjsModule(function (module, exports) {
|
|
32330
33273
|
|
32331
33274
|
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
|
32332
33275
|
});
|
32333
|
-
unwrapExports(constants$
|
32334
|
-
var constants_1 = constants$
|
33276
|
+
unwrapExports(constants$4);
|
33277
|
+
var constants_1 = constants$4.IS_SUPPORT_READDIR_WITH_FILE_TYPES;
|
32335
33278
|
|
32336
|
-
var fs$
|
33279
|
+
var fs$2 = createCommonjsModule(function (module, exports) {
|
32337
33280
|
|
32338
33281
|
Object.defineProperty(exports, "__esModule", {
|
32339
33282
|
value: true
|
@@ -32359,27 +33302,27 @@ var fs$1 = createCommonjsModule(function (module, exports) {
|
|
32359
33302
|
|
32360
33303
|
exports.createDirentFromStats = createDirentFromStats;
|
32361
33304
|
});
|
32362
|
-
unwrapExports(fs$
|
32363
|
-
var fs_1$2 = fs$
|
33305
|
+
unwrapExports(fs$2);
|
33306
|
+
var fs_1$2 = fs$2.createDirentFromStats;
|
32364
33307
|
|
32365
33308
|
var utils$5 = createCommonjsModule(function (module, exports) {
|
32366
33309
|
|
32367
33310
|
Object.defineProperty(exports, "__esModule", {
|
32368
33311
|
value: true
|
32369
33312
|
});
|
32370
|
-
exports.fs = fs$
|
33313
|
+
exports.fs = fs$2;
|
32371
33314
|
});
|
32372
33315
|
unwrapExports(utils$5);
|
32373
33316
|
var utils_1$5 = utils$5.fs;
|
32374
33317
|
|
32375
|
-
var async$
|
33318
|
+
var async$2 = createCommonjsModule(function (module, exports) {
|
32376
33319
|
|
32377
33320
|
Object.defineProperty(exports, "__esModule", {
|
32378
33321
|
value: true
|
32379
33322
|
});
|
32380
33323
|
|
32381
33324
|
function read(directory, settings, callback) {
|
32382
|
-
if (!settings.stats && constants$
|
33325
|
+
if (!settings.stats && constants$4.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
32383
33326
|
return readdirWithFileTypes(directory, settings, callback);
|
32384
33327
|
}
|
32385
33328
|
|
@@ -32485,19 +33428,19 @@ var async$1 = createCommonjsModule(function (module, exports) {
|
|
32485
33428
|
callback(null, result);
|
32486
33429
|
}
|
32487
33430
|
});
|
32488
|
-
unwrapExports(async$
|
32489
|
-
var async_1$1 = async$
|
32490
|
-
var async_2 = async$
|
32491
|
-
var async_3 = async$
|
33431
|
+
unwrapExports(async$2);
|
33432
|
+
var async_1$1 = async$2.read;
|
33433
|
+
var async_2 = async$2.readdirWithFileTypes;
|
33434
|
+
var async_3 = async$2.readdir;
|
32492
33435
|
|
32493
|
-
var sync$
|
33436
|
+
var sync$2 = createCommonjsModule(function (module, exports) {
|
32494
33437
|
|
32495
33438
|
Object.defineProperty(exports, "__esModule", {
|
32496
33439
|
value: true
|
32497
33440
|
});
|
32498
33441
|
|
32499
33442
|
function read(directory, settings) {
|
32500
|
-
if (!settings.stats && constants$
|
33443
|
+
if (!settings.stats && constants$4.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
32501
33444
|
return readdirWithFileTypes(directory, settings);
|
32502
33445
|
}
|
32503
33446
|
|
@@ -32555,10 +33498,10 @@ var sync$1 = createCommonjsModule(function (module, exports) {
|
|
32555
33498
|
|
32556
33499
|
exports.readdir = readdir;
|
32557
33500
|
});
|
32558
|
-
unwrapExports(sync$
|
32559
|
-
var sync_1$1 = sync$
|
32560
|
-
var sync_2 = sync$
|
32561
|
-
var sync_3 = sync$
|
33501
|
+
unwrapExports(sync$2);
|
33502
|
+
var sync_1$1 = sync$2.read;
|
33503
|
+
var sync_2 = sync$2.readdirWithFileTypes;
|
33504
|
+
var sync_3 = sync$2.readdir;
|
32562
33505
|
|
32563
33506
|
var fs_1$3 = createCommonjsModule(function (module, exports) {
|
32564
33507
|
|
@@ -32566,12 +33509,12 @@ var fs_1$3 = createCommonjsModule(function (module, exports) {
|
|
32566
33509
|
value: true
|
32567
33510
|
});
|
32568
33511
|
exports.FILE_SYSTEM_ADAPTER = {
|
32569
|
-
lstat: fs$
|
32570
|
-
stat: fs$
|
32571
|
-
lstatSync: fs$
|
32572
|
-
statSync: fs$
|
32573
|
-
readdir: fs$
|
32574
|
-
readdirSync: fs$
|
33512
|
+
lstat: fs$3.lstat,
|
33513
|
+
stat: fs$3.stat,
|
33514
|
+
lstatSync: fs$3.lstatSync,
|
33515
|
+
statSync: fs$3.statSync,
|
33516
|
+
readdir: fs$3.readdir,
|
33517
|
+
readdirSync: fs$3.readdirSync
|
32575
33518
|
};
|
32576
33519
|
|
32577
33520
|
function createFileSystemAdapter(fsMethods) {
|
@@ -32599,7 +33542,7 @@ var settings$1 = createCommonjsModule(function (module, exports) {
|
|
32599
33542
|
this._options = _options;
|
32600
33543
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
32601
33544
|
this.fs = fs_1$3.createFileSystemAdapter(this._options.fs);
|
32602
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$
|
33545
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$2.sep);
|
32603
33546
|
this.stats = this._getValue(this._options.stats, false);
|
32604
33547
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
32605
33548
|
this.fsStatSettings = new out.Settings({
|
@@ -32628,17 +33571,17 @@ var out$1 = createCommonjsModule(function (module, exports) {
|
|
32628
33571
|
|
32629
33572
|
function scandir(path, optionsOrSettingsOrCallback, callback) {
|
32630
33573
|
if (typeof optionsOrSettingsOrCallback === 'function') {
|
32631
|
-
return async$
|
33574
|
+
return async$2.read(path, getSettings(), optionsOrSettingsOrCallback);
|
32632
33575
|
}
|
32633
33576
|
|
32634
|
-
async$
|
33577
|
+
async$2.read(path, getSettings(optionsOrSettingsOrCallback), callback);
|
32635
33578
|
}
|
32636
33579
|
|
32637
33580
|
exports.scandir = scandir;
|
32638
33581
|
|
32639
33582
|
function scandirSync(path, optionsOrSettings) {
|
32640
33583
|
const settings = getSettings(optionsOrSettings);
|
32641
|
-
return sync$
|
33584
|
+
return sync$2.read(path, settings);
|
32642
33585
|
}
|
32643
33586
|
|
32644
33587
|
exports.scandirSync = scandirSync;
|
@@ -32920,7 +33863,7 @@ var reader = createCommonjsModule(function (module, exports) {
|
|
32920
33863
|
});
|
32921
33864
|
unwrapExports(reader);
|
32922
33865
|
|
32923
|
-
var async$
|
33866
|
+
var async$3 = createCommonjsModule(function (module, exports) {
|
32924
33867
|
|
32925
33868
|
Object.defineProperty(exports, "__esModule", {
|
32926
33869
|
value: true
|
@@ -32931,7 +33874,7 @@ var async$2 = createCommonjsModule(function (module, exports) {
|
|
32931
33874
|
super(_root, _settings);
|
32932
33875
|
this._settings = _settings;
|
32933
33876
|
this._scandir = out$1.scandir;
|
32934
|
-
this._emitter = new events.EventEmitter();
|
33877
|
+
this._emitter = new events$1.EventEmitter();
|
32935
33878
|
this._queue = queue(this._worker.bind(this), this._settings.concurrency);
|
32936
33879
|
this._isFatalError = false;
|
32937
33880
|
this._isDestroyed = false;
|
@@ -33040,9 +33983,9 @@ var async$2 = createCommonjsModule(function (module, exports) {
|
|
33040
33983
|
|
33041
33984
|
exports.default = AsyncReader;
|
33042
33985
|
});
|
33043
|
-
unwrapExports(async$
|
33986
|
+
unwrapExports(async$3);
|
33044
33987
|
|
33045
|
-
var async$
|
33988
|
+
var async$4 = createCommonjsModule(function (module, exports) {
|
33046
33989
|
|
33047
33990
|
Object.defineProperty(exports, "__esModule", {
|
33048
33991
|
value: true
|
@@ -33052,7 +33995,7 @@ var async$3 = createCommonjsModule(function (module, exports) {
|
|
33052
33995
|
constructor(_root, _settings) {
|
33053
33996
|
this._root = _root;
|
33054
33997
|
this._settings = _settings;
|
33055
|
-
this._reader = new async$
|
33998
|
+
this._reader = new async$3.default(this._root, this._settings);
|
33056
33999
|
this._storage = new Set();
|
33057
34000
|
}
|
33058
34001
|
|
@@ -33084,9 +34027,9 @@ var async$3 = createCommonjsModule(function (module, exports) {
|
|
33084
34027
|
callback(null, entries);
|
33085
34028
|
}
|
33086
34029
|
});
|
33087
|
-
unwrapExports(async$
|
34030
|
+
unwrapExports(async$4);
|
33088
34031
|
|
33089
|
-
var stream$
|
34032
|
+
var stream$2 = createCommonjsModule(function (module, exports) {
|
33090
34033
|
|
33091
34034
|
Object.defineProperty(exports, "__esModule", {
|
33092
34035
|
value: true
|
@@ -33096,8 +34039,8 @@ var stream$1 = createCommonjsModule(function (module, exports) {
|
|
33096
34039
|
constructor(_root, _settings) {
|
33097
34040
|
this._root = _root;
|
33098
34041
|
this._settings = _settings;
|
33099
|
-
this._reader = new async$
|
33100
|
-
this._stream = new stream$
|
34042
|
+
this._reader = new async$3.default(this._root, this._settings);
|
34043
|
+
this._stream = new stream$6.Readable({
|
33101
34044
|
objectMode: true,
|
33102
34045
|
read: () => {},
|
33103
34046
|
destroy: this._reader.destroy.bind(this._reader)
|
@@ -33126,9 +34069,9 @@ var stream$1 = createCommonjsModule(function (module, exports) {
|
|
33126
34069
|
|
33127
34070
|
exports.default = StreamProvider;
|
33128
34071
|
});
|
33129
|
-
unwrapExports(stream$
|
34072
|
+
unwrapExports(stream$2);
|
33130
34073
|
|
33131
|
-
var sync$
|
34074
|
+
var sync$3 = createCommonjsModule(function (module, exports) {
|
33132
34075
|
|
33133
34076
|
Object.defineProperty(exports, "__esModule", {
|
33134
34077
|
value: true
|
@@ -33207,9 +34150,9 @@ var sync$2 = createCommonjsModule(function (module, exports) {
|
|
33207
34150
|
|
33208
34151
|
exports.default = SyncReader;
|
33209
34152
|
});
|
33210
|
-
unwrapExports(sync$
|
34153
|
+
unwrapExports(sync$3);
|
33211
34154
|
|
33212
|
-
var sync$
|
34155
|
+
var sync$4 = createCommonjsModule(function (module, exports) {
|
33213
34156
|
|
33214
34157
|
Object.defineProperty(exports, "__esModule", {
|
33215
34158
|
value: true
|
@@ -33219,7 +34162,7 @@ var sync$3 = createCommonjsModule(function (module, exports) {
|
|
33219
34162
|
constructor(_root, _settings) {
|
33220
34163
|
this._root = _root;
|
33221
34164
|
this._settings = _settings;
|
33222
|
-
this._reader = new sync$
|
34165
|
+
this._reader = new sync$3.default(this._root, this._settings);
|
33223
34166
|
}
|
33224
34167
|
|
33225
34168
|
read() {
|
@@ -33230,7 +34173,7 @@ var sync$3 = createCommonjsModule(function (module, exports) {
|
|
33230
34173
|
|
33231
34174
|
exports.default = SyncProvider;
|
33232
34175
|
});
|
33233
|
-
unwrapExports(sync$
|
34176
|
+
unwrapExports(sync$4);
|
33234
34177
|
|
33235
34178
|
var settings$2 = createCommonjsModule(function (module, exports) {
|
33236
34179
|
|
@@ -33246,7 +34189,7 @@ var settings$2 = createCommonjsModule(function (module, exports) {
|
|
33246
34189
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
33247
34190
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
33248
34191
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
33249
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$
|
34192
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$2.sep);
|
33250
34193
|
this.fsScandirSettings = new out$1.Settings({
|
33251
34194
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
33252
34195
|
fs: this._options.fs,
|
@@ -33275,17 +34218,17 @@ var out$2 = createCommonjsModule(function (module, exports) {
|
|
33275
34218
|
|
33276
34219
|
function walk(directory, optionsOrSettingsOrCallback, callback) {
|
33277
34220
|
if (typeof optionsOrSettingsOrCallback === 'function') {
|
33278
|
-
return new async$
|
34221
|
+
return new async$4.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
|
33279
34222
|
}
|
33280
34223
|
|
33281
|
-
new async$
|
34224
|
+
new async$4.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
|
33282
34225
|
}
|
33283
34226
|
|
33284
34227
|
exports.walk = walk;
|
33285
34228
|
|
33286
34229
|
function walkSync(directory, optionsOrSettings) {
|
33287
34230
|
const settings = getSettings(optionsOrSettings);
|
33288
|
-
const provider = new sync$
|
34231
|
+
const provider = new sync$4.default(directory, settings);
|
33289
34232
|
return provider.read();
|
33290
34233
|
}
|
33291
34234
|
|
@@ -33293,7 +34236,7 @@ var out$2 = createCommonjsModule(function (module, exports) {
|
|
33293
34236
|
|
33294
34237
|
function walkStream(directory, optionsOrSettings) {
|
33295
34238
|
const settings = getSettings(optionsOrSettings);
|
33296
|
-
const provider = new stream$
|
34239
|
+
const provider = new stream$2.default(directory, settings);
|
33297
34240
|
return provider.read();
|
33298
34241
|
}
|
33299
34242
|
|
@@ -33330,7 +34273,7 @@ var reader$1 = createCommonjsModule(function (module, exports) {
|
|
33330
34273
|
}
|
33331
34274
|
|
33332
34275
|
_getFullEntryPath(filepath) {
|
33333
|
-
return path$
|
34276
|
+
return path$2.resolve(this._settings.cwd, filepath);
|
33334
34277
|
}
|
33335
34278
|
|
33336
34279
|
_makeEntry(stats, pattern) {
|
@@ -33357,7 +34300,7 @@ var reader$1 = createCommonjsModule(function (module, exports) {
|
|
33357
34300
|
});
|
33358
34301
|
unwrapExports(reader$1);
|
33359
34302
|
|
33360
|
-
var stream$
|
34303
|
+
var stream$3 = createCommonjsModule(function (module, exports) {
|
33361
34304
|
|
33362
34305
|
Object.defineProperty(exports, "__esModule", {
|
33363
34306
|
value: true
|
@@ -33376,7 +34319,7 @@ var stream$2 = createCommonjsModule(function (module, exports) {
|
|
33376
34319
|
|
33377
34320
|
static(patterns, options) {
|
33378
34321
|
const filepaths = patterns.map(this._getFullEntryPath, this);
|
33379
|
-
const stream = new stream$
|
34322
|
+
const stream = new stream$6.PassThrough({
|
33380
34323
|
objectMode: true
|
33381
34324
|
});
|
33382
34325
|
|
@@ -33423,7 +34366,7 @@ var stream$2 = createCommonjsModule(function (module, exports) {
|
|
33423
34366
|
|
33424
34367
|
exports.default = ReaderStream;
|
33425
34368
|
});
|
33426
|
-
unwrapExports(stream$
|
34369
|
+
unwrapExports(stream$3);
|
33427
34370
|
|
33428
34371
|
var matcher = createCommonjsModule(function (module, exports) {
|
33429
34372
|
|
@@ -33783,7 +34726,7 @@ var provider = createCommonjsModule(function (module, exports) {
|
|
33783
34726
|
}
|
33784
34727
|
|
33785
34728
|
_getRootDirectory(task) {
|
33786
|
-
return path$
|
34729
|
+
return path$2.resolve(this._settings.cwd, task.base);
|
33787
34730
|
}
|
33788
34731
|
|
33789
34732
|
_getReaderOptions(task) {
|
@@ -33822,7 +34765,7 @@ var provider = createCommonjsModule(function (module, exports) {
|
|
33822
34765
|
});
|
33823
34766
|
unwrapExports(provider);
|
33824
34767
|
|
33825
|
-
var async$
|
34768
|
+
var async$5 = createCommonjsModule(function (module, exports) {
|
33826
34769
|
|
33827
34770
|
Object.defineProperty(exports, "__esModule", {
|
33828
34771
|
value: true
|
@@ -33831,7 +34774,7 @@ var async$4 = createCommonjsModule(function (module, exports) {
|
|
33831
34774
|
class ProviderAsync extends provider.default {
|
33832
34775
|
constructor() {
|
33833
34776
|
super(...arguments);
|
33834
|
-
this._reader = new stream$
|
34777
|
+
this._reader = new stream$3.default(this._settings);
|
33835
34778
|
}
|
33836
34779
|
|
33837
34780
|
read(task) {
|
@@ -33860,9 +34803,9 @@ var async$4 = createCommonjsModule(function (module, exports) {
|
|
33860
34803
|
|
33861
34804
|
exports.default = ProviderAsync;
|
33862
34805
|
});
|
33863
|
-
unwrapExports(async$
|
34806
|
+
unwrapExports(async$5);
|
33864
34807
|
|
33865
|
-
var stream$
|
34808
|
+
var stream$4 = createCommonjsModule(function (module, exports) {
|
33866
34809
|
|
33867
34810
|
Object.defineProperty(exports, "__esModule", {
|
33868
34811
|
value: true
|
@@ -33871,7 +34814,7 @@ var stream$3 = createCommonjsModule(function (module, exports) {
|
|
33871
34814
|
class ProviderStream extends provider.default {
|
33872
34815
|
constructor() {
|
33873
34816
|
super(...arguments);
|
33874
|
-
this._reader = new stream$
|
34817
|
+
this._reader = new stream$3.default(this._settings);
|
33875
34818
|
}
|
33876
34819
|
|
33877
34820
|
read(task) {
|
@@ -33880,7 +34823,7 @@ var stream$3 = createCommonjsModule(function (module, exports) {
|
|
33880
34823
|
const options = this._getReaderOptions(task);
|
33881
34824
|
|
33882
34825
|
const source = this.api(root, task, options);
|
33883
|
-
const destination = new stream$
|
34826
|
+
const destination = new stream$6.Readable({
|
33884
34827
|
objectMode: true,
|
33885
34828
|
read: () => {}
|
33886
34829
|
});
|
@@ -33901,9 +34844,9 @@ var stream$3 = createCommonjsModule(function (module, exports) {
|
|
33901
34844
|
|
33902
34845
|
exports.default = ProviderStream;
|
33903
34846
|
});
|
33904
|
-
unwrapExports(stream$
|
34847
|
+
unwrapExports(stream$4);
|
33905
34848
|
|
33906
|
-
var sync$
|
34849
|
+
var sync$5 = createCommonjsModule(function (module, exports) {
|
33907
34850
|
|
33908
34851
|
Object.defineProperty(exports, "__esModule", {
|
33909
34852
|
value: true
|
@@ -33960,9 +34903,9 @@ var sync$4 = createCommonjsModule(function (module, exports) {
|
|
33960
34903
|
|
33961
34904
|
exports.default = ReaderSync;
|
33962
34905
|
});
|
33963
|
-
unwrapExports(sync$
|
34906
|
+
unwrapExports(sync$5);
|
33964
34907
|
|
33965
|
-
var sync$
|
34908
|
+
var sync$6 = createCommonjsModule(function (module, exports) {
|
33966
34909
|
|
33967
34910
|
Object.defineProperty(exports, "__esModule", {
|
33968
34911
|
value: true
|
@@ -33971,7 +34914,7 @@ var sync$5 = createCommonjsModule(function (module, exports) {
|
|
33971
34914
|
class ProviderSync extends provider.default {
|
33972
34915
|
constructor() {
|
33973
34916
|
super(...arguments);
|
33974
|
-
this._reader = new sync$
|
34917
|
+
this._reader = new sync$5.default(this._settings);
|
33975
34918
|
}
|
33976
34919
|
|
33977
34920
|
read(task) {
|
@@ -33995,21 +34938,21 @@ var sync$5 = createCommonjsModule(function (module, exports) {
|
|
33995
34938
|
|
33996
34939
|
exports.default = ProviderSync;
|
33997
34940
|
});
|
33998
|
-
unwrapExports(sync$
|
34941
|
+
unwrapExports(sync$6);
|
33999
34942
|
|
34000
34943
|
var settings$3 = createCommonjsModule(function (module, exports) {
|
34001
34944
|
|
34002
34945
|
Object.defineProperty(exports, "__esModule", {
|
34003
34946
|
value: true
|
34004
34947
|
});
|
34005
|
-
const CPU_COUNT = os.cpus().length;
|
34948
|
+
const CPU_COUNT = os$1.cpus().length;
|
34006
34949
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
34007
|
-
lstat: fs$
|
34008
|
-
lstatSync: fs$
|
34009
|
-
stat: fs$
|
34010
|
-
statSync: fs$
|
34011
|
-
readdir: fs$
|
34012
|
-
readdirSync: fs$
|
34950
|
+
lstat: fs$3.lstat,
|
34951
|
+
lstatSync: fs$3.lstatSync,
|
34952
|
+
stat: fs$3.stat,
|
34953
|
+
statSync: fs$3.statSync,
|
34954
|
+
readdir: fs$3.readdir,
|
34955
|
+
readdirSync: fs$3.readdirSync
|
34013
34956
|
};
|
34014
34957
|
|
34015
34958
|
class Settings {
|
@@ -34063,7 +35006,7 @@ var settings_1 = settings$3.DEFAULT_FILE_SYSTEM_ADAPTER;
|
|
34063
35006
|
|
34064
35007
|
async function FastGlob(source, options) {
|
34065
35008
|
assertPatternsInput(source);
|
34066
|
-
const works = getWorks(source, async$
|
35009
|
+
const works = getWorks(source, async$5.default, options);
|
34067
35010
|
const result = await Promise.all(works);
|
34068
35011
|
return utils$4.array.flatten(result);
|
34069
35012
|
} // https://github.com/typescript-eslint/typescript-eslint/issues/60
|
@@ -34073,7 +35016,7 @@ async function FastGlob(source, options) {
|
|
34073
35016
|
(function (FastGlob) {
|
34074
35017
|
function sync(source, options) {
|
34075
35018
|
assertPatternsInput(source);
|
34076
|
-
const works = getWorks(source, sync$
|
35019
|
+
const works = getWorks(source, sync$6.default, options);
|
34077
35020
|
return utils$4.array.flatten(works);
|
34078
35021
|
}
|
34079
35022
|
|
@@ -34081,7 +35024,7 @@ async function FastGlob(source, options) {
|
|
34081
35024
|
|
34082
35025
|
function stream(source, options) {
|
34083
35026
|
assertPatternsInput(source);
|
34084
|
-
const works = getWorks(source, stream$
|
35027
|
+
const works = getWorks(source, stream$4.default, options);
|
34085
35028
|
/**
|
34086
35029
|
* The stream returned by the provider cannot work with an asynchronous iterator.
|
34087
35030
|
* To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
|
@@ -34139,7 +35082,7 @@ var out$3 = FastGlob;
|
|
34139
35082
|
|
34140
35083
|
const {
|
34141
35084
|
promisify
|
34142
|
-
} = util$
|
35085
|
+
} = util$3;
|
34143
35086
|
|
34144
35087
|
async function isType(fsStatType, statsMethodName, filePath) {
|
34145
35088
|
if (typeof filePath !== 'string') {
|
@@ -34147,7 +35090,7 @@ async function isType(fsStatType, statsMethodName, filePath) {
|
|
34147
35090
|
}
|
34148
35091
|
|
34149
35092
|
try {
|
34150
|
-
const stats = await promisify(fs$
|
35093
|
+
const stats = await promisify(fs$3[fsStatType])(filePath);
|
34151
35094
|
return stats[statsMethodName]();
|
34152
35095
|
} catch (error) {
|
34153
35096
|
if (error.code === 'ENOENT') {
|
@@ -34164,7 +35107,7 @@ function isTypeSync(fsStatType, statsMethodName, filePath) {
|
|
34164
35107
|
}
|
34165
35108
|
|
34166
35109
|
try {
|
34167
|
-
return fs$
|
35110
|
+
return fs$3[fsStatType](filePath)[statsMethodName]();
|
34168
35111
|
} catch (error) {
|
34169
35112
|
if (error.code === 'ENOENT') {
|
34170
35113
|
return false;
|
@@ -34193,11 +35136,11 @@ const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(
|
|
34193
35136
|
|
34194
35137
|
const getPath = (filepath, cwd) => {
|
34195
35138
|
const pth = filepath[0] === '!' ? filepath.slice(1) : filepath;
|
34196
|
-
return path$
|
35139
|
+
return path$2.isAbsolute(pth) ? pth : path$2.join(cwd, pth);
|
34197
35140
|
};
|
34198
35141
|
|
34199
35142
|
const addExtensions = (file, extensions) => {
|
34200
|
-
if (path$
|
35143
|
+
if (path$2.extname(file)) {
|
34201
35144
|
return `**/${file}`;
|
34202
35145
|
}
|
34203
35146
|
|
@@ -34214,18 +35157,18 @@ const getGlob = (directory, options) => {
|
|
34214
35157
|
}
|
34215
35158
|
|
34216
35159
|
if (options.files && options.extensions) {
|
34217
|
-
return options.files.map(x => path$
|
35160
|
+
return options.files.map(x => path$2.posix.join(directory, addExtensions(x, options.extensions)));
|
34218
35161
|
}
|
34219
35162
|
|
34220
35163
|
if (options.files) {
|
34221
|
-
return options.files.map(x => path$
|
35164
|
+
return options.files.map(x => path$2.posix.join(directory, `**/${x}`));
|
34222
35165
|
}
|
34223
35166
|
|
34224
35167
|
if (options.extensions) {
|
34225
|
-
return [path$
|
35168
|
+
return [path$2.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)];
|
34226
35169
|
}
|
34227
35170
|
|
34228
|
-
return [path$
|
35171
|
+
return [path$2.posix.join(directory, '**')];
|
34229
35172
|
};
|
34230
35173
|
|
34231
35174
|
var dirGlob = async (input, options) => {
|
@@ -34244,7 +35187,7 @@ var dirGlob = async (input, options) => {
|
|
34244
35187
|
return [].concat.apply([], globs); // eslint-disable-line prefer-spread
|
34245
35188
|
};
|
34246
35189
|
|
34247
|
-
var sync$
|
35190
|
+
var sync$7 = (input, options) => {
|
34248
35191
|
options = Object.assign({
|
34249
35192
|
cwd: process.cwd()
|
34250
35193
|
}, options);
|
@@ -34256,7 +35199,7 @@ var sync$6 = (input, options) => {
|
|
34256
35199
|
const globs = [].concat(input).map(x => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x);
|
34257
35200
|
return [].concat.apply([], globs); // eslint-disable-line prefer-spread
|
34258
35201
|
};
|
34259
|
-
dirGlob.sync = sync$
|
35202
|
+
dirGlob.sync = sync$7;
|
34260
35203
|
|
34261
35204
|
// A simple implementation of make-array
|
34262
35205
|
function makeArray(subject) {
|
@@ -34667,20 +35610,20 @@ var slash$1 = path => {
|
|
34667
35610
|
|
34668
35611
|
const {
|
34669
35612
|
promisify: promisify$1
|
34670
|
-
} = util$
|
35613
|
+
} = util$3;
|
34671
35614
|
const DEFAULT_IGNORE = ['**/node_modules/**', '**/flow-typed/**', '**/coverage/**', '**/.git'];
|
34672
|
-
const readFileP = promisify$1(fs$
|
35615
|
+
const readFileP = promisify$1(fs$3.readFile);
|
34673
35616
|
|
34674
35617
|
const mapGitIgnorePatternTo = base => ignore => {
|
34675
35618
|
if (ignore.startsWith('!')) {
|
34676
|
-
return '!' + path$
|
35619
|
+
return '!' + path$2.posix.join(base, ignore.slice(1));
|
34677
35620
|
}
|
34678
35621
|
|
34679
|
-
return path$
|
35622
|
+
return path$2.posix.join(base, ignore);
|
34680
35623
|
};
|
34681
35624
|
|
34682
35625
|
const parseGitIgnore = (content, options) => {
|
34683
|
-
const base = slash$1(path$
|
35626
|
+
const base = slash$1(path$2.relative(options.cwd, path$2.dirname(options.fileName)));
|
34684
35627
|
return content.split(/\r?\n/).filter(Boolean).filter(line => !line.startsWith('#')).map(mapGitIgnorePatternTo(base));
|
34685
35628
|
};
|
34686
35629
|
|
@@ -34695,7 +35638,7 @@ const reduceIgnore = files => {
|
|
34695
35638
|
};
|
34696
35639
|
|
34697
35640
|
const ensureAbsolutePathForCwd = (cwd, p) => {
|
34698
|
-
if (path$
|
35641
|
+
if (path$2.isAbsolute(p)) {
|
34699
35642
|
if (p.startsWith(cwd)) {
|
34700
35643
|
return p;
|
34701
35644
|
}
|
@@ -34703,15 +35646,15 @@ const ensureAbsolutePathForCwd = (cwd, p) => {
|
|
34703
35646
|
throw new Error(`Path ${p} is not in cwd ${cwd}`);
|
34704
35647
|
}
|
34705
35648
|
|
34706
|
-
return path$
|
35649
|
+
return path$2.join(cwd, p);
|
34707
35650
|
};
|
34708
35651
|
|
34709
35652
|
const getIsIgnoredPredecate = (ignores, cwd) => {
|
34710
|
-
return p => ignores.ignores(slash$1(path$
|
35653
|
+
return p => ignores.ignores(slash$1(path$2.relative(cwd, ensureAbsolutePathForCwd(cwd, p))));
|
34711
35654
|
};
|
34712
35655
|
|
34713
35656
|
const getFile = async (file, cwd) => {
|
34714
|
-
const filePath = path$
|
35657
|
+
const filePath = path$2.join(cwd, file);
|
34715
35658
|
const content = await readFileP(filePath, 'utf8');
|
34716
35659
|
return {
|
34717
35660
|
cwd,
|
@@ -34721,8 +35664,8 @@ const getFile = async (file, cwd) => {
|
|
34721
35664
|
};
|
34722
35665
|
|
34723
35666
|
const getFileSync = (file, cwd) => {
|
34724
|
-
const filePath = path$
|
34725
|
-
const content = fs$
|
35667
|
+
const filePath = path$2.join(cwd, file);
|
35668
|
+
const content = fs$3.readFileSync(filePath, 'utf8');
|
34726
35669
|
return {
|
34727
35670
|
cwd,
|
34728
35671
|
filePath,
|
@@ -34730,7 +35673,7 @@ const getFileSync = (file, cwd) => {
|
|
34730
35673
|
};
|
34731
35674
|
};
|
34732
35675
|
|
34733
|
-
const normalizeOptions$
|
35676
|
+
const normalizeOptions$3 = ({
|
34734
35677
|
ignore = [],
|
34735
35678
|
cwd = slash$1(process.cwd())
|
34736
35679
|
} = {}) => {
|
@@ -34741,7 +35684,7 @@ const normalizeOptions$2 = ({
|
|
34741
35684
|
};
|
34742
35685
|
|
34743
35686
|
var gitignore = async options => {
|
34744
|
-
options = normalizeOptions$
|
35687
|
+
options = normalizeOptions$3(options);
|
34745
35688
|
const paths = await out$3('**/.gitignore', {
|
34746
35689
|
ignore: DEFAULT_IGNORE.concat(options.ignore),
|
34747
35690
|
cwd: options.cwd
|
@@ -34751,8 +35694,8 @@ var gitignore = async options => {
|
|
34751
35694
|
return getIsIgnoredPredecate(ignores, options.cwd);
|
34752
35695
|
};
|
34753
35696
|
|
34754
|
-
var sync$
|
34755
|
-
options = normalizeOptions$
|
35697
|
+
var sync$8 = options => {
|
35698
|
+
options = normalizeOptions$3(options);
|
34756
35699
|
const paths = out$3.sync('**/.gitignore', {
|
34757
35700
|
ignore: DEFAULT_IGNORE.concat(options.ignore),
|
34758
35701
|
cwd: options.cwd
|
@@ -34761,11 +35704,11 @@ var sync$7 = options => {
|
|
34761
35704
|
const ignores = reduceIgnore(files);
|
34762
35705
|
return getIsIgnoredPredecate(ignores, options.cwd);
|
34763
35706
|
};
|
34764
|
-
gitignore.sync = sync$
|
35707
|
+
gitignore.sync = sync$8;
|
34765
35708
|
|
34766
35709
|
const {
|
34767
35710
|
Transform
|
34768
|
-
} = stream$
|
35711
|
+
} = stream$6;
|
34769
35712
|
|
34770
35713
|
class ObjectTransform extends Transform {
|
34771
35714
|
constructor() {
|
@@ -34838,7 +35781,7 @@ const checkCwdOption = (options = {}) => {
|
|
34838
35781
|
let stat;
|
34839
35782
|
|
34840
35783
|
try {
|
34841
|
-
stat = fs$
|
35784
|
+
stat = fs$3.statSync(options.cwd);
|
34842
35785
|
} catch (_) {
|
34843
35786
|
return;
|
34844
35787
|
}
|
@@ -34848,7 +35791,7 @@ const checkCwdOption = (options = {}) => {
|
|
34848
35791
|
}
|
34849
35792
|
};
|
34850
35793
|
|
34851
|
-
const getPathString = p => p.stats instanceof fs$
|
35794
|
+
const getPathString = p => p.stats instanceof fs$3.Stats ? p.path : p;
|
34852
35795
|
|
34853
35796
|
const generateGlobTasks = (patterns, taskOptions) => {
|
34854
35797
|
patterns = arrayUnion([].concat(patterns));
|
@@ -34943,7 +35886,7 @@ var globby$1 = async (patterns, options) => {
|
|
34943
35886
|
return arrayUnion(...paths).filter(path_ => !filter(getPathString(path_)));
|
34944
35887
|
};
|
34945
35888
|
|
34946
|
-
var sync$
|
35889
|
+
var sync$9 = (patterns, options) => {
|
34947
35890
|
const globTasks = generateGlobTasks(patterns, options);
|
34948
35891
|
const tasks = globTasks.reduce((tasks, task) => {
|
34949
35892
|
const newTask = getPattern(task, dirGlob.sync).map(globToTask(task));
|
@@ -34953,7 +35896,7 @@ var sync$8 = (patterns, options) => {
|
|
34953
35896
|
return tasks.reduce((matches, task) => arrayUnion(matches, out$3.sync(task.pattern, task.options)), []).filter(path_ => !filter(path_));
|
34954
35897
|
};
|
34955
35898
|
|
34956
|
-
var stream$
|
35899
|
+
var stream$5 = (patterns, options) => {
|
34957
35900
|
const globTasks = generateGlobTasks(patterns, options);
|
34958
35901
|
const tasks = globTasks.reduce((tasks, task) => {
|
34959
35902
|
const newTask = getPattern(task, dirGlob.sync).map(globToTask(task));
|
@@ -34970,8 +35913,8 @@ var generateGlobTasks_1 = generateGlobTasks;
|
|
34970
35913
|
var hasMagic = (patterns, options) => [].concat(patterns).some(pattern => out$3.isDynamicPattern(pattern, options));
|
34971
35914
|
|
34972
35915
|
var gitignore_1 = gitignore;
|
34973
|
-
globby$1.sync = sync$
|
34974
|
-
globby$1.stream = stream$
|
35916
|
+
globby$1.sync = sync$9;
|
35917
|
+
globby$1.stream = stream$5;
|
34975
35918
|
globby$1.generateGlobTasks = generateGlobTasks_1;
|
34976
35919
|
globby$1.hasMagic = hasMagic;
|
34977
35920
|
globby$1.gitignore = gitignore_1;
|
@@ -35550,7 +36493,7 @@ const {
|
|
35550
36493
|
dedentToRoot: dedentToRoot$1
|
35551
36494
|
},
|
35552
36495
|
utils: {
|
35553
|
-
mapDoc: mapDoc$
|
36496
|
+
mapDoc: mapDoc$1,
|
35554
36497
|
stripTrailingHardline: stripTrailingHardline$1
|
35555
36498
|
}
|
35556
36499
|
} = document;
|
@@ -35570,34 +36513,10 @@ function embed(path, print, textToDoc, options) {
|
|
35570
36513
|
const rawQuasis = node.quasis.map(q => q.value.raw);
|
35571
36514
|
let placeholderID = 0;
|
35572
36515
|
const text = rawQuasis.reduce((prevVal, currVal, idx) => {
|
35573
|
-
|
35574
|
-
return currVal;
|
35575
|
-
}
|
35576
|
-
|
35577
|
-
let specialSuffix = ""; // colons and whitespaces
|
35578
|
-
|
35579
|
-
const trailingColons = currVal.match(/^(\s*)(:+)(\s*)/);
|
35580
|
-
|
35581
|
-
if (trailingColons) {
|
35582
|
-
const whitespaceBeforeColons = !!trailingColons[1];
|
35583
|
-
const numberOfColons = trailingColons[2].length;
|
35584
|
-
const whitespaceAfterColons = !!trailingColons[3];
|
35585
|
-
|
35586
|
-
if (whitespaceAfterColons) ; else {
|
35587
|
-
if (whitespaceBeforeColons) {
|
35588
|
-
specialSuffix += "-whitespace";
|
35589
|
-
}
|
35590
|
-
|
35591
|
-
specialSuffix += "-colon".repeat(numberOfColons);
|
35592
|
-
currVal = "\uffff" + currVal.slice(trailingColons[0].length);
|
35593
|
-
}
|
35594
|
-
}
|
35595
|
-
|
35596
|
-
const placeholder = `@prettier-placeholder${specialSuffix}-${placeholderID++}-id`;
|
35597
|
-
return prevVal + placeholder + currVal;
|
36516
|
+
return idx === 0 ? currVal : prevVal + "@prettier-placeholder-" + placeholderID++ + "-id" + currVal;
|
35598
36517
|
}, "");
|
35599
36518
|
const doc = textToDoc(text, {
|
35600
|
-
parser: "
|
36519
|
+
parser: "scss"
|
35601
36520
|
});
|
35602
36521
|
return transformCssDoc(doc, path, print);
|
35603
36522
|
}
|
@@ -35723,7 +36642,7 @@ function uncook(cookedValue) {
|
|
35723
36642
|
}
|
35724
36643
|
|
35725
36644
|
function escapeTemplateCharacters(doc, raw) {
|
35726
|
-
return mapDoc$
|
36645
|
+
return mapDoc$1(doc, currentDoc => {
|
35727
36646
|
if (!currentDoc.parts) {
|
35728
36647
|
return currentDoc;
|
35729
36648
|
}
|
@@ -35772,7 +36691,7 @@ function replacePlaceholders(quasisDoc, expressionDocs) {
|
|
35772
36691
|
|
35773
36692
|
const expressions = expressionDocs.slice();
|
35774
36693
|
let replaceCounter = 0;
|
35775
|
-
const newDoc = mapDoc$
|
36694
|
+
const newDoc = mapDoc$1(quasisDoc, doc => {
|
35776
36695
|
if (!doc || !doc.parts || !doc.parts.length) {
|
35777
36696
|
return doc;
|
35778
36697
|
}
|
@@ -35796,19 +36715,12 @@ function replacePlaceholders(quasisDoc, expressionDocs) {
|
|
35796
36715
|
if (atPlaceholderIndex > -1) {
|
35797
36716
|
const placeholder = parts[atPlaceholderIndex];
|
35798
36717
|
const rest = parts.slice(atPlaceholderIndex + 1);
|
35799
|
-
const placeholderMatch = placeholder.match(/@prettier-placeholder
|
35800
|
-
const
|
35801
|
-
|
35802
|
-
const placeholderID = placeholderMatch[2]; // When the expression has a suffix appended, like:
|
36718
|
+
const placeholderMatch = placeholder.match(/@prettier-placeholder-(.+)-id([\s\S]*)/);
|
36719
|
+
const placeholderID = placeholderMatch[1]; // When the expression has a suffix appended, like:
|
35803
36720
|
// animation: linear ${time}s ease-out;
|
35804
36721
|
|
35805
|
-
|
36722
|
+
const suffix = placeholderMatch[2];
|
35806
36723
|
const expression = expressions[placeholderID];
|
35807
|
-
|
35808
|
-
if (specialSuffix) {
|
35809
|
-
suffix = specialSuffix.replace(/-whitespace/g, " ").replace(/-colon/g, ":") + suffix.replace(/^\uffff/g, "");
|
35810
|
-
}
|
35811
|
-
|
35812
36724
|
replaceCounter++;
|
35813
36725
|
parts = parts.slice(0, atPlaceholderIndex).concat(["${", expression, "}" + suffix]).concat(rest);
|
35814
36726
|
}
|
@@ -35994,7 +36906,7 @@ function printHtmlTemplateLiteral(path, print, textToDoc, parser, options) {
|
|
35994
36906
|
|
35995
36907
|
const placeholderRegex = new RegExp(composePlaceholder("(\\d+)"), "g");
|
35996
36908
|
let topLevelCount = 0;
|
35997
|
-
const contentDoc = mapDoc$
|
36909
|
+
const contentDoc = mapDoc$1(stripTrailingHardline$1(textToDoc(text, {
|
35998
36910
|
parser,
|
35999
36911
|
|
36000
36912
|
__onHtmlRoot(root) {
|
@@ -36204,7 +37116,7 @@ var build = createCommonjsModule(function (module, exports) {
|
|
36204
37116
|
exports.print = print;
|
36205
37117
|
|
36206
37118
|
function _os() {
|
36207
|
-
const data = os;
|
37119
|
+
const data = os$1;
|
36208
37120
|
|
36209
37121
|
_os = function () {
|
36210
37122
|
return data;
|
@@ -36564,8 +37476,10 @@ function isTypeAnnotationAFunction(node, options) {
|
|
36564
37476
|
return (node.type === "TypeAnnotation" || node.type === "TSTypeAnnotation") && node.typeAnnotation.type === "FunctionTypeAnnotation" && !node.static && !sameLocStart(node, node.typeAnnotation, options);
|
36565
37477
|
}
|
36566
37478
|
|
37479
|
+
const binaryishNodeTypes = new Set(["BinaryExpression", "LogicalExpression", "NGPipeExpression"]);
|
37480
|
+
|
36567
37481
|
function isBinaryish(node) {
|
36568
|
-
return
|
37482
|
+
return binaryishNodeTypes.has(node.type);
|
36569
37483
|
}
|
36570
37484
|
|
36571
37485
|
function isMemberish(node) {
|
@@ -37118,7 +38032,7 @@ function isSimpleCallArgument(node, depth) {
|
|
37118
38032
|
}
|
37119
38033
|
|
37120
38034
|
if (node.type === "ArrayExpression") {
|
37121
|
-
return node.elements.every(isChildSimple);
|
38035
|
+
return node.elements.every(x => x == null || isChildSimple(x));
|
37122
38036
|
}
|
37123
38037
|
|
37124
38038
|
if (node.type === "CallExpression" || node.type === "OptionalCallExpression" || node.type === "NewExpression") {
|
@@ -37461,7 +38375,7 @@ function needsParens(path, options) {
|
|
37461
38375
|
}
|
37462
38376
|
|
37463
38377
|
if (pp === np && name === "right") {
|
37464
|
-
assert.strictEqual(parent.right, node);
|
38378
|
+
assert$1.strictEqual(parent.right, node);
|
37465
38379
|
return true;
|
37466
38380
|
}
|
37467
38381
|
|
@@ -37792,7 +38706,7 @@ function needsParens(path, options) {
|
|
37792
38706
|
}
|
37793
38707
|
|
37794
38708
|
function isStatement(node) {
|
37795
|
-
return node.type === "BlockStatement" || node.type === "BreakStatement" || node.type === "ClassBody" || node.type === "ClassDeclaration" || node.type === "ClassMethod" || node.type === "ClassProperty" || node.type === "ClassPrivateProperty" || node.type === "ContinueStatement" || node.type === "DebuggerStatement" || node.type === "DeclareClass" || node.type === "DeclareExportAllDeclaration" || node.type === "DeclareExportDeclaration" || node.type === "DeclareFunction" || node.type === "DeclareInterface" || node.type === "DeclareModule" || node.type === "DeclareModuleExports" || node.type === "DeclareVariable" || node.type === "DoWhileStatement" || node.type === "EnumDeclaration" || node.type === "ExportAllDeclaration" || node.type === "ExportDefaultDeclaration" || node.type === "ExportNamedDeclaration" || node.type === "ExpressionStatement" || node.type === "
|
38709
|
+
return node.type === "BlockStatement" || node.type === "BreakStatement" || node.type === "ClassBody" || node.type === "ClassDeclaration" || node.type === "ClassMethod" || node.type === "ClassProperty" || node.type === "ClassPrivateProperty" || node.type === "ContinueStatement" || node.type === "DebuggerStatement" || node.type === "DeclareClass" || node.type === "DeclareExportAllDeclaration" || node.type === "DeclareExportDeclaration" || node.type === "DeclareFunction" || node.type === "DeclareInterface" || node.type === "DeclareModule" || node.type === "DeclareModuleExports" || node.type === "DeclareVariable" || node.type === "DoWhileStatement" || node.type === "EnumDeclaration" || node.type === "ExportAllDeclaration" || node.type === "ExportDefaultDeclaration" || node.type === "ExportNamedDeclaration" || node.type === "ExpressionStatement" || node.type === "ForInStatement" || node.type === "ForOfStatement" || node.type === "ForStatement" || node.type === "FunctionDeclaration" || node.type === "IfStatement" || node.type === "ImportDeclaration" || node.type === "InterfaceDeclaration" || node.type === "LabeledStatement" || node.type === "MethodDefinition" || node.type === "ReturnStatement" || node.type === "SwitchStatement" || node.type === "ThrowStatement" || node.type === "TryStatement" || node.type === "TSDeclareFunction" || node.type === "TSEnumDeclaration" || node.type === "TSImportEqualsDeclaration" || node.type === "TSInterfaceDeclaration" || node.type === "TSModuleDeclaration" || node.type === "TSNamespaceExportDeclaration" || node.type === "TypeAlias" || node.type === "VariableDeclaration" || node.type === "WhileStatement" || node.type === "WithStatement";
|
37796
38710
|
}
|
37797
38711
|
|
37798
38712
|
function includesFunctionTypeInObjectType(node) {
|
@@ -38331,7 +39245,9 @@ function printPathNoParens(path, options, print, args) {
|
|
38331
39245
|
/* sameIndent */
|
38332
39246
|
true)); // Only force a trailing newline if there were any contents.
|
38333
39247
|
|
38334
|
-
if (n.body.
|
39248
|
+
if (!n.body.every(({
|
39249
|
+
type
|
39250
|
+
}) => type === "EmptyStatement") || n.comments) {
|
38335
39251
|
parts.push(hardline$4);
|
38336
39252
|
}
|
38337
39253
|
|
@@ -38506,7 +39422,6 @@ function printPathNoParens(path, options, print, args) {
|
|
38506
39422
|
|
38507
39423
|
case "SpreadElement":
|
38508
39424
|
case "SpreadElementPattern":
|
38509
|
-
case "RestProperty":
|
38510
39425
|
case "SpreadProperty":
|
38511
39426
|
case "SpreadPropertyPattern":
|
38512
39427
|
case "RestElement":
|
@@ -38873,11 +39788,23 @@ function printPathNoParens(path, options, print, args) {
|
|
38873
39788
|
});
|
38874
39789
|
|
38875
39790
|
if (n.inexact) {
|
38876
|
-
|
39791
|
+
let printed;
|
39792
|
+
|
39793
|
+
if (hasDanglingComments$1(n)) {
|
39794
|
+
const hasLineComments = !n.comments.every(comments$1.isBlockComment);
|
39795
|
+
const printedDanglingComments = comments.printDanglingComments(path, options,
|
39796
|
+
/* sameIndent */
|
39797
|
+
true);
|
39798
|
+
printed = concat$6([printedDanglingComments, hasLineComments || hasNewline$4(options.originalText, options.locEnd(n.comments[n.comments.length - 1])) ? hardline$4 : line$4, "..."]);
|
39799
|
+
} else {
|
39800
|
+
printed = "...";
|
39801
|
+
}
|
39802
|
+
|
39803
|
+
props.push(concat$6(separatorParts.concat(printed)));
|
38877
39804
|
}
|
38878
39805
|
|
38879
39806
|
const lastElem = getLast$2(n[propertiesField]);
|
38880
|
-
const canHaveTrailingSeparator = !(lastElem && (lastElem.type === "
|
39807
|
+
const canHaveTrailingSeparator = !(n.inexact || lastElem && (lastElem.type === "RestElement" || hasNodeIgnoreComment$2(lastElem)));
|
38881
39808
|
let content;
|
38882
39809
|
|
38883
39810
|
if (props.length === 0) {
|
@@ -39116,7 +40043,7 @@ function printPathNoParens(path, options, print, args) {
|
|
39116
40043
|
// semicolon, except when they in the () part of for loops.
|
39117
40044
|
|
39118
40045
|
const parentNode = path.getParentNode();
|
39119
|
-
const isParentForLoop = parentNode.type === "ForStatement" || parentNode.type === "ForInStatement" || parentNode.type === "ForOfStatement"
|
40046
|
+
const isParentForLoop = parentNode.type === "ForStatement" || parentNode.type === "ForInStatement" || parentNode.type === "ForOfStatement";
|
39120
40047
|
const hasValue = n.declarations.some(decl => decl.init);
|
39121
40048
|
let firstVariable;
|
39122
40049
|
|
@@ -39200,14 +40127,7 @@ function printPathNoParens(path, options, print, args) {
|
|
39200
40127
|
return group$2(concat$6([n.each ? "for each (" : "for (", path.call(print, "left"), " in ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))]));
|
39201
40128
|
|
39202
40129
|
case "ForOfStatement":
|
39203
|
-
|
39204
|
-
{
|
39205
|
-
// Babel 7 removed ForAwaitStatement in favor of ForOfStatement
|
39206
|
-
// with `"await": true`:
|
39207
|
-
// https://github.com/estree/estree/pull/138
|
39208
|
-
const isAwait = n.type === "ForAwaitStatement" || n.await;
|
39209
|
-
return group$2(concat$6(["for", isAwait ? " await" : "", " (", path.call(print, "left"), " of ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))]));
|
39210
|
-
}
|
40130
|
+
return group$2(concat$6(["for", n.await ? " await" : "", " (", path.call(print, "left"), " of ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))]));
|
39211
40131
|
|
39212
40132
|
case "DoWhileStatement":
|
39213
40133
|
{
|
@@ -39357,8 +40277,8 @@ function printPathNoParens(path, options, print, args) {
|
|
39357
40277
|
case "JSXExpressionContainer":
|
39358
40278
|
{
|
39359
40279
|
const parent = path.getParentNode(0);
|
39360
|
-
const
|
39361
|
-
const shouldInline =
|
40280
|
+
const hasComments = n.expression.comments && n.expression.comments.length > 0;
|
40281
|
+
const shouldInline = n.expression.type === "JSXEmptyExpression" || !hasComments && (n.expression.type === "ArrayExpression" || n.expression.type === "ObjectExpression" || n.expression.type === "ArrowFunctionExpression" || n.expression.type === "CallExpression" || n.expression.type === "OptionalCallExpression" || n.expression.type === "FunctionExpression" || n.expression.type === "TemplateLiteral" || n.expression.type === "TaggedTemplateExpression" || n.expression.type === "DoExpression" || isJSXNode$1(parent) && (n.expression.type === "ConditionalExpression" || isBinaryish$1(n.expression)));
|
39362
40282
|
|
39363
40283
|
if (shouldInline) {
|
39364
40284
|
return group$2(concat$6(["{", path.call(print, "expression"), lineSuffixBoundary$1, "}"]));
|
@@ -39564,7 +40484,7 @@ function printPathNoParens(path, options, print, args) {
|
|
39564
40484
|
if (!isSimple) {
|
39565
40485
|
// Breaks at the template element boundaries (${ and }) are preferred to breaking
|
39566
40486
|
// in the middle of a MemberExpression
|
39567
|
-
if (n.expressions[i].comments && n.expressions[i].comments.length || n.expressions[i].type === "MemberExpression" || n.expressions[i].type === "OptionalMemberExpression" || n.expressions[i].type === "ConditionalExpression" || n.expressions[i].type === "
|
40487
|
+
if (n.expressions[i].comments && n.expressions[i].comments.length || n.expressions[i].type === "MemberExpression" || n.expressions[i].type === "OptionalMemberExpression" || n.expressions[i].type === "ConditionalExpression" || n.expressions[i].type === "SequenceExpression" || n.expressions[i].type === "TSAsExpression" || isBinaryish$1(n.expressions[i])) {
|
39568
40488
|
printed = concat$6([indent$3(concat$6([softline$2, printed])), softline$2]);
|
39569
40489
|
}
|
39570
40490
|
}
|
@@ -39955,7 +40875,7 @@ function printPathNoParens(path, options, print, args) {
|
|
39955
40875
|
return nodeStr(n, options);
|
39956
40876
|
|
39957
40877
|
case "NumberLiteralTypeAnnotation":
|
39958
|
-
assert.strictEqual(typeof n.value, "number");
|
40878
|
+
assert$1.strictEqual(typeof n.value, "number");
|
39959
40879
|
|
39960
40880
|
if (n.extra != null) {
|
39961
40881
|
return printNumber$1(n.extra.raw);
|
@@ -40410,7 +41330,7 @@ function printPathNoParens(path, options, print, args) {
|
|
40410
41330
|
return "";
|
40411
41331
|
|
40412
41332
|
case "NGQuotedExpression":
|
40413
|
-
return concat$6([n.prefix, ":", n.value]);
|
41333
|
+
return concat$6([n.prefix, ": ", n.value.trim()]);
|
40414
41334
|
|
40415
41335
|
case "NGMicrosyntax":
|
40416
41336
|
return concat$6(path.map((childPath, index) => concat$6([index === 0 ? "" : isNgForOf$1(childPath.getValue(), index, n) ? " " : concat$6([";", line$4]), print(childPath)]), "body"));
|
@@ -40572,7 +41492,7 @@ function printMethod(path, options, print) {
|
|
40572
41492
|
parts.push("*");
|
40573
41493
|
}
|
40574
41494
|
} else {
|
40575
|
-
assert.ok(kind === "get" || kind === "set");
|
41495
|
+
assert$1.ok(kind === "get" || kind === "set");
|
40576
41496
|
parts.push(kind, " ");
|
40577
41497
|
}
|
40578
41498
|
|
@@ -41055,7 +41975,7 @@ function printFlowDeclaration(path, parts) {
|
|
41055
41975
|
const parentExportDecl = getParentExportDeclaration$1(path);
|
41056
41976
|
|
41057
41977
|
if (parentExportDecl) {
|
41058
|
-
assert.strictEqual(parentExportDecl.type, "DeclareExportDeclaration");
|
41978
|
+
assert$1.strictEqual(parentExportDecl.type, "DeclareExportDeclaration");
|
41059
41979
|
} else {
|
41060
41980
|
// If the parent node has type DeclareExportDeclaration, then it
|
41061
41981
|
// will be responsible for printing the "declare" token. Otherwise
|
@@ -41967,7 +42887,7 @@ function printReturnAndThrowArgument(path, options, print) {
|
|
41967
42887
|
if (node.argument) {
|
41968
42888
|
if (returnArgumentHasLeadingComment$1(options, node.argument)) {
|
41969
42889
|
parts.push(concat$6([" (", indent$3(concat$6([hardline$4, path.call(print, "argument")])), hardline$4, ")"]));
|
41970
|
-
} else if (node.argument
|
42890
|
+
} else if (isBinaryish$1(node.argument) || node.argument.type === "SequenceExpression") {
|
41971
42891
|
parts.push(group$2(concat$6([ifBreak$1(" (", " "), indent$3(concat$6([softline$2, path.call(print, "argument")])), softline$2, ifBreak$1(")")])));
|
41972
42892
|
} else {
|
41973
42893
|
parts.push(" ", path.call(print, "argument"));
|
@@ -42861,7 +43781,7 @@ const {
|
|
42861
43781
|
markAsRoot: markAsRoot$1
|
42862
43782
|
},
|
42863
43783
|
utils: {
|
42864
|
-
mapDoc: mapDoc$
|
43784
|
+
mapDoc: mapDoc$2
|
42865
43785
|
}
|
42866
43786
|
} = document;
|
42867
43787
|
|
@@ -42879,7 +43799,7 @@ function embed$1(path, print, textToDoc
|
|
42879
43799
|
return null;
|
42880
43800
|
|
42881
43801
|
function replaceNewlinesWithLiterallines(doc) {
|
42882
|
-
return mapDoc$
|
43802
|
+
return mapDoc$2(doc, currentDoc => typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$8(currentDoc.split(/(\n)/g).map((v, i) => i % 2 === 0 ? v : literalline$3)) : currentDoc);
|
42883
43803
|
}
|
42884
43804
|
}
|
42885
43805
|
|
@@ -42890,7 +43810,7 @@ const DELIMITER_MAP = {
|
|
42890
43810
|
"+++": "toml"
|
42891
43811
|
};
|
42892
43812
|
|
42893
|
-
function parse$
|
43813
|
+
function parse$5(text) {
|
42894
43814
|
const delimiterRegex = Object.keys(DELIMITER_MAP).map(escapeStringRegexp$2).join("|");
|
42895
43815
|
const match = text.match( // trailing spaces after delimiters are allowed
|
42896
43816
|
new RegExp(`^(${delimiterRegex})[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)`));
|
@@ -42913,7 +43833,7 @@ function parse$4(text) {
|
|
42913
43833
|
};
|
42914
43834
|
}
|
42915
43835
|
|
42916
|
-
var frontMatter = parse$
|
43836
|
+
var frontMatter = parse$5;
|
42917
43837
|
|
42918
43838
|
function hasPragma$1(text) {
|
42919
43839
|
return pragma.hasPragma(frontMatter(text).content);
|
@@ -43164,7 +44084,7 @@ function getPropOfDeclNode(path) {
|
|
43164
44084
|
|
43165
44085
|
function isSCSS(parser, text) {
|
43166
44086
|
const hasExplicitParserChoice = parser === "less" || parser === "scss";
|
43167
|
-
const IS_POSSIBLY_SCSS = /(\w\s
|
44087
|
+
const IS_POSSIBLY_SCSS = /(\w\s*:\s*[^}:]+|#){|@import[^\n]+(?:url|,)/;
|
43168
44088
|
return hasExplicitParserChoice ? parser === "scss" : IS_POSSIBLY_SCSS.test(text);
|
43169
44089
|
}
|
43170
44090
|
|
@@ -43608,7 +44528,7 @@ function genericPrint$2(path, options, print) {
|
|
43608
44528
|
return concat$9(["@", // If a Less file ends up being parsed with the SCSS parser, Less
|
43609
44529
|
// variable declarations will be parsed as at-rules with names ending
|
43610
44530
|
// with a colon, so keep the original case then.
|
43611
|
-
isDetachedRulesetCallNode$1(node) || node.name.endsWith(":") ? node.name : maybeToLowerCase$1(node.name), node.params ? concat$9([isDetachedRulesetCallNode$1(node) ? "" : isTemplatePlaceholderNode$1(node)
|
44531
|
+
isDetachedRulesetCallNode$1(node) || node.name.endsWith(":") ? node.name : maybeToLowerCase$1(node.name), node.params ? concat$9([isDetachedRulesetCallNode$1(node) ? "" : isTemplatePlaceholderNode$1(node) ? node.raws.afterName === "" ? "" : node.name.endsWith(":") ? " " : /^\s*\n\s*\n/.test(node.raws.afterName) ? concat$9([hardline$7, hardline$7]) : /^\s*\n/.test(node.raws.afterName) ? hardline$7 : " " : " ", path.call(print, "params")]) : "", node.selector ? indent$5(concat$9([" ", path.call(print, "selector")])) : "", node.value ? group$6(concat$9([" ", path.call(print, "value"), isSCSSControlDirectiveNode$1(node) ? hasParensAroundNode$1(node) ? " " : line$5 : ""])) : node.name === "else" ? " " : "", node.nodes ? concat$9([isSCSSControlDirectiveNode$1(node) ? "" : " ", "{", indent$5(concat$9([node.nodes.length > 0 ? softline$3 : "", printNodeSequence(path, options, print)])), softline$3, "}"]) : isTemplatePlaceholderNodeWithoutSemiColon ? "" : ";"]);
|
43612
44532
|
}
|
43613
44533
|
// postcss-media-query-parser
|
43614
44534
|
|
@@ -43814,6 +44734,11 @@ function genericPrint$2(path, options, print) {
|
|
43814
44734
|
|
43815
44735
|
if (!iNextNode) {
|
43816
44736
|
continue;
|
44737
|
+
} // styled.div` background: var(--${one}); `
|
44738
|
+
|
44739
|
+
|
44740
|
+
if (!iPrevNode && iNode.value === "--" && iNextNode.type === "value-atword") {
|
44741
|
+
continue;
|
43817
44742
|
} // Ignore spaces before/after string interpolation (i.e. `"#{my-fn("_")}"`)
|
43818
44743
|
|
43819
44744
|
|
@@ -45459,7 +46384,7 @@ const {
|
|
45459
46384
|
markAsRoot: markAsRoot$2
|
45460
46385
|
},
|
45461
46386
|
utils: {
|
45462
|
-
mapDoc: mapDoc$
|
46387
|
+
mapDoc: mapDoc$3
|
45463
46388
|
}
|
45464
46389
|
} = document;
|
45465
46390
|
const {
|
@@ -45521,7 +46446,7 @@ function embed$2(path, print, textToDoc, options) {
|
|
45521
46446
|
}
|
45522
46447
|
|
45523
46448
|
function replaceNewlinesWithLiterallines(doc) {
|
45524
|
-
return mapDoc$
|
46449
|
+
return mapDoc$3(doc, currentDoc => typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$c(currentDoc.split(/(\n)/g).map((v, i) => i % 2 === 0 ? v : literalline$4)) : currentDoc);
|
45525
46450
|
}
|
45526
46451
|
}
|
45527
46452
|
|
@@ -45826,7 +46751,7 @@ const {
|
|
45826
46751
|
group: group$d
|
45827
46752
|
},
|
45828
46753
|
utils: {
|
45829
|
-
mapDoc: mapDoc$
|
46754
|
+
mapDoc: mapDoc$4
|
45830
46755
|
},
|
45831
46756
|
printer: {
|
45832
46757
|
printDocToString: printDocToString$3
|
@@ -46394,7 +47319,7 @@ function shouldRemainTheSameContent(path) {
|
|
46394
47319
|
}
|
46395
47320
|
|
46396
47321
|
function normalizeDoc(doc) {
|
46397
|
-
return mapDoc$
|
47322
|
+
return mapDoc$4(doc, currentDoc => {
|
46398
47323
|
if (!currentDoc.parts) {
|
46399
47324
|
return currentDoc;
|
46400
47325
|
}
|
@@ -46990,7 +47915,7 @@ var colgroup = [
|
|
46990
47915
|
"valign",
|
46991
47916
|
"width"
|
46992
47917
|
];
|
46993
|
-
var data = [
|
47918
|
+
var data$1 = [
|
46994
47919
|
"value"
|
46995
47920
|
];
|
46996
47921
|
var del$1 = [
|
@@ -47483,7 +48408,7 @@ var index$1 = {
|
|
47483
48408
|
caption: caption,
|
47484
48409
|
col: col,
|
47485
48410
|
colgroup: colgroup,
|
47486
|
-
data: data,
|
48411
|
+
data: data$1,
|
47487
48412
|
del: del$1,
|
47488
48413
|
details: details,
|
47489
48414
|
dfn: dfn,
|
@@ -47566,7 +48491,7 @@ var htmlElementAttributes = /*#__PURE__*/Object.freeze({
|
|
47566
48491
|
caption: caption,
|
47567
48492
|
col: col,
|
47568
48493
|
colgroup: colgroup,
|
47569
|
-
data: data,
|
48494
|
+
data: data$1,
|
47570
48495
|
del: del$1,
|
47571
48496
|
details: details,
|
47572
48497
|
dfn: dfn,
|
@@ -47743,7 +48668,7 @@ function isTextLikeNode(node) {
|
|
47743
48668
|
}
|
47744
48669
|
|
47745
48670
|
function isScriptLikeTag(node) {
|
47746
|
-
return node.type === "element" && (node.fullName === "script" || node.fullName === "style" || node.fullName === "svg:style");
|
48671
|
+
return node.type === "element" && (node.fullName === "script" || node.fullName === "style" || node.fullName === "svg:style" || isUnknownNamespace(node) && (node.name === "script" || node.name === "style"));
|
47747
48672
|
}
|
47748
48673
|
|
47749
48674
|
function isFrontMatterNode(node) {
|
@@ -48626,7 +49551,7 @@ function deepUnique(array) {
|
|
48626
49551
|
});
|
48627
49552
|
}
|
48628
49553
|
|
48629
|
-
var parse$
|
49554
|
+
var parse$6 = string => {
|
48630
49555
|
return deepUnique(string.split(',').map(part => {
|
48631
49556
|
const result = {};
|
48632
49557
|
part.trim().split(/\s+/).forEach((element, index) => {
|
@@ -48679,7 +49604,7 @@ var stringify$2 = array => {
|
|
48679
49604
|
};
|
48680
49605
|
|
48681
49606
|
var srcset = {
|
48682
|
-
parse: parse$
|
49607
|
+
parse: parse$6,
|
48683
49608
|
stringify: stringify$2
|
48684
49609
|
};
|
48685
49610
|
|
@@ -48744,7 +49669,7 @@ const {
|
|
48744
49669
|
builders,
|
48745
49670
|
utils: {
|
48746
49671
|
stripTrailingHardline: stripTrailingHardline$2,
|
48747
|
-
mapDoc: mapDoc$
|
49672
|
+
mapDoc: mapDoc$5
|
48748
49673
|
}
|
48749
49674
|
} = document;
|
48750
49675
|
const {
|
@@ -48858,7 +49783,7 @@ function embed$4(path, print, textToDoc, options) {
|
|
48858
49783
|
}, opts)), options);
|
48859
49784
|
|
48860
49785
|
if (embeddedAttributeValueDoc) {
|
48861
|
-
return concat$g([node.rawName, '="', group$f(mapDoc$
|
49786
|
+
return concat$g([node.rawName, '="', group$f(mapDoc$5(embeddedAttributeValueDoc, doc => typeof doc === "string" ? doc.replace(/"/g, """) : doc)), '"']);
|
48862
49787
|
}
|
48863
49788
|
|
48864
49789
|
break;
|
@@ -49066,7 +49991,7 @@ function printChildren$2(path, options, print) {
|
|
49066
49991
|
}
|
49067
49992
|
|
49068
49993
|
function printBetweenLine(prevNode, nextNode) {
|
49069
|
-
return isTextLikeNode$1(prevNode) && isTextLikeNode$1(nextNode) ? prevNode.isTrailingSpaceSensitive ? prevNode.hasTrailingSpaces ? preferHardlineAsLeadingSpaces$1(nextNode) ? hardline$c : line$a : "" : preferHardlineAsLeadingSpaces$1(nextNode) ? hardline$c : softline$7 : needsToBorrowNextOpeningTagStartMarker(prevNode) && (
|
49994
|
+
return isTextLikeNode$1(prevNode) && isTextLikeNode$1(nextNode) ? prevNode.isTrailingSpaceSensitive ? prevNode.hasTrailingSpaces ? preferHardlineAsLeadingSpaces$1(nextNode) ? hardline$c : line$a : "" : preferHardlineAsLeadingSpaces$1(nextNode) ? hardline$c : softline$7 : needsToBorrowNextOpeningTagStartMarker(prevNode) && (hasPrettierIgnore$6(nextNode) ||
|
49070
49995
|
/**
|
49071
49996
|
* 123<a
|
49072
49997
|
* ~
|
@@ -49254,7 +50179,7 @@ function printOpeningTagStartMarker(node) {
|
|
49254
50179
|
}
|
49255
50180
|
|
49256
50181
|
function printOpeningTagEndMarker(node) {
|
49257
|
-
assert(!node.isSelfClosing);
|
50182
|
+
assert$1(!node.isSelfClosing);
|
49258
50183
|
|
49259
50184
|
switch (node.type) {
|
49260
50185
|
case "ieConditionalComment":
|
@@ -49273,7 +50198,7 @@ function printOpeningTagEndMarker(node) {
|
|
49273
50198
|
}
|
49274
50199
|
|
49275
50200
|
function printClosingTagStartMarker(node, options) {
|
49276
|
-
assert(!node.isSelfClosing);
|
50201
|
+
assert$1(!node.isSelfClosing);
|
49277
50202
|
|
49278
50203
|
if (shouldNotPrintClosingTag$1(node, options)) {
|
49279
50204
|
return "";
|
@@ -50514,11 +51439,11 @@ languageCss, {
|
|
50514
51439
|
},
|
50515
51440
|
|
50516
51441
|
get less() {
|
50517
|
-
return require("./parser-postcss").parsers.
|
51442
|
+
return require("./parser-postcss").parsers.less;
|
50518
51443
|
},
|
50519
51444
|
|
50520
51445
|
get scss() {
|
50521
|
-
return require("./parser-postcss").parsers.
|
51446
|
+
return require("./parser-postcss").parsers.scss;
|
50522
51447
|
}
|
50523
51448
|
|
50524
51449
|
}
|
@@ -50621,10 +51546,10 @@ function load(plugins, pluginSearchDirs) {
|
|
50621
51546
|
|
50622
51547
|
try {
|
50623
51548
|
// try local files
|
50624
|
-
requirePath =
|
51549
|
+
requirePath = resolve_1(path$2.resolve(process.cwd(), pluginName));
|
50625
51550
|
} catch (_) {
|
50626
51551
|
// try node modules
|
50627
|
-
requirePath =
|
51552
|
+
requirePath = resolve_1(pluginName, {
|
50628
51553
|
paths: [process.cwd()]
|
50629
51554
|
});
|
50630
51555
|
}
|
@@ -50635,8 +51560,8 @@ function load(plugins, pluginSearchDirs) {
|
|
50635
51560
|
};
|
50636
51561
|
});
|
50637
51562
|
const externalAutoLoadPluginInfos = pluginSearchDirs.map(pluginSearchDir => {
|
50638
|
-
const resolvedPluginSearchDir = path$
|
50639
|
-
const nodeModulesDir = path$
|
51563
|
+
const resolvedPluginSearchDir = path$2.resolve(process.cwd(), pluginSearchDir);
|
51564
|
+
const nodeModulesDir = path$2.resolve(resolvedPluginSearchDir, "node_modules"); // In some fringe cases (ex: files "mounted" as virtual directories), the
|
50640
51565
|
// isDirectory(resolvedPluginSearchDir) check might be false even though
|
50641
51566
|
// the node_modules actually exists.
|
50642
51567
|
|
@@ -50646,7 +51571,7 @@ function load(plugins, pluginSearchDirs) {
|
|
50646
51571
|
|
50647
51572
|
return memoizedSearch(nodeModulesDir).map(pluginName => ({
|
50648
51573
|
name: pluginName,
|
50649
|
-
requirePath:
|
51574
|
+
requirePath: resolve_1(pluginName, {
|
50650
51575
|
paths: [resolvedPluginSearchDir]
|
50651
51576
|
})
|
50652
51577
|
}));
|
@@ -50662,12 +51587,12 @@ function findPluginsInNodeModules(nodeModulesDir) {
|
|
50662
51587
|
cwd: nodeModulesDir,
|
50663
51588
|
expandDirectories: false
|
50664
51589
|
});
|
50665
|
-
return pluginPackageJsonPaths.map(path$
|
51590
|
+
return pluginPackageJsonPaths.map(path$2.dirname);
|
50666
51591
|
}
|
50667
51592
|
|
50668
51593
|
function isDirectory$1(dir) {
|
50669
51594
|
try {
|
50670
|
-
return fs$
|
51595
|
+
return fs$3.statSync(dir).isDirectory();
|
50671
51596
|
} catch (e) {
|
50672
51597
|
return false;
|
50673
51598
|
}
|