prettier 2.0.1 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -10
- package/bin-prettier.js +1762 -745
- package/doc.js +9 -3
- package/index.js +1323 -344
- package/package.json +1 -1
- package/parser-babel.js +1 -1
- package/parser-flow.js +1 -1
- package/parser-graphql.js +1 -1
- package/parser-html.js +1 -1
- package/parser-markdown.js +8 -2
- package/parser-postcss.js +2 -2
- package/parser-typescript.js +3 -3
- package/standalone.js +139 -115
package/bin-prettier.js
CHANGED
|
@@ -3,18 +3,54 @@
|
|
|
3
3
|
|
|
4
4
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
5
5
|
|
|
6
|
-
var fs$
|
|
7
|
-
var path$
|
|
8
|
-
var os = _interopDefault(require('os'));
|
|
9
|
-
var tty = _interopDefault(require('tty'));
|
|
10
|
-
var assert = _interopDefault(require('assert'));
|
|
11
|
-
var util$
|
|
12
|
-
var stream$
|
|
13
|
-
var events = _interopDefault(require('events'));
|
|
14
|
-
var readline = _interopDefault(require('readline'));
|
|
6
|
+
var fs$3 = _interopDefault(require('fs'));
|
|
7
|
+
var path$2 = _interopDefault(require('path'));
|
|
8
|
+
var os$1 = _interopDefault(require('os'));
|
|
9
|
+
var tty$1 = _interopDefault(require('tty'));
|
|
10
|
+
var assert$1 = _interopDefault(require('assert'));
|
|
11
|
+
var util$4 = _interopDefault(require('util'));
|
|
12
|
+
var stream$6 = _interopDefault(require('stream'));
|
|
13
|
+
var events$1 = _interopDefault(require('events'));
|
|
14
|
+
var readline$1 = _interopDefault(require('readline'));
|
|
15
|
+
|
|
16
|
+
var semverCompare = function cmp(a, b) {
|
|
17
|
+
var pa = a.split('.');
|
|
18
|
+
var pb = b.split('.');
|
|
19
|
+
|
|
20
|
+
for (var i = 0; i < 3; i++) {
|
|
21
|
+
var na = Number(pa[i]);
|
|
22
|
+
var nb = Number(pb[i]);
|
|
23
|
+
if (na > nb) return 1;
|
|
24
|
+
if (nb > na) return -1;
|
|
25
|
+
if (!isNaN(na) && isNaN(nb)) return 1;
|
|
26
|
+
if (isNaN(na) && !isNaN(nb)) return -1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return 0;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var pleaseUpgradeNode = function pleaseUpgradeNode(pkg, opts) {
|
|
33
|
+
var opts = opts || {};
|
|
34
|
+
var requiredVersion = pkg.engines.node.replace('>=', '');
|
|
35
|
+
var currentVersion = process.version.replace('v', '');
|
|
36
|
+
|
|
37
|
+
if (semverCompare(currentVersion, requiredVersion) === -1) {
|
|
38
|
+
if (opts.message) {
|
|
39
|
+
console.error(opts.message(requiredVersion));
|
|
40
|
+
} else {
|
|
41
|
+
console.error(pkg.name + ' requires at least version ' + requiredVersion + ' of Node, please upgrade');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (opts.hasOwnProperty('exitCode')) {
|
|
45
|
+
process.exit(opts.exitCode);
|
|
46
|
+
} else {
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
15
51
|
|
|
16
52
|
var name = "prettier";
|
|
17
|
-
var version = "2.0.
|
|
53
|
+
var version = "2.0.5";
|
|
18
54
|
var description = "Prettier is an opinionated code formatter";
|
|
19
55
|
var bin = "./bin/prettier.js";
|
|
20
56
|
var repository = "prettier/prettier";
|
|
@@ -28,14 +64,14 @@ var engines = {
|
|
|
28
64
|
var dependencies = {
|
|
29
65
|
"@angular/compiler": "9.0.5",
|
|
30
66
|
"@babel/code-frame": "7.8.0",
|
|
31
|
-
"@babel/parser": "7.9.
|
|
32
|
-
"@glimmer/syntax": "0.
|
|
67
|
+
"@babel/parser": "7.9.4",
|
|
68
|
+
"@glimmer/syntax": "0.50.0",
|
|
33
69
|
"@iarna/toml": "2.2.3",
|
|
34
|
-
"@typescript-eslint/typescript-estree": "2.
|
|
70
|
+
"@typescript-eslint/typescript-estree": "2.26.0",
|
|
35
71
|
"angular-estree-parser": "1.3.0",
|
|
36
72
|
"angular-html-parser": "1.4.0",
|
|
37
73
|
camelcase: "5.3.1",
|
|
38
|
-
chalk: "
|
|
74
|
+
chalk: "4.0.0",
|
|
39
75
|
"ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540",
|
|
40
76
|
"cjk-regex": "2.0.0",
|
|
41
77
|
cosmiconfig: "6.0.0",
|
|
@@ -49,24 +85,25 @@ var dependencies = {
|
|
|
49
85
|
"fast-glob": "3.2.2",
|
|
50
86
|
"find-parent-dir": "0.3.0",
|
|
51
87
|
"find-project-root": "1.1.1",
|
|
52
|
-
"flow-parser": "0.
|
|
88
|
+
"flow-parser": "0.122.0",
|
|
53
89
|
"get-stream": "5.1.0",
|
|
54
90
|
globby: "11.0.0",
|
|
55
|
-
graphql: "
|
|
91
|
+
graphql: "15.0.0",
|
|
56
92
|
"html-element-attributes": "2.2.1",
|
|
57
93
|
"html-styles": "1.0.0",
|
|
58
94
|
"html-tag-names": "1.1.5",
|
|
59
95
|
ignore: "4.0.6",
|
|
60
|
-
"jest-docblock": "25.
|
|
96
|
+
"jest-docblock": "25.2.6",
|
|
61
97
|
"json-stable-stringify": "1.0.1",
|
|
62
98
|
leven: "3.1.0",
|
|
63
99
|
"lines-and-columns": "1.1.6",
|
|
64
|
-
"linguist-languages": "7.
|
|
100
|
+
"linguist-languages": "7.9.0",
|
|
65
101
|
lodash: "4.17.15",
|
|
66
102
|
mem: "6.0.1",
|
|
67
103
|
minimatch: "3.0.4",
|
|
68
104
|
minimist: "1.2.5",
|
|
69
105
|
"n-readlines": "1.0.0",
|
|
106
|
+
"please-upgrade-node": "3.2.0",
|
|
70
107
|
"postcss-less": "3.1.4",
|
|
71
108
|
"postcss-media-query-parser": "0.2.3",
|
|
72
109
|
"postcss-scss": "2.0.0",
|
|
@@ -75,45 +112,45 @@ var dependencies = {
|
|
|
75
112
|
"regexp-util": "1.2.2",
|
|
76
113
|
"remark-math": "1.0.6",
|
|
77
114
|
"remark-parse": "5.0.0",
|
|
115
|
+
resolve: "1.16.1",
|
|
78
116
|
semver: "7.1.3",
|
|
79
117
|
srcset: "2.0.1",
|
|
80
118
|
"string-width": "4.2.0",
|
|
81
119
|
typescript: "3.8.3",
|
|
82
120
|
"unicode-regex": "3.0.0",
|
|
83
|
-
unified: "
|
|
121
|
+
unified: "9.0.0",
|
|
84
122
|
vnopts: "1.0.2",
|
|
85
123
|
"yaml-unist-parser": "1.1.1"
|
|
86
124
|
};
|
|
87
125
|
var devDependencies = {
|
|
88
|
-
"@babel/core": "7.
|
|
89
|
-
"@babel/preset-env": "7.
|
|
126
|
+
"@babel/core": "7.9.0",
|
|
127
|
+
"@babel/preset-env": "7.9.0",
|
|
90
128
|
"@rollup/plugin-alias": "3.0.1",
|
|
91
129
|
"@rollup/plugin-commonjs": "11.0.2",
|
|
92
130
|
"@rollup/plugin-json": "4.0.2",
|
|
93
131
|
"@rollup/plugin-node-resolve": "7.1.1",
|
|
94
132
|
"@rollup/plugin-replace": "2.3.1",
|
|
95
|
-
"babel-loader": "8.0
|
|
133
|
+
"babel-loader": "8.1.0",
|
|
96
134
|
benchmark: "2.1.4",
|
|
97
135
|
"builtin-modules": "3.1.0",
|
|
98
136
|
codecov: "3.6.5",
|
|
99
137
|
"cross-env": "7.0.2",
|
|
100
138
|
cspell: "4.0.55",
|
|
101
139
|
eslint: "6.8.0",
|
|
102
|
-
"eslint-config-prettier": "6.10.
|
|
140
|
+
"eslint-config-prettier": "6.10.1",
|
|
103
141
|
"eslint-formatter-friendly": "7.0.0",
|
|
104
|
-
"eslint-plugin-import": "2.20.
|
|
142
|
+
"eslint-plugin-import": "2.20.2",
|
|
105
143
|
"eslint-plugin-prettier": "3.1.2",
|
|
106
144
|
"eslint-plugin-react": "7.19.0",
|
|
107
|
-
"eslint-plugin-unicorn": "
|
|
145
|
+
"eslint-plugin-unicorn": "18.0.1",
|
|
108
146
|
execa: "4.0.0",
|
|
109
|
-
jest: "25.
|
|
110
|
-
"jest-junit": "10.0.0",
|
|
147
|
+
jest: "25.2.7",
|
|
111
148
|
"jest-snapshot-serializer-ansi": "1.0.0",
|
|
112
149
|
"jest-snapshot-serializer-raw": "1.1.0",
|
|
113
|
-
"jest-watch-typeahead": "0.
|
|
114
|
-
prettier: "2.0.
|
|
150
|
+
"jest-watch-typeahead": "0.5.0",
|
|
151
|
+
prettier: "2.0.4",
|
|
115
152
|
rimraf: "3.0.2",
|
|
116
|
-
rollup: "2.
|
|
153
|
+
rollup: "2.3.2",
|
|
117
154
|
"rollup-plugin-babel": "4.4.0",
|
|
118
155
|
"rollup-plugin-node-globals": "1.4.0",
|
|
119
156
|
"rollup-plugin-terser": "5.3.0",
|
|
@@ -123,13 +160,14 @@ var devDependencies = {
|
|
|
123
160
|
"synchronous-promise": "2.0.10",
|
|
124
161
|
tempy: "0.5.0",
|
|
125
162
|
"terser-webpack-plugin": "2.3.5",
|
|
126
|
-
webpack: "4.42.
|
|
163
|
+
webpack: "4.42.1"
|
|
127
164
|
};
|
|
128
165
|
var scripts = {
|
|
129
166
|
prepublishOnly: "echo \"Error: must publish from dist/\" && exit 1",
|
|
130
167
|
"prepare-release": "yarn && yarn build && yarn test:dist",
|
|
131
168
|
test: "jest",
|
|
132
|
-
"test:dist": "
|
|
169
|
+
"test:dist": "cross-env NODE_ENV=production jest",
|
|
170
|
+
"test:dist-standalone": "cross-env NODE_ENV=production TEST_STANDALONE=1 jest tests/",
|
|
133
171
|
"test:integration": "jest tests_integration",
|
|
134
172
|
"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",
|
|
135
173
|
"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",
|
|
@@ -139,7 +177,7 @@ var scripts = {
|
|
|
139
177
|
"lint:changelog": "node ./scripts/lint-changelog.js",
|
|
140
178
|
"lint:prettier": "prettier \"**/*.{md,json,yml,html,css}\" --check",
|
|
141
179
|
"lint:dist": "eslint --no-eslintrc --no-ignore --env=es6,browser --parser-options=ecmaVersion:2016 \"dist/!(bin-prettier|index|third-party).js\"",
|
|
142
|
-
"lint:spellcheck": "cspell {bin,scripts,src}/**/*.js {docs,website/blog,changelog_unreleased}/**/*.md",
|
|
180
|
+
"lint:spellcheck": "cspell {bin,scripts,src,website}/**/*.js {docs,website/blog,changelog_unreleased}/**/*.md",
|
|
143
181
|
"lint:deps": "node ./scripts/check-deps.js",
|
|
144
182
|
build: "node --max-old-space-size=3072 ./scripts/build/build.js",
|
|
145
183
|
"build-docs": "node ./scripts/build-docs.js"
|
|
@@ -161,21 +199,21 @@ var _package = {
|
|
|
161
199
|
};
|
|
162
200
|
|
|
163
201
|
var _package$1 = /*#__PURE__*/Object.freeze({
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
202
|
+
__proto__: null,
|
|
203
|
+
name: name,
|
|
204
|
+
version: version,
|
|
205
|
+
description: description,
|
|
206
|
+
bin: bin,
|
|
207
|
+
repository: repository,
|
|
208
|
+
homepage: homepage,
|
|
209
|
+
author: author,
|
|
210
|
+
license: license,
|
|
211
|
+
main: main,
|
|
212
|
+
engines: engines,
|
|
213
|
+
dependencies: dependencies,
|
|
214
|
+
devDependencies: devDependencies,
|
|
215
|
+
scripts: scripts,
|
|
216
|
+
'default': _package
|
|
179
217
|
});
|
|
180
218
|
|
|
181
219
|
function Diff() {}
|
|
@@ -1704,27 +1742,27 @@ function escapeHTML(s) {
|
|
|
1704
1742
|
}
|
|
1705
1743
|
|
|
1706
1744
|
var index_es6 = /*#__PURE__*/Object.freeze({
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1745
|
+
__proto__: null,
|
|
1746
|
+
Diff: Diff,
|
|
1747
|
+
diffChars: diffChars,
|
|
1748
|
+
diffWords: diffWords,
|
|
1749
|
+
diffWordsWithSpace: diffWordsWithSpace,
|
|
1750
|
+
diffLines: diffLines,
|
|
1751
|
+
diffTrimmedLines: diffTrimmedLines,
|
|
1752
|
+
diffSentences: diffSentences,
|
|
1753
|
+
diffCss: diffCss,
|
|
1754
|
+
diffJson: diffJson,
|
|
1755
|
+
diffArrays: diffArrays,
|
|
1756
|
+
structuredPatch: structuredPatch,
|
|
1757
|
+
createTwoFilesPatch: createTwoFilesPatch,
|
|
1758
|
+
createPatch: createPatch,
|
|
1759
|
+
applyPatch: applyPatch,
|
|
1760
|
+
applyPatches: applyPatches,
|
|
1761
|
+
parsePatch: parsePatch,
|
|
1762
|
+
merge: merge,
|
|
1763
|
+
convertChangesToDMP: convertChangesToDMP,
|
|
1764
|
+
convertChangesToXML: convertChangesToXML,
|
|
1765
|
+
canonicalize: canonicalize
|
|
1728
1766
|
});
|
|
1729
1767
|
|
|
1730
1768
|
/**
|
|
@@ -1746,7 +1784,7 @@ class LineByLine {
|
|
|
1746
1784
|
if (typeof file === 'number') {
|
|
1747
1785
|
this.fd = file;
|
|
1748
1786
|
} else {
|
|
1749
|
-
this.fd = fs$
|
|
1787
|
+
this.fd = fs$3.openSync(file, 'r');
|
|
1750
1788
|
}
|
|
1751
1789
|
|
|
1752
1790
|
this.options = options;
|
|
@@ -1776,7 +1814,7 @@ class LineByLine {
|
|
|
1776
1814
|
}
|
|
1777
1815
|
|
|
1778
1816
|
close() {
|
|
1779
|
-
fs$
|
|
1817
|
+
fs$3.closeSync(this.fd);
|
|
1780
1818
|
this.fd = null;
|
|
1781
1819
|
}
|
|
1782
1820
|
|
|
@@ -1814,7 +1852,7 @@ class LineByLine {
|
|
|
1814
1852
|
|
|
1815
1853
|
do {
|
|
1816
1854
|
const readBuffer = new Buffer(this.options.readChunk);
|
|
1817
|
-
bytesRead = fs$
|
|
1855
|
+
bytesRead = fs$3.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition);
|
|
1818
1856
|
totalBytesRead = totalBytesRead + bytesRead;
|
|
1819
1857
|
this.fdPosition = this.fdPosition + bytesRead;
|
|
1820
1858
|
buffers.push(readBuffer);
|
|
@@ -2811,14 +2849,14 @@ var coreOptions = {
|
|
|
2811
2849
|
options
|
|
2812
2850
|
};
|
|
2813
2851
|
|
|
2814
|
-
var require$$
|
|
2852
|
+
var require$$1 = getCjsExportFromNamespace(_package$1);
|
|
2815
2853
|
|
|
2816
2854
|
const semver$1 = {
|
|
2817
2855
|
compare: compare_1,
|
|
2818
2856
|
lt: lt_1,
|
|
2819
2857
|
gte: gte_1
|
|
2820
2858
|
};
|
|
2821
|
-
const currentVersion = require$$
|
|
2859
|
+
const currentVersion = require$$1.version;
|
|
2822
2860
|
const coreOptions$1 = coreOptions.options;
|
|
2823
2861
|
/**
|
|
2824
2862
|
* Strings in `plugins` and `pluginSearchDirs` are handled by a wrapped version
|
|
@@ -3265,27 +3303,27 @@ function __importDefault(mod) {
|
|
|
3265
3303
|
}
|
|
3266
3304
|
|
|
3267
3305
|
var tslib_es6 = /*#__PURE__*/Object.freeze({
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3306
|
+
__proto__: null,
|
|
3307
|
+
__extends: __extends,
|
|
3308
|
+
get __assign () { return __assign; },
|
|
3309
|
+
__rest: __rest,
|
|
3310
|
+
__decorate: __decorate,
|
|
3311
|
+
__param: __param,
|
|
3312
|
+
__metadata: __metadata,
|
|
3313
|
+
__awaiter: __awaiter,
|
|
3314
|
+
__generator: __generator,
|
|
3315
|
+
__exportStar: __exportStar,
|
|
3316
|
+
__values: __values,
|
|
3317
|
+
__read: __read,
|
|
3318
|
+
__spread: __spread,
|
|
3319
|
+
__spreadArrays: __spreadArrays,
|
|
3320
|
+
__await: __await,
|
|
3321
|
+
__asyncGenerator: __asyncGenerator,
|
|
3322
|
+
__asyncDelegator: __asyncDelegator,
|
|
3323
|
+
__asyncValues: __asyncValues,
|
|
3324
|
+
__makeTemplateObject: __makeTemplateObject,
|
|
3325
|
+
__importStar: __importStar,
|
|
3326
|
+
__importDefault: __importDefault
|
|
3289
3327
|
});
|
|
3290
3328
|
|
|
3291
3329
|
var api = createCommonjsModule(function (module, exports) {
|
|
@@ -4791,7 +4829,7 @@ function supportsColor(stream) {
|
|
|
4791
4829
|
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
|
4792
4830
|
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
|
4793
4831
|
// that supports 16m/TrueColor.
|
|
4794
|
-
const osRelease = os.release().split('.');
|
|
4832
|
+
const osRelease = os$1.release().split('.');
|
|
4795
4833
|
|
|
4796
4834
|
if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
4797
4835
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
@@ -7718,7 +7756,7 @@ function supportsColor$1(haveStream, streamIsTTY) {
|
|
|
7718
7756
|
if (process.platform === 'win32') {
|
|
7719
7757
|
// Windows 10 build 10586 is the first Windows release that supports 256 colors.
|
|
7720
7758
|
// Windows 10 build 14931 is the first release that supports 16m/TrueColor.
|
|
7721
|
-
const osRelease = os.release().split('.');
|
|
7759
|
+
const osRelease = os$1.release().split('.');
|
|
7722
7760
|
|
|
7723
7761
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
7724
7762
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
@@ -7782,8 +7820,8 @@ function getSupportLevel$1(stream) {
|
|
|
7782
7820
|
|
|
7783
7821
|
var supportsColor_1$1 = {
|
|
7784
7822
|
supportsColor: getSupportLevel$1,
|
|
7785
|
-
stdout: translateLevel$1(supportsColor$1(true, tty.isatty(1))),
|
|
7786
|
-
stderr: translateLevel$1(supportsColor$1(true, tty.isatty(2)))
|
|
7823
|
+
stdout: translateLevel$1(supportsColor$1(true, tty$1.isatty(1))),
|
|
7824
|
+
stderr: translateLevel$1(supportsColor$1(true, tty$1.isatty(2)))
|
|
7787
7825
|
};
|
|
7788
7826
|
|
|
7789
7827
|
const stringReplaceAll = (string, substring, replacer) => {
|
|
@@ -7830,7 +7868,7 @@ var util = {
|
|
|
7830
7868
|
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;
|
|
7831
7869
|
const STYLE_REGEX$1 = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
7832
7870
|
const STRING_REGEX$1 = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
|
7833
|
-
const ESCAPE_REGEX$1 = /\\(u(?:[a-f\d]{4}
|
|
7871
|
+
const ESCAPE_REGEX$1 = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
|
|
7834
7872
|
const ESCAPES$1 = new Map([['n', '\n'], ['r', '\r'], ['t', '\t'], ['b', '\b'], ['f', '\f'], ['v', '\v'], ['0', '\0'], ['\\', '\\'], ['e', '\u001B'], ['a', '\u0007']]);
|
|
7835
7873
|
|
|
7836
7874
|
function unescape$1(c) {
|
|
@@ -7944,8 +7982,8 @@ var templates$1 = (chalk, temporary) => {
|
|
|
7944
7982
|
chunks.push(chunk.join(''));
|
|
7945
7983
|
|
|
7946
7984
|
if (styles.length > 0) {
|
|
7947
|
-
const
|
|
7948
|
-
throw new Error(
|
|
7985
|
+
const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
|
|
7986
|
+
throw new Error(errMessage);
|
|
7949
7987
|
}
|
|
7950
7988
|
|
|
7951
7989
|
return chunks.join('');
|
|
@@ -7964,7 +8002,7 @@ const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];
|
|
|
7964
8002
|
const styles = Object.create(null);
|
|
7965
8003
|
|
|
7966
8004
|
const applyOptions = (object, options = {}) => {
|
|
7967
|
-
if (options.level
|
|
8005
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
7968
8006
|
throw new Error('The `level` option should be an integer from 0 to 3');
|
|
7969
8007
|
} // Detect level if not set manually
|
|
7970
8008
|
|
|
@@ -7975,6 +8013,7 @@ const applyOptions = (object, options = {}) => {
|
|
|
7975
8013
|
|
|
7976
8014
|
class ChalkClass {
|
|
7977
8015
|
constructor(options) {
|
|
8016
|
+
// eslint-disable-next-line no-constructor-return
|
|
7978
8017
|
return chalkFactory(options);
|
|
7979
8018
|
}
|
|
7980
8019
|
|
|
@@ -8098,12 +8137,11 @@ const createBuilder = (self, _styler, _isEmpty) => {
|
|
|
8098
8137
|
// Single argument is hot path, implicit coercion is faster than anything
|
|
8099
8138
|
// eslint-disable-next-line no-implicit-coercion
|
|
8100
8139
|
return applyStyle(builder, arguments_.length === 1 ? '' + arguments_[0] : arguments_.join(' '));
|
|
8101
|
-
}; //
|
|
8140
|
+
}; // We alter the prototype because we must return a function, but there is
|
|
8102
8141
|
// no way to create a function with a different prototype
|
|
8103
8142
|
|
|
8104
8143
|
|
|
8105
|
-
builder
|
|
8106
|
-
|
|
8144
|
+
Object.setPrototypeOf(builder, proto);
|
|
8107
8145
|
builder._generator = self;
|
|
8108
8146
|
builder._styler = _styler;
|
|
8109
8147
|
builder._isEmpty = _isEmpty;
|
|
@@ -8181,18 +8219,7 @@ chalk$1.stderr = Chalk({
|
|
|
8181
8219
|
level: stderrColor ? stderrColor.level : 0
|
|
8182
8220
|
}); // eslint-disable-line new-cap
|
|
8183
8221
|
|
|
8184
|
-
chalk$1.stderr.supportsColor = stderrColor;
|
|
8185
|
-
|
|
8186
|
-
chalk$1.Level = {
|
|
8187
|
-
None: 0,
|
|
8188
|
-
Basic: 1,
|
|
8189
|
-
Ansi256: 2,
|
|
8190
|
-
TrueColor: 3,
|
|
8191
|
-
0: 'None',
|
|
8192
|
-
1: 'Basic',
|
|
8193
|
-
2: 'Ansi256',
|
|
8194
|
-
3: 'TrueColor'
|
|
8195
|
-
};
|
|
8222
|
+
chalk$1.stderr.supportsColor = stderrColor;
|
|
8196
8223
|
var source = chalk$1;
|
|
8197
8224
|
|
|
8198
8225
|
const cliDescriptor = {
|
|
@@ -10502,7 +10529,7 @@ function supportsColor$2(stream) {
|
|
|
10502
10529
|
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
|
10503
10530
|
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
|
10504
10531
|
// that supports 16m/TrueColor.
|
|
10505
|
-
const osRelease = os.release().split('.');
|
|
10532
|
+
const osRelease = os$1.release().split('.');
|
|
10506
10533
|
|
|
10507
10534
|
if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
10508
10535
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
@@ -11346,7 +11373,7 @@ function resolveParser(opts, parsers) {
|
|
|
11346
11373
|
{
|
|
11347
11374
|
try {
|
|
11348
11375
|
return {
|
|
11349
|
-
parse: require(path$
|
|
11376
|
+
parse: require(path$2.resolve(process.cwd(), opts.parser)),
|
|
11350
11377
|
astFormat: "estree",
|
|
11351
11378
|
locStart: locStart$1,
|
|
11352
11379
|
locEnd: locEnd$1
|
|
@@ -11502,8 +11529,9 @@ function getInterpreter(filepath) {
|
|
|
11502
11529
|
let fd;
|
|
11503
11530
|
|
|
11504
11531
|
try {
|
|
11505
|
-
fd = fs$
|
|
11532
|
+
fd = fs$3.openSync(filepath, "r");
|
|
11506
11533
|
} catch (err) {
|
|
11534
|
+
// istanbul ignore next
|
|
11507
11535
|
return "";
|
|
11508
11536
|
}
|
|
11509
11537
|
|
|
@@ -11533,20 +11561,27 @@ function getInterpreter(filepath) {
|
|
|
11533
11561
|
try {
|
|
11534
11562
|
// There are some weird cases where paths are missing, causing Jest
|
|
11535
11563
|
// failures. It's unclear what these correspond to in the real world.
|
|
11536
|
-
fs$
|
|
11564
|
+
fs$3.closeSync(fd);
|
|
11537
11565
|
} catch (err) {// nop
|
|
11538
11566
|
}
|
|
11539
11567
|
}
|
|
11540
11568
|
}
|
|
11541
11569
|
|
|
11542
11570
|
function inferParser(filepath, plugins) {
|
|
11543
|
-
const filename = path$
|
|
11571
|
+
const filename = path$2.basename(filepath).toLowerCase();
|
|
11572
|
+
const languages = getSupportInfo$1({
|
|
11573
|
+
plugins
|
|
11574
|
+
}).languages.filter(language => language.since !== null); // If the file has no extension, we can try to infer the language from the
|
|
11544
11575
|
// interpreter in the shebang line, if any; but since this requires FS access,
|
|
11545
11576
|
// do it last.
|
|
11546
11577
|
|
|
11547
|
-
|
|
11548
|
-
|
|
11549
|
-
|
|
11578
|
+
let language = languages.find(language => language.extensions && language.extensions.some(extension => filename.endsWith(extension)) || language.filenames && language.filenames.find(name => name.toLowerCase() === filename));
|
|
11579
|
+
|
|
11580
|
+
if (!language && !filename.includes(".")) {
|
|
11581
|
+
const interpreter = getInterpreter(filepath);
|
|
11582
|
+
language = languages.find(language => language.interpreters && language.interpreters.includes(interpreter));
|
|
11583
|
+
}
|
|
11584
|
+
|
|
11550
11585
|
return language && language.parsers[0];
|
|
11551
11586
|
}
|
|
11552
11587
|
|
|
@@ -12640,7 +12675,11 @@ function hasIgnoreComment(path) {
|
|
|
12640
12675
|
}
|
|
12641
12676
|
|
|
12642
12677
|
function hasNodeIgnoreComment(node) {
|
|
12643
|
-
return node && node.comments && node.comments.length > 0 && node.comments.some(comment => comment.
|
|
12678
|
+
return node && (node.comments && node.comments.length > 0 && node.comments.some(comment => isNodeIgnoreComment(comment) && !comment.unignore) || node.prettierIgnore);
|
|
12679
|
+
}
|
|
12680
|
+
|
|
12681
|
+
function isNodeIgnoreComment(comment) {
|
|
12682
|
+
return comment.value.trim() === "prettier-ignore";
|
|
12644
12683
|
}
|
|
12645
12684
|
|
|
12646
12685
|
function addCommentHelper(node, comment) {
|
|
@@ -12740,6 +12779,7 @@ var util$1 = {
|
|
|
12740
12779
|
printNumber,
|
|
12741
12780
|
hasIgnoreComment,
|
|
12742
12781
|
hasNodeIgnoreComment,
|
|
12782
|
+
isNodeIgnoreComment,
|
|
12743
12783
|
makeString,
|
|
12744
12784
|
addLeadingComment,
|
|
12745
12785
|
addDanglingComment,
|
|
@@ -13052,8 +13092,9 @@ function printDocToString(doc, options) {
|
|
|
13052
13092
|
const [ind, mode, doc] = cmds.pop();
|
|
13053
13093
|
|
|
13054
13094
|
if (typeof doc === "string") {
|
|
13055
|
-
|
|
13056
|
-
|
|
13095
|
+
const formatted = newLine !== "\n" && doc.includes("\n") ? doc.replace(/\n/g, newLine) : doc;
|
|
13096
|
+
out.push(formatted);
|
|
13097
|
+
pos += getStringWidth$1(formatted);
|
|
13057
13098
|
} else {
|
|
13058
13099
|
switch (doc.type) {
|
|
13059
13100
|
case "cursor":
|
|
@@ -14033,8 +14074,8 @@ function breakTies(tiesToBreak, text, options) {
|
|
|
14033
14074
|
|
|
14034
14075
|
for (indexOfFirstLeadingComment = tieCount; indexOfFirstLeadingComment > 0; --indexOfFirstLeadingComment) {
|
|
14035
14076
|
const comment = tiesToBreak[indexOfFirstLeadingComment - 1];
|
|
14036
|
-
assert.strictEqual(comment.precedingNode, precedingNode);
|
|
14037
|
-
assert.strictEqual(comment.followingNode, followingNode);
|
|
14077
|
+
assert$1.strictEqual(comment.precedingNode, precedingNode);
|
|
14078
|
+
assert$1.strictEqual(comment.followingNode, followingNode);
|
|
14038
14079
|
const gap = text.slice(options.locEnd(comment), gapEndPos);
|
|
14039
14080
|
|
|
14040
14081
|
if (gapRegExp.test(gap)) {
|
|
@@ -14542,7 +14583,7 @@ function printAstToDoc(ast, options, alignmentSize = 0) {
|
|
|
14542
14583
|
}
|
|
14543
14584
|
|
|
14544
14585
|
function callPluginPrintFunction(path, options, printPath, args) {
|
|
14545
|
-
assert.ok(path instanceof fastPath);
|
|
14586
|
+
assert$1.ok(path instanceof fastPath);
|
|
14546
14587
|
const node = path.getValue();
|
|
14547
14588
|
const {
|
|
14548
14589
|
printer
|
|
@@ -14715,7 +14756,7 @@ var rangeUtil = {
|
|
|
14715
14756
|
findNodeAtOffset
|
|
14716
14757
|
};
|
|
14717
14758
|
|
|
14718
|
-
var require$$0
|
|
14759
|
+
var require$$0 = getCjsExportFromNamespace(index_es6);
|
|
14719
14760
|
|
|
14720
14761
|
const normalizeOptions$1 = options$1.normalize;
|
|
14721
14762
|
const {
|
|
@@ -14723,9 +14764,6 @@ const {
|
|
|
14723
14764
|
convertEndOfLineToChars: convertEndOfLineToChars$2
|
|
14724
14765
|
} = endOfLine;
|
|
14725
14766
|
const {
|
|
14726
|
-
utils: {
|
|
14727
|
-
mapDoc: mapDoc$1
|
|
14728
|
-
},
|
|
14729
14767
|
printer: {
|
|
14730
14768
|
printDocToString: printDocToString$1
|
|
14731
14769
|
},
|
|
@@ -14747,7 +14785,7 @@ function ensureAllCommentsPrinted(astComments) {
|
|
|
14747
14785
|
}
|
|
14748
14786
|
|
|
14749
14787
|
for (let i = 0; i < astComments.length; ++i) {
|
|
14750
|
-
if (astComments[i]
|
|
14788
|
+
if (util$1.isNodeIgnoreComment(astComments[i])) {
|
|
14751
14789
|
// If there's a prettier-ignore, we're not printing that sub-tree so we
|
|
14752
14790
|
// don't know if the comments was printed or not.
|
|
14753
14791
|
return;
|
|
@@ -14801,8 +14839,7 @@ function coreFormat(text, opts, addAlignmentSize) {
|
|
|
14801
14839
|
|
|
14802
14840
|
const astComments = attachComments(text, ast, opts);
|
|
14803
14841
|
const doc = astToDoc(ast, opts, addAlignmentSize);
|
|
14804
|
-
const
|
|
14805
|
-
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);
|
|
14842
|
+
const result = printDocToString$1(doc, opts);
|
|
14806
14843
|
ensureAllCommentsPrinted(astComments); // Remove extra leading indentation as well as the added indentation after last newline
|
|
14807
14844
|
|
|
14808
14845
|
if (addAlignmentSize > 0) {
|
|
@@ -14848,7 +14885,7 @@ function coreFormat(text, opts, addAlignmentSize) {
|
|
|
14848
14885
|
const oldCursorNodeCharArray = oldCursorNodeText.split("");
|
|
14849
14886
|
oldCursorNodeCharArray.splice(cursorOffsetRelativeToOldCursorNode, 0, CURSOR);
|
|
14850
14887
|
const newCursorNodeCharArray = newCursorNodeText.split("");
|
|
14851
|
-
const cursorNodeDiff = require$$0
|
|
14888
|
+
const cursorNodeDiff = require$$0.diffArrays(oldCursorNodeCharArray, newCursorNodeCharArray);
|
|
14852
14889
|
let cursorOffset = newCursorNodeStart;
|
|
14853
14890
|
|
|
14854
14891
|
for (const entry of cursorNodeDiff) {
|
|
@@ -15407,7 +15444,7 @@ var ignore = options => new IgnoreBase(options);
|
|
|
15407
15444
|
|
|
15408
15445
|
function getFileContentOrNull(filename) {
|
|
15409
15446
|
return new Promise((resolve, reject) => {
|
|
15410
|
-
fs$
|
|
15447
|
+
fs$3.readFile(filename, "utf8", (error, data) => {
|
|
15411
15448
|
if (error && error.code !== "ENOENT") {
|
|
15412
15449
|
reject(createError(filename, error));
|
|
15413
15450
|
} else {
|
|
@@ -15424,7 +15461,7 @@ function getFileContentOrNull(filename) {
|
|
|
15424
15461
|
|
|
15425
15462
|
getFileContentOrNull.sync = function (filename) {
|
|
15426
15463
|
try {
|
|
15427
|
-
return fs$
|
|
15464
|
+
return fs$3.readFileSync(filename, "utf8");
|
|
15428
15465
|
} catch (error) {
|
|
15429
15466
|
if (error && error.code === "ENOENT") {
|
|
15430
15467
|
return null;
|
|
@@ -15447,7 +15484,7 @@ var getFileContentOrNull_1 = getFileContentOrNull;
|
|
|
15447
15484
|
|
|
15448
15485
|
|
|
15449
15486
|
async function createIgnorer(ignorePath, withNodeModules) {
|
|
15450
|
-
const ignoreContent = ignorePath ? await getFileContentOrNull_1(path$
|
|
15487
|
+
const ignoreContent = ignorePath ? await getFileContentOrNull_1(path$2.resolve(ignorePath)) : null;
|
|
15451
15488
|
return _createIgnorer(ignoreContent, withNodeModules);
|
|
15452
15489
|
}
|
|
15453
15490
|
/**
|
|
@@ -15457,7 +15494,7 @@ async function createIgnorer(ignorePath, withNodeModules) {
|
|
|
15457
15494
|
|
|
15458
15495
|
|
|
15459
15496
|
createIgnorer.sync = function (ignorePath, withNodeModules) {
|
|
15460
|
-
const ignoreContent = !ignorePath ? null : getFileContentOrNull_1.sync(path$
|
|
15497
|
+
const ignoreContent = !ignorePath ? null : getFileContentOrNull_1.sync(path$2.resolve(ignorePath));
|
|
15461
15498
|
return _createIgnorer(ignoreContent, withNodeModules);
|
|
15462
15499
|
};
|
|
15463
15500
|
/**
|
|
@@ -15735,7 +15772,7 @@ var path = {
|
|
|
15735
15772
|
};
|
|
15736
15773
|
|
|
15737
15774
|
try {
|
|
15738
|
-
path = path$
|
|
15775
|
+
path = path$2;
|
|
15739
15776
|
} catch (er) {}
|
|
15740
15777
|
|
|
15741
15778
|
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
|
|
@@ -19161,7 +19198,7 @@ LRUCache.prototype.inspect = function (n, opts) {
|
|
|
19161
19198
|
str += ',';
|
|
19162
19199
|
}
|
|
19163
19200
|
|
|
19164
|
-
str += '\n max: ' + util$
|
|
19201
|
+
str += '\n max: ' + util$4.inspect(max, opts);
|
|
19165
19202
|
extras = true;
|
|
19166
19203
|
}
|
|
19167
19204
|
|
|
@@ -19172,7 +19209,7 @@ LRUCache.prototype.inspect = function (n, opts) {
|
|
|
19172
19209
|
str += ',';
|
|
19173
19210
|
}
|
|
19174
19211
|
|
|
19175
|
-
str += '\n maxAge: ' + util$
|
|
19212
|
+
str += '\n maxAge: ' + util$4.inspect(maxAge, opts);
|
|
19176
19213
|
extras = true;
|
|
19177
19214
|
}
|
|
19178
19215
|
|
|
@@ -19183,7 +19220,7 @@ LRUCache.prototype.inspect = function (n, opts) {
|
|
|
19183
19220
|
str += ',';
|
|
19184
19221
|
}
|
|
19185
19222
|
|
|
19186
|
-
str += '\n length: ' + util$
|
|
19223
|
+
str += '\n length: ' + util$4.inspect(this[LENGTH], opts);
|
|
19187
19224
|
extras = true;
|
|
19188
19225
|
}
|
|
19189
19226
|
|
|
@@ -19200,7 +19237,7 @@ LRUCache.prototype.inspect = function (n, opts) {
|
|
|
19200
19237
|
str += '\n ';
|
|
19201
19238
|
}
|
|
19202
19239
|
|
|
19203
|
-
var key = util$
|
|
19240
|
+
var key = util$4.inspect(item.key).split('\n').join('\n ');
|
|
19204
19241
|
var val = {
|
|
19205
19242
|
value: item.value
|
|
19206
19243
|
};
|
|
@@ -19217,7 +19254,7 @@ LRUCache.prototype.inspect = function (n, opts) {
|
|
|
19217
19254
|
val.stale = true;
|
|
19218
19255
|
}
|
|
19219
19256
|
|
|
19220
|
-
val = util$
|
|
19257
|
+
val = util$4.inspect(val, opts).split('\n').join('\n ');
|
|
19221
19258
|
str += key + ' => ' + val;
|
|
19222
19259
|
});
|
|
19223
19260
|
|
|
@@ -20276,7 +20313,7 @@ var fnmatch = createCommonjsModule(function (module, exports) {
|
|
|
20276
20313
|
}
|
|
20277
20314
|
|
|
20278
20315
|
if (options.matchBase && pattern.length === 1) {
|
|
20279
|
-
file = path$
|
|
20316
|
+
file = path$2.basename(file.join("/")).split("/");
|
|
20280
20317
|
}
|
|
20281
20318
|
|
|
20282
20319
|
if (options.debug) {
|
|
@@ -20601,7 +20638,7 @@ var ini = createCommonjsModule(function (module, exports) {
|
|
|
20601
20638
|
value: true
|
|
20602
20639
|
});
|
|
20603
20640
|
|
|
20604
|
-
var fs = __importStar(fs$
|
|
20641
|
+
var fs = __importStar(fs$3);
|
|
20605
20642
|
/**
|
|
20606
20643
|
* define the possible values:
|
|
20607
20644
|
* section: [section]
|
|
@@ -20754,22 +20791,22 @@ var _package$2 = {
|
|
|
20754
20791
|
};
|
|
20755
20792
|
|
|
20756
20793
|
var _package$3 = /*#__PURE__*/Object.freeze({
|
|
20757
|
-
|
|
20758
|
-
|
|
20759
|
-
|
|
20760
|
-
|
|
20761
|
-
|
|
20762
|
-
|
|
20763
|
-
|
|
20764
|
-
|
|
20765
|
-
|
|
20766
|
-
|
|
20767
|
-
|
|
20768
|
-
|
|
20769
|
-
|
|
20770
|
-
|
|
20771
|
-
|
|
20772
|
-
|
|
20794
|
+
__proto__: null,
|
|
20795
|
+
name: name$1,
|
|
20796
|
+
version: version$1,
|
|
20797
|
+
description: description$1,
|
|
20798
|
+
keywords: keywords,
|
|
20799
|
+
main: main$1,
|
|
20800
|
+
contributors: contributors,
|
|
20801
|
+
directories: directories,
|
|
20802
|
+
scripts: scripts$1,
|
|
20803
|
+
repository: repository$1,
|
|
20804
|
+
bugs: bugs,
|
|
20805
|
+
author: author$1,
|
|
20806
|
+
license: license$1,
|
|
20807
|
+
dependencies: dependencies$1,
|
|
20808
|
+
devDependencies: devDependencies$1,
|
|
20809
|
+
'default': _package$2
|
|
20773
20810
|
});
|
|
20774
20811
|
|
|
20775
20812
|
var require$$4 = getCjsExportFromNamespace(_package$3);
|
|
@@ -20931,9 +20968,9 @@ var src = createCommonjsModule(function (module, exports) {
|
|
|
20931
20968
|
value: true
|
|
20932
20969
|
});
|
|
20933
20970
|
|
|
20934
|
-
var fs = __importStar(fs$
|
|
20971
|
+
var fs = __importStar(fs$3);
|
|
20935
20972
|
|
|
20936
|
-
var path = __importStar(path$
|
|
20973
|
+
var path = __importStar(path$2);
|
|
20937
20974
|
|
|
20938
20975
|
var semver = __importStar(semver$2);
|
|
20939
20976
|
|
|
@@ -21300,14 +21337,14 @@ function markerExists(files, markers) {
|
|
|
21300
21337
|
}
|
|
21301
21338
|
|
|
21302
21339
|
function traverseFolder(directory, levels, markers) {
|
|
21303
|
-
var files = fs$
|
|
21340
|
+
var files = fs$3.readdirSync(directory);
|
|
21304
21341
|
|
|
21305
21342
|
if (levels === 0) {
|
|
21306
21343
|
return null;
|
|
21307
21344
|
} else if (markerExists(files, markers)) {
|
|
21308
21345
|
return directory;
|
|
21309
21346
|
} else {
|
|
21310
|
-
return traverseFolder(path$
|
|
21347
|
+
return traverseFolder(path$2.resolve(directory, '..'), levels - 1, markers);
|
|
21311
21348
|
}
|
|
21312
21349
|
}
|
|
21313
21350
|
|
|
@@ -21333,11 +21370,11 @@ const maybeParse = (filePath, parse) => {
|
|
|
21333
21370
|
// it, which is possible, for example, when the path is given via
|
|
21334
21371
|
// --stdin-filepath. So, first, traverse up until we find an existing
|
|
21335
21372
|
// directory.
|
|
21336
|
-
let dirPath = path$
|
|
21337
|
-
const fsRoot = path$
|
|
21373
|
+
let dirPath = path$2.dirname(path$2.resolve(filePath));
|
|
21374
|
+
const fsRoot = path$2.parse(dirPath).root;
|
|
21338
21375
|
|
|
21339
|
-
while (dirPath !== fsRoot && !fs$
|
|
21340
|
-
dirPath = path$
|
|
21376
|
+
while (dirPath !== fsRoot && !fs$3.existsSync(dirPath)) {
|
|
21377
|
+
dirPath = path$2.dirname(dirPath);
|
|
21341
21378
|
}
|
|
21342
21379
|
|
|
21343
21380
|
const root = findProjectRoot(dirPath);
|
|
@@ -23263,6 +23300,962 @@ var loadToml = function (filePath, content) {
|
|
|
23263
23300
|
}
|
|
23264
23301
|
};
|
|
23265
23302
|
|
|
23303
|
+
var caller = function () {
|
|
23304
|
+
// see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
|
|
23305
|
+
var origPrepareStackTrace = Error.prepareStackTrace;
|
|
23306
|
+
|
|
23307
|
+
Error.prepareStackTrace = function (_, stack) {
|
|
23308
|
+
return stack;
|
|
23309
|
+
};
|
|
23310
|
+
|
|
23311
|
+
var stack = new Error().stack;
|
|
23312
|
+
Error.prepareStackTrace = origPrepareStackTrace;
|
|
23313
|
+
return stack[2].getFileName();
|
|
23314
|
+
};
|
|
23315
|
+
|
|
23316
|
+
var pathParse = createCommonjsModule(function (module) {
|
|
23317
|
+
|
|
23318
|
+
var isWindows = process.platform === 'win32'; // Regex to split a windows path into three parts: [*, device, slash,
|
|
23319
|
+
// tail] windows-only
|
|
23320
|
+
|
|
23321
|
+
var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; // Regex to split the tail part of the above into [*, dir, basename, ext]
|
|
23322
|
+
|
|
23323
|
+
var splitTailRe = /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/;
|
|
23324
|
+
var win32 = {}; // Function to split a filename into [root, dir, basename, ext]
|
|
23325
|
+
|
|
23326
|
+
function win32SplitPath(filename) {
|
|
23327
|
+
// Separate device+slash from tail
|
|
23328
|
+
var result = splitDeviceRe.exec(filename),
|
|
23329
|
+
device = (result[1] || '') + (result[2] || ''),
|
|
23330
|
+
tail = result[3] || ''; // Split the tail into dir, basename and extension
|
|
23331
|
+
|
|
23332
|
+
var result2 = splitTailRe.exec(tail),
|
|
23333
|
+
dir = result2[1],
|
|
23334
|
+
basename = result2[2],
|
|
23335
|
+
ext = result2[3];
|
|
23336
|
+
return [device, dir, basename, ext];
|
|
23337
|
+
}
|
|
23338
|
+
|
|
23339
|
+
win32.parse = function (pathString) {
|
|
23340
|
+
if (typeof pathString !== 'string') {
|
|
23341
|
+
throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString);
|
|
23342
|
+
}
|
|
23343
|
+
|
|
23344
|
+
var allParts = win32SplitPath(pathString);
|
|
23345
|
+
|
|
23346
|
+
if (!allParts || allParts.length !== 4) {
|
|
23347
|
+
throw new TypeError("Invalid path '" + pathString + "'");
|
|
23348
|
+
}
|
|
23349
|
+
|
|
23350
|
+
return {
|
|
23351
|
+
root: allParts[0],
|
|
23352
|
+
dir: allParts[0] + allParts[1].slice(0, -1),
|
|
23353
|
+
base: allParts[2],
|
|
23354
|
+
ext: allParts[3],
|
|
23355
|
+
name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
|
|
23356
|
+
};
|
|
23357
|
+
}; // Split a filename into [root, dir, basename, ext], unix version
|
|
23358
|
+
// 'root' is just a slash, or nothing.
|
|
23359
|
+
|
|
23360
|
+
|
|
23361
|
+
var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
|
|
23362
|
+
var posix = {};
|
|
23363
|
+
|
|
23364
|
+
function posixSplitPath(filename) {
|
|
23365
|
+
return splitPathRe.exec(filename).slice(1);
|
|
23366
|
+
}
|
|
23367
|
+
|
|
23368
|
+
posix.parse = function (pathString) {
|
|
23369
|
+
if (typeof pathString !== 'string') {
|
|
23370
|
+
throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString);
|
|
23371
|
+
}
|
|
23372
|
+
|
|
23373
|
+
var allParts = posixSplitPath(pathString);
|
|
23374
|
+
|
|
23375
|
+
if (!allParts || allParts.length !== 4) {
|
|
23376
|
+
throw new TypeError("Invalid path '" + pathString + "'");
|
|
23377
|
+
}
|
|
23378
|
+
|
|
23379
|
+
allParts[1] = allParts[1] || '';
|
|
23380
|
+
allParts[2] = allParts[2] || '';
|
|
23381
|
+
allParts[3] = allParts[3] || '';
|
|
23382
|
+
return {
|
|
23383
|
+
root: allParts[0],
|
|
23384
|
+
dir: allParts[0] + allParts[1].slice(0, -1),
|
|
23385
|
+
base: allParts[2],
|
|
23386
|
+
ext: allParts[3],
|
|
23387
|
+
name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
|
|
23388
|
+
};
|
|
23389
|
+
};
|
|
23390
|
+
|
|
23391
|
+
if (isWindows) module.exports = win32.parse;else
|
|
23392
|
+
/* posix */
|
|
23393
|
+
module.exports = posix.parse;
|
|
23394
|
+
module.exports.posix = posix.parse;
|
|
23395
|
+
module.exports.win32 = win32.parse;
|
|
23396
|
+
});
|
|
23397
|
+
var pathParse_1 = pathParse.posix;
|
|
23398
|
+
var pathParse_2 = pathParse.win32;
|
|
23399
|
+
|
|
23400
|
+
var parse$2 = path$2.parse || pathParse;
|
|
23401
|
+
|
|
23402
|
+
var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {
|
|
23403
|
+
var prefix = '/';
|
|
23404
|
+
|
|
23405
|
+
if (/^([A-Za-z]:)/.test(absoluteStart)) {
|
|
23406
|
+
prefix = '';
|
|
23407
|
+
} else if (/^\\\\/.test(absoluteStart)) {
|
|
23408
|
+
prefix = '\\\\';
|
|
23409
|
+
}
|
|
23410
|
+
|
|
23411
|
+
var paths = [absoluteStart];
|
|
23412
|
+
var parsed = parse$2(absoluteStart);
|
|
23413
|
+
|
|
23414
|
+
while (parsed.dir !== paths[paths.length - 1]) {
|
|
23415
|
+
paths.push(parsed.dir);
|
|
23416
|
+
parsed = parse$2(parsed.dir);
|
|
23417
|
+
}
|
|
23418
|
+
|
|
23419
|
+
return paths.reduce(function (dirs, aPath) {
|
|
23420
|
+
return dirs.concat(modules.map(function (moduleDir) {
|
|
23421
|
+
return path$2.resolve(prefix, aPath, moduleDir);
|
|
23422
|
+
}));
|
|
23423
|
+
}, []);
|
|
23424
|
+
};
|
|
23425
|
+
|
|
23426
|
+
var nodeModulesPaths = function nodeModulesPaths(start, opts, request) {
|
|
23427
|
+
var modules = opts && opts.moduleDirectory ? [].concat(opts.moduleDirectory) : ['node_modules'];
|
|
23428
|
+
|
|
23429
|
+
if (opts && typeof opts.paths === 'function') {
|
|
23430
|
+
return opts.paths(request, start, function () {
|
|
23431
|
+
return getNodeModulesDirs(start, modules);
|
|
23432
|
+
}, opts);
|
|
23433
|
+
}
|
|
23434
|
+
|
|
23435
|
+
var dirs = getNodeModulesDirs(start, modules);
|
|
23436
|
+
return opts && opts.paths ? dirs.concat(opts.paths) : dirs;
|
|
23437
|
+
};
|
|
23438
|
+
|
|
23439
|
+
var normalizeOptions$2 = function (x, opts) {
|
|
23440
|
+
/**
|
|
23441
|
+
* This file is purposefully a passthrough. It's expected that third-party
|
|
23442
|
+
* environments will override it at runtime in order to inject special logic
|
|
23443
|
+
* into `resolve` (by manipulating the options). One such example is the PnP
|
|
23444
|
+
* code path in Yarn.
|
|
23445
|
+
*/
|
|
23446
|
+
return opts || {};
|
|
23447
|
+
};
|
|
23448
|
+
|
|
23449
|
+
var assert = true;
|
|
23450
|
+
var async_hooks = ">= 8";
|
|
23451
|
+
var buffer_ieee754 = "< 0.9.7";
|
|
23452
|
+
var buffer = true;
|
|
23453
|
+
var child_process = true;
|
|
23454
|
+
var cluster = true;
|
|
23455
|
+
var console$1 = true;
|
|
23456
|
+
var constants$1 = true;
|
|
23457
|
+
var crypto = true;
|
|
23458
|
+
var _debug_agent = ">= 1 && < 8";
|
|
23459
|
+
var _debugger = "< 8";
|
|
23460
|
+
var dgram = true;
|
|
23461
|
+
var dns = true;
|
|
23462
|
+
var domain = true;
|
|
23463
|
+
var events = true;
|
|
23464
|
+
var freelist = "< 6";
|
|
23465
|
+
var fs = true;
|
|
23466
|
+
var _http_agent = ">= 0.11.1";
|
|
23467
|
+
var _http_client = ">= 0.11.1";
|
|
23468
|
+
var _http_common = ">= 0.11.1";
|
|
23469
|
+
var _http_incoming = ">= 0.11.1";
|
|
23470
|
+
var _http_outgoing = ">= 0.11.1";
|
|
23471
|
+
var _http_server = ">= 0.11.1";
|
|
23472
|
+
var http = true;
|
|
23473
|
+
var http2 = ">= 8.8";
|
|
23474
|
+
var https = true;
|
|
23475
|
+
var inspector = ">= 8.0.0";
|
|
23476
|
+
var _linklist = "< 8";
|
|
23477
|
+
var module$1 = true;
|
|
23478
|
+
var net = true;
|
|
23479
|
+
var os = true;
|
|
23480
|
+
var path$1 = true;
|
|
23481
|
+
var perf_hooks = ">= 8.5";
|
|
23482
|
+
var process$1 = ">= 1";
|
|
23483
|
+
var punycode = true;
|
|
23484
|
+
var querystring = true;
|
|
23485
|
+
var readline = true;
|
|
23486
|
+
var repl = true;
|
|
23487
|
+
var smalloc = ">= 0.11.5 && < 3";
|
|
23488
|
+
var _stream_duplex = ">= 0.9.4";
|
|
23489
|
+
var _stream_transform = ">= 0.9.4";
|
|
23490
|
+
var _stream_wrap = ">= 1.4.1";
|
|
23491
|
+
var _stream_passthrough = ">= 0.9.4";
|
|
23492
|
+
var _stream_readable = ">= 0.9.4";
|
|
23493
|
+
var _stream_writable = ">= 0.9.4";
|
|
23494
|
+
var stream = true;
|
|
23495
|
+
var string_decoder = true;
|
|
23496
|
+
var sys = true;
|
|
23497
|
+
var timers = true;
|
|
23498
|
+
var _tls_common = ">= 0.11.13";
|
|
23499
|
+
var _tls_legacy = ">= 0.11.3 && < 10";
|
|
23500
|
+
var _tls_wrap = ">= 0.11.3";
|
|
23501
|
+
var tls = true;
|
|
23502
|
+
var trace_events = ">= 10";
|
|
23503
|
+
var tty = true;
|
|
23504
|
+
var url = true;
|
|
23505
|
+
var util$2 = true;
|
|
23506
|
+
var v8 = ">= 1";
|
|
23507
|
+
var vm = true;
|
|
23508
|
+
var wasi = ">= 13.4 && < 13.5";
|
|
23509
|
+
var worker_threads = ">= 11.7";
|
|
23510
|
+
var zlib = true;
|
|
23511
|
+
var core$1 = {
|
|
23512
|
+
assert: assert,
|
|
23513
|
+
async_hooks: async_hooks,
|
|
23514
|
+
buffer_ieee754: buffer_ieee754,
|
|
23515
|
+
buffer: buffer,
|
|
23516
|
+
child_process: child_process,
|
|
23517
|
+
cluster: cluster,
|
|
23518
|
+
console: console$1,
|
|
23519
|
+
constants: constants$1,
|
|
23520
|
+
crypto: crypto,
|
|
23521
|
+
_debug_agent: _debug_agent,
|
|
23522
|
+
_debugger: _debugger,
|
|
23523
|
+
dgram: dgram,
|
|
23524
|
+
dns: dns,
|
|
23525
|
+
domain: domain,
|
|
23526
|
+
events: events,
|
|
23527
|
+
freelist: freelist,
|
|
23528
|
+
fs: fs,
|
|
23529
|
+
"fs/promises": [
|
|
23530
|
+
">= 10 && < 10.1",
|
|
23531
|
+
">= 14"
|
|
23532
|
+
],
|
|
23533
|
+
_http_agent: _http_agent,
|
|
23534
|
+
_http_client: _http_client,
|
|
23535
|
+
_http_common: _http_common,
|
|
23536
|
+
_http_incoming: _http_incoming,
|
|
23537
|
+
_http_outgoing: _http_outgoing,
|
|
23538
|
+
_http_server: _http_server,
|
|
23539
|
+
http: http,
|
|
23540
|
+
http2: http2,
|
|
23541
|
+
https: https,
|
|
23542
|
+
inspector: inspector,
|
|
23543
|
+
_linklist: _linklist,
|
|
23544
|
+
module: module$1,
|
|
23545
|
+
net: net,
|
|
23546
|
+
"node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
|
|
23547
|
+
"node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
|
|
23548
|
+
"node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
|
|
23549
|
+
os: os,
|
|
23550
|
+
path: path$1,
|
|
23551
|
+
perf_hooks: perf_hooks,
|
|
23552
|
+
process: process$1,
|
|
23553
|
+
punycode: punycode,
|
|
23554
|
+
querystring: querystring,
|
|
23555
|
+
readline: readline,
|
|
23556
|
+
repl: repl,
|
|
23557
|
+
smalloc: smalloc,
|
|
23558
|
+
_stream_duplex: _stream_duplex,
|
|
23559
|
+
_stream_transform: _stream_transform,
|
|
23560
|
+
_stream_wrap: _stream_wrap,
|
|
23561
|
+
_stream_passthrough: _stream_passthrough,
|
|
23562
|
+
_stream_readable: _stream_readable,
|
|
23563
|
+
_stream_writable: _stream_writable,
|
|
23564
|
+
stream: stream,
|
|
23565
|
+
string_decoder: string_decoder,
|
|
23566
|
+
sys: sys,
|
|
23567
|
+
timers: timers,
|
|
23568
|
+
_tls_common: _tls_common,
|
|
23569
|
+
_tls_legacy: _tls_legacy,
|
|
23570
|
+
_tls_wrap: _tls_wrap,
|
|
23571
|
+
tls: tls,
|
|
23572
|
+
trace_events: trace_events,
|
|
23573
|
+
tty: tty,
|
|
23574
|
+
url: url,
|
|
23575
|
+
util: util$2,
|
|
23576
|
+
"v8/tools/arguments": ">= 10 && < 12",
|
|
23577
|
+
"v8/tools/codemap": [
|
|
23578
|
+
">= 4.4.0 && < 5",
|
|
23579
|
+
">= 5.2.0 && < 12"
|
|
23580
|
+
],
|
|
23581
|
+
"v8/tools/consarray": [
|
|
23582
|
+
">= 4.4.0 && < 5",
|
|
23583
|
+
">= 5.2.0 && < 12"
|
|
23584
|
+
],
|
|
23585
|
+
"v8/tools/csvparser": [
|
|
23586
|
+
">= 4.4.0 && < 5",
|
|
23587
|
+
">= 5.2.0 && < 12"
|
|
23588
|
+
],
|
|
23589
|
+
"v8/tools/logreader": [
|
|
23590
|
+
">= 4.4.0 && < 5",
|
|
23591
|
+
">= 5.2.0 && < 12"
|
|
23592
|
+
],
|
|
23593
|
+
"v8/tools/profile_view": [
|
|
23594
|
+
">= 4.4.0 && < 5",
|
|
23595
|
+
">= 5.2.0 && < 12"
|
|
23596
|
+
],
|
|
23597
|
+
"v8/tools/splaytree": [
|
|
23598
|
+
">= 4.4.0 && < 5",
|
|
23599
|
+
">= 5.2.0 && < 12"
|
|
23600
|
+
],
|
|
23601
|
+
v8: v8,
|
|
23602
|
+
vm: vm,
|
|
23603
|
+
wasi: wasi,
|
|
23604
|
+
worker_threads: worker_threads,
|
|
23605
|
+
zlib: zlib
|
|
23606
|
+
};
|
|
23607
|
+
|
|
23608
|
+
var core$2 = /*#__PURE__*/Object.freeze({
|
|
23609
|
+
__proto__: null,
|
|
23610
|
+
assert: assert,
|
|
23611
|
+
async_hooks: async_hooks,
|
|
23612
|
+
buffer_ieee754: buffer_ieee754,
|
|
23613
|
+
buffer: buffer,
|
|
23614
|
+
child_process: child_process,
|
|
23615
|
+
cluster: cluster,
|
|
23616
|
+
console: console$1,
|
|
23617
|
+
constants: constants$1,
|
|
23618
|
+
crypto: crypto,
|
|
23619
|
+
_debug_agent: _debug_agent,
|
|
23620
|
+
_debugger: _debugger,
|
|
23621
|
+
dgram: dgram,
|
|
23622
|
+
dns: dns,
|
|
23623
|
+
domain: domain,
|
|
23624
|
+
events: events,
|
|
23625
|
+
freelist: freelist,
|
|
23626
|
+
fs: fs,
|
|
23627
|
+
_http_agent: _http_agent,
|
|
23628
|
+
_http_client: _http_client,
|
|
23629
|
+
_http_common: _http_common,
|
|
23630
|
+
_http_incoming: _http_incoming,
|
|
23631
|
+
_http_outgoing: _http_outgoing,
|
|
23632
|
+
_http_server: _http_server,
|
|
23633
|
+
http: http,
|
|
23634
|
+
http2: http2,
|
|
23635
|
+
https: https,
|
|
23636
|
+
inspector: inspector,
|
|
23637
|
+
_linklist: _linklist,
|
|
23638
|
+
module: module$1,
|
|
23639
|
+
net: net,
|
|
23640
|
+
os: os,
|
|
23641
|
+
path: path$1,
|
|
23642
|
+
perf_hooks: perf_hooks,
|
|
23643
|
+
process: process$1,
|
|
23644
|
+
punycode: punycode,
|
|
23645
|
+
querystring: querystring,
|
|
23646
|
+
readline: readline,
|
|
23647
|
+
repl: repl,
|
|
23648
|
+
smalloc: smalloc,
|
|
23649
|
+
_stream_duplex: _stream_duplex,
|
|
23650
|
+
_stream_transform: _stream_transform,
|
|
23651
|
+
_stream_wrap: _stream_wrap,
|
|
23652
|
+
_stream_passthrough: _stream_passthrough,
|
|
23653
|
+
_stream_readable: _stream_readable,
|
|
23654
|
+
_stream_writable: _stream_writable,
|
|
23655
|
+
stream: stream,
|
|
23656
|
+
string_decoder: string_decoder,
|
|
23657
|
+
sys: sys,
|
|
23658
|
+
timers: timers,
|
|
23659
|
+
_tls_common: _tls_common,
|
|
23660
|
+
_tls_legacy: _tls_legacy,
|
|
23661
|
+
_tls_wrap: _tls_wrap,
|
|
23662
|
+
tls: tls,
|
|
23663
|
+
trace_events: trace_events,
|
|
23664
|
+
tty: tty,
|
|
23665
|
+
url: url,
|
|
23666
|
+
util: util$2,
|
|
23667
|
+
v8: v8,
|
|
23668
|
+
vm: vm,
|
|
23669
|
+
wasi: wasi,
|
|
23670
|
+
worker_threads: worker_threads,
|
|
23671
|
+
zlib: zlib,
|
|
23672
|
+
'default': core$1
|
|
23673
|
+
});
|
|
23674
|
+
|
|
23675
|
+
var data = getCjsExportFromNamespace(core$2);
|
|
23676
|
+
|
|
23677
|
+
var current = process.versions && process.versions.node && process.versions.node.split('.') || [];
|
|
23678
|
+
|
|
23679
|
+
function specifierIncluded(specifier) {
|
|
23680
|
+
var parts = specifier.split(' ');
|
|
23681
|
+
var op = parts.length > 1 ? parts[0] : '=';
|
|
23682
|
+
var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
|
|
23683
|
+
|
|
23684
|
+
for (var i = 0; i < 3; ++i) {
|
|
23685
|
+
var cur = Number(current[i] || 0);
|
|
23686
|
+
var ver = Number(versionParts[i] || 0);
|
|
23687
|
+
|
|
23688
|
+
if (cur === ver) {
|
|
23689
|
+
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
23690
|
+
}
|
|
23691
|
+
|
|
23692
|
+
if (op === '<') {
|
|
23693
|
+
return cur < ver;
|
|
23694
|
+
} else if (op === '>=') {
|
|
23695
|
+
return cur >= ver;
|
|
23696
|
+
} else {
|
|
23697
|
+
return false;
|
|
23698
|
+
}
|
|
23699
|
+
}
|
|
23700
|
+
|
|
23701
|
+
return op === '>=';
|
|
23702
|
+
}
|
|
23703
|
+
|
|
23704
|
+
function matchesRange(range) {
|
|
23705
|
+
var specifiers = range.split(/ ?&& ?/);
|
|
23706
|
+
|
|
23707
|
+
if (specifiers.length === 0) {
|
|
23708
|
+
return false;
|
|
23709
|
+
}
|
|
23710
|
+
|
|
23711
|
+
for (var i = 0; i < specifiers.length; ++i) {
|
|
23712
|
+
if (!specifierIncluded(specifiers[i])) {
|
|
23713
|
+
return false;
|
|
23714
|
+
}
|
|
23715
|
+
}
|
|
23716
|
+
|
|
23717
|
+
return true;
|
|
23718
|
+
}
|
|
23719
|
+
|
|
23720
|
+
function versionIncluded(specifierValue) {
|
|
23721
|
+
if (typeof specifierValue === 'boolean') {
|
|
23722
|
+
return specifierValue;
|
|
23723
|
+
}
|
|
23724
|
+
|
|
23725
|
+
if (specifierValue && typeof specifierValue === 'object') {
|
|
23726
|
+
for (var i = 0; i < specifierValue.length; ++i) {
|
|
23727
|
+
if (matchesRange(specifierValue[i])) {
|
|
23728
|
+
return true;
|
|
23729
|
+
}
|
|
23730
|
+
}
|
|
23731
|
+
|
|
23732
|
+
return false;
|
|
23733
|
+
}
|
|
23734
|
+
|
|
23735
|
+
return matchesRange(specifierValue);
|
|
23736
|
+
}
|
|
23737
|
+
|
|
23738
|
+
var core$3 = {};
|
|
23739
|
+
|
|
23740
|
+
for (var mod in data) {
|
|
23741
|
+
// eslint-disable-line no-restricted-syntax
|
|
23742
|
+
if (Object.prototype.hasOwnProperty.call(data, mod)) {
|
|
23743
|
+
core$3[mod] = versionIncluded(data[mod]);
|
|
23744
|
+
}
|
|
23745
|
+
}
|
|
23746
|
+
|
|
23747
|
+
var core_1 = core$3;
|
|
23748
|
+
|
|
23749
|
+
var isCore = function isCore(x) {
|
|
23750
|
+
return Object.prototype.hasOwnProperty.call(core_1, x);
|
|
23751
|
+
};
|
|
23752
|
+
|
|
23753
|
+
var realpath = fs$3.realpath && typeof fs$3.realpath.native === 'function' ? fs$3.realpath.native : fs$3.realpath;
|
|
23754
|
+
|
|
23755
|
+
var defaultIsFile = function isFile(file, cb) {
|
|
23756
|
+
fs$3.stat(file, function (err, stat) {
|
|
23757
|
+
if (!err) {
|
|
23758
|
+
return cb(null, stat.isFile() || stat.isFIFO());
|
|
23759
|
+
}
|
|
23760
|
+
|
|
23761
|
+
if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
|
|
23762
|
+
return cb(err);
|
|
23763
|
+
});
|
|
23764
|
+
};
|
|
23765
|
+
|
|
23766
|
+
var defaultIsDir = function isDirectory(dir, cb) {
|
|
23767
|
+
fs$3.stat(dir, function (err, stat) {
|
|
23768
|
+
if (!err) {
|
|
23769
|
+
return cb(null, stat.isDirectory());
|
|
23770
|
+
}
|
|
23771
|
+
|
|
23772
|
+
if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
|
|
23773
|
+
return cb(err);
|
|
23774
|
+
});
|
|
23775
|
+
};
|
|
23776
|
+
|
|
23777
|
+
var maybeUnwrapSymlink = function maybeUnwrapSymlink(x, opts, cb) {
|
|
23778
|
+
if (opts && opts.preserveSymlinks === false) {
|
|
23779
|
+
realpath(x, function (realPathErr, realPath) {
|
|
23780
|
+
if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr);else cb(null, realPathErr ? x : realPath);
|
|
23781
|
+
});
|
|
23782
|
+
} else {
|
|
23783
|
+
cb(null, x);
|
|
23784
|
+
}
|
|
23785
|
+
};
|
|
23786
|
+
|
|
23787
|
+
var getPackageCandidates = function getPackageCandidates(x, start, opts) {
|
|
23788
|
+
var dirs = nodeModulesPaths(start, opts, x);
|
|
23789
|
+
|
|
23790
|
+
for (var i = 0; i < dirs.length; i++) {
|
|
23791
|
+
dirs[i] = path$2.join(dirs[i], x);
|
|
23792
|
+
}
|
|
23793
|
+
|
|
23794
|
+
return dirs;
|
|
23795
|
+
};
|
|
23796
|
+
|
|
23797
|
+
var async = function resolve(x, options, callback) {
|
|
23798
|
+
var cb = callback;
|
|
23799
|
+
var opts = options;
|
|
23800
|
+
|
|
23801
|
+
if (typeof options === 'function') {
|
|
23802
|
+
cb = opts;
|
|
23803
|
+
opts = {};
|
|
23804
|
+
}
|
|
23805
|
+
|
|
23806
|
+
if (typeof x !== 'string') {
|
|
23807
|
+
var err = new TypeError('Path must be a string.');
|
|
23808
|
+
return process.nextTick(function () {
|
|
23809
|
+
cb(err);
|
|
23810
|
+
});
|
|
23811
|
+
}
|
|
23812
|
+
|
|
23813
|
+
opts = normalizeOptions$2(x, opts);
|
|
23814
|
+
var isFile = opts.isFile || defaultIsFile;
|
|
23815
|
+
var isDirectory = opts.isDirectory || defaultIsDir;
|
|
23816
|
+
var readFile = opts.readFile || fs$3.readFile;
|
|
23817
|
+
var packageIterator = opts.packageIterator;
|
|
23818
|
+
var extensions = opts.extensions || ['.js'];
|
|
23819
|
+
var basedir = opts.basedir || path$2.dirname(caller());
|
|
23820
|
+
var parent = opts.filename || basedir;
|
|
23821
|
+
opts.paths = opts.paths || []; // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
|
|
23822
|
+
|
|
23823
|
+
var absoluteStart = path$2.resolve(basedir);
|
|
23824
|
+
maybeUnwrapSymlink(absoluteStart, opts, function (err, realStart) {
|
|
23825
|
+
if (err) cb(err);else init(realStart);
|
|
23826
|
+
});
|
|
23827
|
+
var res;
|
|
23828
|
+
|
|
23829
|
+
function init(basedir) {
|
|
23830
|
+
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
|
|
23831
|
+
res = path$2.resolve(basedir, x);
|
|
23832
|
+
if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
|
|
23833
|
+
|
|
23834
|
+
if (/\/$/.test(x) && res === basedir) {
|
|
23835
|
+
loadAsDirectory(res, opts.package, onfile);
|
|
23836
|
+
} else loadAsFile(res, opts.package, onfile);
|
|
23837
|
+
} else if (isCore(x)) {
|
|
23838
|
+
return cb(null, x);
|
|
23839
|
+
} else loadNodeModules(x, basedir, function (err, n, pkg) {
|
|
23840
|
+
if (err) cb(err);else if (n) {
|
|
23841
|
+
return maybeUnwrapSymlink(n, opts, function (err, realN) {
|
|
23842
|
+
if (err) {
|
|
23843
|
+
cb(err);
|
|
23844
|
+
} else {
|
|
23845
|
+
cb(null, realN, pkg);
|
|
23846
|
+
}
|
|
23847
|
+
});
|
|
23848
|
+
} else {
|
|
23849
|
+
var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
|
|
23850
|
+
moduleError.code = 'MODULE_NOT_FOUND';
|
|
23851
|
+
cb(moduleError);
|
|
23852
|
+
}
|
|
23853
|
+
});
|
|
23854
|
+
}
|
|
23855
|
+
|
|
23856
|
+
function onfile(err, m, pkg) {
|
|
23857
|
+
if (err) cb(err);else if (m) cb(null, m, pkg);else loadAsDirectory(res, function (err, d, pkg) {
|
|
23858
|
+
if (err) cb(err);else if (d) {
|
|
23859
|
+
maybeUnwrapSymlink(d, opts, function (err, realD) {
|
|
23860
|
+
if (err) {
|
|
23861
|
+
cb(err);
|
|
23862
|
+
} else {
|
|
23863
|
+
cb(null, realD, pkg);
|
|
23864
|
+
}
|
|
23865
|
+
});
|
|
23866
|
+
} else {
|
|
23867
|
+
var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
|
|
23868
|
+
moduleError.code = 'MODULE_NOT_FOUND';
|
|
23869
|
+
cb(moduleError);
|
|
23870
|
+
}
|
|
23871
|
+
});
|
|
23872
|
+
}
|
|
23873
|
+
|
|
23874
|
+
function loadAsFile(x, thePackage, callback) {
|
|
23875
|
+
var loadAsFilePackage = thePackage;
|
|
23876
|
+
var cb = callback;
|
|
23877
|
+
|
|
23878
|
+
if (typeof loadAsFilePackage === 'function') {
|
|
23879
|
+
cb = loadAsFilePackage;
|
|
23880
|
+
loadAsFilePackage = undefined;
|
|
23881
|
+
}
|
|
23882
|
+
|
|
23883
|
+
var exts = [''].concat(extensions);
|
|
23884
|
+
load(exts, x, loadAsFilePackage);
|
|
23885
|
+
|
|
23886
|
+
function load(exts, x, loadPackage) {
|
|
23887
|
+
if (exts.length === 0) return cb(null, undefined, loadPackage);
|
|
23888
|
+
var file = x + exts[0];
|
|
23889
|
+
var pkg = loadPackage;
|
|
23890
|
+
if (pkg) onpkg(null, pkg);else loadpkg(path$2.dirname(file), onpkg);
|
|
23891
|
+
|
|
23892
|
+
function onpkg(err, pkg_, dir) {
|
|
23893
|
+
pkg = pkg_;
|
|
23894
|
+
if (err) return cb(err);
|
|
23895
|
+
|
|
23896
|
+
if (dir && pkg && opts.pathFilter) {
|
|
23897
|
+
var rfile = path$2.relative(dir, file);
|
|
23898
|
+
var rel = rfile.slice(0, rfile.length - exts[0].length);
|
|
23899
|
+
var r = opts.pathFilter(pkg, x, rel);
|
|
23900
|
+
if (r) return load([''].concat(extensions.slice()), path$2.resolve(dir, r), pkg);
|
|
23901
|
+
}
|
|
23902
|
+
|
|
23903
|
+
isFile(file, onex);
|
|
23904
|
+
}
|
|
23905
|
+
|
|
23906
|
+
function onex(err, ex) {
|
|
23907
|
+
if (err) return cb(err);
|
|
23908
|
+
if (ex) return cb(null, file, pkg);
|
|
23909
|
+
load(exts.slice(1), x, pkg);
|
|
23910
|
+
}
|
|
23911
|
+
}
|
|
23912
|
+
}
|
|
23913
|
+
|
|
23914
|
+
function loadpkg(dir, cb) {
|
|
23915
|
+
if (dir === '' || dir === '/') return cb(null);
|
|
23916
|
+
|
|
23917
|
+
if (process.platform === 'win32' && /^\w:[/\\]*$/.test(dir)) {
|
|
23918
|
+
return cb(null);
|
|
23919
|
+
}
|
|
23920
|
+
|
|
23921
|
+
if (/[/\\]node_modules[/\\]*$/.test(dir)) return cb(null);
|
|
23922
|
+
maybeUnwrapSymlink(dir, opts, function (unwrapErr, pkgdir) {
|
|
23923
|
+
if (unwrapErr) return loadpkg(path$2.dirname(dir), cb);
|
|
23924
|
+
var pkgfile = path$2.join(pkgdir, 'package.json');
|
|
23925
|
+
isFile(pkgfile, function (err, ex) {
|
|
23926
|
+
// on err, ex is false
|
|
23927
|
+
if (!ex) return loadpkg(path$2.dirname(dir), cb);
|
|
23928
|
+
readFile(pkgfile, function (err, body) {
|
|
23929
|
+
if (err) cb(err);
|
|
23930
|
+
|
|
23931
|
+
try {
|
|
23932
|
+
var pkg = JSON.parse(body);
|
|
23933
|
+
} catch (jsonErr) {}
|
|
23934
|
+
|
|
23935
|
+
if (pkg && opts.packageFilter) {
|
|
23936
|
+
pkg = opts.packageFilter(pkg, pkgfile);
|
|
23937
|
+
}
|
|
23938
|
+
|
|
23939
|
+
cb(null, pkg, dir);
|
|
23940
|
+
});
|
|
23941
|
+
});
|
|
23942
|
+
});
|
|
23943
|
+
}
|
|
23944
|
+
|
|
23945
|
+
function loadAsDirectory(x, loadAsDirectoryPackage, callback) {
|
|
23946
|
+
var cb = callback;
|
|
23947
|
+
var fpkg = loadAsDirectoryPackage;
|
|
23948
|
+
|
|
23949
|
+
if (typeof fpkg === 'function') {
|
|
23950
|
+
cb = fpkg;
|
|
23951
|
+
fpkg = opts.package;
|
|
23952
|
+
}
|
|
23953
|
+
|
|
23954
|
+
maybeUnwrapSymlink(x, opts, function (unwrapErr, pkgdir) {
|
|
23955
|
+
if (unwrapErr) return cb(unwrapErr);
|
|
23956
|
+
var pkgfile = path$2.join(pkgdir, 'package.json');
|
|
23957
|
+
isFile(pkgfile, function (err, ex) {
|
|
23958
|
+
if (err) return cb(err);
|
|
23959
|
+
if (!ex) return loadAsFile(path$2.join(x, 'index'), fpkg, cb);
|
|
23960
|
+
readFile(pkgfile, function (err, body) {
|
|
23961
|
+
if (err) return cb(err);
|
|
23962
|
+
|
|
23963
|
+
try {
|
|
23964
|
+
var pkg = JSON.parse(body);
|
|
23965
|
+
} catch (jsonErr) {}
|
|
23966
|
+
|
|
23967
|
+
if (pkg && opts.packageFilter) {
|
|
23968
|
+
pkg = opts.packageFilter(pkg, pkgfile);
|
|
23969
|
+
}
|
|
23970
|
+
|
|
23971
|
+
if (pkg && pkg.main) {
|
|
23972
|
+
if (typeof pkg.main !== 'string') {
|
|
23973
|
+
var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
|
|
23974
|
+
mainError.code = 'INVALID_PACKAGE_MAIN';
|
|
23975
|
+
return cb(mainError);
|
|
23976
|
+
}
|
|
23977
|
+
|
|
23978
|
+
if (pkg.main === '.' || pkg.main === './') {
|
|
23979
|
+
pkg.main = 'index';
|
|
23980
|
+
}
|
|
23981
|
+
|
|
23982
|
+
loadAsFile(path$2.resolve(x, pkg.main), pkg, function (err, m, pkg) {
|
|
23983
|
+
if (err) return cb(err);
|
|
23984
|
+
if (m) return cb(null, m, pkg);
|
|
23985
|
+
if (!pkg) return loadAsFile(path$2.join(x, 'index'), pkg, cb);
|
|
23986
|
+
var dir = path$2.resolve(x, pkg.main);
|
|
23987
|
+
loadAsDirectory(dir, pkg, function (err, n, pkg) {
|
|
23988
|
+
if (err) return cb(err);
|
|
23989
|
+
if (n) return cb(null, n, pkg);
|
|
23990
|
+
loadAsFile(path$2.join(x, 'index'), pkg, cb);
|
|
23991
|
+
});
|
|
23992
|
+
});
|
|
23993
|
+
return;
|
|
23994
|
+
}
|
|
23995
|
+
|
|
23996
|
+
loadAsFile(path$2.join(x, '/index'), pkg, cb);
|
|
23997
|
+
});
|
|
23998
|
+
});
|
|
23999
|
+
});
|
|
24000
|
+
}
|
|
24001
|
+
|
|
24002
|
+
function processDirs(cb, dirs) {
|
|
24003
|
+
if (dirs.length === 0) return cb(null, undefined);
|
|
24004
|
+
var dir = dirs[0];
|
|
24005
|
+
isDirectory(path$2.dirname(dir), isdir);
|
|
24006
|
+
|
|
24007
|
+
function isdir(err, isdir) {
|
|
24008
|
+
if (err) return cb(err);
|
|
24009
|
+
if (!isdir) return processDirs(cb, dirs.slice(1));
|
|
24010
|
+
loadAsFile(dir, opts.package, onfile);
|
|
24011
|
+
}
|
|
24012
|
+
|
|
24013
|
+
function onfile(err, m, pkg) {
|
|
24014
|
+
if (err) return cb(err);
|
|
24015
|
+
if (m) return cb(null, m, pkg);
|
|
24016
|
+
loadAsDirectory(dir, opts.package, ondir);
|
|
24017
|
+
}
|
|
24018
|
+
|
|
24019
|
+
function ondir(err, n, pkg) {
|
|
24020
|
+
if (err) return cb(err);
|
|
24021
|
+
if (n) return cb(null, n, pkg);
|
|
24022
|
+
processDirs(cb, dirs.slice(1));
|
|
24023
|
+
}
|
|
24024
|
+
}
|
|
24025
|
+
|
|
24026
|
+
function loadNodeModules(x, start, cb) {
|
|
24027
|
+
var thunk = function () {
|
|
24028
|
+
return getPackageCandidates(x, start, opts);
|
|
24029
|
+
};
|
|
24030
|
+
|
|
24031
|
+
processDirs(cb, packageIterator ? packageIterator(x, start, thunk, opts) : thunk());
|
|
24032
|
+
}
|
|
24033
|
+
};
|
|
24034
|
+
|
|
24035
|
+
var realpath$1 = fs$3.realpathSync && typeof fs$3.realpathSync.native === 'function' ? fs$3.realpathSync.native : fs$3.realpathSync;
|
|
24036
|
+
|
|
24037
|
+
var defaultIsFile$1 = function isFile(file) {
|
|
24038
|
+
try {
|
|
24039
|
+
var stat = fs$3.statSync(file);
|
|
24040
|
+
} catch (e) {
|
|
24041
|
+
if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
|
|
24042
|
+
throw e;
|
|
24043
|
+
}
|
|
24044
|
+
|
|
24045
|
+
return stat.isFile() || stat.isFIFO();
|
|
24046
|
+
};
|
|
24047
|
+
|
|
24048
|
+
var defaultIsDir$1 = function isDirectory(dir) {
|
|
24049
|
+
try {
|
|
24050
|
+
var stat = fs$3.statSync(dir);
|
|
24051
|
+
} catch (e) {
|
|
24052
|
+
if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
|
|
24053
|
+
throw e;
|
|
24054
|
+
}
|
|
24055
|
+
|
|
24056
|
+
return stat.isDirectory();
|
|
24057
|
+
};
|
|
24058
|
+
|
|
24059
|
+
var maybeUnwrapSymlink$1 = function maybeUnwrapSymlink(x, opts) {
|
|
24060
|
+
if (opts && opts.preserveSymlinks === false) {
|
|
24061
|
+
try {
|
|
24062
|
+
return realpath$1(x);
|
|
24063
|
+
} catch (realPathErr) {
|
|
24064
|
+
if (realPathErr.code !== 'ENOENT') {
|
|
24065
|
+
throw realPathErr;
|
|
24066
|
+
}
|
|
24067
|
+
}
|
|
24068
|
+
}
|
|
24069
|
+
|
|
24070
|
+
return x;
|
|
24071
|
+
};
|
|
24072
|
+
|
|
24073
|
+
var getPackageCandidates$1 = function getPackageCandidates(x, start, opts) {
|
|
24074
|
+
var dirs = nodeModulesPaths(start, opts, x);
|
|
24075
|
+
|
|
24076
|
+
for (var i = 0; i < dirs.length; i++) {
|
|
24077
|
+
dirs[i] = path$2.join(dirs[i], x);
|
|
24078
|
+
}
|
|
24079
|
+
|
|
24080
|
+
return dirs;
|
|
24081
|
+
};
|
|
24082
|
+
|
|
24083
|
+
var sync = function resolveSync(x, options) {
|
|
24084
|
+
if (typeof x !== 'string') {
|
|
24085
|
+
throw new TypeError('Path must be a string.');
|
|
24086
|
+
}
|
|
24087
|
+
|
|
24088
|
+
var opts = normalizeOptions$2(x, options);
|
|
24089
|
+
var isFile = opts.isFile || defaultIsFile$1;
|
|
24090
|
+
var readFileSync = opts.readFileSync || fs$3.readFileSync;
|
|
24091
|
+
var isDirectory = opts.isDirectory || defaultIsDir$1;
|
|
24092
|
+
var packageIterator = opts.packageIterator;
|
|
24093
|
+
var extensions = opts.extensions || ['.js'];
|
|
24094
|
+
var basedir = opts.basedir || path$2.dirname(caller());
|
|
24095
|
+
var parent = opts.filename || basedir;
|
|
24096
|
+
opts.paths = opts.paths || []; // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
|
|
24097
|
+
|
|
24098
|
+
var absoluteStart = maybeUnwrapSymlink$1(path$2.resolve(basedir), opts);
|
|
24099
|
+
|
|
24100
|
+
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
|
|
24101
|
+
var res = path$2.resolve(absoluteStart, x);
|
|
24102
|
+
if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
|
|
24103
|
+
var m = loadAsFileSync(res) || loadAsDirectorySync(res);
|
|
24104
|
+
if (m) return maybeUnwrapSymlink$1(m, opts);
|
|
24105
|
+
} else if (isCore(x)) {
|
|
24106
|
+
return x;
|
|
24107
|
+
} else {
|
|
24108
|
+
var n = loadNodeModulesSync(x, absoluteStart);
|
|
24109
|
+
if (n) return maybeUnwrapSymlink$1(n, opts);
|
|
24110
|
+
}
|
|
24111
|
+
|
|
24112
|
+
var err = new Error("Cannot find module '" + x + "' from '" + parent + "'");
|
|
24113
|
+
err.code = 'MODULE_NOT_FOUND';
|
|
24114
|
+
throw err;
|
|
24115
|
+
|
|
24116
|
+
function loadAsFileSync(x) {
|
|
24117
|
+
var pkg = loadpkg(path$2.dirname(x));
|
|
24118
|
+
|
|
24119
|
+
if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
|
|
24120
|
+
var rfile = path$2.relative(pkg.dir, x);
|
|
24121
|
+
var r = opts.pathFilter(pkg.pkg, x, rfile);
|
|
24122
|
+
|
|
24123
|
+
if (r) {
|
|
24124
|
+
x = path$2.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign
|
|
24125
|
+
}
|
|
24126
|
+
}
|
|
24127
|
+
|
|
24128
|
+
if (isFile(x)) {
|
|
24129
|
+
return x;
|
|
24130
|
+
}
|
|
24131
|
+
|
|
24132
|
+
for (var i = 0; i < extensions.length; i++) {
|
|
24133
|
+
var file = x + extensions[i];
|
|
24134
|
+
|
|
24135
|
+
if (isFile(file)) {
|
|
24136
|
+
return file;
|
|
24137
|
+
}
|
|
24138
|
+
}
|
|
24139
|
+
}
|
|
24140
|
+
|
|
24141
|
+
function loadpkg(dir) {
|
|
24142
|
+
if (dir === '' || dir === '/') return;
|
|
24143
|
+
|
|
24144
|
+
if (process.platform === 'win32' && /^\w:[/\\]*$/.test(dir)) {
|
|
24145
|
+
return;
|
|
24146
|
+
}
|
|
24147
|
+
|
|
24148
|
+
if (/[/\\]node_modules[/\\]*$/.test(dir)) return;
|
|
24149
|
+
var pkgfile = path$2.join(maybeUnwrapSymlink$1(dir, opts), 'package.json');
|
|
24150
|
+
|
|
24151
|
+
if (!isFile(pkgfile)) {
|
|
24152
|
+
return loadpkg(path$2.dirname(dir));
|
|
24153
|
+
}
|
|
24154
|
+
|
|
24155
|
+
var body = readFileSync(pkgfile);
|
|
24156
|
+
|
|
24157
|
+
try {
|
|
24158
|
+
var pkg = JSON.parse(body);
|
|
24159
|
+
} catch (jsonErr) {}
|
|
24160
|
+
|
|
24161
|
+
if (pkg && opts.packageFilter) {
|
|
24162
|
+
// v2 will pass pkgfile
|
|
24163
|
+
pkg = opts.packageFilter(pkg,
|
|
24164
|
+
/*pkgfile,*/
|
|
24165
|
+
dir); // eslint-disable-line spaced-comment
|
|
24166
|
+
}
|
|
24167
|
+
|
|
24168
|
+
return {
|
|
24169
|
+
pkg: pkg,
|
|
24170
|
+
dir: dir
|
|
24171
|
+
};
|
|
24172
|
+
}
|
|
24173
|
+
|
|
24174
|
+
function loadAsDirectorySync(x) {
|
|
24175
|
+
var pkgfile = path$2.join(maybeUnwrapSymlink$1(x, opts), '/package.json');
|
|
24176
|
+
|
|
24177
|
+
if (isFile(pkgfile)) {
|
|
24178
|
+
try {
|
|
24179
|
+
var body = readFileSync(pkgfile, 'UTF8');
|
|
24180
|
+
var pkg = JSON.parse(body);
|
|
24181
|
+
} catch (e) {}
|
|
24182
|
+
|
|
24183
|
+
if (pkg && opts.packageFilter) {
|
|
24184
|
+
// v2 will pass pkgfile
|
|
24185
|
+
pkg = opts.packageFilter(pkg,
|
|
24186
|
+
/*pkgfile,*/
|
|
24187
|
+
x); // eslint-disable-line spaced-comment
|
|
24188
|
+
}
|
|
24189
|
+
|
|
24190
|
+
if (pkg && pkg.main) {
|
|
24191
|
+
if (typeof pkg.main !== 'string') {
|
|
24192
|
+
var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
|
|
24193
|
+
mainError.code = 'INVALID_PACKAGE_MAIN';
|
|
24194
|
+
throw mainError;
|
|
24195
|
+
}
|
|
24196
|
+
|
|
24197
|
+
if (pkg.main === '.' || pkg.main === './') {
|
|
24198
|
+
pkg.main = 'index';
|
|
24199
|
+
}
|
|
24200
|
+
|
|
24201
|
+
try {
|
|
24202
|
+
var m = loadAsFileSync(path$2.resolve(x, pkg.main));
|
|
24203
|
+
if (m) return m;
|
|
24204
|
+
var n = loadAsDirectorySync(path$2.resolve(x, pkg.main));
|
|
24205
|
+
if (n) return n;
|
|
24206
|
+
} catch (e) {}
|
|
24207
|
+
}
|
|
24208
|
+
}
|
|
24209
|
+
|
|
24210
|
+
return loadAsFileSync(path$2.join(x, '/index'));
|
|
24211
|
+
}
|
|
24212
|
+
|
|
24213
|
+
function loadNodeModulesSync(x, start) {
|
|
24214
|
+
var thunk = function () {
|
|
24215
|
+
return getPackageCandidates$1(x, start, opts);
|
|
24216
|
+
};
|
|
24217
|
+
|
|
24218
|
+
var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk();
|
|
24219
|
+
|
|
24220
|
+
for (var i = 0; i < dirs.length; i++) {
|
|
24221
|
+
var dir = dirs[i];
|
|
24222
|
+
|
|
24223
|
+
if (isDirectory(path$2.dirname(dir))) {
|
|
24224
|
+
var m = loadAsFileSync(dir);
|
|
24225
|
+
if (m) return m;
|
|
24226
|
+
var n = loadAsDirectorySync(dir);
|
|
24227
|
+
if (n) return n;
|
|
24228
|
+
}
|
|
24229
|
+
}
|
|
24230
|
+
}
|
|
24231
|
+
};
|
|
24232
|
+
|
|
24233
|
+
async.core = core_1;
|
|
24234
|
+
async.isCore = isCore;
|
|
24235
|
+
async.sync = sync;
|
|
24236
|
+
var resolve = async;
|
|
24237
|
+
|
|
24238
|
+
// eslint-disable-next-line prefer-destructuring
|
|
24239
|
+
|
|
24240
|
+
|
|
24241
|
+
let resolve$1 = require.resolve; // In the VS Code and Atom extensions `require` is overridden and `require.resolve` doesn't support the 2nd argument.
|
|
24242
|
+
|
|
24243
|
+
if (resolve$1.length === 1 || process.env.PRETTIER_FALLBACK_RESOLVE) {
|
|
24244
|
+
resolve$1 = (id, options) => {
|
|
24245
|
+
let basedir;
|
|
24246
|
+
|
|
24247
|
+
if (options && options.paths && options.paths.length === 1) {
|
|
24248
|
+
basedir = options.paths[0];
|
|
24249
|
+
}
|
|
24250
|
+
|
|
24251
|
+
return resolve.sync(id, {
|
|
24252
|
+
basedir
|
|
24253
|
+
});
|
|
24254
|
+
};
|
|
24255
|
+
}
|
|
24256
|
+
|
|
24257
|
+
var resolve_1 = resolve$1;
|
|
24258
|
+
|
|
23266
24259
|
const getExplorerMemoized = mem_1(opts => {
|
|
23267
24260
|
const cosmiconfig = thirdParty["cosmiconfig" + (opts.sync ? "Sync" : "")];
|
|
23268
24261
|
const explorer = cosmiconfig("prettier", {
|
|
@@ -23270,13 +24263,12 @@ const getExplorerMemoized = mem_1(opts => {
|
|
|
23270
24263
|
transform: result => {
|
|
23271
24264
|
if (result && result.config) {
|
|
23272
24265
|
if (typeof result.config === "string") {
|
|
23273
|
-
const dir = path$
|
|
24266
|
+
const dir = path$2.dirname(result.filepath);
|
|
23274
24267
|
|
|
23275
24268
|
try {
|
|
23276
|
-
const modulePath =
|
|
24269
|
+
const modulePath = resolve_1(result.config, {
|
|
23277
24270
|
paths: [dir]
|
|
23278
24271
|
});
|
|
23279
|
-
|
|
23280
24272
|
result.config = require(modulePath);
|
|
23281
24273
|
} catch (error) {
|
|
23282
24274
|
// Original message contains `__filename`, can't pass tests
|
|
@@ -23335,7 +24327,7 @@ function _resolveConfig(filePath, opts, sync) {
|
|
|
23335
24327
|
["plugins", "pluginSearchDirs"].forEach(optionName => {
|
|
23336
24328
|
if (Array.isArray(merged[optionName])) {
|
|
23337
24329
|
merged[optionName] = merged[optionName].map(value => typeof value === "string" && value.startsWith(".") // relative path
|
|
23338
|
-
? path$
|
|
24330
|
+
? path$2.resolve(path$2.dirname(result.filepath), value) : value);
|
|
23339
24331
|
}
|
|
23340
24332
|
});
|
|
23341
24333
|
|
|
@@ -23395,7 +24387,7 @@ function mergeOverrides(configResult, filePath) {
|
|
|
23395
24387
|
options = _objectWithoutPropertiesLoose(_ref, ["overrides"]);
|
|
23396
24388
|
|
|
23397
24389
|
if (filePath && overrides) {
|
|
23398
|
-
const relativeFilePath = path$
|
|
24390
|
+
const relativeFilePath = path$2.relative(path$2.dirname(configPath), filePath);
|
|
23399
24391
|
|
|
23400
24392
|
for (const override of overrides) {
|
|
23401
24393
|
if (pathMatchesGlobs(relativeFilePath, override.files, override.excludeFiles)) {
|
|
@@ -23510,7 +24502,7 @@ function _getFileInfo({
|
|
|
23510
24502
|
}
|
|
23511
24503
|
|
|
23512
24504
|
function normalizeFilePath(filePath, ignorePath) {
|
|
23513
|
-
return ignorePath ? path$
|
|
24505
|
+
return ignorePath ? path$2.relative(path$2.dirname(ignorePath), filePath) : filePath;
|
|
23514
24506
|
}
|
|
23515
24507
|
|
|
23516
24508
|
var getFileInfo_1 = getFileInfo;
|
|
@@ -26928,7 +27920,7 @@ var arrayUnion = (...arguments_) => {
|
|
|
26928
27920
|
*/
|
|
26929
27921
|
|
|
26930
27922
|
|
|
26931
|
-
const PassThrough = stream$
|
|
27923
|
+
const PassThrough = stream$6.PassThrough;
|
|
26932
27924
|
const slice = Array.prototype.slice;
|
|
26933
27925
|
var merge2_1 = merge2;
|
|
26934
27926
|
|
|
@@ -27077,7 +28069,7 @@ var errno = createCommonjsModule(function (module, exports) {
|
|
|
27077
28069
|
unwrapExports(errno);
|
|
27078
28070
|
var errno_1 = errno.isEnoentCodeError;
|
|
27079
28071
|
|
|
27080
|
-
var fs = createCommonjsModule(function (module, exports) {
|
|
28072
|
+
var fs$1 = createCommonjsModule(function (module, exports) {
|
|
27081
28073
|
|
|
27082
28074
|
Object.defineProperty(exports, "__esModule", {
|
|
27083
28075
|
value: true
|
|
@@ -27103,8 +28095,8 @@ var fs = createCommonjsModule(function (module, exports) {
|
|
|
27103
28095
|
|
|
27104
28096
|
exports.createDirentFromStats = createDirentFromStats;
|
|
27105
28097
|
});
|
|
27106
|
-
unwrapExports(fs);
|
|
27107
|
-
var fs_1 = fs.createDirentFromStats;
|
|
28098
|
+
unwrapExports(fs$1);
|
|
28099
|
+
var fs_1 = fs$1.createDirentFromStats;
|
|
27108
28100
|
|
|
27109
28101
|
var path_1 = createCommonjsModule(function (module, exports) {
|
|
27110
28102
|
|
|
@@ -27125,7 +28117,7 @@ var path_1 = createCommonjsModule(function (module, exports) {
|
|
|
27125
28117
|
exports.unixify = unixify;
|
|
27126
28118
|
|
|
27127
28119
|
function makeAbsolute(cwd, filepath) {
|
|
27128
|
-
return path$
|
|
28120
|
+
return path$2.resolve(cwd, filepath);
|
|
27129
28121
|
}
|
|
27130
28122
|
|
|
27131
28123
|
exports.makeAbsolute = makeAbsolute;
|
|
@@ -27232,8 +28224,8 @@ var isGlob = function isGlob(str, options) {
|
|
|
27232
28224
|
return false;
|
|
27233
28225
|
};
|
|
27234
28226
|
|
|
27235
|
-
var pathPosixDirname = path$
|
|
27236
|
-
var isWin32 = os.platform() === 'win32';
|
|
28227
|
+
var pathPosixDirname = path$2.posix.dirname;
|
|
28228
|
+
var isWin32 = os$1.platform() === 'win32';
|
|
27237
28229
|
var slash = '/';
|
|
27238
28230
|
var backslash = /\\/g;
|
|
27239
28231
|
var enclosure = /[\{\[].*[\/]*.*[\}\]]$/;
|
|
@@ -27869,7 +28861,7 @@ const toRegex = (start, end, options) => {
|
|
|
27869
28861
|
};
|
|
27870
28862
|
|
|
27871
28863
|
const rangeError = (...args) => {
|
|
27872
|
-
return new RangeError('Invalid range arguments: ' + util$
|
|
28864
|
+
return new RangeError('Invalid range arguments: ' + util$4.inspect(...args));
|
|
27873
28865
|
};
|
|
27874
28866
|
|
|
27875
28867
|
const invalidRange = (start, end, options) => {
|
|
@@ -28180,7 +29172,7 @@ const expand$1 = (ast, options = {}) => {
|
|
|
28180
29172
|
|
|
28181
29173
|
var expand_1 = expand$1;
|
|
28182
29174
|
|
|
28183
|
-
var constants$
|
|
29175
|
+
var constants$2 = {
|
|
28184
29176
|
MAX_LENGTH: 1024 * 64,
|
|
28185
29177
|
// Digits
|
|
28186
29178
|
CHAR_0: '0',
|
|
@@ -28364,12 +29356,12 @@ const {
|
|
|
28364
29356
|
/* ' */
|
|
28365
29357
|
CHAR_NO_BREAK_SPACE,
|
|
28366
29358
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE
|
|
28367
|
-
} = constants$
|
|
29359
|
+
} = constants$2;
|
|
28368
29360
|
/**
|
|
28369
29361
|
* parse
|
|
28370
29362
|
*/
|
|
28371
29363
|
|
|
28372
|
-
const parse$
|
|
29364
|
+
const parse$3 = (input, options = {}) => {
|
|
28373
29365
|
if (typeof input !== 'string') {
|
|
28374
29366
|
throw new TypeError('Expected a string');
|
|
28375
29367
|
}
|
|
@@ -28719,7 +29711,7 @@ const parse$2 = (input, options = {}) => {
|
|
|
28719
29711
|
return ast;
|
|
28720
29712
|
};
|
|
28721
29713
|
|
|
28722
|
-
var parse_1 = parse$
|
|
29714
|
+
var parse_1 = parse$3;
|
|
28723
29715
|
|
|
28724
29716
|
/**
|
|
28725
29717
|
* Expand the given pattern or create a regex-compatible string.
|
|
@@ -28962,7 +29954,7 @@ const POSIX_REGEX_SOURCE = {
|
|
|
28962
29954
|
word: 'A-Za-z0-9_',
|
|
28963
29955
|
xdigit: 'A-Fa-f0-9'
|
|
28964
29956
|
};
|
|
28965
|
-
var constants$
|
|
29957
|
+
var constants$3 = {
|
|
28966
29958
|
MAX_LENGTH: 1024 * 64,
|
|
28967
29959
|
POSIX_REGEX_SOURCE,
|
|
28968
29960
|
// regular expressions
|
|
@@ -29110,7 +30102,7 @@ var constants$2 = {
|
|
|
29110
30102
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
29111
30103
|
|
|
29112
30104
|
/* \uFEFF */
|
|
29113
|
-
SEP: path$
|
|
30105
|
+
SEP: path$2.sep,
|
|
29114
30106
|
|
|
29115
30107
|
/**
|
|
29116
30108
|
* Create EXTGLOB_CHARS
|
|
@@ -29162,7 +30154,7 @@ var utils$3 = createCommonjsModule(function (module, exports) {
|
|
|
29162
30154
|
REGEX_REMOVE_BACKSLASH,
|
|
29163
30155
|
REGEX_SPECIAL_CHARS,
|
|
29164
30156
|
REGEX_SPECIAL_CHARS_GLOBAL
|
|
29165
|
-
} = constants$
|
|
30157
|
+
} = constants$3;
|
|
29166
30158
|
|
|
29167
30159
|
exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
|
29168
30160
|
|
|
@@ -29195,7 +30187,7 @@ var utils$3 = createCommonjsModule(function (module, exports) {
|
|
|
29195
30187
|
return options.windows;
|
|
29196
30188
|
}
|
|
29197
30189
|
|
|
29198
|
-
return win32 === true || path$
|
|
30190
|
+
return win32 === true || path$2.sep === '\\';
|
|
29199
30191
|
};
|
|
29200
30192
|
|
|
29201
30193
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
@@ -29286,7 +30278,7 @@ const {
|
|
|
29286
30278
|
CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET$1
|
|
29287
30279
|
/* ] */
|
|
29288
30280
|
|
|
29289
|
-
} = constants$
|
|
30281
|
+
} = constants$3;
|
|
29290
30282
|
|
|
29291
30283
|
const isPathSeparator = code => {
|
|
29292
30284
|
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
|
|
@@ -29678,7 +30670,7 @@ const {
|
|
|
29678
30670
|
REGEX_NON_SPECIAL_CHARS,
|
|
29679
30671
|
REGEX_SPECIAL_CHARS_BACKREF,
|
|
29680
30672
|
REPLACEMENTS
|
|
29681
|
-
} = constants$
|
|
30673
|
+
} = constants$3;
|
|
29682
30674
|
/**
|
|
29683
30675
|
* Helpers
|
|
29684
30676
|
*/
|
|
@@ -29716,7 +30708,7 @@ const syntaxError = (type, char) => {
|
|
|
29716
30708
|
*/
|
|
29717
30709
|
|
|
29718
30710
|
|
|
29719
|
-
const parse$
|
|
30711
|
+
const parse$4 = (input, options) => {
|
|
29720
30712
|
if (typeof input !== 'string') {
|
|
29721
30713
|
throw new TypeError('Expected a string');
|
|
29722
30714
|
}
|
|
@@ -29739,8 +30731,8 @@ const parse$3 = (input, options) => {
|
|
|
29739
30731
|
const capture = opts.capture ? '' : '?:';
|
|
29740
30732
|
const win32 = utils$3.isWindows(options); // create constants based on platform, for windows or posix
|
|
29741
30733
|
|
|
29742
|
-
const PLATFORM_CHARS = constants$
|
|
29743
|
-
const EXTGLOB_CHARS = constants$
|
|
30734
|
+
const PLATFORM_CHARS = constants$3.globChars(win32);
|
|
30735
|
+
const EXTGLOB_CHARS = constants$3.extglobChars(PLATFORM_CHARS);
|
|
29744
30736
|
const {
|
|
29745
30737
|
DOT_LITERAL,
|
|
29746
30738
|
PLUS_LITERAL,
|
|
@@ -30796,7 +31788,7 @@ const parse$3 = (input, options) => {
|
|
|
30796
31788
|
*/
|
|
30797
31789
|
|
|
30798
31790
|
|
|
30799
|
-
parse$
|
|
31791
|
+
parse$4.fastpaths = (input, options) => {
|
|
30800
31792
|
const opts = Object.assign({}, options);
|
|
30801
31793
|
const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH$3, opts.maxLength) : MAX_LENGTH$3;
|
|
30802
31794
|
const len = input.length;
|
|
@@ -30818,7 +31810,7 @@ parse$3.fastpaths = (input, options) => {
|
|
|
30818
31810
|
NO_DOTS_SLASH,
|
|
30819
31811
|
STAR,
|
|
30820
31812
|
START_ANCHOR
|
|
30821
|
-
} = constants$
|
|
31813
|
+
} = constants$3.globChars(win32);
|
|
30822
31814
|
const nodot = opts.dot ? NO_DOTS : NO_DOT;
|
|
30823
31815
|
const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
|
|
30824
31816
|
const capture = opts.capture ? '' : '?:';
|
|
@@ -30884,7 +31876,7 @@ parse$3.fastpaths = (input, options) => {
|
|
|
30884
31876
|
return source;
|
|
30885
31877
|
};
|
|
30886
31878
|
|
|
30887
|
-
var parse_1$1 = parse$
|
|
31879
|
+
var parse_1$1 = parse$4;
|
|
30888
31880
|
|
|
30889
31881
|
const isObject$2 = val => val && typeof val === 'object' && !Array.isArray(val);
|
|
30890
31882
|
/**
|
|
@@ -31074,7 +32066,7 @@ picomatch.test = (input, regex, options, {
|
|
|
31074
32066
|
|
|
31075
32067
|
picomatch.matchBase = (input, glob, options, posix = utils$3.isWindows(options)) => {
|
|
31076
32068
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
31077
|
-
return regex.test(path$
|
|
32069
|
+
return regex.test(path$2.basename(input));
|
|
31078
32070
|
};
|
|
31079
32071
|
/**
|
|
31080
32072
|
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|
|
@@ -31249,7 +32241,7 @@ picomatch.toRegex = (source, options) => {
|
|
|
31249
32241
|
*/
|
|
31250
32242
|
|
|
31251
32243
|
|
|
31252
|
-
picomatch.constants = constants$
|
|
32244
|
+
picomatch.constants = constants$3;
|
|
31253
32245
|
/**
|
|
31254
32246
|
* Expose "picomatch"
|
|
31255
32247
|
*/
|
|
@@ -31443,7 +32435,7 @@ micromatch.not = (list, patterns, options = {}) => {
|
|
|
31443
32435
|
|
|
31444
32436
|
micromatch.contains = (str, pattern, options) => {
|
|
31445
32437
|
if (typeof str !== 'string') {
|
|
31446
|
-
throw new TypeError(`Expected a string: "${util$
|
|
32438
|
+
throw new TypeError(`Expected a string: "${util$4.inspect(str)}"`);
|
|
31447
32439
|
}
|
|
31448
32440
|
|
|
31449
32441
|
if (Array.isArray(pattern)) {
|
|
@@ -31598,7 +32590,7 @@ micromatch.every = (list, patterns, options) => {
|
|
|
31598
32590
|
|
|
31599
32591
|
micromatch.all = (str, patterns, options) => {
|
|
31600
32592
|
if (typeof str !== 'string') {
|
|
31601
|
-
throw new TypeError(`Expected a string: "${util$
|
|
32593
|
+
throw new TypeError(`Expected a string: "${util$4.inspect(str)}"`);
|
|
31602
32594
|
}
|
|
31603
32595
|
|
|
31604
32596
|
return [].concat(patterns).every(p => picomatch$1(p, options)(str));
|
|
@@ -31841,7 +32833,7 @@ var pattern = createCommonjsModule(function (module, exports) {
|
|
|
31841
32833
|
exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
31842
32834
|
|
|
31843
32835
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
31844
|
-
const basename = path$
|
|
32836
|
+
const basename = path$2.basename(pattern);
|
|
31845
32837
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
31846
32838
|
}
|
|
31847
32839
|
|
|
@@ -31916,7 +32908,7 @@ var pattern_16 = pattern.makeRe;
|
|
|
31916
32908
|
var pattern_17 = pattern.convertPatternsToRe;
|
|
31917
32909
|
var pattern_18 = pattern.matchAny;
|
|
31918
32910
|
|
|
31919
|
-
var stream = createCommonjsModule(function (module, exports) {
|
|
32911
|
+
var stream$1 = createCommonjsModule(function (module, exports) {
|
|
31920
32912
|
|
|
31921
32913
|
Object.defineProperty(exports, "__esModule", {
|
|
31922
32914
|
value: true
|
|
@@ -31938,8 +32930,8 @@ var stream = createCommonjsModule(function (module, exports) {
|
|
|
31938
32930
|
streams.forEach(stream => stream.emit('close'));
|
|
31939
32931
|
}
|
|
31940
32932
|
});
|
|
31941
|
-
unwrapExports(stream);
|
|
31942
|
-
var stream_1 = stream.merge;
|
|
32933
|
+
unwrapExports(stream$1);
|
|
32934
|
+
var stream_1 = stream$1.merge;
|
|
31943
32935
|
|
|
31944
32936
|
var string$1 = createCommonjsModule(function (module, exports) {
|
|
31945
32937
|
|
|
@@ -31970,10 +32962,10 @@ var utils$4 = createCommonjsModule(function (module, exports) {
|
|
|
31970
32962
|
});
|
|
31971
32963
|
exports.array = array$2;
|
|
31972
32964
|
exports.errno = errno;
|
|
31973
|
-
exports.fs = fs;
|
|
32965
|
+
exports.fs = fs$1;
|
|
31974
32966
|
exports.path = path_1;
|
|
31975
32967
|
exports.pattern = pattern;
|
|
31976
|
-
exports.stream = stream;
|
|
32968
|
+
exports.stream = stream$1;
|
|
31977
32969
|
exports.string = string$1;
|
|
31978
32970
|
});
|
|
31979
32971
|
unwrapExports(utils$4);
|
|
@@ -32081,7 +33073,7 @@ var tasks_5 = tasks.groupPatternsByBaseDirectory;
|
|
|
32081
33073
|
var tasks_6 = tasks.convertPatternGroupsToTasks;
|
|
32082
33074
|
var tasks_7 = tasks.convertPatternGroupToTask;
|
|
32083
33075
|
|
|
32084
|
-
var async = createCommonjsModule(function (module, exports) {
|
|
33076
|
+
var async$1 = createCommonjsModule(function (module, exports) {
|
|
32085
33077
|
|
|
32086
33078
|
Object.defineProperty(exports, "__esModule", {
|
|
32087
33079
|
value: true
|
|
@@ -32125,10 +33117,10 @@ var async = createCommonjsModule(function (module, exports) {
|
|
|
32125
33117
|
callback(null, result);
|
|
32126
33118
|
}
|
|
32127
33119
|
});
|
|
32128
|
-
unwrapExports(async);
|
|
32129
|
-
var async_1 = async.read;
|
|
33120
|
+
unwrapExports(async$1);
|
|
33121
|
+
var async_1 = async$1.read;
|
|
32130
33122
|
|
|
32131
|
-
var sync = createCommonjsModule(function (module, exports) {
|
|
33123
|
+
var sync$1 = createCommonjsModule(function (module, exports) {
|
|
32132
33124
|
|
|
32133
33125
|
Object.defineProperty(exports, "__esModule", {
|
|
32134
33126
|
value: true
|
|
@@ -32160,8 +33152,8 @@ var sync = createCommonjsModule(function (module, exports) {
|
|
|
32160
33152
|
|
|
32161
33153
|
exports.read = read;
|
|
32162
33154
|
});
|
|
32163
|
-
unwrapExports(sync);
|
|
32164
|
-
var sync_1 = sync.read;
|
|
33155
|
+
unwrapExports(sync$1);
|
|
33156
|
+
var sync_1 = sync$1.read;
|
|
32165
33157
|
|
|
32166
33158
|
var fs_1$1 = createCommonjsModule(function (module, exports) {
|
|
32167
33159
|
|
|
@@ -32169,10 +33161,10 @@ var fs_1$1 = createCommonjsModule(function (module, exports) {
|
|
|
32169
33161
|
value: true
|
|
32170
33162
|
});
|
|
32171
33163
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
32172
|
-
lstat: fs$
|
|
32173
|
-
stat: fs$
|
|
32174
|
-
lstatSync: fs$
|
|
32175
|
-
statSync: fs$
|
|
33164
|
+
lstat: fs$3.lstat,
|
|
33165
|
+
stat: fs$3.stat,
|
|
33166
|
+
lstatSync: fs$3.lstatSync,
|
|
33167
|
+
statSync: fs$3.statSync
|
|
32176
33168
|
};
|
|
32177
33169
|
|
|
32178
33170
|
function createFileSystemAdapter(fsMethods) {
|
|
@@ -32223,17 +33215,17 @@ var out = createCommonjsModule(function (module, exports) {
|
|
|
32223
33215
|
|
|
32224
33216
|
function stat(path, optionsOrSettingsOrCallback, callback) {
|
|
32225
33217
|
if (typeof optionsOrSettingsOrCallback === 'function') {
|
|
32226
|
-
return async.read(path, getSettings(), optionsOrSettingsOrCallback);
|
|
33218
|
+
return async$1.read(path, getSettings(), optionsOrSettingsOrCallback);
|
|
32227
33219
|
}
|
|
32228
33220
|
|
|
32229
|
-
async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
|
|
33221
|
+
async$1.read(path, getSettings(optionsOrSettingsOrCallback), callback);
|
|
32230
33222
|
}
|
|
32231
33223
|
|
|
32232
33224
|
exports.stat = stat;
|
|
32233
33225
|
|
|
32234
33226
|
function statSync(path, optionsOrSettings) {
|
|
32235
33227
|
const settings = getSettings(optionsOrSettings);
|
|
32236
|
-
return sync.read(path, settings);
|
|
33228
|
+
return sync$1.read(path, settings);
|
|
32237
33229
|
}
|
|
32238
33230
|
|
|
32239
33231
|
exports.statSync = statSync;
|
|
@@ -32305,7 +33297,7 @@ function runParallel(tasks, cb) {
|
|
|
32305
33297
|
isSync = false;
|
|
32306
33298
|
}
|
|
32307
33299
|
|
|
32308
|
-
var constants$
|
|
33300
|
+
var constants$4 = createCommonjsModule(function (module, exports) {
|
|
32309
33301
|
|
|
32310
33302
|
Object.defineProperty(exports, "__esModule", {
|
|
32311
33303
|
value: true
|
|
@@ -32323,10 +33315,10 @@ var constants$3 = createCommonjsModule(function (module, exports) {
|
|
|
32323
33315
|
|
|
32324
33316
|
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
|
|
32325
33317
|
});
|
|
32326
|
-
unwrapExports(constants$
|
|
32327
|
-
var constants_1 = constants$
|
|
33318
|
+
unwrapExports(constants$4);
|
|
33319
|
+
var constants_1 = constants$4.IS_SUPPORT_READDIR_WITH_FILE_TYPES;
|
|
32328
33320
|
|
|
32329
|
-
var fs$
|
|
33321
|
+
var fs$2 = createCommonjsModule(function (module, exports) {
|
|
32330
33322
|
|
|
32331
33323
|
Object.defineProperty(exports, "__esModule", {
|
|
32332
33324
|
value: true
|
|
@@ -32352,27 +33344,27 @@ var fs$1 = createCommonjsModule(function (module, exports) {
|
|
|
32352
33344
|
|
|
32353
33345
|
exports.createDirentFromStats = createDirentFromStats;
|
|
32354
33346
|
});
|
|
32355
|
-
unwrapExports(fs$
|
|
32356
|
-
var fs_1$2 = fs$
|
|
33347
|
+
unwrapExports(fs$2);
|
|
33348
|
+
var fs_1$2 = fs$2.createDirentFromStats;
|
|
32357
33349
|
|
|
32358
33350
|
var utils$5 = createCommonjsModule(function (module, exports) {
|
|
32359
33351
|
|
|
32360
33352
|
Object.defineProperty(exports, "__esModule", {
|
|
32361
33353
|
value: true
|
|
32362
33354
|
});
|
|
32363
|
-
exports.fs = fs$
|
|
33355
|
+
exports.fs = fs$2;
|
|
32364
33356
|
});
|
|
32365
33357
|
unwrapExports(utils$5);
|
|
32366
33358
|
var utils_1$5 = utils$5.fs;
|
|
32367
33359
|
|
|
32368
|
-
var async$
|
|
33360
|
+
var async$2 = createCommonjsModule(function (module, exports) {
|
|
32369
33361
|
|
|
32370
33362
|
Object.defineProperty(exports, "__esModule", {
|
|
32371
33363
|
value: true
|
|
32372
33364
|
});
|
|
32373
33365
|
|
|
32374
33366
|
function read(directory, settings, callback) {
|
|
32375
|
-
if (!settings.stats && constants$
|
|
33367
|
+
if (!settings.stats && constants$4.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
32376
33368
|
return readdirWithFileTypes(directory, settings, callback);
|
|
32377
33369
|
}
|
|
32378
33370
|
|
|
@@ -32478,19 +33470,19 @@ var async$1 = createCommonjsModule(function (module, exports) {
|
|
|
32478
33470
|
callback(null, result);
|
|
32479
33471
|
}
|
|
32480
33472
|
});
|
|
32481
|
-
unwrapExports(async$
|
|
32482
|
-
var async_1$1 = async$
|
|
32483
|
-
var async_2 = async$
|
|
32484
|
-
var async_3 = async$
|
|
33473
|
+
unwrapExports(async$2);
|
|
33474
|
+
var async_1$1 = async$2.read;
|
|
33475
|
+
var async_2 = async$2.readdirWithFileTypes;
|
|
33476
|
+
var async_3 = async$2.readdir;
|
|
32485
33477
|
|
|
32486
|
-
var sync$
|
|
33478
|
+
var sync$2 = createCommonjsModule(function (module, exports) {
|
|
32487
33479
|
|
|
32488
33480
|
Object.defineProperty(exports, "__esModule", {
|
|
32489
33481
|
value: true
|
|
32490
33482
|
});
|
|
32491
33483
|
|
|
32492
33484
|
function read(directory, settings) {
|
|
32493
|
-
if (!settings.stats && constants$
|
|
33485
|
+
if (!settings.stats && constants$4.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
32494
33486
|
return readdirWithFileTypes(directory, settings);
|
|
32495
33487
|
}
|
|
32496
33488
|
|
|
@@ -32548,10 +33540,10 @@ var sync$1 = createCommonjsModule(function (module, exports) {
|
|
|
32548
33540
|
|
|
32549
33541
|
exports.readdir = readdir;
|
|
32550
33542
|
});
|
|
32551
|
-
unwrapExports(sync$
|
|
32552
|
-
var sync_1$1 = sync$
|
|
32553
|
-
var sync_2 = sync$
|
|
32554
|
-
var sync_3 = sync$
|
|
33543
|
+
unwrapExports(sync$2);
|
|
33544
|
+
var sync_1$1 = sync$2.read;
|
|
33545
|
+
var sync_2 = sync$2.readdirWithFileTypes;
|
|
33546
|
+
var sync_3 = sync$2.readdir;
|
|
32555
33547
|
|
|
32556
33548
|
var fs_1$3 = createCommonjsModule(function (module, exports) {
|
|
32557
33549
|
|
|
@@ -32559,12 +33551,12 @@ var fs_1$3 = createCommonjsModule(function (module, exports) {
|
|
|
32559
33551
|
value: true
|
|
32560
33552
|
});
|
|
32561
33553
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
32562
|
-
lstat: fs$
|
|
32563
|
-
stat: fs$
|
|
32564
|
-
lstatSync: fs$
|
|
32565
|
-
statSync: fs$
|
|
32566
|
-
readdir: fs$
|
|
32567
|
-
readdirSync: fs$
|
|
33554
|
+
lstat: fs$3.lstat,
|
|
33555
|
+
stat: fs$3.stat,
|
|
33556
|
+
lstatSync: fs$3.lstatSync,
|
|
33557
|
+
statSync: fs$3.statSync,
|
|
33558
|
+
readdir: fs$3.readdir,
|
|
33559
|
+
readdirSync: fs$3.readdirSync
|
|
32568
33560
|
};
|
|
32569
33561
|
|
|
32570
33562
|
function createFileSystemAdapter(fsMethods) {
|
|
@@ -32592,7 +33584,7 @@ var settings$1 = createCommonjsModule(function (module, exports) {
|
|
|
32592
33584
|
this._options = _options;
|
|
32593
33585
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
32594
33586
|
this.fs = fs_1$3.createFileSystemAdapter(this._options.fs);
|
|
32595
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$
|
|
33587
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$2.sep);
|
|
32596
33588
|
this.stats = this._getValue(this._options.stats, false);
|
|
32597
33589
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
32598
33590
|
this.fsStatSettings = new out.Settings({
|
|
@@ -32621,17 +33613,17 @@ var out$1 = createCommonjsModule(function (module, exports) {
|
|
|
32621
33613
|
|
|
32622
33614
|
function scandir(path, optionsOrSettingsOrCallback, callback) {
|
|
32623
33615
|
if (typeof optionsOrSettingsOrCallback === 'function') {
|
|
32624
|
-
return async$
|
|
33616
|
+
return async$2.read(path, getSettings(), optionsOrSettingsOrCallback);
|
|
32625
33617
|
}
|
|
32626
33618
|
|
|
32627
|
-
async$
|
|
33619
|
+
async$2.read(path, getSettings(optionsOrSettingsOrCallback), callback);
|
|
32628
33620
|
}
|
|
32629
33621
|
|
|
32630
33622
|
exports.scandir = scandir;
|
|
32631
33623
|
|
|
32632
33624
|
function scandirSync(path, optionsOrSettings) {
|
|
32633
33625
|
const settings = getSettings(optionsOrSettings);
|
|
32634
|
-
return sync$
|
|
33626
|
+
return sync$2.read(path, settings);
|
|
32635
33627
|
}
|
|
32636
33628
|
|
|
32637
33629
|
exports.scandirSync = scandirSync;
|
|
@@ -32913,7 +33905,7 @@ var reader = createCommonjsModule(function (module, exports) {
|
|
|
32913
33905
|
});
|
|
32914
33906
|
unwrapExports(reader);
|
|
32915
33907
|
|
|
32916
|
-
var async$
|
|
33908
|
+
var async$3 = createCommonjsModule(function (module, exports) {
|
|
32917
33909
|
|
|
32918
33910
|
Object.defineProperty(exports, "__esModule", {
|
|
32919
33911
|
value: true
|
|
@@ -32924,7 +33916,7 @@ var async$2 = createCommonjsModule(function (module, exports) {
|
|
|
32924
33916
|
super(_root, _settings);
|
|
32925
33917
|
this._settings = _settings;
|
|
32926
33918
|
this._scandir = out$1.scandir;
|
|
32927
|
-
this._emitter = new events.EventEmitter();
|
|
33919
|
+
this._emitter = new events$1.EventEmitter();
|
|
32928
33920
|
this._queue = queue(this._worker.bind(this), this._settings.concurrency);
|
|
32929
33921
|
this._isFatalError = false;
|
|
32930
33922
|
this._isDestroyed = false;
|
|
@@ -33033,9 +34025,9 @@ var async$2 = createCommonjsModule(function (module, exports) {
|
|
|
33033
34025
|
|
|
33034
34026
|
exports.default = AsyncReader;
|
|
33035
34027
|
});
|
|
33036
|
-
unwrapExports(async$
|
|
34028
|
+
unwrapExports(async$3);
|
|
33037
34029
|
|
|
33038
|
-
var async$
|
|
34030
|
+
var async$4 = createCommonjsModule(function (module, exports) {
|
|
33039
34031
|
|
|
33040
34032
|
Object.defineProperty(exports, "__esModule", {
|
|
33041
34033
|
value: true
|
|
@@ -33045,7 +34037,7 @@ var async$3 = createCommonjsModule(function (module, exports) {
|
|
|
33045
34037
|
constructor(_root, _settings) {
|
|
33046
34038
|
this._root = _root;
|
|
33047
34039
|
this._settings = _settings;
|
|
33048
|
-
this._reader = new async$
|
|
34040
|
+
this._reader = new async$3.default(this._root, this._settings);
|
|
33049
34041
|
this._storage = new Set();
|
|
33050
34042
|
}
|
|
33051
34043
|
|
|
@@ -33077,9 +34069,9 @@ var async$3 = createCommonjsModule(function (module, exports) {
|
|
|
33077
34069
|
callback(null, entries);
|
|
33078
34070
|
}
|
|
33079
34071
|
});
|
|
33080
|
-
unwrapExports(async$
|
|
34072
|
+
unwrapExports(async$4);
|
|
33081
34073
|
|
|
33082
|
-
var stream$
|
|
34074
|
+
var stream$2 = createCommonjsModule(function (module, exports) {
|
|
33083
34075
|
|
|
33084
34076
|
Object.defineProperty(exports, "__esModule", {
|
|
33085
34077
|
value: true
|
|
@@ -33089,8 +34081,8 @@ var stream$1 = createCommonjsModule(function (module, exports) {
|
|
|
33089
34081
|
constructor(_root, _settings) {
|
|
33090
34082
|
this._root = _root;
|
|
33091
34083
|
this._settings = _settings;
|
|
33092
|
-
this._reader = new async$
|
|
33093
|
-
this._stream = new stream$
|
|
34084
|
+
this._reader = new async$3.default(this._root, this._settings);
|
|
34085
|
+
this._stream = new stream$6.Readable({
|
|
33094
34086
|
objectMode: true,
|
|
33095
34087
|
read: () => {},
|
|
33096
34088
|
destroy: this._reader.destroy.bind(this._reader)
|
|
@@ -33119,9 +34111,9 @@ var stream$1 = createCommonjsModule(function (module, exports) {
|
|
|
33119
34111
|
|
|
33120
34112
|
exports.default = StreamProvider;
|
|
33121
34113
|
});
|
|
33122
|
-
unwrapExports(stream$
|
|
34114
|
+
unwrapExports(stream$2);
|
|
33123
34115
|
|
|
33124
|
-
var sync$
|
|
34116
|
+
var sync$3 = createCommonjsModule(function (module, exports) {
|
|
33125
34117
|
|
|
33126
34118
|
Object.defineProperty(exports, "__esModule", {
|
|
33127
34119
|
value: true
|
|
@@ -33200,9 +34192,9 @@ var sync$2 = createCommonjsModule(function (module, exports) {
|
|
|
33200
34192
|
|
|
33201
34193
|
exports.default = SyncReader;
|
|
33202
34194
|
});
|
|
33203
|
-
unwrapExports(sync$
|
|
34195
|
+
unwrapExports(sync$3);
|
|
33204
34196
|
|
|
33205
|
-
var sync$
|
|
34197
|
+
var sync$4 = createCommonjsModule(function (module, exports) {
|
|
33206
34198
|
|
|
33207
34199
|
Object.defineProperty(exports, "__esModule", {
|
|
33208
34200
|
value: true
|
|
@@ -33212,7 +34204,7 @@ var sync$3 = createCommonjsModule(function (module, exports) {
|
|
|
33212
34204
|
constructor(_root, _settings) {
|
|
33213
34205
|
this._root = _root;
|
|
33214
34206
|
this._settings = _settings;
|
|
33215
|
-
this._reader = new sync$
|
|
34207
|
+
this._reader = new sync$3.default(this._root, this._settings);
|
|
33216
34208
|
}
|
|
33217
34209
|
|
|
33218
34210
|
read() {
|
|
@@ -33223,7 +34215,7 @@ var sync$3 = createCommonjsModule(function (module, exports) {
|
|
|
33223
34215
|
|
|
33224
34216
|
exports.default = SyncProvider;
|
|
33225
34217
|
});
|
|
33226
|
-
unwrapExports(sync$
|
|
34218
|
+
unwrapExports(sync$4);
|
|
33227
34219
|
|
|
33228
34220
|
var settings$2 = createCommonjsModule(function (module, exports) {
|
|
33229
34221
|
|
|
@@ -33239,7 +34231,7 @@ var settings$2 = createCommonjsModule(function (module, exports) {
|
|
|
33239
34231
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
33240
34232
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
33241
34233
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
33242
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$
|
|
34234
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$2.sep);
|
|
33243
34235
|
this.fsScandirSettings = new out$1.Settings({
|
|
33244
34236
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
33245
34237
|
fs: this._options.fs,
|
|
@@ -33268,17 +34260,17 @@ var out$2 = createCommonjsModule(function (module, exports) {
|
|
|
33268
34260
|
|
|
33269
34261
|
function walk(directory, optionsOrSettingsOrCallback, callback) {
|
|
33270
34262
|
if (typeof optionsOrSettingsOrCallback === 'function') {
|
|
33271
|
-
return new async$
|
|
34263
|
+
return new async$4.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
|
|
33272
34264
|
}
|
|
33273
34265
|
|
|
33274
|
-
new async$
|
|
34266
|
+
new async$4.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
|
|
33275
34267
|
}
|
|
33276
34268
|
|
|
33277
34269
|
exports.walk = walk;
|
|
33278
34270
|
|
|
33279
34271
|
function walkSync(directory, optionsOrSettings) {
|
|
33280
34272
|
const settings = getSettings(optionsOrSettings);
|
|
33281
|
-
const provider = new sync$
|
|
34273
|
+
const provider = new sync$4.default(directory, settings);
|
|
33282
34274
|
return provider.read();
|
|
33283
34275
|
}
|
|
33284
34276
|
|
|
@@ -33286,7 +34278,7 @@ var out$2 = createCommonjsModule(function (module, exports) {
|
|
|
33286
34278
|
|
|
33287
34279
|
function walkStream(directory, optionsOrSettings) {
|
|
33288
34280
|
const settings = getSettings(optionsOrSettings);
|
|
33289
|
-
const provider = new stream$
|
|
34281
|
+
const provider = new stream$2.default(directory, settings);
|
|
33290
34282
|
return provider.read();
|
|
33291
34283
|
}
|
|
33292
34284
|
|
|
@@ -33323,7 +34315,7 @@ var reader$1 = createCommonjsModule(function (module, exports) {
|
|
|
33323
34315
|
}
|
|
33324
34316
|
|
|
33325
34317
|
_getFullEntryPath(filepath) {
|
|
33326
|
-
return path$
|
|
34318
|
+
return path$2.resolve(this._settings.cwd, filepath);
|
|
33327
34319
|
}
|
|
33328
34320
|
|
|
33329
34321
|
_makeEntry(stats, pattern) {
|
|
@@ -33350,7 +34342,7 @@ var reader$1 = createCommonjsModule(function (module, exports) {
|
|
|
33350
34342
|
});
|
|
33351
34343
|
unwrapExports(reader$1);
|
|
33352
34344
|
|
|
33353
|
-
var stream$
|
|
34345
|
+
var stream$3 = createCommonjsModule(function (module, exports) {
|
|
33354
34346
|
|
|
33355
34347
|
Object.defineProperty(exports, "__esModule", {
|
|
33356
34348
|
value: true
|
|
@@ -33369,7 +34361,7 @@ var stream$2 = createCommonjsModule(function (module, exports) {
|
|
|
33369
34361
|
|
|
33370
34362
|
static(patterns, options) {
|
|
33371
34363
|
const filepaths = patterns.map(this._getFullEntryPath, this);
|
|
33372
|
-
const stream = new stream$
|
|
34364
|
+
const stream = new stream$6.PassThrough({
|
|
33373
34365
|
objectMode: true
|
|
33374
34366
|
});
|
|
33375
34367
|
|
|
@@ -33416,7 +34408,7 @@ var stream$2 = createCommonjsModule(function (module, exports) {
|
|
|
33416
34408
|
|
|
33417
34409
|
exports.default = ReaderStream;
|
|
33418
34410
|
});
|
|
33419
|
-
unwrapExports(stream$
|
|
34411
|
+
unwrapExports(stream$3);
|
|
33420
34412
|
|
|
33421
34413
|
var matcher = createCommonjsModule(function (module, exports) {
|
|
33422
34414
|
|
|
@@ -33776,7 +34768,7 @@ var provider = createCommonjsModule(function (module, exports) {
|
|
|
33776
34768
|
}
|
|
33777
34769
|
|
|
33778
34770
|
_getRootDirectory(task) {
|
|
33779
|
-
return path$
|
|
34771
|
+
return path$2.resolve(this._settings.cwd, task.base);
|
|
33780
34772
|
}
|
|
33781
34773
|
|
|
33782
34774
|
_getReaderOptions(task) {
|
|
@@ -33815,7 +34807,7 @@ var provider = createCommonjsModule(function (module, exports) {
|
|
|
33815
34807
|
});
|
|
33816
34808
|
unwrapExports(provider);
|
|
33817
34809
|
|
|
33818
|
-
var async$
|
|
34810
|
+
var async$5 = createCommonjsModule(function (module, exports) {
|
|
33819
34811
|
|
|
33820
34812
|
Object.defineProperty(exports, "__esModule", {
|
|
33821
34813
|
value: true
|
|
@@ -33824,7 +34816,7 @@ var async$4 = createCommonjsModule(function (module, exports) {
|
|
|
33824
34816
|
class ProviderAsync extends provider.default {
|
|
33825
34817
|
constructor() {
|
|
33826
34818
|
super(...arguments);
|
|
33827
|
-
this._reader = new stream$
|
|
34819
|
+
this._reader = new stream$3.default(this._settings);
|
|
33828
34820
|
}
|
|
33829
34821
|
|
|
33830
34822
|
read(task) {
|
|
@@ -33853,9 +34845,9 @@ var async$4 = createCommonjsModule(function (module, exports) {
|
|
|
33853
34845
|
|
|
33854
34846
|
exports.default = ProviderAsync;
|
|
33855
34847
|
});
|
|
33856
|
-
unwrapExports(async$
|
|
34848
|
+
unwrapExports(async$5);
|
|
33857
34849
|
|
|
33858
|
-
var stream$
|
|
34850
|
+
var stream$4 = createCommonjsModule(function (module, exports) {
|
|
33859
34851
|
|
|
33860
34852
|
Object.defineProperty(exports, "__esModule", {
|
|
33861
34853
|
value: true
|
|
@@ -33864,7 +34856,7 @@ var stream$3 = createCommonjsModule(function (module, exports) {
|
|
|
33864
34856
|
class ProviderStream extends provider.default {
|
|
33865
34857
|
constructor() {
|
|
33866
34858
|
super(...arguments);
|
|
33867
|
-
this._reader = new stream$
|
|
34859
|
+
this._reader = new stream$3.default(this._settings);
|
|
33868
34860
|
}
|
|
33869
34861
|
|
|
33870
34862
|
read(task) {
|
|
@@ -33873,7 +34865,7 @@ var stream$3 = createCommonjsModule(function (module, exports) {
|
|
|
33873
34865
|
const options = this._getReaderOptions(task);
|
|
33874
34866
|
|
|
33875
34867
|
const source = this.api(root, task, options);
|
|
33876
|
-
const destination = new stream$
|
|
34868
|
+
const destination = new stream$6.Readable({
|
|
33877
34869
|
objectMode: true,
|
|
33878
34870
|
read: () => {}
|
|
33879
34871
|
});
|
|
@@ -33894,9 +34886,9 @@ var stream$3 = createCommonjsModule(function (module, exports) {
|
|
|
33894
34886
|
|
|
33895
34887
|
exports.default = ProviderStream;
|
|
33896
34888
|
});
|
|
33897
|
-
unwrapExports(stream$
|
|
34889
|
+
unwrapExports(stream$4);
|
|
33898
34890
|
|
|
33899
|
-
var sync$
|
|
34891
|
+
var sync$5 = createCommonjsModule(function (module, exports) {
|
|
33900
34892
|
|
|
33901
34893
|
Object.defineProperty(exports, "__esModule", {
|
|
33902
34894
|
value: true
|
|
@@ -33953,9 +34945,9 @@ var sync$4 = createCommonjsModule(function (module, exports) {
|
|
|
33953
34945
|
|
|
33954
34946
|
exports.default = ReaderSync;
|
|
33955
34947
|
});
|
|
33956
|
-
unwrapExports(sync$
|
|
34948
|
+
unwrapExports(sync$5);
|
|
33957
34949
|
|
|
33958
|
-
var sync$
|
|
34950
|
+
var sync$6 = createCommonjsModule(function (module, exports) {
|
|
33959
34951
|
|
|
33960
34952
|
Object.defineProperty(exports, "__esModule", {
|
|
33961
34953
|
value: true
|
|
@@ -33964,7 +34956,7 @@ var sync$5 = createCommonjsModule(function (module, exports) {
|
|
|
33964
34956
|
class ProviderSync extends provider.default {
|
|
33965
34957
|
constructor() {
|
|
33966
34958
|
super(...arguments);
|
|
33967
|
-
this._reader = new sync$
|
|
34959
|
+
this._reader = new sync$5.default(this._settings);
|
|
33968
34960
|
}
|
|
33969
34961
|
|
|
33970
34962
|
read(task) {
|
|
@@ -33988,21 +34980,21 @@ var sync$5 = createCommonjsModule(function (module, exports) {
|
|
|
33988
34980
|
|
|
33989
34981
|
exports.default = ProviderSync;
|
|
33990
34982
|
});
|
|
33991
|
-
unwrapExports(sync$
|
|
34983
|
+
unwrapExports(sync$6);
|
|
33992
34984
|
|
|
33993
34985
|
var settings$3 = createCommonjsModule(function (module, exports) {
|
|
33994
34986
|
|
|
33995
34987
|
Object.defineProperty(exports, "__esModule", {
|
|
33996
34988
|
value: true
|
|
33997
34989
|
});
|
|
33998
|
-
const CPU_COUNT = os.cpus().length;
|
|
34990
|
+
const CPU_COUNT = os$1.cpus().length;
|
|
33999
34991
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
34000
|
-
lstat: fs$
|
|
34001
|
-
lstatSync: fs$
|
|
34002
|
-
stat: fs$
|
|
34003
|
-
statSync: fs$
|
|
34004
|
-
readdir: fs$
|
|
34005
|
-
readdirSync: fs$
|
|
34992
|
+
lstat: fs$3.lstat,
|
|
34993
|
+
lstatSync: fs$3.lstatSync,
|
|
34994
|
+
stat: fs$3.stat,
|
|
34995
|
+
statSync: fs$3.statSync,
|
|
34996
|
+
readdir: fs$3.readdir,
|
|
34997
|
+
readdirSync: fs$3.readdirSync
|
|
34006
34998
|
};
|
|
34007
34999
|
|
|
34008
35000
|
class Settings {
|
|
@@ -34056,7 +35048,7 @@ var settings_1 = settings$3.DEFAULT_FILE_SYSTEM_ADAPTER;
|
|
|
34056
35048
|
|
|
34057
35049
|
async function FastGlob(source, options) {
|
|
34058
35050
|
assertPatternsInput(source);
|
|
34059
|
-
const works = getWorks(source, async$
|
|
35051
|
+
const works = getWorks(source, async$5.default, options);
|
|
34060
35052
|
const result = await Promise.all(works);
|
|
34061
35053
|
return utils$4.array.flatten(result);
|
|
34062
35054
|
} // https://github.com/typescript-eslint/typescript-eslint/issues/60
|
|
@@ -34066,7 +35058,7 @@ async function FastGlob(source, options) {
|
|
|
34066
35058
|
(function (FastGlob) {
|
|
34067
35059
|
function sync(source, options) {
|
|
34068
35060
|
assertPatternsInput(source);
|
|
34069
|
-
const works = getWorks(source, sync$
|
|
35061
|
+
const works = getWorks(source, sync$6.default, options);
|
|
34070
35062
|
return utils$4.array.flatten(works);
|
|
34071
35063
|
}
|
|
34072
35064
|
|
|
@@ -34074,7 +35066,7 @@ async function FastGlob(source, options) {
|
|
|
34074
35066
|
|
|
34075
35067
|
function stream(source, options) {
|
|
34076
35068
|
assertPatternsInput(source);
|
|
34077
|
-
const works = getWorks(source, stream$
|
|
35069
|
+
const works = getWorks(source, stream$4.default, options);
|
|
34078
35070
|
/**
|
|
34079
35071
|
* The stream returned by the provider cannot work with an asynchronous iterator.
|
|
34080
35072
|
* To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
|
|
@@ -34132,7 +35124,7 @@ var out$3 = FastGlob;
|
|
|
34132
35124
|
|
|
34133
35125
|
const {
|
|
34134
35126
|
promisify
|
|
34135
|
-
} = util$
|
|
35127
|
+
} = util$4;
|
|
34136
35128
|
|
|
34137
35129
|
async function isType(fsStatType, statsMethodName, filePath) {
|
|
34138
35130
|
if (typeof filePath !== 'string') {
|
|
@@ -34140,7 +35132,7 @@ async function isType(fsStatType, statsMethodName, filePath) {
|
|
|
34140
35132
|
}
|
|
34141
35133
|
|
|
34142
35134
|
try {
|
|
34143
|
-
const stats = await promisify(fs$
|
|
35135
|
+
const stats = await promisify(fs$3[fsStatType])(filePath);
|
|
34144
35136
|
return stats[statsMethodName]();
|
|
34145
35137
|
} catch (error) {
|
|
34146
35138
|
if (error.code === 'ENOENT') {
|
|
@@ -34157,7 +35149,7 @@ function isTypeSync(fsStatType, statsMethodName, filePath) {
|
|
|
34157
35149
|
}
|
|
34158
35150
|
|
|
34159
35151
|
try {
|
|
34160
|
-
return fs$
|
|
35152
|
+
return fs$3[fsStatType](filePath)[statsMethodName]();
|
|
34161
35153
|
} catch (error) {
|
|
34162
35154
|
if (error.code === 'ENOENT') {
|
|
34163
35155
|
return false;
|
|
@@ -34186,11 +35178,11 @@ const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(
|
|
|
34186
35178
|
|
|
34187
35179
|
const getPath = (filepath, cwd) => {
|
|
34188
35180
|
const pth = filepath[0] === '!' ? filepath.slice(1) : filepath;
|
|
34189
|
-
return path$
|
|
35181
|
+
return path$2.isAbsolute(pth) ? pth : path$2.join(cwd, pth);
|
|
34190
35182
|
};
|
|
34191
35183
|
|
|
34192
35184
|
const addExtensions = (file, extensions) => {
|
|
34193
|
-
if (path$
|
|
35185
|
+
if (path$2.extname(file)) {
|
|
34194
35186
|
return `**/${file}`;
|
|
34195
35187
|
}
|
|
34196
35188
|
|
|
@@ -34207,18 +35199,18 @@ const getGlob = (directory, options) => {
|
|
|
34207
35199
|
}
|
|
34208
35200
|
|
|
34209
35201
|
if (options.files && options.extensions) {
|
|
34210
|
-
return options.files.map(x => path$
|
|
35202
|
+
return options.files.map(x => path$2.posix.join(directory, addExtensions(x, options.extensions)));
|
|
34211
35203
|
}
|
|
34212
35204
|
|
|
34213
35205
|
if (options.files) {
|
|
34214
|
-
return options.files.map(x => path$
|
|
35206
|
+
return options.files.map(x => path$2.posix.join(directory, `**/${x}`));
|
|
34215
35207
|
}
|
|
34216
35208
|
|
|
34217
35209
|
if (options.extensions) {
|
|
34218
|
-
return [path$
|
|
35210
|
+
return [path$2.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)];
|
|
34219
35211
|
}
|
|
34220
35212
|
|
|
34221
|
-
return [path$
|
|
35213
|
+
return [path$2.posix.join(directory, '**')];
|
|
34222
35214
|
};
|
|
34223
35215
|
|
|
34224
35216
|
var dirGlob = async (input, options) => {
|
|
@@ -34237,7 +35229,7 @@ var dirGlob = async (input, options) => {
|
|
|
34237
35229
|
return [].concat.apply([], globs); // eslint-disable-line prefer-spread
|
|
34238
35230
|
};
|
|
34239
35231
|
|
|
34240
|
-
var sync$
|
|
35232
|
+
var sync$7 = (input, options) => {
|
|
34241
35233
|
options = Object.assign({
|
|
34242
35234
|
cwd: process.cwd()
|
|
34243
35235
|
}, options);
|
|
@@ -34249,7 +35241,7 @@ var sync$6 = (input, options) => {
|
|
|
34249
35241
|
const globs = [].concat(input).map(x => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x);
|
|
34250
35242
|
return [].concat.apply([], globs); // eslint-disable-line prefer-spread
|
|
34251
35243
|
};
|
|
34252
|
-
dirGlob.sync = sync$
|
|
35244
|
+
dirGlob.sync = sync$7;
|
|
34253
35245
|
|
|
34254
35246
|
// A simple implementation of make-array
|
|
34255
35247
|
function makeArray(subject) {
|
|
@@ -34660,20 +35652,20 @@ var slash$1 = path => {
|
|
|
34660
35652
|
|
|
34661
35653
|
const {
|
|
34662
35654
|
promisify: promisify$1
|
|
34663
|
-
} = util$
|
|
35655
|
+
} = util$4;
|
|
34664
35656
|
const DEFAULT_IGNORE = ['**/node_modules/**', '**/flow-typed/**', '**/coverage/**', '**/.git'];
|
|
34665
|
-
const readFileP = promisify$1(fs$
|
|
35657
|
+
const readFileP = promisify$1(fs$3.readFile);
|
|
34666
35658
|
|
|
34667
35659
|
const mapGitIgnorePatternTo = base => ignore => {
|
|
34668
35660
|
if (ignore.startsWith('!')) {
|
|
34669
|
-
return '!' + path$
|
|
35661
|
+
return '!' + path$2.posix.join(base, ignore.slice(1));
|
|
34670
35662
|
}
|
|
34671
35663
|
|
|
34672
|
-
return path$
|
|
35664
|
+
return path$2.posix.join(base, ignore);
|
|
34673
35665
|
};
|
|
34674
35666
|
|
|
34675
35667
|
const parseGitIgnore = (content, options) => {
|
|
34676
|
-
const base = slash$1(path$
|
|
35668
|
+
const base = slash$1(path$2.relative(options.cwd, path$2.dirname(options.fileName)));
|
|
34677
35669
|
return content.split(/\r?\n/).filter(Boolean).filter(line => !line.startsWith('#')).map(mapGitIgnorePatternTo(base));
|
|
34678
35670
|
};
|
|
34679
35671
|
|
|
@@ -34688,7 +35680,7 @@ const reduceIgnore = files => {
|
|
|
34688
35680
|
};
|
|
34689
35681
|
|
|
34690
35682
|
const ensureAbsolutePathForCwd = (cwd, p) => {
|
|
34691
|
-
if (path$
|
|
35683
|
+
if (path$2.isAbsolute(p)) {
|
|
34692
35684
|
if (p.startsWith(cwd)) {
|
|
34693
35685
|
return p;
|
|
34694
35686
|
}
|
|
@@ -34696,15 +35688,15 @@ const ensureAbsolutePathForCwd = (cwd, p) => {
|
|
|
34696
35688
|
throw new Error(`Path ${p} is not in cwd ${cwd}`);
|
|
34697
35689
|
}
|
|
34698
35690
|
|
|
34699
|
-
return path$
|
|
35691
|
+
return path$2.join(cwd, p);
|
|
34700
35692
|
};
|
|
34701
35693
|
|
|
34702
35694
|
const getIsIgnoredPredecate = (ignores, cwd) => {
|
|
34703
|
-
return p => ignores.ignores(slash$1(path$
|
|
35695
|
+
return p => ignores.ignores(slash$1(path$2.relative(cwd, ensureAbsolutePathForCwd(cwd, p))));
|
|
34704
35696
|
};
|
|
34705
35697
|
|
|
34706
35698
|
const getFile = async (file, cwd) => {
|
|
34707
|
-
const filePath = path$
|
|
35699
|
+
const filePath = path$2.join(cwd, file);
|
|
34708
35700
|
const content = await readFileP(filePath, 'utf8');
|
|
34709
35701
|
return {
|
|
34710
35702
|
cwd,
|
|
@@ -34714,8 +35706,8 @@ const getFile = async (file, cwd) => {
|
|
|
34714
35706
|
};
|
|
34715
35707
|
|
|
34716
35708
|
const getFileSync = (file, cwd) => {
|
|
34717
|
-
const filePath = path$
|
|
34718
|
-
const content = fs$
|
|
35709
|
+
const filePath = path$2.join(cwd, file);
|
|
35710
|
+
const content = fs$3.readFileSync(filePath, 'utf8');
|
|
34719
35711
|
return {
|
|
34720
35712
|
cwd,
|
|
34721
35713
|
filePath,
|
|
@@ -34723,7 +35715,7 @@ const getFileSync = (file, cwd) => {
|
|
|
34723
35715
|
};
|
|
34724
35716
|
};
|
|
34725
35717
|
|
|
34726
|
-
const normalizeOptions$
|
|
35718
|
+
const normalizeOptions$3 = ({
|
|
34727
35719
|
ignore = [],
|
|
34728
35720
|
cwd = slash$1(process.cwd())
|
|
34729
35721
|
} = {}) => {
|
|
@@ -34734,7 +35726,7 @@ const normalizeOptions$2 = ({
|
|
|
34734
35726
|
};
|
|
34735
35727
|
|
|
34736
35728
|
var gitignore = async options => {
|
|
34737
|
-
options = normalizeOptions$
|
|
35729
|
+
options = normalizeOptions$3(options);
|
|
34738
35730
|
const paths = await out$3('**/.gitignore', {
|
|
34739
35731
|
ignore: DEFAULT_IGNORE.concat(options.ignore),
|
|
34740
35732
|
cwd: options.cwd
|
|
@@ -34744,8 +35736,8 @@ var gitignore = async options => {
|
|
|
34744
35736
|
return getIsIgnoredPredecate(ignores, options.cwd);
|
|
34745
35737
|
};
|
|
34746
35738
|
|
|
34747
|
-
var sync$
|
|
34748
|
-
options = normalizeOptions$
|
|
35739
|
+
var sync$8 = options => {
|
|
35740
|
+
options = normalizeOptions$3(options);
|
|
34749
35741
|
const paths = out$3.sync('**/.gitignore', {
|
|
34750
35742
|
ignore: DEFAULT_IGNORE.concat(options.ignore),
|
|
34751
35743
|
cwd: options.cwd
|
|
@@ -34754,11 +35746,11 @@ var sync$7 = options => {
|
|
|
34754
35746
|
const ignores = reduceIgnore(files);
|
|
34755
35747
|
return getIsIgnoredPredecate(ignores, options.cwd);
|
|
34756
35748
|
};
|
|
34757
|
-
gitignore.sync = sync$
|
|
35749
|
+
gitignore.sync = sync$8;
|
|
34758
35750
|
|
|
34759
35751
|
const {
|
|
34760
35752
|
Transform
|
|
34761
|
-
} = stream$
|
|
35753
|
+
} = stream$6;
|
|
34762
35754
|
|
|
34763
35755
|
class ObjectTransform extends Transform {
|
|
34764
35756
|
constructor() {
|
|
@@ -34831,7 +35823,7 @@ const checkCwdOption = (options = {}) => {
|
|
|
34831
35823
|
let stat;
|
|
34832
35824
|
|
|
34833
35825
|
try {
|
|
34834
|
-
stat = fs$
|
|
35826
|
+
stat = fs$3.statSync(options.cwd);
|
|
34835
35827
|
} catch (_) {
|
|
34836
35828
|
return;
|
|
34837
35829
|
}
|
|
@@ -34841,7 +35833,7 @@ const checkCwdOption = (options = {}) => {
|
|
|
34841
35833
|
}
|
|
34842
35834
|
};
|
|
34843
35835
|
|
|
34844
|
-
const getPathString = p => p.stats instanceof fs$
|
|
35836
|
+
const getPathString = p => p.stats instanceof fs$3.Stats ? p.path : p;
|
|
34845
35837
|
|
|
34846
35838
|
const generateGlobTasks = (patterns, taskOptions) => {
|
|
34847
35839
|
patterns = arrayUnion([].concat(patterns));
|
|
@@ -34936,7 +35928,7 @@ var globby$1 = async (patterns, options) => {
|
|
|
34936
35928
|
return arrayUnion(...paths).filter(path_ => !filter(getPathString(path_)));
|
|
34937
35929
|
};
|
|
34938
35930
|
|
|
34939
|
-
var sync$
|
|
35931
|
+
var sync$9 = (patterns, options) => {
|
|
34940
35932
|
const globTasks = generateGlobTasks(patterns, options);
|
|
34941
35933
|
const tasks = globTasks.reduce((tasks, task) => {
|
|
34942
35934
|
const newTask = getPattern(task, dirGlob.sync).map(globToTask(task));
|
|
@@ -34946,7 +35938,7 @@ var sync$8 = (patterns, options) => {
|
|
|
34946
35938
|
return tasks.reduce((matches, task) => arrayUnion(matches, out$3.sync(task.pattern, task.options)), []).filter(path_ => !filter(path_));
|
|
34947
35939
|
};
|
|
34948
35940
|
|
|
34949
|
-
var stream$
|
|
35941
|
+
var stream$5 = (patterns, options) => {
|
|
34950
35942
|
const globTasks = generateGlobTasks(patterns, options);
|
|
34951
35943
|
const tasks = globTasks.reduce((tasks, task) => {
|
|
34952
35944
|
const newTask = getPattern(task, dirGlob.sync).map(globToTask(task));
|
|
@@ -34963,8 +35955,8 @@ var generateGlobTasks_1 = generateGlobTasks;
|
|
|
34963
35955
|
var hasMagic = (patterns, options) => [].concat(patterns).some(pattern => out$3.isDynamicPattern(pattern, options));
|
|
34964
35956
|
|
|
34965
35957
|
var gitignore_1 = gitignore;
|
|
34966
|
-
globby$1.sync = sync$
|
|
34967
|
-
globby$1.stream = stream$
|
|
35958
|
+
globby$1.sync = sync$9;
|
|
35959
|
+
globby$1.stream = stream$5;
|
|
34968
35960
|
globby$1.generateGlobTasks = generateGlobTasks_1;
|
|
34969
35961
|
globby$1.hasMagic = hasMagic;
|
|
34970
35962
|
globby$1.gitignore = gitignore_1;
|
|
@@ -35342,8 +36334,22 @@ function handleCallExpressionComments(precedingNode, enclosingNode, comment) {
|
|
|
35342
36334
|
|
|
35343
36335
|
function handleUnionTypeComments(precedingNode, enclosingNode, followingNode, comment) {
|
|
35344
36336
|
if (enclosingNode && (enclosingNode.type === "UnionTypeAnnotation" || enclosingNode.type === "TSUnionType")) {
|
|
35345
|
-
|
|
35346
|
-
|
|
36337
|
+
if (util$1.isNodeIgnoreComment(comment)) {
|
|
36338
|
+
followingNode.prettierIgnore = true;
|
|
36339
|
+
comment.unignore = true;
|
|
36340
|
+
}
|
|
36341
|
+
|
|
36342
|
+
if (precedingNode) {
|
|
36343
|
+
addTrailingComment$3(precedingNode, comment);
|
|
36344
|
+
return true;
|
|
36345
|
+
}
|
|
36346
|
+
|
|
36347
|
+
return false;
|
|
36348
|
+
}
|
|
36349
|
+
|
|
36350
|
+
if (followingNode && (followingNode.type === "UnionTypeAnnotation" || followingNode.type === "TSUnionType") && util$1.isNodeIgnoreComment(comment)) {
|
|
36351
|
+
followingNode.types[0].prettierIgnore = true;
|
|
36352
|
+
comment.unignore = true;
|
|
35347
36353
|
}
|
|
35348
36354
|
|
|
35349
36355
|
return false;
|
|
@@ -35529,7 +36535,7 @@ const {
|
|
|
35529
36535
|
dedentToRoot: dedentToRoot$1
|
|
35530
36536
|
},
|
|
35531
36537
|
utils: {
|
|
35532
|
-
mapDoc: mapDoc$
|
|
36538
|
+
mapDoc: mapDoc$1,
|
|
35533
36539
|
stripTrailingHardline: stripTrailingHardline$1
|
|
35534
36540
|
}
|
|
35535
36541
|
} = document;
|
|
@@ -35552,7 +36558,7 @@ function embed(path, print, textToDoc, options) {
|
|
|
35552
36558
|
return idx === 0 ? currVal : prevVal + "@prettier-placeholder-" + placeholderID++ + "-id" + currVal;
|
|
35553
36559
|
}, "");
|
|
35554
36560
|
const doc = textToDoc(text, {
|
|
35555
|
-
parser: "
|
|
36561
|
+
parser: "scss"
|
|
35556
36562
|
});
|
|
35557
36563
|
return transformCssDoc(doc, path, print);
|
|
35558
36564
|
}
|
|
@@ -35678,7 +36684,7 @@ function uncook(cookedValue) {
|
|
|
35678
36684
|
}
|
|
35679
36685
|
|
|
35680
36686
|
function escapeTemplateCharacters(doc, raw) {
|
|
35681
|
-
return mapDoc$
|
|
36687
|
+
return mapDoc$1(doc, currentDoc => {
|
|
35682
36688
|
if (!currentDoc.parts) {
|
|
35683
36689
|
return currentDoc;
|
|
35684
36690
|
}
|
|
@@ -35727,7 +36733,7 @@ function replacePlaceholders(quasisDoc, expressionDocs) {
|
|
|
35727
36733
|
|
|
35728
36734
|
const expressions = expressionDocs.slice();
|
|
35729
36735
|
let replaceCounter = 0;
|
|
35730
|
-
const newDoc = mapDoc$
|
|
36736
|
+
const newDoc = mapDoc$1(quasisDoc, doc => {
|
|
35731
36737
|
if (!doc || !doc.parts || !doc.parts.length) {
|
|
35732
36738
|
return doc;
|
|
35733
36739
|
}
|
|
@@ -35942,7 +36948,7 @@ function printHtmlTemplateLiteral(path, print, textToDoc, parser, options) {
|
|
|
35942
36948
|
|
|
35943
36949
|
const placeholderRegex = new RegExp(composePlaceholder("(\\d+)"), "g");
|
|
35944
36950
|
let topLevelCount = 0;
|
|
35945
|
-
const contentDoc = mapDoc$
|
|
36951
|
+
const contentDoc = mapDoc$1(stripTrailingHardline$1(textToDoc(text, {
|
|
35946
36952
|
parser,
|
|
35947
36953
|
|
|
35948
36954
|
__onHtmlRoot(root) {
|
|
@@ -36152,7 +37158,7 @@ var build = createCommonjsModule(function (module, exports) {
|
|
|
36152
37158
|
exports.print = print;
|
|
36153
37159
|
|
|
36154
37160
|
function _os() {
|
|
36155
|
-
const data = os;
|
|
37161
|
+
const data = os$1;
|
|
36156
37162
|
|
|
36157
37163
|
_os = function () {
|
|
36158
37164
|
return data;
|
|
@@ -36512,8 +37518,10 @@ function isTypeAnnotationAFunction(node, options) {
|
|
|
36512
37518
|
return (node.type === "TypeAnnotation" || node.type === "TSTypeAnnotation") && node.typeAnnotation.type === "FunctionTypeAnnotation" && !node.static && !sameLocStart(node, node.typeAnnotation, options);
|
|
36513
37519
|
}
|
|
36514
37520
|
|
|
37521
|
+
const binaryishNodeTypes = new Set(["BinaryExpression", "LogicalExpression", "NGPipeExpression"]);
|
|
37522
|
+
|
|
36515
37523
|
function isBinaryish(node) {
|
|
36516
|
-
return
|
|
37524
|
+
return binaryishNodeTypes.has(node.type);
|
|
36517
37525
|
}
|
|
36518
37526
|
|
|
36519
37527
|
function isMemberish(node) {
|
|
@@ -37066,7 +38074,7 @@ function isSimpleCallArgument(node, depth) {
|
|
|
37066
38074
|
}
|
|
37067
38075
|
|
|
37068
38076
|
if (node.type === "ArrayExpression") {
|
|
37069
|
-
return node.elements.every(isChildSimple);
|
|
38077
|
+
return node.elements.every(x => x == null || isChildSimple(x));
|
|
37070
38078
|
}
|
|
37071
38079
|
|
|
37072
38080
|
if (node.type === "CallExpression" || node.type === "OptionalCallExpression" || node.type === "NewExpression") {
|
|
@@ -37409,7 +38417,7 @@ function needsParens(path, options) {
|
|
|
37409
38417
|
}
|
|
37410
38418
|
|
|
37411
38419
|
if (pp === np && name === "right") {
|
|
37412
|
-
assert.strictEqual(parent.right, node);
|
|
38420
|
+
assert$1.strictEqual(parent.right, node);
|
|
37413
38421
|
return true;
|
|
37414
38422
|
}
|
|
37415
38423
|
|
|
@@ -37740,7 +38748,7 @@ function needsParens(path, options) {
|
|
|
37740
38748
|
}
|
|
37741
38749
|
|
|
37742
38750
|
function isStatement(node) {
|
|
37743
|
-
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 === "
|
|
38751
|
+
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";
|
|
37744
38752
|
}
|
|
37745
38753
|
|
|
37746
38754
|
function includesFunctionTypeInObjectType(node) {
|
|
@@ -38279,7 +39287,9 @@ function printPathNoParens(path, options, print, args) {
|
|
|
38279
39287
|
/* sameIndent */
|
|
38280
39288
|
true)); // Only force a trailing newline if there were any contents.
|
|
38281
39289
|
|
|
38282
|
-
if (n.body.
|
|
39290
|
+
if (!n.body.every(({
|
|
39291
|
+
type
|
|
39292
|
+
}) => type === "EmptyStatement") || n.comments) {
|
|
38283
39293
|
parts.push(hardline$4);
|
|
38284
39294
|
}
|
|
38285
39295
|
|
|
@@ -38454,7 +39464,6 @@ function printPathNoParens(path, options, print, args) {
|
|
|
38454
39464
|
|
|
38455
39465
|
case "SpreadElement":
|
|
38456
39466
|
case "SpreadElementPattern":
|
|
38457
|
-
case "RestProperty":
|
|
38458
39467
|
case "SpreadProperty":
|
|
38459
39468
|
case "SpreadPropertyPattern":
|
|
38460
39469
|
case "RestElement":
|
|
@@ -38821,11 +39830,23 @@ function printPathNoParens(path, options, print, args) {
|
|
|
38821
39830
|
});
|
|
38822
39831
|
|
|
38823
39832
|
if (n.inexact) {
|
|
38824
|
-
|
|
39833
|
+
let printed;
|
|
39834
|
+
|
|
39835
|
+
if (hasDanglingComments$1(n)) {
|
|
39836
|
+
const hasLineComments = !n.comments.every(comments$1.isBlockComment);
|
|
39837
|
+
const printedDanglingComments = comments.printDanglingComments(path, options,
|
|
39838
|
+
/* sameIndent */
|
|
39839
|
+
true);
|
|
39840
|
+
printed = concat$6([printedDanglingComments, hasLineComments || hasNewline$4(options.originalText, options.locEnd(n.comments[n.comments.length - 1])) ? hardline$4 : line$4, "..."]);
|
|
39841
|
+
} else {
|
|
39842
|
+
printed = "...";
|
|
39843
|
+
}
|
|
39844
|
+
|
|
39845
|
+
props.push(concat$6(separatorParts.concat(printed)));
|
|
38825
39846
|
}
|
|
38826
39847
|
|
|
38827
39848
|
const lastElem = getLast$2(n[propertiesField]);
|
|
38828
|
-
const canHaveTrailingSeparator = !(lastElem && (lastElem.type === "
|
|
39849
|
+
const canHaveTrailingSeparator = !(n.inexact || lastElem && (lastElem.type === "RestElement" || hasNodeIgnoreComment$2(lastElem)));
|
|
38829
39850
|
let content;
|
|
38830
39851
|
|
|
38831
39852
|
if (props.length === 0) {
|
|
@@ -39064,7 +40085,7 @@ function printPathNoParens(path, options, print, args) {
|
|
|
39064
40085
|
// semicolon, except when they in the () part of for loops.
|
|
39065
40086
|
|
|
39066
40087
|
const parentNode = path.getParentNode();
|
|
39067
|
-
const isParentForLoop = parentNode.type === "ForStatement" || parentNode.type === "ForInStatement" || parentNode.type === "ForOfStatement"
|
|
40088
|
+
const isParentForLoop = parentNode.type === "ForStatement" || parentNode.type === "ForInStatement" || parentNode.type === "ForOfStatement";
|
|
39068
40089
|
const hasValue = n.declarations.some(decl => decl.init);
|
|
39069
40090
|
let firstVariable;
|
|
39070
40091
|
|
|
@@ -39148,14 +40169,7 @@ function printPathNoParens(path, options, print, args) {
|
|
|
39148
40169
|
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"))]));
|
|
39149
40170
|
|
|
39150
40171
|
case "ForOfStatement":
|
|
39151
|
-
|
|
39152
|
-
{
|
|
39153
|
-
// Babel 7 removed ForAwaitStatement in favor of ForOfStatement
|
|
39154
|
-
// with `"await": true`:
|
|
39155
|
-
// https://github.com/estree/estree/pull/138
|
|
39156
|
-
const isAwait = n.type === "ForAwaitStatement" || n.await;
|
|
39157
|
-
return group$2(concat$6(["for", isAwait ? " await" : "", " (", path.call(print, "left"), " of ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))]));
|
|
39158
|
-
}
|
|
40172
|
+
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"))]));
|
|
39159
40173
|
|
|
39160
40174
|
case "DoWhileStatement":
|
|
39161
40175
|
{
|
|
@@ -39305,8 +40319,8 @@ function printPathNoParens(path, options, print, args) {
|
|
|
39305
40319
|
case "JSXExpressionContainer":
|
|
39306
40320
|
{
|
|
39307
40321
|
const parent = path.getParentNode(0);
|
|
39308
|
-
const
|
|
39309
|
-
const shouldInline =
|
|
40322
|
+
const hasComments = n.expression.comments && n.expression.comments.length > 0;
|
|
40323
|
+
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)));
|
|
39310
40324
|
|
|
39311
40325
|
if (shouldInline) {
|
|
39312
40326
|
return group$2(concat$6(["{", path.call(print, "expression"), lineSuffixBoundary$1, "}"]));
|
|
@@ -39512,7 +40526,7 @@ function printPathNoParens(path, options, print, args) {
|
|
|
39512
40526
|
if (!isSimple) {
|
|
39513
40527
|
// Breaks at the template element boundaries (${ and }) are preferred to breaking
|
|
39514
40528
|
// in the middle of a MemberExpression
|
|
39515
|
-
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 === "
|
|
40529
|
+
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])) {
|
|
39516
40530
|
printed = concat$6([indent$3(concat$6([softline$2, printed])), softline$2]);
|
|
39517
40531
|
}
|
|
39518
40532
|
}
|
|
@@ -39903,7 +40917,7 @@ function printPathNoParens(path, options, print, args) {
|
|
|
39903
40917
|
return nodeStr(n, options);
|
|
39904
40918
|
|
|
39905
40919
|
case "NumberLiteralTypeAnnotation":
|
|
39906
|
-
assert.strictEqual(typeof n.value, "number");
|
|
40920
|
+
assert$1.strictEqual(typeof n.value, "number");
|
|
39907
40921
|
|
|
39908
40922
|
if (n.extra != null) {
|
|
39909
40923
|
return printNumber$1(n.extra.raw);
|
|
@@ -40145,8 +41159,13 @@ function printPathNoParens(path, options, print, args) {
|
|
|
40145
41159
|
|
|
40146
41160
|
case "TSIndexSignature":
|
|
40147
41161
|
{
|
|
40148
|
-
const parent = path.getParentNode();
|
|
40149
|
-
|
|
41162
|
+
const parent = path.getParentNode(); // The typescript parser accepts multiple parameters here. If you're
|
|
41163
|
+
// using them, it makes sense to have a trailing comma. But if you
|
|
41164
|
+
// aren't, this is more like a computed property name than an array.
|
|
41165
|
+
// So we leave off the trailing comma when there's just one parameter.
|
|
41166
|
+
|
|
41167
|
+
const trailingComma = n.parameters.length > 1 ? ifBreak$1(shouldPrintComma(options) ? "," : "") : "";
|
|
41168
|
+
const parametersGroup = group$2(concat$6([indent$3(concat$6([softline$2, join$4(concat$6([", ", softline$2]), path.map(print, "parameters"))])), trailingComma, softline$2]));
|
|
40150
41169
|
return concat$6([n.export ? "export " : "", n.accessibility ? concat$6([n.accessibility, " "]) : "", n.static ? "static " : "", n.readonly ? "readonly " : "", "[", n.parameters ? parametersGroup : "", n.typeAnnotation ? "]: " : "]", n.typeAnnotation ? path.call(print, "typeAnnotation") : "", parent.type === "ClassBody" ? semi : ""]);
|
|
40151
41170
|
}
|
|
40152
41171
|
|
|
@@ -40353,7 +41372,7 @@ function printPathNoParens(path, options, print, args) {
|
|
|
40353
41372
|
return "";
|
|
40354
41373
|
|
|
40355
41374
|
case "NGQuotedExpression":
|
|
40356
|
-
return concat$6([n.prefix, ":", n.value]);
|
|
41375
|
+
return concat$6([n.prefix, ": ", n.value.trim()]);
|
|
40357
41376
|
|
|
40358
41377
|
case "NGMicrosyntax":
|
|
40359
41378
|
return concat$6(path.map((childPath, index) => concat$6([index === 0 ? "" : isNgForOf$1(childPath.getValue(), index, n) ? " " : concat$6([";", line$4]), print(childPath)]), "body"));
|
|
@@ -40515,7 +41534,7 @@ function printMethod(path, options, print) {
|
|
|
40515
41534
|
parts.push("*");
|
|
40516
41535
|
}
|
|
40517
41536
|
} else {
|
|
40518
|
-
assert.ok(kind === "get" || kind === "set");
|
|
41537
|
+
assert$1.ok(kind === "get" || kind === "set");
|
|
40519
41538
|
parts.push(kind, " ");
|
|
40520
41539
|
}
|
|
40521
41540
|
|
|
@@ -40998,7 +42017,7 @@ function printFlowDeclaration(path, parts) {
|
|
|
40998
42017
|
const parentExportDecl = getParentExportDeclaration$1(path);
|
|
40999
42018
|
|
|
41000
42019
|
if (parentExportDecl) {
|
|
41001
|
-
assert.strictEqual(parentExportDecl.type, "DeclareExportDeclaration");
|
|
42020
|
+
assert$1.strictEqual(parentExportDecl.type, "DeclareExportDeclaration");
|
|
41002
42021
|
} else {
|
|
41003
42022
|
// If the parent node has type DeclareExportDeclaration, then it
|
|
41004
42023
|
// will be responsible for printing the "declare" token. Otherwise
|
|
@@ -41910,7 +42929,7 @@ function printReturnAndThrowArgument(path, options, print) {
|
|
|
41910
42929
|
if (node.argument) {
|
|
41911
42930
|
if (returnArgumentHasLeadingComment$1(options, node.argument)) {
|
|
41912
42931
|
parts.push(concat$6([" (", indent$3(concat$6([hardline$4, path.call(print, "argument")])), hardline$4, ")"]));
|
|
41913
|
-
} else if (node.argument
|
|
42932
|
+
} else if (isBinaryish$1(node.argument) || node.argument.type === "SequenceExpression") {
|
|
41914
42933
|
parts.push(group$2(concat$6([ifBreak$1(" (", " "), indent$3(concat$6([softline$2, path.call(print, "argument")])), softline$2, ifBreak$1(")")])));
|
|
41915
42934
|
} else {
|
|
41916
42935
|
parts.push(" ", path.call(print, "argument"));
|
|
@@ -41942,7 +42961,7 @@ function willPrintOwnComments(path
|
|
|
41942
42961
|
) {
|
|
41943
42962
|
const node = path.getValue();
|
|
41944
42963
|
const parent = path.getParentNode();
|
|
41945
|
-
return (node && (isJSXNode$1(node) || hasFlowShorthandAnnotationComment$2(node) || parent && (parent.type === "CallExpression" || parent.type === "OptionalCallExpression") && (hasFlowAnnotationComment$1(node.leadingComments) || hasFlowAnnotationComment$1(node.trailingComments))) || parent && (parent.type === "JSXSpreadAttribute" || parent.type === "JSXSpreadChild" || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType" || (parent.type === "ClassDeclaration" || parent.type === "ClassExpression") && parent.superClass === node)) && !hasIgnoreComment$2(path);
|
|
42964
|
+
return (node && (isJSXNode$1(node) || hasFlowShorthandAnnotationComment$2(node) || parent && (parent.type === "CallExpression" || parent.type === "OptionalCallExpression") && (hasFlowAnnotationComment$1(node.leadingComments) || hasFlowAnnotationComment$1(node.trailingComments))) || parent && (parent.type === "JSXSpreadAttribute" || parent.type === "JSXSpreadChild" || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType" || (parent.type === "ClassDeclaration" || parent.type === "ClassExpression") && parent.superClass === node)) && (!hasIgnoreComment$2(path) || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType");
|
|
41946
42965
|
}
|
|
41947
42966
|
|
|
41948
42967
|
function canAttachComment(node) {
|
|
@@ -42310,20 +43329,20 @@ var JavaScript = {
|
|
|
42310
43329
|
};
|
|
42311
43330
|
|
|
42312
43331
|
var JavaScript$1 = /*#__PURE__*/Object.freeze({
|
|
42313
|
-
|
|
42314
|
-
|
|
42315
|
-
|
|
42316
|
-
|
|
42317
|
-
|
|
42318
|
-
|
|
42319
|
-
|
|
42320
|
-
|
|
42321
|
-
|
|
42322
|
-
|
|
42323
|
-
|
|
42324
|
-
|
|
42325
|
-
|
|
42326
|
-
|
|
43332
|
+
__proto__: null,
|
|
43333
|
+
name: name$2,
|
|
43334
|
+
type: type,
|
|
43335
|
+
tmScope: tmScope,
|
|
43336
|
+
aceMode: aceMode,
|
|
43337
|
+
codemirrorMode: codemirrorMode,
|
|
43338
|
+
codemirrorMimeType: codemirrorMimeType,
|
|
43339
|
+
color: color,
|
|
43340
|
+
aliases: aliases,
|
|
43341
|
+
extensions: extensions,
|
|
43342
|
+
filenames: filenames,
|
|
43343
|
+
interpreters: interpreters,
|
|
43344
|
+
languageId: languageId,
|
|
43345
|
+
'default': JavaScript
|
|
42327
43346
|
});
|
|
42328
43347
|
|
|
42329
43348
|
var name$3 = "JSX";
|
|
@@ -42350,17 +43369,17 @@ var JSX = {
|
|
|
42350
43369
|
};
|
|
42351
43370
|
|
|
42352
43371
|
var JSX$1 = /*#__PURE__*/Object.freeze({
|
|
42353
|
-
|
|
42354
|
-
|
|
42355
|
-
|
|
42356
|
-
|
|
42357
|
-
|
|
42358
|
-
|
|
42359
|
-
|
|
42360
|
-
|
|
42361
|
-
|
|
42362
|
-
|
|
42363
|
-
|
|
43372
|
+
__proto__: null,
|
|
43373
|
+
name: name$3,
|
|
43374
|
+
type: type$1,
|
|
43375
|
+
group: group$3,
|
|
43376
|
+
extensions: extensions$1,
|
|
43377
|
+
tmScope: tmScope$1,
|
|
43378
|
+
aceMode: aceMode$1,
|
|
43379
|
+
codemirrorMode: codemirrorMode$1,
|
|
43380
|
+
codemirrorMimeType: codemirrorMimeType$1,
|
|
43381
|
+
languageId: languageId$1,
|
|
43382
|
+
'default': JSX
|
|
42364
43383
|
});
|
|
42365
43384
|
|
|
42366
43385
|
var name$4 = "TypeScript";
|
|
@@ -42396,19 +43415,19 @@ var TypeScript = {
|
|
|
42396
43415
|
};
|
|
42397
43416
|
|
|
42398
43417
|
var TypeScript$1 = /*#__PURE__*/Object.freeze({
|
|
42399
|
-
|
|
42400
|
-
|
|
42401
|
-
|
|
42402
|
-
|
|
42403
|
-
|
|
42404
|
-
|
|
42405
|
-
|
|
42406
|
-
|
|
42407
|
-
|
|
42408
|
-
|
|
42409
|
-
|
|
42410
|
-
|
|
42411
|
-
|
|
43418
|
+
__proto__: null,
|
|
43419
|
+
name: name$4,
|
|
43420
|
+
type: type$2,
|
|
43421
|
+
color: color$1,
|
|
43422
|
+
aliases: aliases$1,
|
|
43423
|
+
interpreters: interpreters$1,
|
|
43424
|
+
extensions: extensions$2,
|
|
43425
|
+
tmScope: tmScope$2,
|
|
43426
|
+
aceMode: aceMode$2,
|
|
43427
|
+
codemirrorMode: codemirrorMode$2,
|
|
43428
|
+
codemirrorMimeType: codemirrorMimeType$2,
|
|
43429
|
+
languageId: languageId$2,
|
|
43430
|
+
'default': TypeScript
|
|
42412
43431
|
});
|
|
42413
43432
|
|
|
42414
43433
|
var name$5 = "TSX";
|
|
@@ -42435,17 +43454,17 @@ var TSX = {
|
|
|
42435
43454
|
};
|
|
42436
43455
|
|
|
42437
43456
|
var TSX$1 = /*#__PURE__*/Object.freeze({
|
|
42438
|
-
|
|
42439
|
-
|
|
42440
|
-
|
|
42441
|
-
|
|
42442
|
-
|
|
42443
|
-
|
|
42444
|
-
|
|
42445
|
-
|
|
42446
|
-
|
|
42447
|
-
|
|
42448
|
-
|
|
43457
|
+
__proto__: null,
|
|
43458
|
+
name: name$5,
|
|
43459
|
+
type: type$3,
|
|
43460
|
+
group: group$4,
|
|
43461
|
+
extensions: extensions$3,
|
|
43462
|
+
tmScope: tmScope$3,
|
|
43463
|
+
aceMode: aceMode$3,
|
|
43464
|
+
codemirrorMode: codemirrorMode$3,
|
|
43465
|
+
codemirrorMimeType: codemirrorMimeType$3,
|
|
43466
|
+
languageId: languageId$3,
|
|
43467
|
+
'default': TSX
|
|
42449
43468
|
});
|
|
42450
43469
|
|
|
42451
43470
|
var name$6 = "JSON";
|
|
@@ -42497,18 +43516,18 @@ var _JSON = {
|
|
|
42497
43516
|
};
|
|
42498
43517
|
|
|
42499
43518
|
var _JSON$1 = /*#__PURE__*/Object.freeze({
|
|
42500
|
-
|
|
42501
|
-
|
|
42502
|
-
|
|
42503
|
-
|
|
42504
|
-
|
|
42505
|
-
|
|
42506
|
-
|
|
42507
|
-
|
|
42508
|
-
|
|
42509
|
-
|
|
42510
|
-
|
|
42511
|
-
|
|
43519
|
+
__proto__: null,
|
|
43520
|
+
name: name$6,
|
|
43521
|
+
type: type$4,
|
|
43522
|
+
tmScope: tmScope$4,
|
|
43523
|
+
aceMode: aceMode$4,
|
|
43524
|
+
codemirrorMode: codemirrorMode$4,
|
|
43525
|
+
codemirrorMimeType: codemirrorMimeType$4,
|
|
43526
|
+
searchable: searchable,
|
|
43527
|
+
extensions: extensions$4,
|
|
43528
|
+
filenames: filenames$1,
|
|
43529
|
+
languageId: languageId$4,
|
|
43530
|
+
'default': _JSON
|
|
42512
43531
|
});
|
|
42513
43532
|
|
|
42514
43533
|
var name$7 = "JSON with Comments";
|
|
@@ -42522,6 +43541,7 @@ var aliases$2 = [
|
|
|
42522
43541
|
"jsonc"
|
|
42523
43542
|
];
|
|
42524
43543
|
var extensions$5 = [
|
|
43544
|
+
".jsonc",
|
|
42525
43545
|
".sublime-build",
|
|
42526
43546
|
".sublime-commands",
|
|
42527
43547
|
".sublime-completions",
|
|
@@ -42562,19 +43582,19 @@ var JSON_with_Comments = {
|
|
|
42562
43582
|
};
|
|
42563
43583
|
|
|
42564
43584
|
var JSON_with_Comments$1 = /*#__PURE__*/Object.freeze({
|
|
42565
|
-
|
|
42566
|
-
|
|
42567
|
-
|
|
42568
|
-
|
|
42569
|
-
|
|
42570
|
-
|
|
42571
|
-
|
|
42572
|
-
|
|
42573
|
-
|
|
42574
|
-
|
|
42575
|
-
|
|
42576
|
-
|
|
42577
|
-
|
|
43585
|
+
__proto__: null,
|
|
43586
|
+
name: name$7,
|
|
43587
|
+
type: type$5,
|
|
43588
|
+
group: group$5,
|
|
43589
|
+
tmScope: tmScope$5,
|
|
43590
|
+
aceMode: aceMode$5,
|
|
43591
|
+
codemirrorMode: codemirrorMode$5,
|
|
43592
|
+
codemirrorMimeType: codemirrorMimeType$5,
|
|
43593
|
+
aliases: aliases$2,
|
|
43594
|
+
extensions: extensions$5,
|
|
43595
|
+
filenames: filenames$2,
|
|
43596
|
+
languageId: languageId$5,
|
|
43597
|
+
'default': JSON_with_Comments
|
|
42578
43598
|
});
|
|
42579
43599
|
|
|
42580
43600
|
var name$8 = "JSON5";
|
|
@@ -42599,21 +43619,21 @@ var JSON5 = {
|
|
|
42599
43619
|
};
|
|
42600
43620
|
|
|
42601
43621
|
var JSON5$1 = /*#__PURE__*/Object.freeze({
|
|
42602
|
-
|
|
42603
|
-
|
|
42604
|
-
|
|
42605
|
-
|
|
42606
|
-
|
|
42607
|
-
|
|
42608
|
-
|
|
42609
|
-
|
|
42610
|
-
|
|
42611
|
-
|
|
43622
|
+
__proto__: null,
|
|
43623
|
+
name: name$8,
|
|
43624
|
+
type: type$6,
|
|
43625
|
+
extensions: extensions$6,
|
|
43626
|
+
tmScope: tmScope$6,
|
|
43627
|
+
aceMode: aceMode$6,
|
|
43628
|
+
codemirrorMode: codemirrorMode$6,
|
|
43629
|
+
codemirrorMimeType: codemirrorMimeType$6,
|
|
43630
|
+
languageId: languageId$6,
|
|
43631
|
+
'default': JSON5
|
|
42612
43632
|
});
|
|
42613
43633
|
|
|
42614
|
-
var require$$0$
|
|
43634
|
+
var require$$0$1 = getCjsExportFromNamespace(JavaScript$1);
|
|
42615
43635
|
|
|
42616
|
-
var require$$1 = getCjsExportFromNamespace(JSX$1);
|
|
43636
|
+
var require$$1$1 = getCjsExportFromNamespace(JSX$1);
|
|
42617
43637
|
|
|
42618
43638
|
var require$$2 = getCjsExportFromNamespace(TypeScript$1);
|
|
42619
43639
|
|
|
@@ -42625,12 +43645,12 @@ var require$$5 = getCjsExportFromNamespace(JSON_with_Comments$1);
|
|
|
42625
43645
|
|
|
42626
43646
|
var require$$6 = getCjsExportFromNamespace(JSON5$1);
|
|
42627
43647
|
|
|
42628
|
-
const languages = [createLanguage(require$$0$
|
|
43648
|
+
const languages = [createLanguage(require$$0$1, data => ({
|
|
42629
43649
|
since: "0.0.0",
|
|
42630
43650
|
parsers: ["babel", "flow"],
|
|
42631
43651
|
vscodeLanguageIds: ["javascript", "mongo"],
|
|
42632
43652
|
interpreters: data.interpreters.concat(["nodejs"])
|
|
42633
|
-
})), createLanguage(require$$0$
|
|
43653
|
+
})), createLanguage(require$$0$1, () => ({
|
|
42634
43654
|
name: "Flow",
|
|
42635
43655
|
since: "0.0.0",
|
|
42636
43656
|
parsers: ["babel", "flow"],
|
|
@@ -42638,7 +43658,7 @@ const languages = [createLanguage(require$$0$2, data => ({
|
|
|
42638
43658
|
aliases: [],
|
|
42639
43659
|
filenames: [],
|
|
42640
43660
|
extensions: [".js.flow"]
|
|
42641
|
-
})), createLanguage(require$$1, () => ({
|
|
43661
|
+
})), createLanguage(require$$1$1, () => ({
|
|
42642
43662
|
since: "0.0.0",
|
|
42643
43663
|
parsers: ["babel", "flow"],
|
|
42644
43664
|
vscodeLanguageIds: ["javascriptreact"]
|
|
@@ -42803,7 +43823,7 @@ const {
|
|
|
42803
43823
|
markAsRoot: markAsRoot$1
|
|
42804
43824
|
},
|
|
42805
43825
|
utils: {
|
|
42806
|
-
mapDoc: mapDoc$
|
|
43826
|
+
mapDoc: mapDoc$2
|
|
42807
43827
|
}
|
|
42808
43828
|
} = document;
|
|
42809
43829
|
|
|
@@ -42821,7 +43841,7 @@ function embed$1(path, print, textToDoc
|
|
|
42821
43841
|
return null;
|
|
42822
43842
|
|
|
42823
43843
|
function replaceNewlinesWithLiterallines(doc) {
|
|
42824
|
-
return mapDoc$
|
|
43844
|
+
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);
|
|
42825
43845
|
}
|
|
42826
43846
|
}
|
|
42827
43847
|
|
|
@@ -42832,7 +43852,7 @@ const DELIMITER_MAP = {
|
|
|
42832
43852
|
"+++": "toml"
|
|
42833
43853
|
};
|
|
42834
43854
|
|
|
42835
|
-
function parse$
|
|
43855
|
+
function parse$5(text) {
|
|
42836
43856
|
const delimiterRegex = Object.keys(DELIMITER_MAP).map(escapeStringRegexp$2).join("|");
|
|
42837
43857
|
const match = text.match( // trailing spaces after delimiters are allowed
|
|
42838
43858
|
new RegExp(`^(${delimiterRegex})[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)`));
|
|
@@ -42855,7 +43875,7 @@ function parse$4(text) {
|
|
|
42855
43875
|
};
|
|
42856
43876
|
}
|
|
42857
43877
|
|
|
42858
|
-
var frontMatter = parse$
|
|
43878
|
+
var frontMatter = parse$5;
|
|
42859
43879
|
|
|
42860
43880
|
function hasPragma$1(text) {
|
|
42861
43881
|
return pragma.hasPragma(frontMatter(text).content);
|
|
@@ -43106,7 +44126,7 @@ function getPropOfDeclNode(path) {
|
|
|
43106
44126
|
|
|
43107
44127
|
function isSCSS(parser, text) {
|
|
43108
44128
|
const hasExplicitParserChoice = parser === "less" || parser === "scss";
|
|
43109
|
-
const IS_POSSIBLY_SCSS = /(\w\s
|
|
44129
|
+
const IS_POSSIBLY_SCSS = /(\w\s*:\s*[^}:]+|#){|@import[^\n]+(?:url|,)/;
|
|
43110
44130
|
return hasExplicitParserChoice ? parser === "scss" : IS_POSSIBLY_SCSS.test(text);
|
|
43111
44131
|
}
|
|
43112
44132
|
|
|
@@ -43550,7 +44570,7 @@ function genericPrint$2(path, options, print) {
|
|
|
43550
44570
|
return concat$9(["@", // If a Less file ends up being parsed with the SCSS parser, Less
|
|
43551
44571
|
// variable declarations will be parsed as at-rules with names ending
|
|
43552
44572
|
// with a colon, so keep the original case then.
|
|
43553
|
-
isDetachedRulesetCallNode$1(node) || node.name.endsWith(":") ? node.name : maybeToLowerCase$1(node.name), node.params ? concat$9([isDetachedRulesetCallNode$1(node) ? "" : isTemplatePlaceholderNode$1(node)
|
|
44573
|
+
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 ? "" : ";"]);
|
|
43554
44574
|
}
|
|
43555
44575
|
// postcss-media-query-parser
|
|
43556
44576
|
|
|
@@ -43756,6 +44776,11 @@ function genericPrint$2(path, options, print) {
|
|
|
43756
44776
|
|
|
43757
44777
|
if (!iNextNode) {
|
|
43758
44778
|
continue;
|
|
44779
|
+
} // styled.div` background: var(--${one}); `
|
|
44780
|
+
|
|
44781
|
+
|
|
44782
|
+
if (!iPrevNode && iNode.value === "--" && iNextNode.type === "value-atword") {
|
|
44783
|
+
continue;
|
|
43759
44784
|
} // Ignore spaces before/after string interpolation (i.e. `"#{my-fn("_")}"`)
|
|
43760
44785
|
|
|
43761
44786
|
|
|
@@ -44104,17 +45129,17 @@ var CSS = {
|
|
|
44104
45129
|
};
|
|
44105
45130
|
|
|
44106
45131
|
var CSS$1 = /*#__PURE__*/Object.freeze({
|
|
44107
|
-
|
|
44108
|
-
|
|
44109
|
-
|
|
44110
|
-
|
|
44111
|
-
|
|
44112
|
-
|
|
44113
|
-
|
|
44114
|
-
|
|
44115
|
-
|
|
44116
|
-
|
|
44117
|
-
|
|
45132
|
+
__proto__: null,
|
|
45133
|
+
name: name$9,
|
|
45134
|
+
type: type$7,
|
|
45135
|
+
tmScope: tmScope$7,
|
|
45136
|
+
aceMode: aceMode$7,
|
|
45137
|
+
codemirrorMode: codemirrorMode$7,
|
|
45138
|
+
codemirrorMimeType: codemirrorMimeType$7,
|
|
45139
|
+
color: color$2,
|
|
45140
|
+
extensions: extensions$7,
|
|
45141
|
+
languageId: languageId$7,
|
|
45142
|
+
'default': CSS
|
|
44118
45143
|
});
|
|
44119
45144
|
|
|
44120
45145
|
var name$a = "PostCSS";
|
|
@@ -44138,15 +45163,15 @@ var PostCSS = {
|
|
|
44138
45163
|
};
|
|
44139
45164
|
|
|
44140
45165
|
var PostCSS$1 = /*#__PURE__*/Object.freeze({
|
|
44141
|
-
|
|
44142
|
-
|
|
44143
|
-
|
|
44144
|
-
|
|
44145
|
-
|
|
44146
|
-
|
|
44147
|
-
|
|
44148
|
-
|
|
44149
|
-
|
|
45166
|
+
__proto__: null,
|
|
45167
|
+
name: name$a,
|
|
45168
|
+
type: type$8,
|
|
45169
|
+
tmScope: tmScope$8,
|
|
45170
|
+
group: group$7,
|
|
45171
|
+
extensions: extensions$8,
|
|
45172
|
+
aceMode: aceMode$8,
|
|
45173
|
+
languageId: languageId$8,
|
|
45174
|
+
'default': PostCSS
|
|
44150
45175
|
});
|
|
44151
45176
|
|
|
44152
45177
|
var name$b = "Less";
|
|
@@ -44173,17 +45198,17 @@ var Less = {
|
|
|
44173
45198
|
};
|
|
44174
45199
|
|
|
44175
45200
|
var Less$1 = /*#__PURE__*/Object.freeze({
|
|
44176
|
-
|
|
44177
|
-
|
|
44178
|
-
|
|
44179
|
-
|
|
44180
|
-
|
|
44181
|
-
|
|
44182
|
-
|
|
44183
|
-
|
|
44184
|
-
|
|
44185
|
-
|
|
44186
|
-
|
|
45201
|
+
__proto__: null,
|
|
45202
|
+
name: name$b,
|
|
45203
|
+
type: type$9,
|
|
45204
|
+
group: group$8,
|
|
45205
|
+
extensions: extensions$9,
|
|
45206
|
+
tmScope: tmScope$9,
|
|
45207
|
+
aceMode: aceMode$9,
|
|
45208
|
+
codemirrorMode: codemirrorMode$8,
|
|
45209
|
+
codemirrorMimeType: codemirrorMimeType$8,
|
|
45210
|
+
languageId: languageId$9,
|
|
45211
|
+
'default': Less
|
|
44187
45212
|
});
|
|
44188
45213
|
|
|
44189
45214
|
var name$c = "SCSS";
|
|
@@ -44210,32 +45235,32 @@ var SCSS = {
|
|
|
44210
45235
|
};
|
|
44211
45236
|
|
|
44212
45237
|
var SCSS$1 = /*#__PURE__*/Object.freeze({
|
|
44213
|
-
|
|
44214
|
-
|
|
44215
|
-
|
|
44216
|
-
|
|
44217
|
-
|
|
44218
|
-
|
|
44219
|
-
|
|
44220
|
-
|
|
44221
|
-
|
|
44222
|
-
|
|
44223
|
-
|
|
45238
|
+
__proto__: null,
|
|
45239
|
+
name: name$c,
|
|
45240
|
+
type: type$a,
|
|
45241
|
+
tmScope: tmScope$a,
|
|
45242
|
+
group: group$9,
|
|
45243
|
+
aceMode: aceMode$a,
|
|
45244
|
+
codemirrorMode: codemirrorMode$9,
|
|
45245
|
+
codemirrorMimeType: codemirrorMimeType$9,
|
|
45246
|
+
extensions: extensions$a,
|
|
45247
|
+
languageId: languageId$a,
|
|
45248
|
+
'default': SCSS
|
|
44224
45249
|
});
|
|
44225
45250
|
|
|
44226
|
-
var require$$0$
|
|
45251
|
+
var require$$0$2 = getCjsExportFromNamespace(CSS$1);
|
|
44227
45252
|
|
|
44228
|
-
var require$$1$
|
|
45253
|
+
var require$$1$2 = getCjsExportFromNamespace(PostCSS$1);
|
|
44229
45254
|
|
|
44230
45255
|
var require$$2$1 = getCjsExportFromNamespace(Less$1);
|
|
44231
45256
|
|
|
44232
45257
|
var require$$3$1 = getCjsExportFromNamespace(SCSS$1);
|
|
44233
45258
|
|
|
44234
|
-
const languages$1 = [createLanguage(require$$0$
|
|
45259
|
+
const languages$1 = [createLanguage(require$$0$2, () => ({
|
|
44235
45260
|
since: "1.4.0",
|
|
44236
45261
|
parsers: ["css"],
|
|
44237
45262
|
vscodeLanguageIds: ["css"]
|
|
44238
|
-
})), createLanguage(require$$1$
|
|
45263
|
+
})), createLanguage(require$$1$2, () => ({
|
|
44239
45264
|
since: "1.4.0",
|
|
44240
45265
|
parsers: ["css"],
|
|
44241
45266
|
vscodeLanguageIds: ["postcss"]
|
|
@@ -44806,21 +45831,21 @@ var Handlebars = {
|
|
|
44806
45831
|
};
|
|
44807
45832
|
|
|
44808
45833
|
var Handlebars$1 = /*#__PURE__*/Object.freeze({
|
|
44809
|
-
|
|
44810
|
-
|
|
44811
|
-
|
|
44812
|
-
|
|
44813
|
-
|
|
44814
|
-
|
|
44815
|
-
|
|
44816
|
-
|
|
44817
|
-
|
|
44818
|
-
|
|
45834
|
+
__proto__: null,
|
|
45835
|
+
name: name$d,
|
|
45836
|
+
type: type$b,
|
|
45837
|
+
group: group$b,
|
|
45838
|
+
aliases: aliases$3,
|
|
45839
|
+
extensions: extensions$b,
|
|
45840
|
+
tmScope: tmScope$b,
|
|
45841
|
+
aceMode: aceMode$b,
|
|
45842
|
+
languageId: languageId$b,
|
|
45843
|
+
'default': Handlebars
|
|
44819
45844
|
});
|
|
44820
45845
|
|
|
44821
|
-
var require$$0$
|
|
45846
|
+
var require$$0$3 = getCjsExportFromNamespace(Handlebars$1);
|
|
44822
45847
|
|
|
44823
|
-
const languages$2 = [createLanguage(require$$0$
|
|
45848
|
+
const languages$2 = [createLanguage(require$$0$3, () => ({
|
|
44824
45849
|
since: null,
|
|
44825
45850
|
// unreleased
|
|
44826
45851
|
parsers: ["glimmer"],
|
|
@@ -45183,19 +46208,19 @@ var GraphQL = {
|
|
|
45183
46208
|
};
|
|
45184
46209
|
|
|
45185
46210
|
var GraphQL$1 = /*#__PURE__*/Object.freeze({
|
|
45186
|
-
|
|
45187
|
-
|
|
45188
|
-
|
|
45189
|
-
|
|
45190
|
-
|
|
45191
|
-
|
|
45192
|
-
|
|
45193
|
-
|
|
46211
|
+
__proto__: null,
|
|
46212
|
+
name: name$e,
|
|
46213
|
+
type: type$c,
|
|
46214
|
+
extensions: extensions$c,
|
|
46215
|
+
tmScope: tmScope$c,
|
|
46216
|
+
aceMode: aceMode$c,
|
|
46217
|
+
languageId: languageId$c,
|
|
46218
|
+
'default': GraphQL
|
|
45194
46219
|
});
|
|
45195
46220
|
|
|
45196
|
-
var require$$0$
|
|
46221
|
+
var require$$0$4 = getCjsExportFromNamespace(GraphQL$1);
|
|
45197
46222
|
|
|
45198
|
-
const languages$3 = [createLanguage(require$$0$
|
|
46223
|
+
const languages$3 = [createLanguage(require$$0$4, () => ({
|
|
45199
46224
|
since: "1.5.0",
|
|
45200
46225
|
parsers: ["graphql"],
|
|
45201
46226
|
vscodeLanguageIds: ["graphql"]
|
|
@@ -45401,7 +46426,7 @@ const {
|
|
|
45401
46426
|
markAsRoot: markAsRoot$2
|
|
45402
46427
|
},
|
|
45403
46428
|
utils: {
|
|
45404
|
-
mapDoc: mapDoc$
|
|
46429
|
+
mapDoc: mapDoc$3
|
|
45405
46430
|
}
|
|
45406
46431
|
} = document;
|
|
45407
46432
|
const {
|
|
@@ -45463,7 +46488,7 @@ function embed$2(path, print, textToDoc, options) {
|
|
|
45463
46488
|
}
|
|
45464
46489
|
|
|
45465
46490
|
function replaceNewlinesWithLiterallines(doc) {
|
|
45466
|
-
return mapDoc$
|
|
46491
|
+
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);
|
|
45467
46492
|
}
|
|
45468
46493
|
}
|
|
45469
46494
|
|
|
@@ -45768,7 +46793,7 @@ const {
|
|
|
45768
46793
|
group: group$d
|
|
45769
46794
|
},
|
|
45770
46795
|
utils: {
|
|
45771
|
-
mapDoc: mapDoc$
|
|
46796
|
+
mapDoc: mapDoc$4
|
|
45772
46797
|
},
|
|
45773
46798
|
printer: {
|
|
45774
46799
|
printDocToString: printDocToString$3
|
|
@@ -46085,19 +47110,6 @@ function getAncestorNode$2(path, typeOrTypes) {
|
|
|
46085
47110
|
}
|
|
46086
47111
|
|
|
46087
47112
|
function printLine(path, value, options) {
|
|
46088
|
-
const greatGrandParentNode = path.getParentNode(2);
|
|
46089
|
-
|
|
46090
|
-
if (greatGrandParentNode && greatGrandParentNode.type === "listItem") {
|
|
46091
|
-
const parentNode = path.getParentNode();
|
|
46092
|
-
const grandParentNode = path.getParentNode(1);
|
|
46093
|
-
const index = grandParentNode.children.indexOf(parentNode);
|
|
46094
|
-
const prevGrandParentNode = grandParentNode.children[index - 1];
|
|
46095
|
-
|
|
46096
|
-
if (prevGrandParentNode && prevGrandParentNode.type === "break") {
|
|
46097
|
-
return "";
|
|
46098
|
-
}
|
|
46099
|
-
}
|
|
46100
|
-
|
|
46101
47113
|
if (options.proseWrap === "preserve" && value === "\n") {
|
|
46102
47114
|
return hardline$b;
|
|
46103
47115
|
}
|
|
@@ -46349,7 +47361,7 @@ function shouldRemainTheSameContent(path) {
|
|
|
46349
47361
|
}
|
|
46350
47362
|
|
|
46351
47363
|
function normalizeDoc(doc) {
|
|
46352
|
-
return mapDoc$
|
|
47364
|
+
return mapDoc$4(doc, currentDoc => {
|
|
46353
47365
|
if (!currentDoc.parts) {
|
|
46354
47366
|
return currentDoc;
|
|
46355
47367
|
}
|
|
@@ -46515,30 +47527,30 @@ var Markdown = {
|
|
|
46515
47527
|
};
|
|
46516
47528
|
|
|
46517
47529
|
var Markdown$1 = /*#__PURE__*/Object.freeze({
|
|
46518
|
-
|
|
46519
|
-
|
|
46520
|
-
|
|
46521
|
-
|
|
46522
|
-
|
|
46523
|
-
|
|
46524
|
-
|
|
46525
|
-
|
|
46526
|
-
|
|
46527
|
-
|
|
46528
|
-
|
|
46529
|
-
|
|
46530
|
-
|
|
47530
|
+
__proto__: null,
|
|
47531
|
+
name: name$f,
|
|
47532
|
+
type: type$d,
|
|
47533
|
+
aliases: aliases$4,
|
|
47534
|
+
aceMode: aceMode$d,
|
|
47535
|
+
codemirrorMode: codemirrorMode$a,
|
|
47536
|
+
codemirrorMimeType: codemirrorMimeType$a,
|
|
47537
|
+
wrap: wrap,
|
|
47538
|
+
extensions: extensions$d,
|
|
47539
|
+
filenames: filenames$3,
|
|
47540
|
+
tmScope: tmScope$d,
|
|
47541
|
+
languageId: languageId$d,
|
|
47542
|
+
'default': Markdown
|
|
46531
47543
|
});
|
|
46532
47544
|
|
|
46533
|
-
var require$$0$
|
|
47545
|
+
var require$$0$5 = getCjsExportFromNamespace(Markdown$1);
|
|
46534
47546
|
|
|
46535
|
-
const languages$4 = [createLanguage(require$$0$
|
|
47547
|
+
const languages$4 = [createLanguage(require$$0$5, data => ({
|
|
46536
47548
|
since: "1.8.0",
|
|
46537
47549
|
parsers: ["markdown"],
|
|
46538
47550
|
vscodeLanguageIds: ["markdown"],
|
|
46539
47551
|
filenames: data.filenames.concat(["README"]),
|
|
46540
47552
|
extensions: data.extensions.filter(extension => extension !== ".mdx")
|
|
46541
|
-
})), createLanguage(require$$0$
|
|
47553
|
+
})), createLanguage(require$$0$5, () => ({
|
|
46542
47554
|
name: "MDX",
|
|
46543
47555
|
since: "1.15.0",
|
|
46544
47556
|
parsers: ["mdx"],
|
|
@@ -46819,8 +47831,8 @@ var index = [
|
|
|
46819
47831
|
];
|
|
46820
47832
|
|
|
46821
47833
|
var htmlTagNames = /*#__PURE__*/Object.freeze({
|
|
46822
|
-
|
|
46823
|
-
|
|
47834
|
+
__proto__: null,
|
|
47835
|
+
'default': index
|
|
46824
47836
|
});
|
|
46825
47837
|
|
|
46826
47838
|
var a = [
|
|
@@ -46945,7 +47957,7 @@ var colgroup = [
|
|
|
46945
47957
|
"valign",
|
|
46946
47958
|
"width"
|
|
46947
47959
|
];
|
|
46948
|
-
var data = [
|
|
47960
|
+
var data$1 = [
|
|
46949
47961
|
"value"
|
|
46950
47962
|
];
|
|
46951
47963
|
var del$1 = [
|
|
@@ -47438,7 +48450,7 @@ var index$1 = {
|
|
|
47438
48450
|
caption: caption,
|
|
47439
48451
|
col: col,
|
|
47440
48452
|
colgroup: colgroup,
|
|
47441
|
-
data: data,
|
|
48453
|
+
data: data$1,
|
|
47442
48454
|
del: del$1,
|
|
47443
48455
|
details: details,
|
|
47444
48456
|
dfn: dfn,
|
|
@@ -47504,87 +48516,87 @@ var index$1 = {
|
|
|
47504
48516
|
};
|
|
47505
48517
|
|
|
47506
48518
|
var htmlElementAttributes = /*#__PURE__*/Object.freeze({
|
|
47507
|
-
|
|
47508
|
-
|
|
47509
|
-
|
|
47510
|
-
|
|
47511
|
-
|
|
47512
|
-
|
|
47513
|
-
|
|
47514
|
-
|
|
47515
|
-
|
|
47516
|
-
|
|
47517
|
-
|
|
47518
|
-
|
|
47519
|
-
|
|
47520
|
-
|
|
47521
|
-
|
|
47522
|
-
|
|
47523
|
-
|
|
47524
|
-
|
|
47525
|
-
|
|
47526
|
-
|
|
47527
|
-
|
|
47528
|
-
|
|
47529
|
-
|
|
47530
|
-
|
|
47531
|
-
|
|
47532
|
-
|
|
47533
|
-
|
|
47534
|
-
|
|
47535
|
-
|
|
47536
|
-
|
|
47537
|
-
|
|
47538
|
-
|
|
47539
|
-
|
|
47540
|
-
|
|
47541
|
-
|
|
47542
|
-
|
|
47543
|
-
|
|
47544
|
-
|
|
47545
|
-
|
|
47546
|
-
|
|
47547
|
-
|
|
47548
|
-
|
|
47549
|
-
|
|
47550
|
-
|
|
47551
|
-
|
|
47552
|
-
|
|
47553
|
-
|
|
47554
|
-
|
|
47555
|
-
|
|
47556
|
-
|
|
47557
|
-
|
|
47558
|
-
|
|
47559
|
-
|
|
47560
|
-
|
|
47561
|
-
|
|
47562
|
-
|
|
47563
|
-
|
|
47564
|
-
|
|
47565
|
-
|
|
47566
|
-
|
|
47567
|
-
|
|
47568
|
-
|
|
47569
|
-
|
|
47570
|
-
|
|
47571
|
-
|
|
47572
|
-
|
|
47573
|
-
|
|
47574
|
-
|
|
47575
|
-
|
|
47576
|
-
|
|
47577
|
-
|
|
47578
|
-
|
|
47579
|
-
|
|
47580
|
-
|
|
47581
|
-
|
|
47582
|
-
|
|
47583
|
-
|
|
47584
|
-
|
|
47585
|
-
|
|
47586
|
-
|
|
47587
|
-
|
|
48519
|
+
__proto__: null,
|
|
48520
|
+
a: a,
|
|
48521
|
+
abbr: abbr,
|
|
48522
|
+
applet: applet,
|
|
48523
|
+
area: area,
|
|
48524
|
+
audio: audio,
|
|
48525
|
+
base: base,
|
|
48526
|
+
basefont: basefont,
|
|
48527
|
+
bdo: bdo,
|
|
48528
|
+
blockquote: blockquote,
|
|
48529
|
+
body: body,
|
|
48530
|
+
br: br,
|
|
48531
|
+
button: button,
|
|
48532
|
+
canvas: canvas,
|
|
48533
|
+
caption: caption,
|
|
48534
|
+
col: col,
|
|
48535
|
+
colgroup: colgroup,
|
|
48536
|
+
data: data$1,
|
|
48537
|
+
del: del$1,
|
|
48538
|
+
details: details,
|
|
48539
|
+
dfn: dfn,
|
|
48540
|
+
dialog: dialog,
|
|
48541
|
+
dir: dir,
|
|
48542
|
+
div: div,
|
|
48543
|
+
dl: dl,
|
|
48544
|
+
embed: embed$3,
|
|
48545
|
+
fieldset: fieldset,
|
|
48546
|
+
font: font,
|
|
48547
|
+
form: form,
|
|
48548
|
+
frame: frame,
|
|
48549
|
+
frameset: frameset,
|
|
48550
|
+
h1: h1,
|
|
48551
|
+
h2: h2,
|
|
48552
|
+
h3: h3,
|
|
48553
|
+
h4: h4,
|
|
48554
|
+
h5: h5,
|
|
48555
|
+
h6: h6,
|
|
48556
|
+
head: head,
|
|
48557
|
+
hr: hr,
|
|
48558
|
+
html: html,
|
|
48559
|
+
iframe: iframe,
|
|
48560
|
+
img: img,
|
|
48561
|
+
input: input,
|
|
48562
|
+
ins: ins,
|
|
48563
|
+
isindex: isindex,
|
|
48564
|
+
label: label,
|
|
48565
|
+
legend: legend,
|
|
48566
|
+
li: li,
|
|
48567
|
+
link: link$3,
|
|
48568
|
+
map: map$1,
|
|
48569
|
+
menu: menu,
|
|
48570
|
+
meta: meta,
|
|
48571
|
+
meter: meter,
|
|
48572
|
+
object: object,
|
|
48573
|
+
ol: ol,
|
|
48574
|
+
optgroup: optgroup,
|
|
48575
|
+
option: option,
|
|
48576
|
+
output: output,
|
|
48577
|
+
p: p,
|
|
48578
|
+
param: param,
|
|
48579
|
+
pre: pre,
|
|
48580
|
+
progress: progress,
|
|
48581
|
+
q: q,
|
|
48582
|
+
script: script,
|
|
48583
|
+
select: select,
|
|
48584
|
+
slot: slot,
|
|
48585
|
+
source: source$1,
|
|
48586
|
+
style: style,
|
|
48587
|
+
table: table,
|
|
48588
|
+
tbody: tbody,
|
|
48589
|
+
td: td,
|
|
48590
|
+
textarea: textarea,
|
|
48591
|
+
tfoot: tfoot,
|
|
48592
|
+
th: th,
|
|
48593
|
+
thead: thead,
|
|
48594
|
+
time: time,
|
|
48595
|
+
tr: tr,
|
|
48596
|
+
track: track,
|
|
48597
|
+
ul: ul,
|
|
48598
|
+
video: video,
|
|
48599
|
+
'default': index$1
|
|
47588
48600
|
});
|
|
47589
48601
|
|
|
47590
48602
|
var htmlTagNames$1 = getCjsExportFromNamespace(htmlTagNames);
|
|
@@ -47698,7 +48710,7 @@ function isTextLikeNode(node) {
|
|
|
47698
48710
|
}
|
|
47699
48711
|
|
|
47700
48712
|
function isScriptLikeTag(node) {
|
|
47701
|
-
return node.type === "element" && (node.fullName === "script" || node.fullName === "style" || node.fullName === "svg:style");
|
|
48713
|
+
return node.type === "element" && (node.fullName === "script" || node.fullName === "style" || node.fullName === "svg:style" || isUnknownNamespace(node) && (node.name === "script" || node.name === "style"));
|
|
47702
48714
|
}
|
|
47703
48715
|
|
|
47704
48716
|
function isFrontMatterNode(node) {
|
|
@@ -48581,7 +49593,7 @@ function deepUnique(array) {
|
|
|
48581
49593
|
});
|
|
48582
49594
|
}
|
|
48583
49595
|
|
|
48584
|
-
var parse$
|
|
49596
|
+
var parse$6 = string => {
|
|
48585
49597
|
return deepUnique(string.split(',').map(part => {
|
|
48586
49598
|
const result = {};
|
|
48587
49599
|
part.trim().split(/\s+/).forEach((element, index) => {
|
|
@@ -48634,7 +49646,7 @@ var stringify$2 = array => {
|
|
|
48634
49646
|
};
|
|
48635
49647
|
|
|
48636
49648
|
var srcset = {
|
|
48637
|
-
parse: parse$
|
|
49649
|
+
parse: parse$6,
|
|
48638
49650
|
stringify: stringify$2
|
|
48639
49651
|
};
|
|
48640
49652
|
|
|
@@ -48699,7 +49711,7 @@ const {
|
|
|
48699
49711
|
builders,
|
|
48700
49712
|
utils: {
|
|
48701
49713
|
stripTrailingHardline: stripTrailingHardline$2,
|
|
48702
|
-
mapDoc: mapDoc$
|
|
49714
|
+
mapDoc: mapDoc$5
|
|
48703
49715
|
}
|
|
48704
49716
|
} = document;
|
|
48705
49717
|
const {
|
|
@@ -48813,7 +49825,7 @@ function embed$4(path, print, textToDoc, options) {
|
|
|
48813
49825
|
}, opts)), options);
|
|
48814
49826
|
|
|
48815
49827
|
if (embeddedAttributeValueDoc) {
|
|
48816
|
-
return concat$g([node.rawName, '="', group$f(mapDoc$
|
|
49828
|
+
return concat$g([node.rawName, '="', group$f(mapDoc$5(embeddedAttributeValueDoc, doc => typeof doc === "string" ? doc.replace(/"/g, """) : doc)), '"']);
|
|
48817
49829
|
}
|
|
48818
49830
|
|
|
48819
49831
|
break;
|
|
@@ -49021,7 +50033,7 @@ function printChildren$2(path, options, print) {
|
|
|
49021
50033
|
}
|
|
49022
50034
|
|
|
49023
50035
|
function printBetweenLine(prevNode, nextNode) {
|
|
49024
|
-
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) && (
|
|
50036
|
+
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) ||
|
|
49025
50037
|
/**
|
|
49026
50038
|
* 123<a
|
|
49027
50039
|
* ~
|
|
@@ -49209,7 +50221,7 @@ function printOpeningTagStartMarker(node) {
|
|
|
49209
50221
|
}
|
|
49210
50222
|
|
|
49211
50223
|
function printOpeningTagEndMarker(node) {
|
|
49212
|
-
assert(!node.isSelfClosing);
|
|
50224
|
+
assert$1(!node.isSelfClosing);
|
|
49213
50225
|
|
|
49214
50226
|
switch (node.type) {
|
|
49215
50227
|
case "ieConditionalComment":
|
|
@@ -49228,7 +50240,7 @@ function printOpeningTagEndMarker(node) {
|
|
|
49228
50240
|
}
|
|
49229
50241
|
|
|
49230
50242
|
function printClosingTagStartMarker(node, options) {
|
|
49231
|
-
assert(!node.isSelfClosing);
|
|
50243
|
+
assert$1(!node.isSelfClosing);
|
|
49232
50244
|
|
|
49233
50245
|
if (shouldNotPrintClosingTag$1(node, options)) {
|
|
49234
50246
|
return "";
|
|
@@ -49536,18 +50548,18 @@ var HTML = {
|
|
|
49536
50548
|
};
|
|
49537
50549
|
|
|
49538
50550
|
var HTML$1 = /*#__PURE__*/Object.freeze({
|
|
49539
|
-
|
|
49540
|
-
|
|
49541
|
-
|
|
49542
|
-
|
|
49543
|
-
|
|
49544
|
-
|
|
49545
|
-
|
|
49546
|
-
|
|
49547
|
-
|
|
49548
|
-
|
|
49549
|
-
|
|
49550
|
-
|
|
50551
|
+
__proto__: null,
|
|
50552
|
+
name: name$g,
|
|
50553
|
+
type: type$e,
|
|
50554
|
+
tmScope: tmScope$e,
|
|
50555
|
+
aceMode: aceMode$e,
|
|
50556
|
+
codemirrorMode: codemirrorMode$b,
|
|
50557
|
+
codemirrorMimeType: codemirrorMimeType$b,
|
|
50558
|
+
color: color$3,
|
|
50559
|
+
aliases: aliases$5,
|
|
50560
|
+
extensions: extensions$e,
|
|
50561
|
+
languageId: languageId$e,
|
|
50562
|
+
'default': HTML
|
|
49551
50563
|
});
|
|
49552
50564
|
|
|
49553
50565
|
var name$h = "Vue";
|
|
@@ -49570,42 +50582,42 @@ var Vue = {
|
|
|
49570
50582
|
};
|
|
49571
50583
|
|
|
49572
50584
|
var Vue$1 = /*#__PURE__*/Object.freeze({
|
|
49573
|
-
|
|
49574
|
-
|
|
49575
|
-
|
|
49576
|
-
|
|
49577
|
-
|
|
49578
|
-
|
|
49579
|
-
|
|
49580
|
-
|
|
49581
|
-
|
|
50585
|
+
__proto__: null,
|
|
50586
|
+
name: name$h,
|
|
50587
|
+
type: type$f,
|
|
50588
|
+
color: color$4,
|
|
50589
|
+
extensions: extensions$f,
|
|
50590
|
+
tmScope: tmScope$f,
|
|
50591
|
+
aceMode: aceMode$f,
|
|
50592
|
+
languageId: languageId$f,
|
|
50593
|
+
'default': Vue
|
|
49582
50594
|
});
|
|
49583
50595
|
|
|
49584
|
-
var require$$0$
|
|
50596
|
+
var require$$0$6 = getCjsExportFromNamespace(HTML$1);
|
|
49585
50597
|
|
|
49586
|
-
var require$$1$
|
|
50598
|
+
var require$$1$3 = getCjsExportFromNamespace(Vue$1);
|
|
49587
50599
|
|
|
49588
|
-
const languages$5 = [createLanguage(require$$0$
|
|
50600
|
+
const languages$5 = [createLanguage(require$$0$6, () => ({
|
|
49589
50601
|
name: "Angular",
|
|
49590
50602
|
since: "1.15.0",
|
|
49591
50603
|
parsers: ["angular"],
|
|
49592
50604
|
vscodeLanguageIds: ["html"],
|
|
49593
50605
|
extensions: [".component.html"],
|
|
49594
50606
|
filenames: []
|
|
49595
|
-
})), createLanguage(require$$0$
|
|
50607
|
+
})), createLanguage(require$$0$6, data => ({
|
|
49596
50608
|
since: "1.15.0",
|
|
49597
50609
|
parsers: ["html"],
|
|
49598
50610
|
vscodeLanguageIds: ["html"],
|
|
49599
50611
|
extensions: data.extensions.concat([".mjml" // MJML is considered XML in Linguist but it should be formatted as HTML
|
|
49600
50612
|
])
|
|
49601
|
-
})), createLanguage(require$$0$
|
|
50613
|
+
})), createLanguage(require$$0$6, () => ({
|
|
49602
50614
|
name: "Lightning Web Components",
|
|
49603
50615
|
since: "1.17.0",
|
|
49604
50616
|
parsers: ["lwc"],
|
|
49605
50617
|
vscodeLanguageIds: ["html"],
|
|
49606
50618
|
extensions: [],
|
|
49607
50619
|
filenames: []
|
|
49608
|
-
})), createLanguage(require$$1$
|
|
50620
|
+
})), createLanguage(require$$1$3, () => ({
|
|
49609
50621
|
since: "1.10.0",
|
|
49610
50622
|
parsers: ["vue"],
|
|
49611
50623
|
vscodeLanguageIds: ["vue"]
|
|
@@ -50332,7 +51344,8 @@ var filenames$4 = [
|
|
|
50332
51344
|
".clang-format",
|
|
50333
51345
|
".clang-tidy",
|
|
50334
51346
|
".gemrc",
|
|
50335
|
-
"glide.lock"
|
|
51347
|
+
"glide.lock",
|
|
51348
|
+
"yarn.lock"
|
|
50336
51349
|
];
|
|
50337
51350
|
var aceMode$g = "yaml";
|
|
50338
51351
|
var codemirrorMode$c = "yaml";
|
|
@@ -50352,26 +51365,28 @@ var YAML = {
|
|
|
50352
51365
|
};
|
|
50353
51366
|
|
|
50354
51367
|
var YAML$1 = /*#__PURE__*/Object.freeze({
|
|
50355
|
-
|
|
50356
|
-
|
|
50357
|
-
|
|
50358
|
-
|
|
50359
|
-
|
|
50360
|
-
|
|
50361
|
-
|
|
50362
|
-
|
|
50363
|
-
|
|
50364
|
-
|
|
50365
|
-
|
|
50366
|
-
|
|
51368
|
+
__proto__: null,
|
|
51369
|
+
name: name$i,
|
|
51370
|
+
type: type$g,
|
|
51371
|
+
tmScope: tmScope$g,
|
|
51372
|
+
aliases: aliases$6,
|
|
51373
|
+
extensions: extensions$g,
|
|
51374
|
+
filenames: filenames$4,
|
|
51375
|
+
aceMode: aceMode$g,
|
|
51376
|
+
codemirrorMode: codemirrorMode$c,
|
|
51377
|
+
codemirrorMimeType: codemirrorMimeType$c,
|
|
51378
|
+
languageId: languageId$g,
|
|
51379
|
+
'default': YAML
|
|
50367
51380
|
});
|
|
50368
51381
|
|
|
50369
|
-
var require$$0$
|
|
51382
|
+
var require$$0$7 = getCjsExportFromNamespace(YAML$1);
|
|
50370
51383
|
|
|
50371
|
-
const languages$6 = [createLanguage(require$$0$
|
|
51384
|
+
const languages$6 = [createLanguage(require$$0$7, data => ({
|
|
50372
51385
|
since: "1.14.0",
|
|
50373
51386
|
parsers: ["yaml"],
|
|
50374
|
-
vscodeLanguageIds: ["yaml"]
|
|
51387
|
+
vscodeLanguageIds: ["yaml"],
|
|
51388
|
+
// yarn.lock is not YAML: https://github.com/yarnpkg/yarn/issues/5629
|
|
51389
|
+
filenames: data.filenames.filter(filename => filename !== "yarn.lock")
|
|
50375
51390
|
}))];
|
|
50376
51391
|
var languageYaml = {
|
|
50377
51392
|
languages: languages$6,
|
|
@@ -50466,11 +51481,11 @@ languageCss, {
|
|
|
50466
51481
|
},
|
|
50467
51482
|
|
|
50468
51483
|
get less() {
|
|
50469
|
-
return require("./parser-postcss").parsers.
|
|
51484
|
+
return require("./parser-postcss").parsers.less;
|
|
50470
51485
|
},
|
|
50471
51486
|
|
|
50472
51487
|
get scss() {
|
|
50473
|
-
return require("./parser-postcss").parsers.
|
|
51488
|
+
return require("./parser-postcss").parsers.scss;
|
|
50474
51489
|
}
|
|
50475
51490
|
|
|
50476
51491
|
}
|
|
@@ -50573,10 +51588,10 @@ function load(plugins, pluginSearchDirs) {
|
|
|
50573
51588
|
|
|
50574
51589
|
try {
|
|
50575
51590
|
// try local files
|
|
50576
|
-
requirePath =
|
|
51591
|
+
requirePath = resolve_1(path$2.resolve(process.cwd(), pluginName));
|
|
50577
51592
|
} catch (_) {
|
|
50578
51593
|
// try node modules
|
|
50579
|
-
requirePath =
|
|
51594
|
+
requirePath = resolve_1(pluginName, {
|
|
50580
51595
|
paths: [process.cwd()]
|
|
50581
51596
|
});
|
|
50582
51597
|
}
|
|
@@ -50587,8 +51602,8 @@ function load(plugins, pluginSearchDirs) {
|
|
|
50587
51602
|
};
|
|
50588
51603
|
});
|
|
50589
51604
|
const externalAutoLoadPluginInfos = pluginSearchDirs.map(pluginSearchDir => {
|
|
50590
|
-
const resolvedPluginSearchDir = path$
|
|
50591
|
-
const nodeModulesDir = path$
|
|
51605
|
+
const resolvedPluginSearchDir = path$2.resolve(process.cwd(), pluginSearchDir);
|
|
51606
|
+
const nodeModulesDir = path$2.resolve(resolvedPluginSearchDir, "node_modules"); // In some fringe cases (ex: files "mounted" as virtual directories), the
|
|
50592
51607
|
// isDirectory(resolvedPluginSearchDir) check might be false even though
|
|
50593
51608
|
// the node_modules actually exists.
|
|
50594
51609
|
|
|
@@ -50598,7 +51613,7 @@ function load(plugins, pluginSearchDirs) {
|
|
|
50598
51613
|
|
|
50599
51614
|
return memoizedSearch(nodeModulesDir).map(pluginName => ({
|
|
50600
51615
|
name: pluginName,
|
|
50601
|
-
requirePath:
|
|
51616
|
+
requirePath: resolve_1(pluginName, {
|
|
50602
51617
|
paths: [resolvedPluginSearchDir]
|
|
50603
51618
|
})
|
|
50604
51619
|
}));
|
|
@@ -50614,12 +51629,12 @@ function findPluginsInNodeModules(nodeModulesDir) {
|
|
|
50614
51629
|
cwd: nodeModulesDir,
|
|
50615
51630
|
expandDirectories: false
|
|
50616
51631
|
});
|
|
50617
|
-
return pluginPackageJsonPaths.map(path$
|
|
51632
|
+
return pluginPackageJsonPaths.map(path$2.dirname);
|
|
50618
51633
|
}
|
|
50619
51634
|
|
|
50620
51635
|
function isDirectory$1(dir) {
|
|
50621
51636
|
try {
|
|
50622
|
-
return fs$
|
|
51637
|
+
return fs$3.statSync(dir).isDirectory();
|
|
50623
51638
|
} catch (e) {
|
|
50624
51639
|
return false;
|
|
50625
51640
|
}
|
|
@@ -50632,7 +51647,7 @@ var loadPlugins = {
|
|
|
50632
51647
|
|
|
50633
51648
|
const {
|
|
50634
51649
|
version: version$2
|
|
50635
|
-
} = require$$
|
|
51650
|
+
} = require$$1;
|
|
50636
51651
|
const {
|
|
50637
51652
|
getSupportInfo: getSupportInfo$2
|
|
50638
51653
|
} = support;
|
|
@@ -50957,7 +51972,7 @@ value = function () {
|
|
|
50957
51972
|
// functions and variables.
|
|
50958
51973
|
|
|
50959
51974
|
|
|
50960
|
-
var parse$
|
|
51975
|
+
var parse$7 = function (source, reviver) {
|
|
50961
51976
|
var result;
|
|
50962
51977
|
text = source;
|
|
50963
51978
|
at = 0;
|
|
@@ -51151,10 +52166,10 @@ var stringify$3 = function (value, replacer, space) {
|
|
|
51151
52166
|
});
|
|
51152
52167
|
};
|
|
51153
52168
|
|
|
51154
|
-
var parse$
|
|
52169
|
+
var parse$8 = parse$7;
|
|
51155
52170
|
var stringify$4 = stringify$3;
|
|
51156
52171
|
var jsonify = {
|
|
51157
|
-
parse: parse$
|
|
52172
|
+
parse: parse$8,
|
|
51158
52173
|
stringify: stringify$4
|
|
51159
52174
|
};
|
|
51160
52175
|
|
|
@@ -52075,7 +53090,7 @@ function* expandPatterns(context) {
|
|
|
52075
53090
|
continue;
|
|
52076
53091
|
}
|
|
52077
53092
|
|
|
52078
|
-
const relativePath = path$
|
|
53093
|
+
const relativePath = path$2.relative(cwd, pathOrError); // filter out duplicates
|
|
52079
53094
|
|
|
52080
53095
|
if (seen.has(relativePath)) {
|
|
52081
53096
|
continue;
|
|
@@ -52116,7 +53131,7 @@ function* expandPatternsInternal(context) {
|
|
|
52116
53131
|
const entries = [];
|
|
52117
53132
|
|
|
52118
53133
|
for (const pattern of context.filePatterns) {
|
|
52119
|
-
const absolutePath = path$
|
|
53134
|
+
const absolutePath = path$2.resolve(cwd, pattern);
|
|
52120
53135
|
|
|
52121
53136
|
if (containsIgnoredPathSegment(absolutePath, cwd, silentlyIgnoredDirs)) {
|
|
52122
53137
|
continue;
|
|
@@ -52207,7 +53222,7 @@ const errorMessages = {
|
|
|
52207
53222
|
*/
|
|
52208
53223
|
|
|
52209
53224
|
function containsIgnoredPathSegment(absolutePath, cwd, ignoredDirectories) {
|
|
52210
|
-
return path$
|
|
53225
|
+
return path$2.relative(cwd, absolutePath).split(path$2.sep).some(dir => ignoredDirectories[dir]);
|
|
52211
53226
|
}
|
|
52212
53227
|
/**
|
|
52213
53228
|
* @param {string[]} paths
|
|
@@ -52226,7 +53241,7 @@ function sortPaths(paths) {
|
|
|
52226
53241
|
|
|
52227
53242
|
function statSafeSync(filePath) {
|
|
52228
53243
|
try {
|
|
52229
|
-
return fs$
|
|
53244
|
+
return fs$3.statSync(filePath);
|
|
52230
53245
|
} catch (error) {
|
|
52231
53246
|
/* istanbul ignore next */
|
|
52232
53247
|
if (error.code !== "ENOENT") {
|
|
@@ -52248,7 +53263,7 @@ function escapePathForGlob(path) {
|
|
|
52248
53263
|
.replace(/\0/g, "@(\\\\)"); // Workaround for fast-glob#262 (part 2)
|
|
52249
53264
|
}
|
|
52250
53265
|
|
|
52251
|
-
const isWindows = path$
|
|
53266
|
+
const isWindows = path$2.sep === "\\";
|
|
52252
53267
|
/**
|
|
52253
53268
|
* Using backslashes in globs is probably not okay, but not accepting
|
|
52254
53269
|
* backslashes as path separators on Windows is even more not okay.
|
|
@@ -52495,7 +53510,7 @@ function cliifyOptions(object, apiDetailedOptionMap) {
|
|
|
52495
53510
|
}
|
|
52496
53511
|
|
|
52497
53512
|
function diff(a, b) {
|
|
52498
|
-
return require$$0
|
|
53513
|
+
return require$$0.createTwoFilesPatch("", "", a, b, "", "", {
|
|
52499
53514
|
context: 2
|
|
52500
53515
|
});
|
|
52501
53516
|
}
|
|
@@ -52503,8 +53518,8 @@ function diff(a, b) {
|
|
|
52503
53518
|
function handleError(context, filename, error) {
|
|
52504
53519
|
if (error instanceof errors.UndefinedParserError) {
|
|
52505
53520
|
if (context.argv.write && isTty()) {
|
|
52506
|
-
readline.clearLine(process.stdout, 0);
|
|
52507
|
-
readline.cursorTo(process.stdout, 0, null);
|
|
53521
|
+
readline$1.clearLine(process.stdout, 0);
|
|
53522
|
+
readline$1.cursorTo(process.stdout, 0, null);
|
|
52508
53523
|
}
|
|
52509
53524
|
|
|
52510
53525
|
if (!context.argv.check && !context.argv["list-different"]) {
|
|
@@ -52547,7 +53562,7 @@ function logResolvedConfigPathOrDie(context) {
|
|
|
52547
53562
|
const configFile = prettier.resolveConfigFile.sync(context.argv["find-config-path"]);
|
|
52548
53563
|
|
|
52549
53564
|
if (configFile) {
|
|
52550
|
-
context.logger.log(path$
|
|
53565
|
+
context.logger.log(path$2.relative(process.cwd(), configFile));
|
|
52551
53566
|
} else {
|
|
52552
53567
|
process.exit(1);
|
|
52553
53568
|
}
|
|
@@ -52765,11 +53780,11 @@ function applyConfigPrecedence(context, options) {
|
|
|
52765
53780
|
}
|
|
52766
53781
|
|
|
52767
53782
|
function formatStdin(context) {
|
|
52768
|
-
const filepath = context.argv["stdin-filepath"] ? path$
|
|
53783
|
+
const filepath = context.argv["stdin-filepath"] ? path$2.resolve(process.cwd(), context.argv["stdin-filepath"]) : process.cwd();
|
|
52769
53784
|
const ignorer = createIgnorerFromContextOrDie(context); // If there's an ignore-path set, the filename must be relative to the
|
|
52770
53785
|
// ignore path, not the current working directory.
|
|
52771
53786
|
|
|
52772
|
-
const relativeFilepath = context.argv["ignore-path"] ? path$
|
|
53787
|
+
const relativeFilepath = context.argv["ignore-path"] ? path$2.relative(path$2.dirname(context.argv["ignore-path"]), filepath) : path$2.relative(process.cwd(), filepath);
|
|
52773
53788
|
thirdParty.getStream(process.stdin).then(input => {
|
|
52774
53789
|
if (relativeFilepath && ignorer.filter([relativeFilepath]).length === 0) {
|
|
52775
53790
|
writeOutput(context, {
|
|
@@ -52820,7 +53835,7 @@ function formatFiles(context) {
|
|
|
52820
53835
|
const filename = pathOrError; // If there's an ignore-path set, the filename must be relative to the
|
|
52821
53836
|
// ignore path, not the current working directory.
|
|
52822
53837
|
|
|
52823
|
-
const ignoreFilename = context.argv["ignore-path"] ? path$
|
|
53838
|
+
const ignoreFilename = context.argv["ignore-path"] ? path$2.relative(path$2.dirname(context.argv["ignore-path"]), filename) : filename;
|
|
52824
53839
|
const fileIgnored = ignorer.filter([ignoreFilename]).length === 0;
|
|
52825
53840
|
|
|
52826
53841
|
if (fileIgnored && (context.argv["debug-check"] || context.argv.write || context.argv.check || context.argv["list-different"])) {
|
|
@@ -52840,7 +53855,7 @@ function formatFiles(context) {
|
|
|
52840
53855
|
let input;
|
|
52841
53856
|
|
|
52842
53857
|
try {
|
|
52843
|
-
input = fs$
|
|
53858
|
+
input = fs$3.readFileSync(filename, "utf8");
|
|
52844
53859
|
} catch (error) {
|
|
52845
53860
|
// Add newline to split errors from filename line.
|
|
52846
53861
|
context.logger.log("");
|
|
@@ -52873,8 +53888,8 @@ function formatFiles(context) {
|
|
|
52873
53888
|
|
|
52874
53889
|
if (isTty()) {
|
|
52875
53890
|
// Remove previously printed filename to log it with duration.
|
|
52876
|
-
readline.clearLine(process.stdout, 0);
|
|
52877
|
-
readline.cursorTo(process.stdout, 0, null);
|
|
53891
|
+
readline$1.clearLine(process.stdout, 0);
|
|
53892
|
+
readline$1.cursorTo(process.stdout, 0, null);
|
|
52878
53893
|
}
|
|
52879
53894
|
|
|
52880
53895
|
if (context.argv.write) {
|
|
@@ -52886,7 +53901,7 @@ function formatFiles(context) {
|
|
|
52886
53901
|
}
|
|
52887
53902
|
|
|
52888
53903
|
try {
|
|
52889
|
-
fs$
|
|
53904
|
+
fs$3.writeFileSync(filename, output, "utf8");
|
|
52890
53905
|
} catch (error) {
|
|
52891
53906
|
context.logger.error(`Unable to write file: ${filename}\n${error.message}`); // Don't exit the process if one file failed
|
|
52892
53907
|
|
|
@@ -53248,7 +54263,7 @@ function normalizeContextArgv(context, keys) {
|
|
|
53248
54263
|
} //------------------------------context-util-end--------------------------------
|
|
53249
54264
|
|
|
53250
54265
|
|
|
53251
|
-
var util$
|
|
54266
|
+
var util$3 = {
|
|
53252
54267
|
createContext,
|
|
53253
54268
|
createDetailedOptionMap,
|
|
53254
54269
|
createDetailedUsage,
|
|
@@ -53262,11 +54277,13 @@ var util$2 = {
|
|
|
53262
54277
|
normalizeDetailedOptionMap
|
|
53263
54278
|
};
|
|
53264
54279
|
|
|
54280
|
+
pleaseUpgradeNode(require$$1);
|
|
54281
|
+
|
|
53265
54282
|
function run(args) {
|
|
53266
|
-
const context = util$
|
|
54283
|
+
const context = util$3.createContext(args);
|
|
53267
54284
|
|
|
53268
54285
|
try {
|
|
53269
|
-
util$
|
|
54286
|
+
util$3.initContext(context);
|
|
53270
54287
|
context.logger.debug(`normalized argv: ${JSON.stringify(context.argv)}`);
|
|
53271
54288
|
|
|
53272
54289
|
if (context.argv.check && context.argv["list-different"]) {
|
|
@@ -53295,7 +54312,7 @@ function run(args) {
|
|
|
53295
54312
|
}
|
|
53296
54313
|
|
|
53297
54314
|
if (context.argv.help !== undefined) {
|
|
53298
|
-
context.logger.log(typeof context.argv.help === "string" && context.argv.help !== "" ? util$
|
|
54315
|
+
context.logger.log(typeof context.argv.help === "string" && context.argv.help !== "" ? util$3.createDetailedUsage(context, context.argv.help) : util$3.createUsage(context));
|
|
53299
54316
|
process.exit(0);
|
|
53300
54317
|
}
|
|
53301
54318
|
|
|
@@ -53310,15 +54327,15 @@ function run(args) {
|
|
|
53310
54327
|
const useStdin = !hasFilePatterns && (!process.stdin.isTTY || context.args["stdin-filepath"]);
|
|
53311
54328
|
|
|
53312
54329
|
if (context.argv["find-config-path"]) {
|
|
53313
|
-
util$
|
|
54330
|
+
util$3.logResolvedConfigPathOrDie(context);
|
|
53314
54331
|
} else if (context.argv["file-info"]) {
|
|
53315
|
-
util$
|
|
54332
|
+
util$3.logFileInfoOrDie(context);
|
|
53316
54333
|
} else if (useStdin) {
|
|
53317
|
-
util$
|
|
54334
|
+
util$3.formatStdin(context);
|
|
53318
54335
|
} else if (hasFilePatterns) {
|
|
53319
|
-
util$
|
|
54336
|
+
util$3.formatFiles(context);
|
|
53320
54337
|
} else {
|
|
53321
|
-
context.logger.log(util$
|
|
54338
|
+
context.logger.log(util$3.createUsage(context));
|
|
53322
54339
|
process.exit(1);
|
|
53323
54340
|
}
|
|
53324
54341
|
} catch (error) {
|