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/index.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
4
|
|
|
5
|
-
var fs$
|
|
6
|
-
var path$
|
|
7
|
-
var os = _interopDefault(require('os'));
|
|
8
|
-
var tty = _interopDefault(require('tty'));
|
|
9
|
-
var assert = _interopDefault(require('assert'));
|
|
10
|
-
var util$
|
|
11
|
-
var stream$
|
|
12
|
-
var events = _interopDefault(require('events'));
|
|
5
|
+
var fs$3 = _interopDefault(require('fs'));
|
|
6
|
+
var path$2 = _interopDefault(require('path'));
|
|
7
|
+
var os$1 = _interopDefault(require('os'));
|
|
8
|
+
var tty$1 = _interopDefault(require('tty'));
|
|
9
|
+
var assert$1 = _interopDefault(require('assert'));
|
|
10
|
+
var util$3 = _interopDefault(require('util'));
|
|
11
|
+
var stream$6 = _interopDefault(require('stream'));
|
|
12
|
+
var events$1 = _interopDefault(require('events'));
|
|
13
13
|
|
|
14
14
|
var name = "prettier";
|
|
15
|
-
var version = "2.0.
|
|
15
|
+
var version = "2.0.5";
|
|
16
16
|
var description = "Prettier is an opinionated code formatter";
|
|
17
17
|
var bin = "./bin/prettier.js";
|
|
18
18
|
var repository = "prettier/prettier";
|
|
@@ -26,14 +26,14 @@ var engines = {
|
|
|
26
26
|
var dependencies = {
|
|
27
27
|
"@angular/compiler": "9.0.5",
|
|
28
28
|
"@babel/code-frame": "7.8.0",
|
|
29
|
-
"@babel/parser": "7.9.
|
|
30
|
-
"@glimmer/syntax": "0.
|
|
29
|
+
"@babel/parser": "7.9.4",
|
|
30
|
+
"@glimmer/syntax": "0.50.0",
|
|
31
31
|
"@iarna/toml": "2.2.3",
|
|
32
|
-
"@typescript-eslint/typescript-estree": "2.
|
|
32
|
+
"@typescript-eslint/typescript-estree": "2.26.0",
|
|
33
33
|
"angular-estree-parser": "1.3.0",
|
|
34
34
|
"angular-html-parser": "1.4.0",
|
|
35
35
|
camelcase: "5.3.1",
|
|
36
|
-
chalk: "
|
|
36
|
+
chalk: "4.0.0",
|
|
37
37
|
"ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540",
|
|
38
38
|
"cjk-regex": "2.0.0",
|
|
39
39
|
cosmiconfig: "6.0.0",
|
|
@@ -47,24 +47,25 @@ var dependencies = {
|
|
|
47
47
|
"fast-glob": "3.2.2",
|
|
48
48
|
"find-parent-dir": "0.3.0",
|
|
49
49
|
"find-project-root": "1.1.1",
|
|
50
|
-
"flow-parser": "0.
|
|
50
|
+
"flow-parser": "0.122.0",
|
|
51
51
|
"get-stream": "5.1.0",
|
|
52
52
|
globby: "11.0.0",
|
|
53
|
-
graphql: "
|
|
53
|
+
graphql: "15.0.0",
|
|
54
54
|
"html-element-attributes": "2.2.1",
|
|
55
55
|
"html-styles": "1.0.0",
|
|
56
56
|
"html-tag-names": "1.1.5",
|
|
57
57
|
ignore: "4.0.6",
|
|
58
|
-
"jest-docblock": "25.
|
|
58
|
+
"jest-docblock": "25.2.6",
|
|
59
59
|
"json-stable-stringify": "1.0.1",
|
|
60
60
|
leven: "3.1.0",
|
|
61
61
|
"lines-and-columns": "1.1.6",
|
|
62
|
-
"linguist-languages": "7.
|
|
62
|
+
"linguist-languages": "7.9.0",
|
|
63
63
|
lodash: "4.17.15",
|
|
64
64
|
mem: "6.0.1",
|
|
65
65
|
minimatch: "3.0.4",
|
|
66
66
|
minimist: "1.2.5",
|
|
67
67
|
"n-readlines": "1.0.0",
|
|
68
|
+
"please-upgrade-node": "3.2.0",
|
|
68
69
|
"postcss-less": "3.1.4",
|
|
69
70
|
"postcss-media-query-parser": "0.2.3",
|
|
70
71
|
"postcss-scss": "2.0.0",
|
|
@@ -73,45 +74,45 @@ var dependencies = {
|
|
|
73
74
|
"regexp-util": "1.2.2",
|
|
74
75
|
"remark-math": "1.0.6",
|
|
75
76
|
"remark-parse": "5.0.0",
|
|
77
|
+
resolve: "1.16.1",
|
|
76
78
|
semver: "7.1.3",
|
|
77
79
|
srcset: "2.0.1",
|
|
78
80
|
"string-width": "4.2.0",
|
|
79
81
|
typescript: "3.8.3",
|
|
80
82
|
"unicode-regex": "3.0.0",
|
|
81
|
-
unified: "
|
|
83
|
+
unified: "9.0.0",
|
|
82
84
|
vnopts: "1.0.2",
|
|
83
85
|
"yaml-unist-parser": "1.1.1"
|
|
84
86
|
};
|
|
85
87
|
var devDependencies = {
|
|
86
|
-
"@babel/core": "7.
|
|
87
|
-
"@babel/preset-env": "7.
|
|
88
|
+
"@babel/core": "7.9.0",
|
|
89
|
+
"@babel/preset-env": "7.9.0",
|
|
88
90
|
"@rollup/plugin-alias": "3.0.1",
|
|
89
91
|
"@rollup/plugin-commonjs": "11.0.2",
|
|
90
92
|
"@rollup/plugin-json": "4.0.2",
|
|
91
93
|
"@rollup/plugin-node-resolve": "7.1.1",
|
|
92
94
|
"@rollup/plugin-replace": "2.3.1",
|
|
93
|
-
"babel-loader": "8.0
|
|
95
|
+
"babel-loader": "8.1.0",
|
|
94
96
|
benchmark: "2.1.4",
|
|
95
97
|
"builtin-modules": "3.1.0",
|
|
96
98
|
codecov: "3.6.5",
|
|
97
99
|
"cross-env": "7.0.2",
|
|
98
100
|
cspell: "4.0.55",
|
|
99
101
|
eslint: "6.8.0",
|
|
100
|
-
"eslint-config-prettier": "6.10.
|
|
102
|
+
"eslint-config-prettier": "6.10.1",
|
|
101
103
|
"eslint-formatter-friendly": "7.0.0",
|
|
102
|
-
"eslint-plugin-import": "2.20.
|
|
104
|
+
"eslint-plugin-import": "2.20.2",
|
|
103
105
|
"eslint-plugin-prettier": "3.1.2",
|
|
104
106
|
"eslint-plugin-react": "7.19.0",
|
|
105
|
-
"eslint-plugin-unicorn": "
|
|
107
|
+
"eslint-plugin-unicorn": "18.0.1",
|
|
106
108
|
execa: "4.0.0",
|
|
107
|
-
jest: "25.
|
|
108
|
-
"jest-junit": "10.0.0",
|
|
109
|
+
jest: "25.2.7",
|
|
109
110
|
"jest-snapshot-serializer-ansi": "1.0.0",
|
|
110
111
|
"jest-snapshot-serializer-raw": "1.1.0",
|
|
111
|
-
"jest-watch-typeahead": "0.
|
|
112
|
-
prettier: "2.0.
|
|
112
|
+
"jest-watch-typeahead": "0.5.0",
|
|
113
|
+
prettier: "2.0.4",
|
|
113
114
|
rimraf: "3.0.2",
|
|
114
|
-
rollup: "2.
|
|
115
|
+
rollup: "2.3.2",
|
|
115
116
|
"rollup-plugin-babel": "4.4.0",
|
|
116
117
|
"rollup-plugin-node-globals": "1.4.0",
|
|
117
118
|
"rollup-plugin-terser": "5.3.0",
|
|
@@ -121,13 +122,14 @@ var devDependencies = {
|
|
|
121
122
|
"synchronous-promise": "2.0.10",
|
|
122
123
|
tempy: "0.5.0",
|
|
123
124
|
"terser-webpack-plugin": "2.3.5",
|
|
124
|
-
webpack: "4.42.
|
|
125
|
+
webpack: "4.42.1"
|
|
125
126
|
};
|
|
126
127
|
var scripts = {
|
|
127
128
|
prepublishOnly: "echo \"Error: must publish from dist/\" && exit 1",
|
|
128
129
|
"prepare-release": "yarn && yarn build && yarn test:dist",
|
|
129
130
|
test: "jest",
|
|
130
|
-
"test:dist": "
|
|
131
|
+
"test:dist": "cross-env NODE_ENV=production jest",
|
|
132
|
+
"test:dist-standalone": "cross-env NODE_ENV=production TEST_STANDALONE=1 jest tests/",
|
|
131
133
|
"test:integration": "jest tests_integration",
|
|
132
134
|
"perf:repeat": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null",
|
|
133
135
|
"perf:repeat-inspect": "yarn && yarn build && cross-env NODE_ENV=production node --inspect-brk ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null",
|
|
@@ -137,7 +139,7 @@ var scripts = {
|
|
|
137
139
|
"lint:changelog": "node ./scripts/lint-changelog.js",
|
|
138
140
|
"lint:prettier": "prettier \"**/*.{md,json,yml,html,css}\" --check",
|
|
139
141
|
"lint:dist": "eslint --no-eslintrc --no-ignore --env=es6,browser --parser-options=ecmaVersion:2016 \"dist/!(bin-prettier|index|third-party).js\"",
|
|
140
|
-
"lint:spellcheck": "cspell {bin,scripts,src}/**/*.js {docs,website/blog,changelog_unreleased}/**/*.md",
|
|
142
|
+
"lint:spellcheck": "cspell {bin,scripts,src,website}/**/*.js {docs,website/blog,changelog_unreleased}/**/*.md",
|
|
141
143
|
"lint:deps": "node ./scripts/check-deps.js",
|
|
142
144
|
build: "node --max-old-space-size=3072 ./scripts/build/build.js",
|
|
143
145
|
"build-docs": "node ./scripts/build-docs.js"
|
|
@@ -1744,7 +1746,7 @@ class LineByLine {
|
|
|
1744
1746
|
if (typeof file === 'number') {
|
|
1745
1747
|
this.fd = file;
|
|
1746
1748
|
} else {
|
|
1747
|
-
this.fd = fs$
|
|
1749
|
+
this.fd = fs$3.openSync(file, 'r');
|
|
1748
1750
|
}
|
|
1749
1751
|
|
|
1750
1752
|
this.options = options;
|
|
@@ -1774,7 +1776,7 @@ class LineByLine {
|
|
|
1774
1776
|
}
|
|
1775
1777
|
|
|
1776
1778
|
close() {
|
|
1777
|
-
fs$
|
|
1779
|
+
fs$3.closeSync(this.fd);
|
|
1778
1780
|
this.fd = null;
|
|
1779
1781
|
}
|
|
1780
1782
|
|
|
@@ -1812,7 +1814,7 @@ class LineByLine {
|
|
|
1812
1814
|
|
|
1813
1815
|
do {
|
|
1814
1816
|
const readBuffer = new Buffer(this.options.readChunk);
|
|
1815
|
-
bytesRead = fs$
|
|
1817
|
+
bytesRead = fs$3.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition);
|
|
1816
1818
|
totalBytesRead = totalBytesRead + bytesRead;
|
|
1817
1819
|
this.fdPosition = this.fdPosition + bytesRead;
|
|
1818
1820
|
buffers.push(readBuffer);
|
|
@@ -4787,7 +4789,7 @@ function supportsColor(stream) {
|
|
|
4787
4789
|
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
|
4788
4790
|
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
|
4789
4791
|
// that supports 16m/TrueColor.
|
|
4790
|
-
const osRelease = os.release().split('.');
|
|
4792
|
+
const osRelease = os$1.release().split('.');
|
|
4791
4793
|
|
|
4792
4794
|
if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
4793
4795
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
@@ -7714,7 +7716,7 @@ function supportsColor$1(haveStream, streamIsTTY) {
|
|
|
7714
7716
|
if (process.platform === 'win32') {
|
|
7715
7717
|
// Windows 10 build 10586 is the first Windows release that supports 256 colors.
|
|
7716
7718
|
// Windows 10 build 14931 is the first release that supports 16m/TrueColor.
|
|
7717
|
-
const osRelease = os.release().split('.');
|
|
7719
|
+
const osRelease = os$1.release().split('.');
|
|
7718
7720
|
|
|
7719
7721
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
7720
7722
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
@@ -7778,8 +7780,8 @@ function getSupportLevel$1(stream) {
|
|
|
7778
7780
|
|
|
7779
7781
|
var supportsColor_1$1 = {
|
|
7780
7782
|
supportsColor: getSupportLevel$1,
|
|
7781
|
-
stdout: translateLevel$1(supportsColor$1(true, tty.isatty(1))),
|
|
7782
|
-
stderr: translateLevel$1(supportsColor$1(true, tty.isatty(2)))
|
|
7783
|
+
stdout: translateLevel$1(supportsColor$1(true, tty$1.isatty(1))),
|
|
7784
|
+
stderr: translateLevel$1(supportsColor$1(true, tty$1.isatty(2)))
|
|
7783
7785
|
};
|
|
7784
7786
|
|
|
7785
7787
|
const stringReplaceAll = (string, substring, replacer) => {
|
|
@@ -7826,7 +7828,7 @@ var util = {
|
|
|
7826
7828
|
const TEMPLATE_REGEX$1 = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
7827
7829
|
const STYLE_REGEX$1 = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
7828
7830
|
const STRING_REGEX$1 = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
|
7829
|
-
const ESCAPE_REGEX$1 = /\\(u(?:[a-f\d]{4}
|
|
7831
|
+
const ESCAPE_REGEX$1 = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
|
|
7830
7832
|
const ESCAPES$1 = new Map([['n', '\n'], ['r', '\r'], ['t', '\t'], ['b', '\b'], ['f', '\f'], ['v', '\v'], ['0', '\0'], ['\\', '\\'], ['e', '\u001B'], ['a', '\u0007']]);
|
|
7831
7833
|
|
|
7832
7834
|
function unescape$1(c) {
|
|
@@ -7940,8 +7942,8 @@ var templates$1 = (chalk, temporary) => {
|
|
|
7940
7942
|
chunks.push(chunk.join(''));
|
|
7941
7943
|
|
|
7942
7944
|
if (styles.length > 0) {
|
|
7943
|
-
const
|
|
7944
|
-
throw new Error(
|
|
7945
|
+
const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
|
|
7946
|
+
throw new Error(errMessage);
|
|
7945
7947
|
}
|
|
7946
7948
|
|
|
7947
7949
|
return chunks.join('');
|
|
@@ -7960,7 +7962,7 @@ const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];
|
|
|
7960
7962
|
const styles = Object.create(null);
|
|
7961
7963
|
|
|
7962
7964
|
const applyOptions = (object, options = {}) => {
|
|
7963
|
-
if (options.level
|
|
7965
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
7964
7966
|
throw new Error('The `level` option should be an integer from 0 to 3');
|
|
7965
7967
|
} // Detect level if not set manually
|
|
7966
7968
|
|
|
@@ -7971,6 +7973,7 @@ const applyOptions = (object, options = {}) => {
|
|
|
7971
7973
|
|
|
7972
7974
|
class ChalkClass {
|
|
7973
7975
|
constructor(options) {
|
|
7976
|
+
// eslint-disable-next-line no-constructor-return
|
|
7974
7977
|
return chalkFactory(options);
|
|
7975
7978
|
}
|
|
7976
7979
|
|
|
@@ -8094,12 +8097,11 @@ const createBuilder = (self, _styler, _isEmpty) => {
|
|
|
8094
8097
|
// Single argument is hot path, implicit coercion is faster than anything
|
|
8095
8098
|
// eslint-disable-next-line no-implicit-coercion
|
|
8096
8099
|
return applyStyle(builder, arguments_.length === 1 ? '' + arguments_[0] : arguments_.join(' '));
|
|
8097
|
-
}; //
|
|
8100
|
+
}; // We alter the prototype because we must return a function, but there is
|
|
8098
8101
|
// no way to create a function with a different prototype
|
|
8099
8102
|
|
|
8100
8103
|
|
|
8101
|
-
builder
|
|
8102
|
-
|
|
8104
|
+
Object.setPrototypeOf(builder, proto);
|
|
8103
8105
|
builder._generator = self;
|
|
8104
8106
|
builder._styler = _styler;
|
|
8105
8107
|
builder._isEmpty = _isEmpty;
|
|
@@ -8177,18 +8179,7 @@ chalk$1.stderr = Chalk({
|
|
|
8177
8179
|
level: stderrColor ? stderrColor.level : 0
|
|
8178
8180
|
}); // eslint-disable-line new-cap
|
|
8179
8181
|
|
|
8180
|
-
chalk$1.stderr.supportsColor = stderrColor;
|
|
8181
|
-
|
|
8182
|
-
chalk$1.Level = {
|
|
8183
|
-
None: 0,
|
|
8184
|
-
Basic: 1,
|
|
8185
|
-
Ansi256: 2,
|
|
8186
|
-
TrueColor: 3,
|
|
8187
|
-
0: 'None',
|
|
8188
|
-
1: 'Basic',
|
|
8189
|
-
2: 'Ansi256',
|
|
8190
|
-
3: 'TrueColor'
|
|
8191
|
-
};
|
|
8182
|
+
chalk$1.stderr.supportsColor = stderrColor;
|
|
8192
8183
|
var source = chalk$1;
|
|
8193
8184
|
|
|
8194
8185
|
const cliDescriptor = {
|
|
@@ -10498,7 +10489,7 @@ function supportsColor$2(stream) {
|
|
|
10498
10489
|
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
|
10499
10490
|
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
|
10500
10491
|
// that supports 16m/TrueColor.
|
|
10501
|
-
const osRelease = os.release().split('.');
|
|
10492
|
+
const osRelease = os$1.release().split('.');
|
|
10502
10493
|
|
|
10503
10494
|
if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
10504
10495
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
@@ -11342,7 +11333,7 @@ function resolveParser(opts, parsers) {
|
|
|
11342
11333
|
{
|
|
11343
11334
|
try {
|
|
11344
11335
|
return {
|
|
11345
|
-
parse: require(path$
|
|
11336
|
+
parse: require(path$2.resolve(process.cwd(), opts.parser)),
|
|
11346
11337
|
astFormat: "estree",
|
|
11347
11338
|
locStart: locStart$1,
|
|
11348
11339
|
locEnd: locEnd$1
|
|
@@ -11498,8 +11489,9 @@ function getInterpreter(filepath) {
|
|
|
11498
11489
|
let fd;
|
|
11499
11490
|
|
|
11500
11491
|
try {
|
|
11501
|
-
fd = fs$
|
|
11492
|
+
fd = fs$3.openSync(filepath, "r");
|
|
11502
11493
|
} catch (err) {
|
|
11494
|
+
// istanbul ignore next
|
|
11503
11495
|
return "";
|
|
11504
11496
|
}
|
|
11505
11497
|
|
|
@@ -11529,20 +11521,27 @@ function getInterpreter(filepath) {
|
|
|
11529
11521
|
try {
|
|
11530
11522
|
// There are some weird cases where paths are missing, causing Jest
|
|
11531
11523
|
// failures. It's unclear what these correspond to in the real world.
|
|
11532
|
-
fs$
|
|
11524
|
+
fs$3.closeSync(fd);
|
|
11533
11525
|
} catch (err) {// nop
|
|
11534
11526
|
}
|
|
11535
11527
|
}
|
|
11536
11528
|
}
|
|
11537
11529
|
|
|
11538
11530
|
function inferParser(filepath, plugins) {
|
|
11539
|
-
const filename = path$
|
|
11531
|
+
const filename = path$2.basename(filepath).toLowerCase();
|
|
11532
|
+
const languages = getSupportInfo$1({
|
|
11533
|
+
plugins
|
|
11534
|
+
}).languages.filter(language => language.since !== null); // If the file has no extension, we can try to infer the language from the
|
|
11540
11535
|
// interpreter in the shebang line, if any; but since this requires FS access,
|
|
11541
11536
|
// do it last.
|
|
11542
11537
|
|
|
11543
|
-
|
|
11544
|
-
|
|
11545
|
-
|
|
11538
|
+
let language = languages.find(language => language.extensions && language.extensions.some(extension => filename.endsWith(extension)) || language.filenames && language.filenames.find(name => name.toLowerCase() === filename));
|
|
11539
|
+
|
|
11540
|
+
if (!language && !filename.includes(".")) {
|
|
11541
|
+
const interpreter = getInterpreter(filepath);
|
|
11542
|
+
language = languages.find(language => language.interpreters && language.interpreters.includes(interpreter));
|
|
11543
|
+
}
|
|
11544
|
+
|
|
11546
11545
|
return language && language.parsers[0];
|
|
11547
11546
|
}
|
|
11548
11547
|
|
|
@@ -12636,7 +12635,11 @@ function hasIgnoreComment(path) {
|
|
|
12636
12635
|
}
|
|
12637
12636
|
|
|
12638
12637
|
function hasNodeIgnoreComment(node) {
|
|
12639
|
-
return node && node.comments && node.comments.length > 0 && node.comments.some(comment => comment.
|
|
12638
|
+
return node && (node.comments && node.comments.length > 0 && node.comments.some(comment => isNodeIgnoreComment(comment) && !comment.unignore) || node.prettierIgnore);
|
|
12639
|
+
}
|
|
12640
|
+
|
|
12641
|
+
function isNodeIgnoreComment(comment) {
|
|
12642
|
+
return comment.value.trim() === "prettier-ignore";
|
|
12640
12643
|
}
|
|
12641
12644
|
|
|
12642
12645
|
function addCommentHelper(node, comment) {
|
|
@@ -12736,6 +12739,7 @@ var util$1 = {
|
|
|
12736
12739
|
printNumber,
|
|
12737
12740
|
hasIgnoreComment,
|
|
12738
12741
|
hasNodeIgnoreComment,
|
|
12742
|
+
isNodeIgnoreComment,
|
|
12739
12743
|
makeString,
|
|
12740
12744
|
addLeadingComment,
|
|
12741
12745
|
addDanglingComment,
|
|
@@ -13048,8 +13052,9 @@ function printDocToString(doc, options) {
|
|
|
13048
13052
|
const [ind, mode, doc] = cmds.pop();
|
|
13049
13053
|
|
|
13050
13054
|
if (typeof doc === "string") {
|
|
13051
|
-
|
|
13052
|
-
|
|
13055
|
+
const formatted = newLine !== "\n" && doc.includes("\n") ? doc.replace(/\n/g, newLine) : doc;
|
|
13056
|
+
out.push(formatted);
|
|
13057
|
+
pos += getStringWidth$1(formatted);
|
|
13053
13058
|
} else {
|
|
13054
13059
|
switch (doc.type) {
|
|
13055
13060
|
case "cursor":
|
|
@@ -14029,8 +14034,8 @@ function breakTies(tiesToBreak, text, options) {
|
|
|
14029
14034
|
|
|
14030
14035
|
for (indexOfFirstLeadingComment = tieCount; indexOfFirstLeadingComment > 0; --indexOfFirstLeadingComment) {
|
|
14031
14036
|
const comment = tiesToBreak[indexOfFirstLeadingComment - 1];
|
|
14032
|
-
assert.strictEqual(comment.precedingNode, precedingNode);
|
|
14033
|
-
assert.strictEqual(comment.followingNode, followingNode);
|
|
14037
|
+
assert$1.strictEqual(comment.precedingNode, precedingNode);
|
|
14038
|
+
assert$1.strictEqual(comment.followingNode, followingNode);
|
|
14034
14039
|
const gap = text.slice(options.locEnd(comment), gapEndPos);
|
|
14035
14040
|
|
|
14036
14041
|
if (gapRegExp.test(gap)) {
|
|
@@ -14538,7 +14543,7 @@ function printAstToDoc(ast, options, alignmentSize = 0) {
|
|
|
14538
14543
|
}
|
|
14539
14544
|
|
|
14540
14545
|
function callPluginPrintFunction(path, options, printPath, args) {
|
|
14541
|
-
assert.ok(path instanceof fastPath);
|
|
14546
|
+
assert$1.ok(path instanceof fastPath);
|
|
14542
14547
|
const node = path.getValue();
|
|
14543
14548
|
const {
|
|
14544
14549
|
printer
|
|
@@ -14717,9 +14722,6 @@ const {
|
|
|
14717
14722
|
convertEndOfLineToChars: convertEndOfLineToChars$2
|
|
14718
14723
|
} = endOfLine;
|
|
14719
14724
|
const {
|
|
14720
|
-
utils: {
|
|
14721
|
-
mapDoc: mapDoc$1
|
|
14722
|
-
},
|
|
14723
14725
|
printer: {
|
|
14724
14726
|
printDocToString: printDocToString$1
|
|
14725
14727
|
},
|
|
@@ -14741,7 +14743,7 @@ function ensureAllCommentsPrinted(astComments) {
|
|
|
14741
14743
|
}
|
|
14742
14744
|
|
|
14743
14745
|
for (let i = 0; i < astComments.length; ++i) {
|
|
14744
|
-
if (astComments[i]
|
|
14746
|
+
if (util$1.isNodeIgnoreComment(astComments[i])) {
|
|
14745
14747
|
// If there's a prettier-ignore, we're not printing that sub-tree so we
|
|
14746
14748
|
// don't know if the comments was printed or not.
|
|
14747
14749
|
return;
|
|
@@ -14795,8 +14797,7 @@ function coreFormat(text, opts, addAlignmentSize) {
|
|
|
14795
14797
|
|
|
14796
14798
|
const astComments = attachComments(text, ast, opts);
|
|
14797
14799
|
const doc = astToDoc(ast, opts, addAlignmentSize);
|
|
14798
|
-
const
|
|
14799
|
-
const result = printDocToString$1(opts.endOfLine === "lf" ? doc : mapDoc$1(doc, currentDoc => typeof currentDoc === "string" && currentDoc.includes("\n") ? currentDoc.replace(/\n/g, eol) : currentDoc), opts);
|
|
14800
|
+
const result = printDocToString$1(doc, opts);
|
|
14800
14801
|
ensureAllCommentsPrinted(astComments); // Remove extra leading indentation as well as the added indentation after last newline
|
|
14801
14802
|
|
|
14802
14803
|
if (addAlignmentSize > 0) {
|
|
@@ -15401,7 +15402,7 @@ var ignore = options => new IgnoreBase(options);
|
|
|
15401
15402
|
|
|
15402
15403
|
function getFileContentOrNull(filename) {
|
|
15403
15404
|
return new Promise((resolve, reject) => {
|
|
15404
|
-
fs$
|
|
15405
|
+
fs$3.readFile(filename, "utf8", (error, data) => {
|
|
15405
15406
|
if (error && error.code !== "ENOENT") {
|
|
15406
15407
|
reject(createError(filename, error));
|
|
15407
15408
|
} else {
|
|
@@ -15418,7 +15419,7 @@ function getFileContentOrNull(filename) {
|
|
|
15418
15419
|
|
|
15419
15420
|
getFileContentOrNull.sync = function (filename) {
|
|
15420
15421
|
try {
|
|
15421
|
-
return fs$
|
|
15422
|
+
return fs$3.readFileSync(filename, "utf8");
|
|
15422
15423
|
} catch (error) {
|
|
15423
15424
|
if (error && error.code === "ENOENT") {
|
|
15424
15425
|
return null;
|
|
@@ -15441,7 +15442,7 @@ var getFileContentOrNull_1 = getFileContentOrNull;
|
|
|
15441
15442
|
|
|
15442
15443
|
|
|
15443
15444
|
async function createIgnorer(ignorePath, withNodeModules) {
|
|
15444
|
-
const ignoreContent = ignorePath ? await getFileContentOrNull_1(path$
|
|
15445
|
+
const ignoreContent = ignorePath ? await getFileContentOrNull_1(path$2.resolve(ignorePath)) : null;
|
|
15445
15446
|
return _createIgnorer(ignoreContent, withNodeModules);
|
|
15446
15447
|
}
|
|
15447
15448
|
/**
|
|
@@ -15451,7 +15452,7 @@ async function createIgnorer(ignorePath, withNodeModules) {
|
|
|
15451
15452
|
|
|
15452
15453
|
|
|
15453
15454
|
createIgnorer.sync = function (ignorePath, withNodeModules) {
|
|
15454
|
-
const ignoreContent = !ignorePath ? null : getFileContentOrNull_1.sync(path$
|
|
15455
|
+
const ignoreContent = !ignorePath ? null : getFileContentOrNull_1.sync(path$2.resolve(ignorePath));
|
|
15455
15456
|
return _createIgnorer(ignoreContent, withNodeModules);
|
|
15456
15457
|
};
|
|
15457
15458
|
/**
|
|
@@ -15729,7 +15730,7 @@ var path = {
|
|
|
15729
15730
|
};
|
|
15730
15731
|
|
|
15731
15732
|
try {
|
|
15732
|
-
path = path$
|
|
15733
|
+
path = path$2;
|
|
15733
15734
|
} catch (er) {}
|
|
15734
15735
|
|
|
15735
15736
|
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
|
|
@@ -19155,7 +19156,7 @@ LRUCache.prototype.inspect = function (n, opts) {
|
|
|
19155
19156
|
str += ',';
|
|
19156
19157
|
}
|
|
19157
19158
|
|
|
19158
|
-
str += '\n max: ' + util$
|
|
19159
|
+
str += '\n max: ' + util$3.inspect(max, opts);
|
|
19159
19160
|
extras = true;
|
|
19160
19161
|
}
|
|
19161
19162
|
|
|
@@ -19166,7 +19167,7 @@ LRUCache.prototype.inspect = function (n, opts) {
|
|
|
19166
19167
|
str += ',';
|
|
19167
19168
|
}
|
|
19168
19169
|
|
|
19169
|
-
str += '\n maxAge: ' + util$
|
|
19170
|
+
str += '\n maxAge: ' + util$3.inspect(maxAge, opts);
|
|
19170
19171
|
extras = true;
|
|
19171
19172
|
}
|
|
19172
19173
|
|
|
@@ -19177,7 +19178,7 @@ LRUCache.prototype.inspect = function (n, opts) {
|
|
|
19177
19178
|
str += ',';
|
|
19178
19179
|
}
|
|
19179
19180
|
|
|
19180
|
-
str += '\n length: ' + util$
|
|
19181
|
+
str += '\n length: ' + util$3.inspect(this[LENGTH], opts);
|
|
19181
19182
|
extras = true;
|
|
19182
19183
|
}
|
|
19183
19184
|
|
|
@@ -19194,7 +19195,7 @@ LRUCache.prototype.inspect = function (n, opts) {
|
|
|
19194
19195
|
str += '\n ';
|
|
19195
19196
|
}
|
|
19196
19197
|
|
|
19197
|
-
var key = util$
|
|
19198
|
+
var key = util$3.inspect(item.key).split('\n').join('\n ');
|
|
19198
19199
|
var val = {
|
|
19199
19200
|
value: item.value
|
|
19200
19201
|
};
|
|
@@ -19211,7 +19212,7 @@ LRUCache.prototype.inspect = function (n, opts) {
|
|
|
19211
19212
|
val.stale = true;
|
|
19212
19213
|
}
|
|
19213
19214
|
|
|
19214
|
-
val = util$
|
|
19215
|
+
val = util$3.inspect(val, opts).split('\n').join('\n ');
|
|
19215
19216
|
str += key + ' => ' + val;
|
|
19216
19217
|
});
|
|
19217
19218
|
|
|
@@ -20270,7 +20271,7 @@ var fnmatch = createCommonjsModule(function (module, exports) {
|
|
|
20270
20271
|
}
|
|
20271
20272
|
|
|
20272
20273
|
if (options.matchBase && pattern.length === 1) {
|
|
20273
|
-
file = path$
|
|
20274
|
+
file = path$2.basename(file.join("/")).split("/");
|
|
20274
20275
|
}
|
|
20275
20276
|
|
|
20276
20277
|
if (options.debug) {
|
|
@@ -20595,7 +20596,7 @@ var ini = createCommonjsModule(function (module, exports) {
|
|
|
20595
20596
|
value: true
|
|
20596
20597
|
});
|
|
20597
20598
|
|
|
20598
|
-
var fs = __importStar(fs$
|
|
20599
|
+
var fs = __importStar(fs$3);
|
|
20599
20600
|
/**
|
|
20600
20601
|
* define the possible values:
|
|
20601
20602
|
* section: [section]
|
|
@@ -20925,9 +20926,9 @@ var src = createCommonjsModule(function (module, exports) {
|
|
|
20925
20926
|
value: true
|
|
20926
20927
|
});
|
|
20927
20928
|
|
|
20928
|
-
var fs = __importStar(fs$
|
|
20929
|
+
var fs = __importStar(fs$3);
|
|
20929
20930
|
|
|
20930
|
-
var path = __importStar(path$
|
|
20931
|
+
var path = __importStar(path$2);
|
|
20931
20932
|
|
|
20932
20933
|
var semver = __importStar(semver$2);
|
|
20933
20934
|
|
|
@@ -21294,14 +21295,14 @@ function markerExists(files, markers) {
|
|
|
21294
21295
|
}
|
|
21295
21296
|
|
|
21296
21297
|
function traverseFolder(directory, levels, markers) {
|
|
21297
|
-
var files = fs$
|
|
21298
|
+
var files = fs$3.readdirSync(directory);
|
|
21298
21299
|
|
|
21299
21300
|
if (levels === 0) {
|
|
21300
21301
|
return null;
|
|
21301
21302
|
} else if (markerExists(files, markers)) {
|
|
21302
21303
|
return directory;
|
|
21303
21304
|
} else {
|
|
21304
|
-
return traverseFolder(path$
|
|
21305
|
+
return traverseFolder(path$2.resolve(directory, '..'), levels - 1, markers);
|
|
21305
21306
|
}
|
|
21306
21307
|
}
|
|
21307
21308
|
|
|
@@ -21327,11 +21328,11 @@ const maybeParse = (filePath, parse) => {
|
|
|
21327
21328
|
// it, which is possible, for example, when the path is given via
|
|
21328
21329
|
// --stdin-filepath. So, first, traverse up until we find an existing
|
|
21329
21330
|
// directory.
|
|
21330
|
-
let dirPath = path$
|
|
21331
|
-
const fsRoot = path$
|
|
21331
|
+
let dirPath = path$2.dirname(path$2.resolve(filePath));
|
|
21332
|
+
const fsRoot = path$2.parse(dirPath).root;
|
|
21332
21333
|
|
|
21333
|
-
while (dirPath !== fsRoot && !fs$
|
|
21334
|
-
dirPath = path$
|
|
21334
|
+
while (dirPath !== fsRoot && !fs$3.existsSync(dirPath)) {
|
|
21335
|
+
dirPath = path$2.dirname(dirPath);
|
|
21335
21336
|
}
|
|
21336
21337
|
|
|
21337
21338
|
const root = findProjectRoot(dirPath);
|
|
@@ -21818,7 +21819,7 @@ function isList(obj) {
|
|
|
21818
21819
|
let _custom;
|
|
21819
21820
|
|
|
21820
21821
|
try {
|
|
21821
|
-
const utilInspect = util$
|
|
21822
|
+
const utilInspect = util$3.inspect;
|
|
21822
21823
|
_custom = utilInspect.custom;
|
|
21823
21824
|
} catch (_) {}
|
|
21824
21825
|
/* eval require not available in transpiled bundle */
|
|
@@ -23257,6 +23258,962 @@ var loadToml = function (filePath, content) {
|
|
|
23257
23258
|
}
|
|
23258
23259
|
};
|
|
23259
23260
|
|
|
23261
|
+
var caller = function () {
|
|
23262
|
+
// see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
|
|
23263
|
+
var origPrepareStackTrace = Error.prepareStackTrace;
|
|
23264
|
+
|
|
23265
|
+
Error.prepareStackTrace = function (_, stack) {
|
|
23266
|
+
return stack;
|
|
23267
|
+
};
|
|
23268
|
+
|
|
23269
|
+
var stack = new Error().stack;
|
|
23270
|
+
Error.prepareStackTrace = origPrepareStackTrace;
|
|
23271
|
+
return stack[2].getFileName();
|
|
23272
|
+
};
|
|
23273
|
+
|
|
23274
|
+
var pathParse = createCommonjsModule(function (module) {
|
|
23275
|
+
|
|
23276
|
+
var isWindows = process.platform === 'win32'; // Regex to split a windows path into three parts: [*, device, slash,
|
|
23277
|
+
// tail] windows-only
|
|
23278
|
+
|
|
23279
|
+
var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; // Regex to split the tail part of the above into [*, dir, basename, ext]
|
|
23280
|
+
|
|
23281
|
+
var splitTailRe = /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/;
|
|
23282
|
+
var win32 = {}; // Function to split a filename into [root, dir, basename, ext]
|
|
23283
|
+
|
|
23284
|
+
function win32SplitPath(filename) {
|
|
23285
|
+
// Separate device+slash from tail
|
|
23286
|
+
var result = splitDeviceRe.exec(filename),
|
|
23287
|
+
device = (result[1] || '') + (result[2] || ''),
|
|
23288
|
+
tail = result[3] || ''; // Split the tail into dir, basename and extension
|
|
23289
|
+
|
|
23290
|
+
var result2 = splitTailRe.exec(tail),
|
|
23291
|
+
dir = result2[1],
|
|
23292
|
+
basename = result2[2],
|
|
23293
|
+
ext = result2[3];
|
|
23294
|
+
return [device, dir, basename, ext];
|
|
23295
|
+
}
|
|
23296
|
+
|
|
23297
|
+
win32.parse = function (pathString) {
|
|
23298
|
+
if (typeof pathString !== 'string') {
|
|
23299
|
+
throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString);
|
|
23300
|
+
}
|
|
23301
|
+
|
|
23302
|
+
var allParts = win32SplitPath(pathString);
|
|
23303
|
+
|
|
23304
|
+
if (!allParts || allParts.length !== 4) {
|
|
23305
|
+
throw new TypeError("Invalid path '" + pathString + "'");
|
|
23306
|
+
}
|
|
23307
|
+
|
|
23308
|
+
return {
|
|
23309
|
+
root: allParts[0],
|
|
23310
|
+
dir: allParts[0] + allParts[1].slice(0, -1),
|
|
23311
|
+
base: allParts[2],
|
|
23312
|
+
ext: allParts[3],
|
|
23313
|
+
name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
|
|
23314
|
+
};
|
|
23315
|
+
}; // Split a filename into [root, dir, basename, ext], unix version
|
|
23316
|
+
// 'root' is just a slash, or nothing.
|
|
23317
|
+
|
|
23318
|
+
|
|
23319
|
+
var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
|
|
23320
|
+
var posix = {};
|
|
23321
|
+
|
|
23322
|
+
function posixSplitPath(filename) {
|
|
23323
|
+
return splitPathRe.exec(filename).slice(1);
|
|
23324
|
+
}
|
|
23325
|
+
|
|
23326
|
+
posix.parse = function (pathString) {
|
|
23327
|
+
if (typeof pathString !== 'string') {
|
|
23328
|
+
throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString);
|
|
23329
|
+
}
|
|
23330
|
+
|
|
23331
|
+
var allParts = posixSplitPath(pathString);
|
|
23332
|
+
|
|
23333
|
+
if (!allParts || allParts.length !== 4) {
|
|
23334
|
+
throw new TypeError("Invalid path '" + pathString + "'");
|
|
23335
|
+
}
|
|
23336
|
+
|
|
23337
|
+
allParts[1] = allParts[1] || '';
|
|
23338
|
+
allParts[2] = allParts[2] || '';
|
|
23339
|
+
allParts[3] = allParts[3] || '';
|
|
23340
|
+
return {
|
|
23341
|
+
root: allParts[0],
|
|
23342
|
+
dir: allParts[0] + allParts[1].slice(0, -1),
|
|
23343
|
+
base: allParts[2],
|
|
23344
|
+
ext: allParts[3],
|
|
23345
|
+
name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
|
|
23346
|
+
};
|
|
23347
|
+
};
|
|
23348
|
+
|
|
23349
|
+
if (isWindows) module.exports = win32.parse;else
|
|
23350
|
+
/* posix */
|
|
23351
|
+
module.exports = posix.parse;
|
|
23352
|
+
module.exports.posix = posix.parse;
|
|
23353
|
+
module.exports.win32 = win32.parse;
|
|
23354
|
+
});
|
|
23355
|
+
var pathParse_1 = pathParse.posix;
|
|
23356
|
+
var pathParse_2 = pathParse.win32;
|
|
23357
|
+
|
|
23358
|
+
var parse$2 = path$2.parse || pathParse;
|
|
23359
|
+
|
|
23360
|
+
var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {
|
|
23361
|
+
var prefix = '/';
|
|
23362
|
+
|
|
23363
|
+
if (/^([A-Za-z]:)/.test(absoluteStart)) {
|
|
23364
|
+
prefix = '';
|
|
23365
|
+
} else if (/^\\\\/.test(absoluteStart)) {
|
|
23366
|
+
prefix = '\\\\';
|
|
23367
|
+
}
|
|
23368
|
+
|
|
23369
|
+
var paths = [absoluteStart];
|
|
23370
|
+
var parsed = parse$2(absoluteStart);
|
|
23371
|
+
|
|
23372
|
+
while (parsed.dir !== paths[paths.length - 1]) {
|
|
23373
|
+
paths.push(parsed.dir);
|
|
23374
|
+
parsed = parse$2(parsed.dir);
|
|
23375
|
+
}
|
|
23376
|
+
|
|
23377
|
+
return paths.reduce(function (dirs, aPath) {
|
|
23378
|
+
return dirs.concat(modules.map(function (moduleDir) {
|
|
23379
|
+
return path$2.resolve(prefix, aPath, moduleDir);
|
|
23380
|
+
}));
|
|
23381
|
+
}, []);
|
|
23382
|
+
};
|
|
23383
|
+
|
|
23384
|
+
var nodeModulesPaths = function nodeModulesPaths(start, opts, request) {
|
|
23385
|
+
var modules = opts && opts.moduleDirectory ? [].concat(opts.moduleDirectory) : ['node_modules'];
|
|
23386
|
+
|
|
23387
|
+
if (opts && typeof opts.paths === 'function') {
|
|
23388
|
+
return opts.paths(request, start, function () {
|
|
23389
|
+
return getNodeModulesDirs(start, modules);
|
|
23390
|
+
}, opts);
|
|
23391
|
+
}
|
|
23392
|
+
|
|
23393
|
+
var dirs = getNodeModulesDirs(start, modules);
|
|
23394
|
+
return opts && opts.paths ? dirs.concat(opts.paths) : dirs;
|
|
23395
|
+
};
|
|
23396
|
+
|
|
23397
|
+
var normalizeOptions$2 = function (x, opts) {
|
|
23398
|
+
/**
|
|
23399
|
+
* This file is purposefully a passthrough. It's expected that third-party
|
|
23400
|
+
* environments will override it at runtime in order to inject special logic
|
|
23401
|
+
* into `resolve` (by manipulating the options). One such example is the PnP
|
|
23402
|
+
* code path in Yarn.
|
|
23403
|
+
*/
|
|
23404
|
+
return opts || {};
|
|
23405
|
+
};
|
|
23406
|
+
|
|
23407
|
+
var assert = true;
|
|
23408
|
+
var async_hooks = ">= 8";
|
|
23409
|
+
var buffer_ieee754 = "< 0.9.7";
|
|
23410
|
+
var buffer = true;
|
|
23411
|
+
var child_process = true;
|
|
23412
|
+
var cluster = true;
|
|
23413
|
+
var console$1 = true;
|
|
23414
|
+
var constants$1 = true;
|
|
23415
|
+
var crypto = true;
|
|
23416
|
+
var _debug_agent = ">= 1 && < 8";
|
|
23417
|
+
var _debugger = "< 8";
|
|
23418
|
+
var dgram = true;
|
|
23419
|
+
var dns = true;
|
|
23420
|
+
var domain = true;
|
|
23421
|
+
var events = true;
|
|
23422
|
+
var freelist = "< 6";
|
|
23423
|
+
var fs = true;
|
|
23424
|
+
var _http_agent = ">= 0.11.1";
|
|
23425
|
+
var _http_client = ">= 0.11.1";
|
|
23426
|
+
var _http_common = ">= 0.11.1";
|
|
23427
|
+
var _http_incoming = ">= 0.11.1";
|
|
23428
|
+
var _http_outgoing = ">= 0.11.1";
|
|
23429
|
+
var _http_server = ">= 0.11.1";
|
|
23430
|
+
var http = true;
|
|
23431
|
+
var http2 = ">= 8.8";
|
|
23432
|
+
var https = true;
|
|
23433
|
+
var inspector = ">= 8.0.0";
|
|
23434
|
+
var _linklist = "< 8";
|
|
23435
|
+
var module$1 = true;
|
|
23436
|
+
var net = true;
|
|
23437
|
+
var os = true;
|
|
23438
|
+
var path$1 = true;
|
|
23439
|
+
var perf_hooks = ">= 8.5";
|
|
23440
|
+
var process$1 = ">= 1";
|
|
23441
|
+
var punycode = true;
|
|
23442
|
+
var querystring = true;
|
|
23443
|
+
var readline = true;
|
|
23444
|
+
var repl = true;
|
|
23445
|
+
var smalloc = ">= 0.11.5 && < 3";
|
|
23446
|
+
var _stream_duplex = ">= 0.9.4";
|
|
23447
|
+
var _stream_transform = ">= 0.9.4";
|
|
23448
|
+
var _stream_wrap = ">= 1.4.1";
|
|
23449
|
+
var _stream_passthrough = ">= 0.9.4";
|
|
23450
|
+
var _stream_readable = ">= 0.9.4";
|
|
23451
|
+
var _stream_writable = ">= 0.9.4";
|
|
23452
|
+
var stream = true;
|
|
23453
|
+
var string_decoder = true;
|
|
23454
|
+
var sys = true;
|
|
23455
|
+
var timers = true;
|
|
23456
|
+
var _tls_common = ">= 0.11.13";
|
|
23457
|
+
var _tls_legacy = ">= 0.11.3 && < 10";
|
|
23458
|
+
var _tls_wrap = ">= 0.11.3";
|
|
23459
|
+
var tls = true;
|
|
23460
|
+
var trace_events = ">= 10";
|
|
23461
|
+
var tty = true;
|
|
23462
|
+
var url = true;
|
|
23463
|
+
var util$2 = true;
|
|
23464
|
+
var v8 = ">= 1";
|
|
23465
|
+
var vm = true;
|
|
23466
|
+
var wasi = ">= 13.4 && < 13.5";
|
|
23467
|
+
var worker_threads = ">= 11.7";
|
|
23468
|
+
var zlib = true;
|
|
23469
|
+
var core$1 = {
|
|
23470
|
+
assert: assert,
|
|
23471
|
+
async_hooks: async_hooks,
|
|
23472
|
+
buffer_ieee754: buffer_ieee754,
|
|
23473
|
+
buffer: buffer,
|
|
23474
|
+
child_process: child_process,
|
|
23475
|
+
cluster: cluster,
|
|
23476
|
+
console: console$1,
|
|
23477
|
+
constants: constants$1,
|
|
23478
|
+
crypto: crypto,
|
|
23479
|
+
_debug_agent: _debug_agent,
|
|
23480
|
+
_debugger: _debugger,
|
|
23481
|
+
dgram: dgram,
|
|
23482
|
+
dns: dns,
|
|
23483
|
+
domain: domain,
|
|
23484
|
+
events: events,
|
|
23485
|
+
freelist: freelist,
|
|
23486
|
+
fs: fs,
|
|
23487
|
+
"fs/promises": [
|
|
23488
|
+
">= 10 && < 10.1",
|
|
23489
|
+
">= 14"
|
|
23490
|
+
],
|
|
23491
|
+
_http_agent: _http_agent,
|
|
23492
|
+
_http_client: _http_client,
|
|
23493
|
+
_http_common: _http_common,
|
|
23494
|
+
_http_incoming: _http_incoming,
|
|
23495
|
+
_http_outgoing: _http_outgoing,
|
|
23496
|
+
_http_server: _http_server,
|
|
23497
|
+
http: http,
|
|
23498
|
+
http2: http2,
|
|
23499
|
+
https: https,
|
|
23500
|
+
inspector: inspector,
|
|
23501
|
+
_linklist: _linklist,
|
|
23502
|
+
module: module$1,
|
|
23503
|
+
net: net,
|
|
23504
|
+
"node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
|
|
23505
|
+
"node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
|
|
23506
|
+
"node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
|
|
23507
|
+
os: os,
|
|
23508
|
+
path: path$1,
|
|
23509
|
+
perf_hooks: perf_hooks,
|
|
23510
|
+
process: process$1,
|
|
23511
|
+
punycode: punycode,
|
|
23512
|
+
querystring: querystring,
|
|
23513
|
+
readline: readline,
|
|
23514
|
+
repl: repl,
|
|
23515
|
+
smalloc: smalloc,
|
|
23516
|
+
_stream_duplex: _stream_duplex,
|
|
23517
|
+
_stream_transform: _stream_transform,
|
|
23518
|
+
_stream_wrap: _stream_wrap,
|
|
23519
|
+
_stream_passthrough: _stream_passthrough,
|
|
23520
|
+
_stream_readable: _stream_readable,
|
|
23521
|
+
_stream_writable: _stream_writable,
|
|
23522
|
+
stream: stream,
|
|
23523
|
+
string_decoder: string_decoder,
|
|
23524
|
+
sys: sys,
|
|
23525
|
+
timers: timers,
|
|
23526
|
+
_tls_common: _tls_common,
|
|
23527
|
+
_tls_legacy: _tls_legacy,
|
|
23528
|
+
_tls_wrap: _tls_wrap,
|
|
23529
|
+
tls: tls,
|
|
23530
|
+
trace_events: trace_events,
|
|
23531
|
+
tty: tty,
|
|
23532
|
+
url: url,
|
|
23533
|
+
util: util$2,
|
|
23534
|
+
"v8/tools/arguments": ">= 10 && < 12",
|
|
23535
|
+
"v8/tools/codemap": [
|
|
23536
|
+
">= 4.4.0 && < 5",
|
|
23537
|
+
">= 5.2.0 && < 12"
|
|
23538
|
+
],
|
|
23539
|
+
"v8/tools/consarray": [
|
|
23540
|
+
">= 4.4.0 && < 5",
|
|
23541
|
+
">= 5.2.0 && < 12"
|
|
23542
|
+
],
|
|
23543
|
+
"v8/tools/csvparser": [
|
|
23544
|
+
">= 4.4.0 && < 5",
|
|
23545
|
+
">= 5.2.0 && < 12"
|
|
23546
|
+
],
|
|
23547
|
+
"v8/tools/logreader": [
|
|
23548
|
+
">= 4.4.0 && < 5",
|
|
23549
|
+
">= 5.2.0 && < 12"
|
|
23550
|
+
],
|
|
23551
|
+
"v8/tools/profile_view": [
|
|
23552
|
+
">= 4.4.0 && < 5",
|
|
23553
|
+
">= 5.2.0 && < 12"
|
|
23554
|
+
],
|
|
23555
|
+
"v8/tools/splaytree": [
|
|
23556
|
+
">= 4.4.0 && < 5",
|
|
23557
|
+
">= 5.2.0 && < 12"
|
|
23558
|
+
],
|
|
23559
|
+
v8: v8,
|
|
23560
|
+
vm: vm,
|
|
23561
|
+
wasi: wasi,
|
|
23562
|
+
worker_threads: worker_threads,
|
|
23563
|
+
zlib: zlib
|
|
23564
|
+
};
|
|
23565
|
+
|
|
23566
|
+
var core$2 = /*#__PURE__*/Object.freeze({
|
|
23567
|
+
__proto__: null,
|
|
23568
|
+
assert: assert,
|
|
23569
|
+
async_hooks: async_hooks,
|
|
23570
|
+
buffer_ieee754: buffer_ieee754,
|
|
23571
|
+
buffer: buffer,
|
|
23572
|
+
child_process: child_process,
|
|
23573
|
+
cluster: cluster,
|
|
23574
|
+
console: console$1,
|
|
23575
|
+
constants: constants$1,
|
|
23576
|
+
crypto: crypto,
|
|
23577
|
+
_debug_agent: _debug_agent,
|
|
23578
|
+
_debugger: _debugger,
|
|
23579
|
+
dgram: dgram,
|
|
23580
|
+
dns: dns,
|
|
23581
|
+
domain: domain,
|
|
23582
|
+
events: events,
|
|
23583
|
+
freelist: freelist,
|
|
23584
|
+
fs: fs,
|
|
23585
|
+
_http_agent: _http_agent,
|
|
23586
|
+
_http_client: _http_client,
|
|
23587
|
+
_http_common: _http_common,
|
|
23588
|
+
_http_incoming: _http_incoming,
|
|
23589
|
+
_http_outgoing: _http_outgoing,
|
|
23590
|
+
_http_server: _http_server,
|
|
23591
|
+
http: http,
|
|
23592
|
+
http2: http2,
|
|
23593
|
+
https: https,
|
|
23594
|
+
inspector: inspector,
|
|
23595
|
+
_linklist: _linklist,
|
|
23596
|
+
module: module$1,
|
|
23597
|
+
net: net,
|
|
23598
|
+
os: os,
|
|
23599
|
+
path: path$1,
|
|
23600
|
+
perf_hooks: perf_hooks,
|
|
23601
|
+
process: process$1,
|
|
23602
|
+
punycode: punycode,
|
|
23603
|
+
querystring: querystring,
|
|
23604
|
+
readline: readline,
|
|
23605
|
+
repl: repl,
|
|
23606
|
+
smalloc: smalloc,
|
|
23607
|
+
_stream_duplex: _stream_duplex,
|
|
23608
|
+
_stream_transform: _stream_transform,
|
|
23609
|
+
_stream_wrap: _stream_wrap,
|
|
23610
|
+
_stream_passthrough: _stream_passthrough,
|
|
23611
|
+
_stream_readable: _stream_readable,
|
|
23612
|
+
_stream_writable: _stream_writable,
|
|
23613
|
+
stream: stream,
|
|
23614
|
+
string_decoder: string_decoder,
|
|
23615
|
+
sys: sys,
|
|
23616
|
+
timers: timers,
|
|
23617
|
+
_tls_common: _tls_common,
|
|
23618
|
+
_tls_legacy: _tls_legacy,
|
|
23619
|
+
_tls_wrap: _tls_wrap,
|
|
23620
|
+
tls: tls,
|
|
23621
|
+
trace_events: trace_events,
|
|
23622
|
+
tty: tty,
|
|
23623
|
+
url: url,
|
|
23624
|
+
util: util$2,
|
|
23625
|
+
v8: v8,
|
|
23626
|
+
vm: vm,
|
|
23627
|
+
wasi: wasi,
|
|
23628
|
+
worker_threads: worker_threads,
|
|
23629
|
+
zlib: zlib,
|
|
23630
|
+
'default': core$1
|
|
23631
|
+
});
|
|
23632
|
+
|
|
23633
|
+
var data = getCjsExportFromNamespace(core$2);
|
|
23634
|
+
|
|
23635
|
+
var current = process.versions && process.versions.node && process.versions.node.split('.') || [];
|
|
23636
|
+
|
|
23637
|
+
function specifierIncluded(specifier) {
|
|
23638
|
+
var parts = specifier.split(' ');
|
|
23639
|
+
var op = parts.length > 1 ? parts[0] : '=';
|
|
23640
|
+
var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
|
|
23641
|
+
|
|
23642
|
+
for (var i = 0; i < 3; ++i) {
|
|
23643
|
+
var cur = Number(current[i] || 0);
|
|
23644
|
+
var ver = Number(versionParts[i] || 0);
|
|
23645
|
+
|
|
23646
|
+
if (cur === ver) {
|
|
23647
|
+
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
23648
|
+
}
|
|
23649
|
+
|
|
23650
|
+
if (op === '<') {
|
|
23651
|
+
return cur < ver;
|
|
23652
|
+
} else if (op === '>=') {
|
|
23653
|
+
return cur >= ver;
|
|
23654
|
+
} else {
|
|
23655
|
+
return false;
|
|
23656
|
+
}
|
|
23657
|
+
}
|
|
23658
|
+
|
|
23659
|
+
return op === '>=';
|
|
23660
|
+
}
|
|
23661
|
+
|
|
23662
|
+
function matchesRange(range) {
|
|
23663
|
+
var specifiers = range.split(/ ?&& ?/);
|
|
23664
|
+
|
|
23665
|
+
if (specifiers.length === 0) {
|
|
23666
|
+
return false;
|
|
23667
|
+
}
|
|
23668
|
+
|
|
23669
|
+
for (var i = 0; i < specifiers.length; ++i) {
|
|
23670
|
+
if (!specifierIncluded(specifiers[i])) {
|
|
23671
|
+
return false;
|
|
23672
|
+
}
|
|
23673
|
+
}
|
|
23674
|
+
|
|
23675
|
+
return true;
|
|
23676
|
+
}
|
|
23677
|
+
|
|
23678
|
+
function versionIncluded(specifierValue) {
|
|
23679
|
+
if (typeof specifierValue === 'boolean') {
|
|
23680
|
+
return specifierValue;
|
|
23681
|
+
}
|
|
23682
|
+
|
|
23683
|
+
if (specifierValue && typeof specifierValue === 'object') {
|
|
23684
|
+
for (var i = 0; i < specifierValue.length; ++i) {
|
|
23685
|
+
if (matchesRange(specifierValue[i])) {
|
|
23686
|
+
return true;
|
|
23687
|
+
}
|
|
23688
|
+
}
|
|
23689
|
+
|
|
23690
|
+
return false;
|
|
23691
|
+
}
|
|
23692
|
+
|
|
23693
|
+
return matchesRange(specifierValue);
|
|
23694
|
+
}
|
|
23695
|
+
|
|
23696
|
+
var core$3 = {};
|
|
23697
|
+
|
|
23698
|
+
for (var mod in data) {
|
|
23699
|
+
// eslint-disable-line no-restricted-syntax
|
|
23700
|
+
if (Object.prototype.hasOwnProperty.call(data, mod)) {
|
|
23701
|
+
core$3[mod] = versionIncluded(data[mod]);
|
|
23702
|
+
}
|
|
23703
|
+
}
|
|
23704
|
+
|
|
23705
|
+
var core_1 = core$3;
|
|
23706
|
+
|
|
23707
|
+
var isCore = function isCore(x) {
|
|
23708
|
+
return Object.prototype.hasOwnProperty.call(core_1, x);
|
|
23709
|
+
};
|
|
23710
|
+
|
|
23711
|
+
var realpath = fs$3.realpath && typeof fs$3.realpath.native === 'function' ? fs$3.realpath.native : fs$3.realpath;
|
|
23712
|
+
|
|
23713
|
+
var defaultIsFile = function isFile(file, cb) {
|
|
23714
|
+
fs$3.stat(file, function (err, stat) {
|
|
23715
|
+
if (!err) {
|
|
23716
|
+
return cb(null, stat.isFile() || stat.isFIFO());
|
|
23717
|
+
}
|
|
23718
|
+
|
|
23719
|
+
if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
|
|
23720
|
+
return cb(err);
|
|
23721
|
+
});
|
|
23722
|
+
};
|
|
23723
|
+
|
|
23724
|
+
var defaultIsDir = function isDirectory(dir, cb) {
|
|
23725
|
+
fs$3.stat(dir, function (err, stat) {
|
|
23726
|
+
if (!err) {
|
|
23727
|
+
return cb(null, stat.isDirectory());
|
|
23728
|
+
}
|
|
23729
|
+
|
|
23730
|
+
if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
|
|
23731
|
+
return cb(err);
|
|
23732
|
+
});
|
|
23733
|
+
};
|
|
23734
|
+
|
|
23735
|
+
var maybeUnwrapSymlink = function maybeUnwrapSymlink(x, opts, cb) {
|
|
23736
|
+
if (opts && opts.preserveSymlinks === false) {
|
|
23737
|
+
realpath(x, function (realPathErr, realPath) {
|
|
23738
|
+
if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr);else cb(null, realPathErr ? x : realPath);
|
|
23739
|
+
});
|
|
23740
|
+
} else {
|
|
23741
|
+
cb(null, x);
|
|
23742
|
+
}
|
|
23743
|
+
};
|
|
23744
|
+
|
|
23745
|
+
var getPackageCandidates = function getPackageCandidates(x, start, opts) {
|
|
23746
|
+
var dirs = nodeModulesPaths(start, opts, x);
|
|
23747
|
+
|
|
23748
|
+
for (var i = 0; i < dirs.length; i++) {
|
|
23749
|
+
dirs[i] = path$2.join(dirs[i], x);
|
|
23750
|
+
}
|
|
23751
|
+
|
|
23752
|
+
return dirs;
|
|
23753
|
+
};
|
|
23754
|
+
|
|
23755
|
+
var async = function resolve(x, options, callback) {
|
|
23756
|
+
var cb = callback;
|
|
23757
|
+
var opts = options;
|
|
23758
|
+
|
|
23759
|
+
if (typeof options === 'function') {
|
|
23760
|
+
cb = opts;
|
|
23761
|
+
opts = {};
|
|
23762
|
+
}
|
|
23763
|
+
|
|
23764
|
+
if (typeof x !== 'string') {
|
|
23765
|
+
var err = new TypeError('Path must be a string.');
|
|
23766
|
+
return process.nextTick(function () {
|
|
23767
|
+
cb(err);
|
|
23768
|
+
});
|
|
23769
|
+
}
|
|
23770
|
+
|
|
23771
|
+
opts = normalizeOptions$2(x, opts);
|
|
23772
|
+
var isFile = opts.isFile || defaultIsFile;
|
|
23773
|
+
var isDirectory = opts.isDirectory || defaultIsDir;
|
|
23774
|
+
var readFile = opts.readFile || fs$3.readFile;
|
|
23775
|
+
var packageIterator = opts.packageIterator;
|
|
23776
|
+
var extensions = opts.extensions || ['.js'];
|
|
23777
|
+
var basedir = opts.basedir || path$2.dirname(caller());
|
|
23778
|
+
var parent = opts.filename || basedir;
|
|
23779
|
+
opts.paths = opts.paths || []; // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
|
|
23780
|
+
|
|
23781
|
+
var absoluteStart = path$2.resolve(basedir);
|
|
23782
|
+
maybeUnwrapSymlink(absoluteStart, opts, function (err, realStart) {
|
|
23783
|
+
if (err) cb(err);else init(realStart);
|
|
23784
|
+
});
|
|
23785
|
+
var res;
|
|
23786
|
+
|
|
23787
|
+
function init(basedir) {
|
|
23788
|
+
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
|
|
23789
|
+
res = path$2.resolve(basedir, x);
|
|
23790
|
+
if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
|
|
23791
|
+
|
|
23792
|
+
if (/\/$/.test(x) && res === basedir) {
|
|
23793
|
+
loadAsDirectory(res, opts.package, onfile);
|
|
23794
|
+
} else loadAsFile(res, opts.package, onfile);
|
|
23795
|
+
} else if (isCore(x)) {
|
|
23796
|
+
return cb(null, x);
|
|
23797
|
+
} else loadNodeModules(x, basedir, function (err, n, pkg) {
|
|
23798
|
+
if (err) cb(err);else if (n) {
|
|
23799
|
+
return maybeUnwrapSymlink(n, opts, function (err, realN) {
|
|
23800
|
+
if (err) {
|
|
23801
|
+
cb(err);
|
|
23802
|
+
} else {
|
|
23803
|
+
cb(null, realN, pkg);
|
|
23804
|
+
}
|
|
23805
|
+
});
|
|
23806
|
+
} else {
|
|
23807
|
+
var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
|
|
23808
|
+
moduleError.code = 'MODULE_NOT_FOUND';
|
|
23809
|
+
cb(moduleError);
|
|
23810
|
+
}
|
|
23811
|
+
});
|
|
23812
|
+
}
|
|
23813
|
+
|
|
23814
|
+
function onfile(err, m, pkg) {
|
|
23815
|
+
if (err) cb(err);else if (m) cb(null, m, pkg);else loadAsDirectory(res, function (err, d, pkg) {
|
|
23816
|
+
if (err) cb(err);else if (d) {
|
|
23817
|
+
maybeUnwrapSymlink(d, opts, function (err, realD) {
|
|
23818
|
+
if (err) {
|
|
23819
|
+
cb(err);
|
|
23820
|
+
} else {
|
|
23821
|
+
cb(null, realD, pkg);
|
|
23822
|
+
}
|
|
23823
|
+
});
|
|
23824
|
+
} else {
|
|
23825
|
+
var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
|
|
23826
|
+
moduleError.code = 'MODULE_NOT_FOUND';
|
|
23827
|
+
cb(moduleError);
|
|
23828
|
+
}
|
|
23829
|
+
});
|
|
23830
|
+
}
|
|
23831
|
+
|
|
23832
|
+
function loadAsFile(x, thePackage, callback) {
|
|
23833
|
+
var loadAsFilePackage = thePackage;
|
|
23834
|
+
var cb = callback;
|
|
23835
|
+
|
|
23836
|
+
if (typeof loadAsFilePackage === 'function') {
|
|
23837
|
+
cb = loadAsFilePackage;
|
|
23838
|
+
loadAsFilePackage = undefined;
|
|
23839
|
+
}
|
|
23840
|
+
|
|
23841
|
+
var exts = [''].concat(extensions);
|
|
23842
|
+
load(exts, x, loadAsFilePackage);
|
|
23843
|
+
|
|
23844
|
+
function load(exts, x, loadPackage) {
|
|
23845
|
+
if (exts.length === 0) return cb(null, undefined, loadPackage);
|
|
23846
|
+
var file = x + exts[0];
|
|
23847
|
+
var pkg = loadPackage;
|
|
23848
|
+
if (pkg) onpkg(null, pkg);else loadpkg(path$2.dirname(file), onpkg);
|
|
23849
|
+
|
|
23850
|
+
function onpkg(err, pkg_, dir) {
|
|
23851
|
+
pkg = pkg_;
|
|
23852
|
+
if (err) return cb(err);
|
|
23853
|
+
|
|
23854
|
+
if (dir && pkg && opts.pathFilter) {
|
|
23855
|
+
var rfile = path$2.relative(dir, file);
|
|
23856
|
+
var rel = rfile.slice(0, rfile.length - exts[0].length);
|
|
23857
|
+
var r = opts.pathFilter(pkg, x, rel);
|
|
23858
|
+
if (r) return load([''].concat(extensions.slice()), path$2.resolve(dir, r), pkg);
|
|
23859
|
+
}
|
|
23860
|
+
|
|
23861
|
+
isFile(file, onex);
|
|
23862
|
+
}
|
|
23863
|
+
|
|
23864
|
+
function onex(err, ex) {
|
|
23865
|
+
if (err) return cb(err);
|
|
23866
|
+
if (ex) return cb(null, file, pkg);
|
|
23867
|
+
load(exts.slice(1), x, pkg);
|
|
23868
|
+
}
|
|
23869
|
+
}
|
|
23870
|
+
}
|
|
23871
|
+
|
|
23872
|
+
function loadpkg(dir, cb) {
|
|
23873
|
+
if (dir === '' || dir === '/') return cb(null);
|
|
23874
|
+
|
|
23875
|
+
if (process.platform === 'win32' && /^\w:[/\\]*$/.test(dir)) {
|
|
23876
|
+
return cb(null);
|
|
23877
|
+
}
|
|
23878
|
+
|
|
23879
|
+
if (/[/\\]node_modules[/\\]*$/.test(dir)) return cb(null);
|
|
23880
|
+
maybeUnwrapSymlink(dir, opts, function (unwrapErr, pkgdir) {
|
|
23881
|
+
if (unwrapErr) return loadpkg(path$2.dirname(dir), cb);
|
|
23882
|
+
var pkgfile = path$2.join(pkgdir, 'package.json');
|
|
23883
|
+
isFile(pkgfile, function (err, ex) {
|
|
23884
|
+
// on err, ex is false
|
|
23885
|
+
if (!ex) return loadpkg(path$2.dirname(dir), cb);
|
|
23886
|
+
readFile(pkgfile, function (err, body) {
|
|
23887
|
+
if (err) cb(err);
|
|
23888
|
+
|
|
23889
|
+
try {
|
|
23890
|
+
var pkg = JSON.parse(body);
|
|
23891
|
+
} catch (jsonErr) {}
|
|
23892
|
+
|
|
23893
|
+
if (pkg && opts.packageFilter) {
|
|
23894
|
+
pkg = opts.packageFilter(pkg, pkgfile);
|
|
23895
|
+
}
|
|
23896
|
+
|
|
23897
|
+
cb(null, pkg, dir);
|
|
23898
|
+
});
|
|
23899
|
+
});
|
|
23900
|
+
});
|
|
23901
|
+
}
|
|
23902
|
+
|
|
23903
|
+
function loadAsDirectory(x, loadAsDirectoryPackage, callback) {
|
|
23904
|
+
var cb = callback;
|
|
23905
|
+
var fpkg = loadAsDirectoryPackage;
|
|
23906
|
+
|
|
23907
|
+
if (typeof fpkg === 'function') {
|
|
23908
|
+
cb = fpkg;
|
|
23909
|
+
fpkg = opts.package;
|
|
23910
|
+
}
|
|
23911
|
+
|
|
23912
|
+
maybeUnwrapSymlink(x, opts, function (unwrapErr, pkgdir) {
|
|
23913
|
+
if (unwrapErr) return cb(unwrapErr);
|
|
23914
|
+
var pkgfile = path$2.join(pkgdir, 'package.json');
|
|
23915
|
+
isFile(pkgfile, function (err, ex) {
|
|
23916
|
+
if (err) return cb(err);
|
|
23917
|
+
if (!ex) return loadAsFile(path$2.join(x, 'index'), fpkg, cb);
|
|
23918
|
+
readFile(pkgfile, function (err, body) {
|
|
23919
|
+
if (err) return cb(err);
|
|
23920
|
+
|
|
23921
|
+
try {
|
|
23922
|
+
var pkg = JSON.parse(body);
|
|
23923
|
+
} catch (jsonErr) {}
|
|
23924
|
+
|
|
23925
|
+
if (pkg && opts.packageFilter) {
|
|
23926
|
+
pkg = opts.packageFilter(pkg, pkgfile);
|
|
23927
|
+
}
|
|
23928
|
+
|
|
23929
|
+
if (pkg && pkg.main) {
|
|
23930
|
+
if (typeof pkg.main !== 'string') {
|
|
23931
|
+
var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
|
|
23932
|
+
mainError.code = 'INVALID_PACKAGE_MAIN';
|
|
23933
|
+
return cb(mainError);
|
|
23934
|
+
}
|
|
23935
|
+
|
|
23936
|
+
if (pkg.main === '.' || pkg.main === './') {
|
|
23937
|
+
pkg.main = 'index';
|
|
23938
|
+
}
|
|
23939
|
+
|
|
23940
|
+
loadAsFile(path$2.resolve(x, pkg.main), pkg, function (err, m, pkg) {
|
|
23941
|
+
if (err) return cb(err);
|
|
23942
|
+
if (m) return cb(null, m, pkg);
|
|
23943
|
+
if (!pkg) return loadAsFile(path$2.join(x, 'index'), pkg, cb);
|
|
23944
|
+
var dir = path$2.resolve(x, pkg.main);
|
|
23945
|
+
loadAsDirectory(dir, pkg, function (err, n, pkg) {
|
|
23946
|
+
if (err) return cb(err);
|
|
23947
|
+
if (n) return cb(null, n, pkg);
|
|
23948
|
+
loadAsFile(path$2.join(x, 'index'), pkg, cb);
|
|
23949
|
+
});
|
|
23950
|
+
});
|
|
23951
|
+
return;
|
|
23952
|
+
}
|
|
23953
|
+
|
|
23954
|
+
loadAsFile(path$2.join(x, '/index'), pkg, cb);
|
|
23955
|
+
});
|
|
23956
|
+
});
|
|
23957
|
+
});
|
|
23958
|
+
}
|
|
23959
|
+
|
|
23960
|
+
function processDirs(cb, dirs) {
|
|
23961
|
+
if (dirs.length === 0) return cb(null, undefined);
|
|
23962
|
+
var dir = dirs[0];
|
|
23963
|
+
isDirectory(path$2.dirname(dir), isdir);
|
|
23964
|
+
|
|
23965
|
+
function isdir(err, isdir) {
|
|
23966
|
+
if (err) return cb(err);
|
|
23967
|
+
if (!isdir) return processDirs(cb, dirs.slice(1));
|
|
23968
|
+
loadAsFile(dir, opts.package, onfile);
|
|
23969
|
+
}
|
|
23970
|
+
|
|
23971
|
+
function onfile(err, m, pkg) {
|
|
23972
|
+
if (err) return cb(err);
|
|
23973
|
+
if (m) return cb(null, m, pkg);
|
|
23974
|
+
loadAsDirectory(dir, opts.package, ondir);
|
|
23975
|
+
}
|
|
23976
|
+
|
|
23977
|
+
function ondir(err, n, pkg) {
|
|
23978
|
+
if (err) return cb(err);
|
|
23979
|
+
if (n) return cb(null, n, pkg);
|
|
23980
|
+
processDirs(cb, dirs.slice(1));
|
|
23981
|
+
}
|
|
23982
|
+
}
|
|
23983
|
+
|
|
23984
|
+
function loadNodeModules(x, start, cb) {
|
|
23985
|
+
var thunk = function () {
|
|
23986
|
+
return getPackageCandidates(x, start, opts);
|
|
23987
|
+
};
|
|
23988
|
+
|
|
23989
|
+
processDirs(cb, packageIterator ? packageIterator(x, start, thunk, opts) : thunk());
|
|
23990
|
+
}
|
|
23991
|
+
};
|
|
23992
|
+
|
|
23993
|
+
var realpath$1 = fs$3.realpathSync && typeof fs$3.realpathSync.native === 'function' ? fs$3.realpathSync.native : fs$3.realpathSync;
|
|
23994
|
+
|
|
23995
|
+
var defaultIsFile$1 = function isFile(file) {
|
|
23996
|
+
try {
|
|
23997
|
+
var stat = fs$3.statSync(file);
|
|
23998
|
+
} catch (e) {
|
|
23999
|
+
if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
|
|
24000
|
+
throw e;
|
|
24001
|
+
}
|
|
24002
|
+
|
|
24003
|
+
return stat.isFile() || stat.isFIFO();
|
|
24004
|
+
};
|
|
24005
|
+
|
|
24006
|
+
var defaultIsDir$1 = function isDirectory(dir) {
|
|
24007
|
+
try {
|
|
24008
|
+
var stat = fs$3.statSync(dir);
|
|
24009
|
+
} catch (e) {
|
|
24010
|
+
if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
|
|
24011
|
+
throw e;
|
|
24012
|
+
}
|
|
24013
|
+
|
|
24014
|
+
return stat.isDirectory();
|
|
24015
|
+
};
|
|
24016
|
+
|
|
24017
|
+
var maybeUnwrapSymlink$1 = function maybeUnwrapSymlink(x, opts) {
|
|
24018
|
+
if (opts && opts.preserveSymlinks === false) {
|
|
24019
|
+
try {
|
|
24020
|
+
return realpath$1(x);
|
|
24021
|
+
} catch (realPathErr) {
|
|
24022
|
+
if (realPathErr.code !== 'ENOENT') {
|
|
24023
|
+
throw realPathErr;
|
|
24024
|
+
}
|
|
24025
|
+
}
|
|
24026
|
+
}
|
|
24027
|
+
|
|
24028
|
+
return x;
|
|
24029
|
+
};
|
|
24030
|
+
|
|
24031
|
+
var getPackageCandidates$1 = function getPackageCandidates(x, start, opts) {
|
|
24032
|
+
var dirs = nodeModulesPaths(start, opts, x);
|
|
24033
|
+
|
|
24034
|
+
for (var i = 0; i < dirs.length; i++) {
|
|
24035
|
+
dirs[i] = path$2.join(dirs[i], x);
|
|
24036
|
+
}
|
|
24037
|
+
|
|
24038
|
+
return dirs;
|
|
24039
|
+
};
|
|
24040
|
+
|
|
24041
|
+
var sync = function resolveSync(x, options) {
|
|
24042
|
+
if (typeof x !== 'string') {
|
|
24043
|
+
throw new TypeError('Path must be a string.');
|
|
24044
|
+
}
|
|
24045
|
+
|
|
24046
|
+
var opts = normalizeOptions$2(x, options);
|
|
24047
|
+
var isFile = opts.isFile || defaultIsFile$1;
|
|
24048
|
+
var readFileSync = opts.readFileSync || fs$3.readFileSync;
|
|
24049
|
+
var isDirectory = opts.isDirectory || defaultIsDir$1;
|
|
24050
|
+
var packageIterator = opts.packageIterator;
|
|
24051
|
+
var extensions = opts.extensions || ['.js'];
|
|
24052
|
+
var basedir = opts.basedir || path$2.dirname(caller());
|
|
24053
|
+
var parent = opts.filename || basedir;
|
|
24054
|
+
opts.paths = opts.paths || []; // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
|
|
24055
|
+
|
|
24056
|
+
var absoluteStart = maybeUnwrapSymlink$1(path$2.resolve(basedir), opts);
|
|
24057
|
+
|
|
24058
|
+
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
|
|
24059
|
+
var res = path$2.resolve(absoluteStart, x);
|
|
24060
|
+
if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
|
|
24061
|
+
var m = loadAsFileSync(res) || loadAsDirectorySync(res);
|
|
24062
|
+
if (m) return maybeUnwrapSymlink$1(m, opts);
|
|
24063
|
+
} else if (isCore(x)) {
|
|
24064
|
+
return x;
|
|
24065
|
+
} else {
|
|
24066
|
+
var n = loadNodeModulesSync(x, absoluteStart);
|
|
24067
|
+
if (n) return maybeUnwrapSymlink$1(n, opts);
|
|
24068
|
+
}
|
|
24069
|
+
|
|
24070
|
+
var err = new Error("Cannot find module '" + x + "' from '" + parent + "'");
|
|
24071
|
+
err.code = 'MODULE_NOT_FOUND';
|
|
24072
|
+
throw err;
|
|
24073
|
+
|
|
24074
|
+
function loadAsFileSync(x) {
|
|
24075
|
+
var pkg = loadpkg(path$2.dirname(x));
|
|
24076
|
+
|
|
24077
|
+
if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
|
|
24078
|
+
var rfile = path$2.relative(pkg.dir, x);
|
|
24079
|
+
var r = opts.pathFilter(pkg.pkg, x, rfile);
|
|
24080
|
+
|
|
24081
|
+
if (r) {
|
|
24082
|
+
x = path$2.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign
|
|
24083
|
+
}
|
|
24084
|
+
}
|
|
24085
|
+
|
|
24086
|
+
if (isFile(x)) {
|
|
24087
|
+
return x;
|
|
24088
|
+
}
|
|
24089
|
+
|
|
24090
|
+
for (var i = 0; i < extensions.length; i++) {
|
|
24091
|
+
var file = x + extensions[i];
|
|
24092
|
+
|
|
24093
|
+
if (isFile(file)) {
|
|
24094
|
+
return file;
|
|
24095
|
+
}
|
|
24096
|
+
}
|
|
24097
|
+
}
|
|
24098
|
+
|
|
24099
|
+
function loadpkg(dir) {
|
|
24100
|
+
if (dir === '' || dir === '/') return;
|
|
24101
|
+
|
|
24102
|
+
if (process.platform === 'win32' && /^\w:[/\\]*$/.test(dir)) {
|
|
24103
|
+
return;
|
|
24104
|
+
}
|
|
24105
|
+
|
|
24106
|
+
if (/[/\\]node_modules[/\\]*$/.test(dir)) return;
|
|
24107
|
+
var pkgfile = path$2.join(maybeUnwrapSymlink$1(dir, opts), 'package.json');
|
|
24108
|
+
|
|
24109
|
+
if (!isFile(pkgfile)) {
|
|
24110
|
+
return loadpkg(path$2.dirname(dir));
|
|
24111
|
+
}
|
|
24112
|
+
|
|
24113
|
+
var body = readFileSync(pkgfile);
|
|
24114
|
+
|
|
24115
|
+
try {
|
|
24116
|
+
var pkg = JSON.parse(body);
|
|
24117
|
+
} catch (jsonErr) {}
|
|
24118
|
+
|
|
24119
|
+
if (pkg && opts.packageFilter) {
|
|
24120
|
+
// v2 will pass pkgfile
|
|
24121
|
+
pkg = opts.packageFilter(pkg,
|
|
24122
|
+
/*pkgfile,*/
|
|
24123
|
+
dir); // eslint-disable-line spaced-comment
|
|
24124
|
+
}
|
|
24125
|
+
|
|
24126
|
+
return {
|
|
24127
|
+
pkg: pkg,
|
|
24128
|
+
dir: dir
|
|
24129
|
+
};
|
|
24130
|
+
}
|
|
24131
|
+
|
|
24132
|
+
function loadAsDirectorySync(x) {
|
|
24133
|
+
var pkgfile = path$2.join(maybeUnwrapSymlink$1(x, opts), '/package.json');
|
|
24134
|
+
|
|
24135
|
+
if (isFile(pkgfile)) {
|
|
24136
|
+
try {
|
|
24137
|
+
var body = readFileSync(pkgfile, 'UTF8');
|
|
24138
|
+
var pkg = JSON.parse(body);
|
|
24139
|
+
} catch (e) {}
|
|
24140
|
+
|
|
24141
|
+
if (pkg && opts.packageFilter) {
|
|
24142
|
+
// v2 will pass pkgfile
|
|
24143
|
+
pkg = opts.packageFilter(pkg,
|
|
24144
|
+
/*pkgfile,*/
|
|
24145
|
+
x); // eslint-disable-line spaced-comment
|
|
24146
|
+
}
|
|
24147
|
+
|
|
24148
|
+
if (pkg && pkg.main) {
|
|
24149
|
+
if (typeof pkg.main !== 'string') {
|
|
24150
|
+
var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
|
|
24151
|
+
mainError.code = 'INVALID_PACKAGE_MAIN';
|
|
24152
|
+
throw mainError;
|
|
24153
|
+
}
|
|
24154
|
+
|
|
24155
|
+
if (pkg.main === '.' || pkg.main === './') {
|
|
24156
|
+
pkg.main = 'index';
|
|
24157
|
+
}
|
|
24158
|
+
|
|
24159
|
+
try {
|
|
24160
|
+
var m = loadAsFileSync(path$2.resolve(x, pkg.main));
|
|
24161
|
+
if (m) return m;
|
|
24162
|
+
var n = loadAsDirectorySync(path$2.resolve(x, pkg.main));
|
|
24163
|
+
if (n) return n;
|
|
24164
|
+
} catch (e) {}
|
|
24165
|
+
}
|
|
24166
|
+
}
|
|
24167
|
+
|
|
24168
|
+
return loadAsFileSync(path$2.join(x, '/index'));
|
|
24169
|
+
}
|
|
24170
|
+
|
|
24171
|
+
function loadNodeModulesSync(x, start) {
|
|
24172
|
+
var thunk = function () {
|
|
24173
|
+
return getPackageCandidates$1(x, start, opts);
|
|
24174
|
+
};
|
|
24175
|
+
|
|
24176
|
+
var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk();
|
|
24177
|
+
|
|
24178
|
+
for (var i = 0; i < dirs.length; i++) {
|
|
24179
|
+
var dir = dirs[i];
|
|
24180
|
+
|
|
24181
|
+
if (isDirectory(path$2.dirname(dir))) {
|
|
24182
|
+
var m = loadAsFileSync(dir);
|
|
24183
|
+
if (m) return m;
|
|
24184
|
+
var n = loadAsDirectorySync(dir);
|
|
24185
|
+
if (n) return n;
|
|
24186
|
+
}
|
|
24187
|
+
}
|
|
24188
|
+
}
|
|
24189
|
+
};
|
|
24190
|
+
|
|
24191
|
+
async.core = core_1;
|
|
24192
|
+
async.isCore = isCore;
|
|
24193
|
+
async.sync = sync;
|
|
24194
|
+
var resolve = async;
|
|
24195
|
+
|
|
24196
|
+
// eslint-disable-next-line prefer-destructuring
|
|
24197
|
+
|
|
24198
|
+
|
|
24199
|
+
let resolve$1 = require.resolve; // In the VS Code and Atom extensions `require` is overridden and `require.resolve` doesn't support the 2nd argument.
|
|
24200
|
+
|
|
24201
|
+
if (resolve$1.length === 1 || process.env.PRETTIER_FALLBACK_RESOLVE) {
|
|
24202
|
+
resolve$1 = (id, options) => {
|
|
24203
|
+
let basedir;
|
|
24204
|
+
|
|
24205
|
+
if (options && options.paths && options.paths.length === 1) {
|
|
24206
|
+
basedir = options.paths[0];
|
|
24207
|
+
}
|
|
24208
|
+
|
|
24209
|
+
return resolve.sync(id, {
|
|
24210
|
+
basedir
|
|
24211
|
+
});
|
|
24212
|
+
};
|
|
24213
|
+
}
|
|
24214
|
+
|
|
24215
|
+
var resolve_1 = resolve$1;
|
|
24216
|
+
|
|
23260
24217
|
const getExplorerMemoized = mem_1(opts => {
|
|
23261
24218
|
const cosmiconfig = thirdParty["cosmiconfig" + (opts.sync ? "Sync" : "")];
|
|
23262
24219
|
const explorer = cosmiconfig("prettier", {
|
|
@@ -23264,13 +24221,12 @@ const getExplorerMemoized = mem_1(opts => {
|
|
|
23264
24221
|
transform: result => {
|
|
23265
24222
|
if (result && result.config) {
|
|
23266
24223
|
if (typeof result.config === "string") {
|
|
23267
|
-
const dir = path$
|
|
24224
|
+
const dir = path$2.dirname(result.filepath);
|
|
23268
24225
|
|
|
23269
24226
|
try {
|
|
23270
|
-
const modulePath =
|
|
24227
|
+
const modulePath = resolve_1(result.config, {
|
|
23271
24228
|
paths: [dir]
|
|
23272
24229
|
});
|
|
23273
|
-
|
|
23274
24230
|
result.config = require(modulePath);
|
|
23275
24231
|
} catch (error) {
|
|
23276
24232
|
// Original message contains `__filename`, can't pass tests
|
|
@@ -23329,7 +24285,7 @@ function _resolveConfig(filePath, opts, sync) {
|
|
|
23329
24285
|
["plugins", "pluginSearchDirs"].forEach(optionName => {
|
|
23330
24286
|
if (Array.isArray(merged[optionName])) {
|
|
23331
24287
|
merged[optionName] = merged[optionName].map(value => typeof value === "string" && value.startsWith(".") // relative path
|
|
23332
|
-
? path$
|
|
24288
|
+
? path$2.resolve(path$2.dirname(result.filepath), value) : value);
|
|
23333
24289
|
}
|
|
23334
24290
|
});
|
|
23335
24291
|
|
|
@@ -23389,7 +24345,7 @@ function mergeOverrides(configResult, filePath) {
|
|
|
23389
24345
|
options = _objectWithoutPropertiesLoose(_ref, ["overrides"]);
|
|
23390
24346
|
|
|
23391
24347
|
if (filePath && overrides) {
|
|
23392
|
-
const relativeFilePath = path$
|
|
24348
|
+
const relativeFilePath = path$2.relative(path$2.dirname(configPath), filePath);
|
|
23393
24349
|
|
|
23394
24350
|
for (const override of overrides) {
|
|
23395
24351
|
if (pathMatchesGlobs(relativeFilePath, override.files, override.excludeFiles)) {
|
|
@@ -23504,7 +24460,7 @@ function _getFileInfo({
|
|
|
23504
24460
|
}
|
|
23505
24461
|
|
|
23506
24462
|
function normalizeFilePath(filePath, ignorePath) {
|
|
23507
|
-
return ignorePath ? path$
|
|
24463
|
+
return ignorePath ? path$2.relative(path$2.dirname(ignorePath), filePath) : filePath;
|
|
23508
24464
|
}
|
|
23509
24465
|
|
|
23510
24466
|
var getFileInfo_1 = getFileInfo;
|
|
@@ -26922,7 +27878,7 @@ var arrayUnion = (...arguments_) => {
|
|
|
26922
27878
|
*/
|
|
26923
27879
|
|
|
26924
27880
|
|
|
26925
|
-
const PassThrough = stream$
|
|
27881
|
+
const PassThrough = stream$6.PassThrough;
|
|
26926
27882
|
const slice = Array.prototype.slice;
|
|
26927
27883
|
var merge2_1 = merge2;
|
|
26928
27884
|
|
|
@@ -27071,7 +28027,7 @@ var errno = createCommonjsModule(function (module, exports) {
|
|
|
27071
28027
|
unwrapExports(errno);
|
|
27072
28028
|
var errno_1 = errno.isEnoentCodeError;
|
|
27073
28029
|
|
|
27074
|
-
var fs = createCommonjsModule(function (module, exports) {
|
|
28030
|
+
var fs$1 = createCommonjsModule(function (module, exports) {
|
|
27075
28031
|
|
|
27076
28032
|
Object.defineProperty(exports, "__esModule", {
|
|
27077
28033
|
value: true
|
|
@@ -27097,8 +28053,8 @@ var fs = createCommonjsModule(function (module, exports) {
|
|
|
27097
28053
|
|
|
27098
28054
|
exports.createDirentFromStats = createDirentFromStats;
|
|
27099
28055
|
});
|
|
27100
|
-
unwrapExports(fs);
|
|
27101
|
-
var fs_1 = fs.createDirentFromStats;
|
|
28056
|
+
unwrapExports(fs$1);
|
|
28057
|
+
var fs_1 = fs$1.createDirentFromStats;
|
|
27102
28058
|
|
|
27103
28059
|
var path_1 = createCommonjsModule(function (module, exports) {
|
|
27104
28060
|
|
|
@@ -27119,7 +28075,7 @@ var path_1 = createCommonjsModule(function (module, exports) {
|
|
|
27119
28075
|
exports.unixify = unixify;
|
|
27120
28076
|
|
|
27121
28077
|
function makeAbsolute(cwd, filepath) {
|
|
27122
|
-
return path$
|
|
28078
|
+
return path$2.resolve(cwd, filepath);
|
|
27123
28079
|
}
|
|
27124
28080
|
|
|
27125
28081
|
exports.makeAbsolute = makeAbsolute;
|
|
@@ -27226,8 +28182,8 @@ var isGlob = function isGlob(str, options) {
|
|
|
27226
28182
|
return false;
|
|
27227
28183
|
};
|
|
27228
28184
|
|
|
27229
|
-
var pathPosixDirname = path$
|
|
27230
|
-
var isWin32 = os.platform() === 'win32';
|
|
28185
|
+
var pathPosixDirname = path$2.posix.dirname;
|
|
28186
|
+
var isWin32 = os$1.platform() === 'win32';
|
|
27231
28187
|
var slash = '/';
|
|
27232
28188
|
var backslash = /\\/g;
|
|
27233
28189
|
var enclosure = /[\{\[].*[\/]*.*[\}\]]$/;
|
|
@@ -27863,7 +28819,7 @@ const toRegex = (start, end, options) => {
|
|
|
27863
28819
|
};
|
|
27864
28820
|
|
|
27865
28821
|
const rangeError = (...args) => {
|
|
27866
|
-
return new RangeError('Invalid range arguments: ' + util$
|
|
28822
|
+
return new RangeError('Invalid range arguments: ' + util$3.inspect(...args));
|
|
27867
28823
|
};
|
|
27868
28824
|
|
|
27869
28825
|
const invalidRange = (start, end, options) => {
|
|
@@ -28174,7 +29130,7 @@ const expand$1 = (ast, options = {}) => {
|
|
|
28174
29130
|
|
|
28175
29131
|
var expand_1 = expand$1;
|
|
28176
29132
|
|
|
28177
|
-
var constants$
|
|
29133
|
+
var constants$2 = {
|
|
28178
29134
|
MAX_LENGTH: 1024 * 64,
|
|
28179
29135
|
// Digits
|
|
28180
29136
|
CHAR_0: '0',
|
|
@@ -28358,12 +29314,12 @@ const {
|
|
|
28358
29314
|
/* ' */
|
|
28359
29315
|
CHAR_NO_BREAK_SPACE,
|
|
28360
29316
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE
|
|
28361
|
-
} = constants$
|
|
29317
|
+
} = constants$2;
|
|
28362
29318
|
/**
|
|
28363
29319
|
* parse
|
|
28364
29320
|
*/
|
|
28365
29321
|
|
|
28366
|
-
const parse$
|
|
29322
|
+
const parse$3 = (input, options = {}) => {
|
|
28367
29323
|
if (typeof input !== 'string') {
|
|
28368
29324
|
throw new TypeError('Expected a string');
|
|
28369
29325
|
}
|
|
@@ -28713,7 +29669,7 @@ const parse$2 = (input, options = {}) => {
|
|
|
28713
29669
|
return ast;
|
|
28714
29670
|
};
|
|
28715
29671
|
|
|
28716
|
-
var parse_1 = parse$
|
|
29672
|
+
var parse_1 = parse$3;
|
|
28717
29673
|
|
|
28718
29674
|
/**
|
|
28719
29675
|
* Expand the given pattern or create a regex-compatible string.
|
|
@@ -28956,7 +29912,7 @@ const POSIX_REGEX_SOURCE = {
|
|
|
28956
29912
|
word: 'A-Za-z0-9_',
|
|
28957
29913
|
xdigit: 'A-Fa-f0-9'
|
|
28958
29914
|
};
|
|
28959
|
-
var constants$
|
|
29915
|
+
var constants$3 = {
|
|
28960
29916
|
MAX_LENGTH: 1024 * 64,
|
|
28961
29917
|
POSIX_REGEX_SOURCE,
|
|
28962
29918
|
// regular expressions
|
|
@@ -29104,7 +30060,7 @@ var constants$2 = {
|
|
|
29104
30060
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
29105
30061
|
|
|
29106
30062
|
/* \uFEFF */
|
|
29107
|
-
SEP: path$
|
|
30063
|
+
SEP: path$2.sep,
|
|
29108
30064
|
|
|
29109
30065
|
/**
|
|
29110
30066
|
* Create EXTGLOB_CHARS
|
|
@@ -29156,7 +30112,7 @@ var utils$3 = createCommonjsModule(function (module, exports) {
|
|
|
29156
30112
|
REGEX_REMOVE_BACKSLASH,
|
|
29157
30113
|
REGEX_SPECIAL_CHARS,
|
|
29158
30114
|
REGEX_SPECIAL_CHARS_GLOBAL
|
|
29159
|
-
} = constants$
|
|
30115
|
+
} = constants$3;
|
|
29160
30116
|
|
|
29161
30117
|
exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
|
29162
30118
|
|
|
@@ -29189,7 +30145,7 @@ var utils$3 = createCommonjsModule(function (module, exports) {
|
|
|
29189
30145
|
return options.windows;
|
|
29190
30146
|
}
|
|
29191
30147
|
|
|
29192
|
-
return win32 === true || path$
|
|
30148
|
+
return win32 === true || path$2.sep === '\\';
|
|
29193
30149
|
};
|
|
29194
30150
|
|
|
29195
30151
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
@@ -29280,7 +30236,7 @@ const {
|
|
|
29280
30236
|
CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET$1
|
|
29281
30237
|
/* ] */
|
|
29282
30238
|
|
|
29283
|
-
} = constants$
|
|
30239
|
+
} = constants$3;
|
|
29284
30240
|
|
|
29285
30241
|
const isPathSeparator = code => {
|
|
29286
30242
|
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
|
|
@@ -29672,7 +30628,7 @@ const {
|
|
|
29672
30628
|
REGEX_NON_SPECIAL_CHARS,
|
|
29673
30629
|
REGEX_SPECIAL_CHARS_BACKREF,
|
|
29674
30630
|
REPLACEMENTS
|
|
29675
|
-
} = constants$
|
|
30631
|
+
} = constants$3;
|
|
29676
30632
|
/**
|
|
29677
30633
|
* Helpers
|
|
29678
30634
|
*/
|
|
@@ -29710,7 +30666,7 @@ const syntaxError = (type, char) => {
|
|
|
29710
30666
|
*/
|
|
29711
30667
|
|
|
29712
30668
|
|
|
29713
|
-
const parse$
|
|
30669
|
+
const parse$4 = (input, options) => {
|
|
29714
30670
|
if (typeof input !== 'string') {
|
|
29715
30671
|
throw new TypeError('Expected a string');
|
|
29716
30672
|
}
|
|
@@ -29733,8 +30689,8 @@ const parse$3 = (input, options) => {
|
|
|
29733
30689
|
const capture = opts.capture ? '' : '?:';
|
|
29734
30690
|
const win32 = utils$3.isWindows(options); // create constants based on platform, for windows or posix
|
|
29735
30691
|
|
|
29736
|
-
const PLATFORM_CHARS = constants$
|
|
29737
|
-
const EXTGLOB_CHARS = constants$
|
|
30692
|
+
const PLATFORM_CHARS = constants$3.globChars(win32);
|
|
30693
|
+
const EXTGLOB_CHARS = constants$3.extglobChars(PLATFORM_CHARS);
|
|
29738
30694
|
const {
|
|
29739
30695
|
DOT_LITERAL,
|
|
29740
30696
|
PLUS_LITERAL,
|
|
@@ -30790,7 +31746,7 @@ const parse$3 = (input, options) => {
|
|
|
30790
31746
|
*/
|
|
30791
31747
|
|
|
30792
31748
|
|
|
30793
|
-
parse$
|
|
31749
|
+
parse$4.fastpaths = (input, options) => {
|
|
30794
31750
|
const opts = Object.assign({}, options);
|
|
30795
31751
|
const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH$3, opts.maxLength) : MAX_LENGTH$3;
|
|
30796
31752
|
const len = input.length;
|
|
@@ -30812,7 +31768,7 @@ parse$3.fastpaths = (input, options) => {
|
|
|
30812
31768
|
NO_DOTS_SLASH,
|
|
30813
31769
|
STAR,
|
|
30814
31770
|
START_ANCHOR
|
|
30815
|
-
} = constants$
|
|
31771
|
+
} = constants$3.globChars(win32);
|
|
30816
31772
|
const nodot = opts.dot ? NO_DOTS : NO_DOT;
|
|
30817
31773
|
const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
|
|
30818
31774
|
const capture = opts.capture ? '' : '?:';
|
|
@@ -30878,7 +31834,7 @@ parse$3.fastpaths = (input, options) => {
|
|
|
30878
31834
|
return source;
|
|
30879
31835
|
};
|
|
30880
31836
|
|
|
30881
|
-
var parse_1$1 = parse$
|
|
31837
|
+
var parse_1$1 = parse$4;
|
|
30882
31838
|
|
|
30883
31839
|
const isObject$2 = val => val && typeof val === 'object' && !Array.isArray(val);
|
|
30884
31840
|
/**
|
|
@@ -31068,7 +32024,7 @@ picomatch.test = (input, regex, options, {
|
|
|
31068
32024
|
|
|
31069
32025
|
picomatch.matchBase = (input, glob, options, posix = utils$3.isWindows(options)) => {
|
|
31070
32026
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
31071
|
-
return regex.test(path$
|
|
32027
|
+
return regex.test(path$2.basename(input));
|
|
31072
32028
|
};
|
|
31073
32029
|
/**
|
|
31074
32030
|
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|
|
@@ -31243,7 +32199,7 @@ picomatch.toRegex = (source, options) => {
|
|
|
31243
32199
|
*/
|
|
31244
32200
|
|
|
31245
32201
|
|
|
31246
|
-
picomatch.constants = constants$
|
|
32202
|
+
picomatch.constants = constants$3;
|
|
31247
32203
|
/**
|
|
31248
32204
|
* Expose "picomatch"
|
|
31249
32205
|
*/
|
|
@@ -31437,7 +32393,7 @@ micromatch.not = (list, patterns, options = {}) => {
|
|
|
31437
32393
|
|
|
31438
32394
|
micromatch.contains = (str, pattern, options) => {
|
|
31439
32395
|
if (typeof str !== 'string') {
|
|
31440
|
-
throw new TypeError(`Expected a string: "${util$
|
|
32396
|
+
throw new TypeError(`Expected a string: "${util$3.inspect(str)}"`);
|
|
31441
32397
|
}
|
|
31442
32398
|
|
|
31443
32399
|
if (Array.isArray(pattern)) {
|
|
@@ -31592,7 +32548,7 @@ micromatch.every = (list, patterns, options) => {
|
|
|
31592
32548
|
|
|
31593
32549
|
micromatch.all = (str, patterns, options) => {
|
|
31594
32550
|
if (typeof str !== 'string') {
|
|
31595
|
-
throw new TypeError(`Expected a string: "${util$
|
|
32551
|
+
throw new TypeError(`Expected a string: "${util$3.inspect(str)}"`);
|
|
31596
32552
|
}
|
|
31597
32553
|
|
|
31598
32554
|
return [].concat(patterns).every(p => picomatch$1(p, options)(str));
|
|
@@ -31835,7 +32791,7 @@ var pattern = createCommonjsModule(function (module, exports) {
|
|
|
31835
32791
|
exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
31836
32792
|
|
|
31837
32793
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
31838
|
-
const basename = path$
|
|
32794
|
+
const basename = path$2.basename(pattern);
|
|
31839
32795
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
31840
32796
|
}
|
|
31841
32797
|
|
|
@@ -31910,7 +32866,7 @@ var pattern_16 = pattern.makeRe;
|
|
|
31910
32866
|
var pattern_17 = pattern.convertPatternsToRe;
|
|
31911
32867
|
var pattern_18 = pattern.matchAny;
|
|
31912
32868
|
|
|
31913
|
-
var stream = createCommonjsModule(function (module, exports) {
|
|
32869
|
+
var stream$1 = createCommonjsModule(function (module, exports) {
|
|
31914
32870
|
|
|
31915
32871
|
Object.defineProperty(exports, "__esModule", {
|
|
31916
32872
|
value: true
|
|
@@ -31932,8 +32888,8 @@ var stream = createCommonjsModule(function (module, exports) {
|
|
|
31932
32888
|
streams.forEach(stream => stream.emit('close'));
|
|
31933
32889
|
}
|
|
31934
32890
|
});
|
|
31935
|
-
unwrapExports(stream);
|
|
31936
|
-
var stream_1 = stream.merge;
|
|
32891
|
+
unwrapExports(stream$1);
|
|
32892
|
+
var stream_1 = stream$1.merge;
|
|
31937
32893
|
|
|
31938
32894
|
var string$1 = createCommonjsModule(function (module, exports) {
|
|
31939
32895
|
|
|
@@ -31964,10 +32920,10 @@ var utils$4 = createCommonjsModule(function (module, exports) {
|
|
|
31964
32920
|
});
|
|
31965
32921
|
exports.array = array$2;
|
|
31966
32922
|
exports.errno = errno;
|
|
31967
|
-
exports.fs = fs;
|
|
32923
|
+
exports.fs = fs$1;
|
|
31968
32924
|
exports.path = path_1;
|
|
31969
32925
|
exports.pattern = pattern;
|
|
31970
|
-
exports.stream = stream;
|
|
32926
|
+
exports.stream = stream$1;
|
|
31971
32927
|
exports.string = string$1;
|
|
31972
32928
|
});
|
|
31973
32929
|
unwrapExports(utils$4);
|
|
@@ -32075,7 +33031,7 @@ var tasks_5 = tasks.groupPatternsByBaseDirectory;
|
|
|
32075
33031
|
var tasks_6 = tasks.convertPatternGroupsToTasks;
|
|
32076
33032
|
var tasks_7 = tasks.convertPatternGroupToTask;
|
|
32077
33033
|
|
|
32078
|
-
var async = createCommonjsModule(function (module, exports) {
|
|
33034
|
+
var async$1 = createCommonjsModule(function (module, exports) {
|
|
32079
33035
|
|
|
32080
33036
|
Object.defineProperty(exports, "__esModule", {
|
|
32081
33037
|
value: true
|
|
@@ -32119,10 +33075,10 @@ var async = createCommonjsModule(function (module, exports) {
|
|
|
32119
33075
|
callback(null, result);
|
|
32120
33076
|
}
|
|
32121
33077
|
});
|
|
32122
|
-
unwrapExports(async);
|
|
32123
|
-
var async_1 = async.read;
|
|
33078
|
+
unwrapExports(async$1);
|
|
33079
|
+
var async_1 = async$1.read;
|
|
32124
33080
|
|
|
32125
|
-
var sync = createCommonjsModule(function (module, exports) {
|
|
33081
|
+
var sync$1 = createCommonjsModule(function (module, exports) {
|
|
32126
33082
|
|
|
32127
33083
|
Object.defineProperty(exports, "__esModule", {
|
|
32128
33084
|
value: true
|
|
@@ -32154,8 +33110,8 @@ var sync = createCommonjsModule(function (module, exports) {
|
|
|
32154
33110
|
|
|
32155
33111
|
exports.read = read;
|
|
32156
33112
|
});
|
|
32157
|
-
unwrapExports(sync);
|
|
32158
|
-
var sync_1 = sync.read;
|
|
33113
|
+
unwrapExports(sync$1);
|
|
33114
|
+
var sync_1 = sync$1.read;
|
|
32159
33115
|
|
|
32160
33116
|
var fs_1$1 = createCommonjsModule(function (module, exports) {
|
|
32161
33117
|
|
|
@@ -32163,10 +33119,10 @@ var fs_1$1 = createCommonjsModule(function (module, exports) {
|
|
|
32163
33119
|
value: true
|
|
32164
33120
|
});
|
|
32165
33121
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
32166
|
-
lstat: fs$
|
|
32167
|
-
stat: fs$
|
|
32168
|
-
lstatSync: fs$
|
|
32169
|
-
statSync: fs$
|
|
33122
|
+
lstat: fs$3.lstat,
|
|
33123
|
+
stat: fs$3.stat,
|
|
33124
|
+
lstatSync: fs$3.lstatSync,
|
|
33125
|
+
statSync: fs$3.statSync
|
|
32170
33126
|
};
|
|
32171
33127
|
|
|
32172
33128
|
function createFileSystemAdapter(fsMethods) {
|
|
@@ -32217,17 +33173,17 @@ var out = createCommonjsModule(function (module, exports) {
|
|
|
32217
33173
|
|
|
32218
33174
|
function stat(path, optionsOrSettingsOrCallback, callback) {
|
|
32219
33175
|
if (typeof optionsOrSettingsOrCallback === 'function') {
|
|
32220
|
-
return async.read(path, getSettings(), optionsOrSettingsOrCallback);
|
|
33176
|
+
return async$1.read(path, getSettings(), optionsOrSettingsOrCallback);
|
|
32221
33177
|
}
|
|
32222
33178
|
|
|
32223
|
-
async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
|
|
33179
|
+
async$1.read(path, getSettings(optionsOrSettingsOrCallback), callback);
|
|
32224
33180
|
}
|
|
32225
33181
|
|
|
32226
33182
|
exports.stat = stat;
|
|
32227
33183
|
|
|
32228
33184
|
function statSync(path, optionsOrSettings) {
|
|
32229
33185
|
const settings = getSettings(optionsOrSettings);
|
|
32230
|
-
return sync.read(path, settings);
|
|
33186
|
+
return sync$1.read(path, settings);
|
|
32231
33187
|
}
|
|
32232
33188
|
|
|
32233
33189
|
exports.statSync = statSync;
|
|
@@ -32299,7 +33255,7 @@ function runParallel(tasks, cb) {
|
|
|
32299
33255
|
isSync = false;
|
|
32300
33256
|
}
|
|
32301
33257
|
|
|
32302
|
-
var constants$
|
|
33258
|
+
var constants$4 = createCommonjsModule(function (module, exports) {
|
|
32303
33259
|
|
|
32304
33260
|
Object.defineProperty(exports, "__esModule", {
|
|
32305
33261
|
value: true
|
|
@@ -32317,10 +33273,10 @@ var constants$3 = createCommonjsModule(function (module, exports) {
|
|
|
32317
33273
|
|
|
32318
33274
|
exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
|
|
32319
33275
|
});
|
|
32320
|
-
unwrapExports(constants$
|
|
32321
|
-
var constants_1 = constants$
|
|
33276
|
+
unwrapExports(constants$4);
|
|
33277
|
+
var constants_1 = constants$4.IS_SUPPORT_READDIR_WITH_FILE_TYPES;
|
|
32322
33278
|
|
|
32323
|
-
var fs$
|
|
33279
|
+
var fs$2 = createCommonjsModule(function (module, exports) {
|
|
32324
33280
|
|
|
32325
33281
|
Object.defineProperty(exports, "__esModule", {
|
|
32326
33282
|
value: true
|
|
@@ -32346,27 +33302,27 @@ var fs$1 = createCommonjsModule(function (module, exports) {
|
|
|
32346
33302
|
|
|
32347
33303
|
exports.createDirentFromStats = createDirentFromStats;
|
|
32348
33304
|
});
|
|
32349
|
-
unwrapExports(fs$
|
|
32350
|
-
var fs_1$2 = fs$
|
|
33305
|
+
unwrapExports(fs$2);
|
|
33306
|
+
var fs_1$2 = fs$2.createDirentFromStats;
|
|
32351
33307
|
|
|
32352
33308
|
var utils$5 = createCommonjsModule(function (module, exports) {
|
|
32353
33309
|
|
|
32354
33310
|
Object.defineProperty(exports, "__esModule", {
|
|
32355
33311
|
value: true
|
|
32356
33312
|
});
|
|
32357
|
-
exports.fs = fs$
|
|
33313
|
+
exports.fs = fs$2;
|
|
32358
33314
|
});
|
|
32359
33315
|
unwrapExports(utils$5);
|
|
32360
33316
|
var utils_1$5 = utils$5.fs;
|
|
32361
33317
|
|
|
32362
|
-
var async$
|
|
33318
|
+
var async$2 = createCommonjsModule(function (module, exports) {
|
|
32363
33319
|
|
|
32364
33320
|
Object.defineProperty(exports, "__esModule", {
|
|
32365
33321
|
value: true
|
|
32366
33322
|
});
|
|
32367
33323
|
|
|
32368
33324
|
function read(directory, settings, callback) {
|
|
32369
|
-
if (!settings.stats && constants$
|
|
33325
|
+
if (!settings.stats && constants$4.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
32370
33326
|
return readdirWithFileTypes(directory, settings, callback);
|
|
32371
33327
|
}
|
|
32372
33328
|
|
|
@@ -32472,19 +33428,19 @@ var async$1 = createCommonjsModule(function (module, exports) {
|
|
|
32472
33428
|
callback(null, result);
|
|
32473
33429
|
}
|
|
32474
33430
|
});
|
|
32475
|
-
unwrapExports(async$
|
|
32476
|
-
var async_1$1 = async$
|
|
32477
|
-
var async_2 = async$
|
|
32478
|
-
var async_3 = async$
|
|
33431
|
+
unwrapExports(async$2);
|
|
33432
|
+
var async_1$1 = async$2.read;
|
|
33433
|
+
var async_2 = async$2.readdirWithFileTypes;
|
|
33434
|
+
var async_3 = async$2.readdir;
|
|
32479
33435
|
|
|
32480
|
-
var sync$
|
|
33436
|
+
var sync$2 = createCommonjsModule(function (module, exports) {
|
|
32481
33437
|
|
|
32482
33438
|
Object.defineProperty(exports, "__esModule", {
|
|
32483
33439
|
value: true
|
|
32484
33440
|
});
|
|
32485
33441
|
|
|
32486
33442
|
function read(directory, settings) {
|
|
32487
|
-
if (!settings.stats && constants$
|
|
33443
|
+
if (!settings.stats && constants$4.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
32488
33444
|
return readdirWithFileTypes(directory, settings);
|
|
32489
33445
|
}
|
|
32490
33446
|
|
|
@@ -32542,10 +33498,10 @@ var sync$1 = createCommonjsModule(function (module, exports) {
|
|
|
32542
33498
|
|
|
32543
33499
|
exports.readdir = readdir;
|
|
32544
33500
|
});
|
|
32545
|
-
unwrapExports(sync$
|
|
32546
|
-
var sync_1$1 = sync$
|
|
32547
|
-
var sync_2 = sync$
|
|
32548
|
-
var sync_3 = sync$
|
|
33501
|
+
unwrapExports(sync$2);
|
|
33502
|
+
var sync_1$1 = sync$2.read;
|
|
33503
|
+
var sync_2 = sync$2.readdirWithFileTypes;
|
|
33504
|
+
var sync_3 = sync$2.readdir;
|
|
32549
33505
|
|
|
32550
33506
|
var fs_1$3 = createCommonjsModule(function (module, exports) {
|
|
32551
33507
|
|
|
@@ -32553,12 +33509,12 @@ var fs_1$3 = createCommonjsModule(function (module, exports) {
|
|
|
32553
33509
|
value: true
|
|
32554
33510
|
});
|
|
32555
33511
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
32556
|
-
lstat: fs$
|
|
32557
|
-
stat: fs$
|
|
32558
|
-
lstatSync: fs$
|
|
32559
|
-
statSync: fs$
|
|
32560
|
-
readdir: fs$
|
|
32561
|
-
readdirSync: fs$
|
|
33512
|
+
lstat: fs$3.lstat,
|
|
33513
|
+
stat: fs$3.stat,
|
|
33514
|
+
lstatSync: fs$3.lstatSync,
|
|
33515
|
+
statSync: fs$3.statSync,
|
|
33516
|
+
readdir: fs$3.readdir,
|
|
33517
|
+
readdirSync: fs$3.readdirSync
|
|
32562
33518
|
};
|
|
32563
33519
|
|
|
32564
33520
|
function createFileSystemAdapter(fsMethods) {
|
|
@@ -32586,7 +33542,7 @@ var settings$1 = createCommonjsModule(function (module, exports) {
|
|
|
32586
33542
|
this._options = _options;
|
|
32587
33543
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
32588
33544
|
this.fs = fs_1$3.createFileSystemAdapter(this._options.fs);
|
|
32589
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$
|
|
33545
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$2.sep);
|
|
32590
33546
|
this.stats = this._getValue(this._options.stats, false);
|
|
32591
33547
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
32592
33548
|
this.fsStatSettings = new out.Settings({
|
|
@@ -32615,17 +33571,17 @@ var out$1 = createCommonjsModule(function (module, exports) {
|
|
|
32615
33571
|
|
|
32616
33572
|
function scandir(path, optionsOrSettingsOrCallback, callback) {
|
|
32617
33573
|
if (typeof optionsOrSettingsOrCallback === 'function') {
|
|
32618
|
-
return async$
|
|
33574
|
+
return async$2.read(path, getSettings(), optionsOrSettingsOrCallback);
|
|
32619
33575
|
}
|
|
32620
33576
|
|
|
32621
|
-
async$
|
|
33577
|
+
async$2.read(path, getSettings(optionsOrSettingsOrCallback), callback);
|
|
32622
33578
|
}
|
|
32623
33579
|
|
|
32624
33580
|
exports.scandir = scandir;
|
|
32625
33581
|
|
|
32626
33582
|
function scandirSync(path, optionsOrSettings) {
|
|
32627
33583
|
const settings = getSettings(optionsOrSettings);
|
|
32628
|
-
return sync$
|
|
33584
|
+
return sync$2.read(path, settings);
|
|
32629
33585
|
}
|
|
32630
33586
|
|
|
32631
33587
|
exports.scandirSync = scandirSync;
|
|
@@ -32907,7 +33863,7 @@ var reader = createCommonjsModule(function (module, exports) {
|
|
|
32907
33863
|
});
|
|
32908
33864
|
unwrapExports(reader);
|
|
32909
33865
|
|
|
32910
|
-
var async$
|
|
33866
|
+
var async$3 = createCommonjsModule(function (module, exports) {
|
|
32911
33867
|
|
|
32912
33868
|
Object.defineProperty(exports, "__esModule", {
|
|
32913
33869
|
value: true
|
|
@@ -32918,7 +33874,7 @@ var async$2 = createCommonjsModule(function (module, exports) {
|
|
|
32918
33874
|
super(_root, _settings);
|
|
32919
33875
|
this._settings = _settings;
|
|
32920
33876
|
this._scandir = out$1.scandir;
|
|
32921
|
-
this._emitter = new events.EventEmitter();
|
|
33877
|
+
this._emitter = new events$1.EventEmitter();
|
|
32922
33878
|
this._queue = queue(this._worker.bind(this), this._settings.concurrency);
|
|
32923
33879
|
this._isFatalError = false;
|
|
32924
33880
|
this._isDestroyed = false;
|
|
@@ -33027,9 +33983,9 @@ var async$2 = createCommonjsModule(function (module, exports) {
|
|
|
33027
33983
|
|
|
33028
33984
|
exports.default = AsyncReader;
|
|
33029
33985
|
});
|
|
33030
|
-
unwrapExports(async$
|
|
33986
|
+
unwrapExports(async$3);
|
|
33031
33987
|
|
|
33032
|
-
var async$
|
|
33988
|
+
var async$4 = createCommonjsModule(function (module, exports) {
|
|
33033
33989
|
|
|
33034
33990
|
Object.defineProperty(exports, "__esModule", {
|
|
33035
33991
|
value: true
|
|
@@ -33039,7 +33995,7 @@ var async$3 = createCommonjsModule(function (module, exports) {
|
|
|
33039
33995
|
constructor(_root, _settings) {
|
|
33040
33996
|
this._root = _root;
|
|
33041
33997
|
this._settings = _settings;
|
|
33042
|
-
this._reader = new async$
|
|
33998
|
+
this._reader = new async$3.default(this._root, this._settings);
|
|
33043
33999
|
this._storage = new Set();
|
|
33044
34000
|
}
|
|
33045
34001
|
|
|
@@ -33071,9 +34027,9 @@ var async$3 = createCommonjsModule(function (module, exports) {
|
|
|
33071
34027
|
callback(null, entries);
|
|
33072
34028
|
}
|
|
33073
34029
|
});
|
|
33074
|
-
unwrapExports(async$
|
|
34030
|
+
unwrapExports(async$4);
|
|
33075
34031
|
|
|
33076
|
-
var stream$
|
|
34032
|
+
var stream$2 = createCommonjsModule(function (module, exports) {
|
|
33077
34033
|
|
|
33078
34034
|
Object.defineProperty(exports, "__esModule", {
|
|
33079
34035
|
value: true
|
|
@@ -33083,8 +34039,8 @@ var stream$1 = createCommonjsModule(function (module, exports) {
|
|
|
33083
34039
|
constructor(_root, _settings) {
|
|
33084
34040
|
this._root = _root;
|
|
33085
34041
|
this._settings = _settings;
|
|
33086
|
-
this._reader = new async$
|
|
33087
|
-
this._stream = new stream$
|
|
34042
|
+
this._reader = new async$3.default(this._root, this._settings);
|
|
34043
|
+
this._stream = new stream$6.Readable({
|
|
33088
34044
|
objectMode: true,
|
|
33089
34045
|
read: () => {},
|
|
33090
34046
|
destroy: this._reader.destroy.bind(this._reader)
|
|
@@ -33113,9 +34069,9 @@ var stream$1 = createCommonjsModule(function (module, exports) {
|
|
|
33113
34069
|
|
|
33114
34070
|
exports.default = StreamProvider;
|
|
33115
34071
|
});
|
|
33116
|
-
unwrapExports(stream$
|
|
34072
|
+
unwrapExports(stream$2);
|
|
33117
34073
|
|
|
33118
|
-
var sync$
|
|
34074
|
+
var sync$3 = createCommonjsModule(function (module, exports) {
|
|
33119
34075
|
|
|
33120
34076
|
Object.defineProperty(exports, "__esModule", {
|
|
33121
34077
|
value: true
|
|
@@ -33194,9 +34150,9 @@ var sync$2 = createCommonjsModule(function (module, exports) {
|
|
|
33194
34150
|
|
|
33195
34151
|
exports.default = SyncReader;
|
|
33196
34152
|
});
|
|
33197
|
-
unwrapExports(sync$
|
|
34153
|
+
unwrapExports(sync$3);
|
|
33198
34154
|
|
|
33199
|
-
var sync$
|
|
34155
|
+
var sync$4 = createCommonjsModule(function (module, exports) {
|
|
33200
34156
|
|
|
33201
34157
|
Object.defineProperty(exports, "__esModule", {
|
|
33202
34158
|
value: true
|
|
@@ -33206,7 +34162,7 @@ var sync$3 = createCommonjsModule(function (module, exports) {
|
|
|
33206
34162
|
constructor(_root, _settings) {
|
|
33207
34163
|
this._root = _root;
|
|
33208
34164
|
this._settings = _settings;
|
|
33209
|
-
this._reader = new sync$
|
|
34165
|
+
this._reader = new sync$3.default(this._root, this._settings);
|
|
33210
34166
|
}
|
|
33211
34167
|
|
|
33212
34168
|
read() {
|
|
@@ -33217,7 +34173,7 @@ var sync$3 = createCommonjsModule(function (module, exports) {
|
|
|
33217
34173
|
|
|
33218
34174
|
exports.default = SyncProvider;
|
|
33219
34175
|
});
|
|
33220
|
-
unwrapExports(sync$
|
|
34176
|
+
unwrapExports(sync$4);
|
|
33221
34177
|
|
|
33222
34178
|
var settings$2 = createCommonjsModule(function (module, exports) {
|
|
33223
34179
|
|
|
@@ -33233,7 +34189,7 @@ var settings$2 = createCommonjsModule(function (module, exports) {
|
|
|
33233
34189
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
33234
34190
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
33235
34191
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
33236
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$
|
|
34192
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$2.sep);
|
|
33237
34193
|
this.fsScandirSettings = new out$1.Settings({
|
|
33238
34194
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
33239
34195
|
fs: this._options.fs,
|
|
@@ -33262,17 +34218,17 @@ var out$2 = createCommonjsModule(function (module, exports) {
|
|
|
33262
34218
|
|
|
33263
34219
|
function walk(directory, optionsOrSettingsOrCallback, callback) {
|
|
33264
34220
|
if (typeof optionsOrSettingsOrCallback === 'function') {
|
|
33265
|
-
return new async$
|
|
34221
|
+
return new async$4.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
|
|
33266
34222
|
}
|
|
33267
34223
|
|
|
33268
|
-
new async$
|
|
34224
|
+
new async$4.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
|
|
33269
34225
|
}
|
|
33270
34226
|
|
|
33271
34227
|
exports.walk = walk;
|
|
33272
34228
|
|
|
33273
34229
|
function walkSync(directory, optionsOrSettings) {
|
|
33274
34230
|
const settings = getSettings(optionsOrSettings);
|
|
33275
|
-
const provider = new sync$
|
|
34231
|
+
const provider = new sync$4.default(directory, settings);
|
|
33276
34232
|
return provider.read();
|
|
33277
34233
|
}
|
|
33278
34234
|
|
|
@@ -33280,7 +34236,7 @@ var out$2 = createCommonjsModule(function (module, exports) {
|
|
|
33280
34236
|
|
|
33281
34237
|
function walkStream(directory, optionsOrSettings) {
|
|
33282
34238
|
const settings = getSettings(optionsOrSettings);
|
|
33283
|
-
const provider = new stream$
|
|
34239
|
+
const provider = new stream$2.default(directory, settings);
|
|
33284
34240
|
return provider.read();
|
|
33285
34241
|
}
|
|
33286
34242
|
|
|
@@ -33317,7 +34273,7 @@ var reader$1 = createCommonjsModule(function (module, exports) {
|
|
|
33317
34273
|
}
|
|
33318
34274
|
|
|
33319
34275
|
_getFullEntryPath(filepath) {
|
|
33320
|
-
return path$
|
|
34276
|
+
return path$2.resolve(this._settings.cwd, filepath);
|
|
33321
34277
|
}
|
|
33322
34278
|
|
|
33323
34279
|
_makeEntry(stats, pattern) {
|
|
@@ -33344,7 +34300,7 @@ var reader$1 = createCommonjsModule(function (module, exports) {
|
|
|
33344
34300
|
});
|
|
33345
34301
|
unwrapExports(reader$1);
|
|
33346
34302
|
|
|
33347
|
-
var stream$
|
|
34303
|
+
var stream$3 = createCommonjsModule(function (module, exports) {
|
|
33348
34304
|
|
|
33349
34305
|
Object.defineProperty(exports, "__esModule", {
|
|
33350
34306
|
value: true
|
|
@@ -33363,7 +34319,7 @@ var stream$2 = createCommonjsModule(function (module, exports) {
|
|
|
33363
34319
|
|
|
33364
34320
|
static(patterns, options) {
|
|
33365
34321
|
const filepaths = patterns.map(this._getFullEntryPath, this);
|
|
33366
|
-
const stream = new stream$
|
|
34322
|
+
const stream = new stream$6.PassThrough({
|
|
33367
34323
|
objectMode: true
|
|
33368
34324
|
});
|
|
33369
34325
|
|
|
@@ -33410,7 +34366,7 @@ var stream$2 = createCommonjsModule(function (module, exports) {
|
|
|
33410
34366
|
|
|
33411
34367
|
exports.default = ReaderStream;
|
|
33412
34368
|
});
|
|
33413
|
-
unwrapExports(stream$
|
|
34369
|
+
unwrapExports(stream$3);
|
|
33414
34370
|
|
|
33415
34371
|
var matcher = createCommonjsModule(function (module, exports) {
|
|
33416
34372
|
|
|
@@ -33770,7 +34726,7 @@ var provider = createCommonjsModule(function (module, exports) {
|
|
|
33770
34726
|
}
|
|
33771
34727
|
|
|
33772
34728
|
_getRootDirectory(task) {
|
|
33773
|
-
return path$
|
|
34729
|
+
return path$2.resolve(this._settings.cwd, task.base);
|
|
33774
34730
|
}
|
|
33775
34731
|
|
|
33776
34732
|
_getReaderOptions(task) {
|
|
@@ -33809,7 +34765,7 @@ var provider = createCommonjsModule(function (module, exports) {
|
|
|
33809
34765
|
});
|
|
33810
34766
|
unwrapExports(provider);
|
|
33811
34767
|
|
|
33812
|
-
var async$
|
|
34768
|
+
var async$5 = createCommonjsModule(function (module, exports) {
|
|
33813
34769
|
|
|
33814
34770
|
Object.defineProperty(exports, "__esModule", {
|
|
33815
34771
|
value: true
|
|
@@ -33818,7 +34774,7 @@ var async$4 = createCommonjsModule(function (module, exports) {
|
|
|
33818
34774
|
class ProviderAsync extends provider.default {
|
|
33819
34775
|
constructor() {
|
|
33820
34776
|
super(...arguments);
|
|
33821
|
-
this._reader = new stream$
|
|
34777
|
+
this._reader = new stream$3.default(this._settings);
|
|
33822
34778
|
}
|
|
33823
34779
|
|
|
33824
34780
|
read(task) {
|
|
@@ -33847,9 +34803,9 @@ var async$4 = createCommonjsModule(function (module, exports) {
|
|
|
33847
34803
|
|
|
33848
34804
|
exports.default = ProviderAsync;
|
|
33849
34805
|
});
|
|
33850
|
-
unwrapExports(async$
|
|
34806
|
+
unwrapExports(async$5);
|
|
33851
34807
|
|
|
33852
|
-
var stream$
|
|
34808
|
+
var stream$4 = createCommonjsModule(function (module, exports) {
|
|
33853
34809
|
|
|
33854
34810
|
Object.defineProperty(exports, "__esModule", {
|
|
33855
34811
|
value: true
|
|
@@ -33858,7 +34814,7 @@ var stream$3 = createCommonjsModule(function (module, exports) {
|
|
|
33858
34814
|
class ProviderStream extends provider.default {
|
|
33859
34815
|
constructor() {
|
|
33860
34816
|
super(...arguments);
|
|
33861
|
-
this._reader = new stream$
|
|
34817
|
+
this._reader = new stream$3.default(this._settings);
|
|
33862
34818
|
}
|
|
33863
34819
|
|
|
33864
34820
|
read(task) {
|
|
@@ -33867,7 +34823,7 @@ var stream$3 = createCommonjsModule(function (module, exports) {
|
|
|
33867
34823
|
const options = this._getReaderOptions(task);
|
|
33868
34824
|
|
|
33869
34825
|
const source = this.api(root, task, options);
|
|
33870
|
-
const destination = new stream$
|
|
34826
|
+
const destination = new stream$6.Readable({
|
|
33871
34827
|
objectMode: true,
|
|
33872
34828
|
read: () => {}
|
|
33873
34829
|
});
|
|
@@ -33888,9 +34844,9 @@ var stream$3 = createCommonjsModule(function (module, exports) {
|
|
|
33888
34844
|
|
|
33889
34845
|
exports.default = ProviderStream;
|
|
33890
34846
|
});
|
|
33891
|
-
unwrapExports(stream$
|
|
34847
|
+
unwrapExports(stream$4);
|
|
33892
34848
|
|
|
33893
|
-
var sync$
|
|
34849
|
+
var sync$5 = createCommonjsModule(function (module, exports) {
|
|
33894
34850
|
|
|
33895
34851
|
Object.defineProperty(exports, "__esModule", {
|
|
33896
34852
|
value: true
|
|
@@ -33947,9 +34903,9 @@ var sync$4 = createCommonjsModule(function (module, exports) {
|
|
|
33947
34903
|
|
|
33948
34904
|
exports.default = ReaderSync;
|
|
33949
34905
|
});
|
|
33950
|
-
unwrapExports(sync$
|
|
34906
|
+
unwrapExports(sync$5);
|
|
33951
34907
|
|
|
33952
|
-
var sync$
|
|
34908
|
+
var sync$6 = createCommonjsModule(function (module, exports) {
|
|
33953
34909
|
|
|
33954
34910
|
Object.defineProperty(exports, "__esModule", {
|
|
33955
34911
|
value: true
|
|
@@ -33958,7 +34914,7 @@ var sync$5 = createCommonjsModule(function (module, exports) {
|
|
|
33958
34914
|
class ProviderSync extends provider.default {
|
|
33959
34915
|
constructor() {
|
|
33960
34916
|
super(...arguments);
|
|
33961
|
-
this._reader = new sync$
|
|
34917
|
+
this._reader = new sync$5.default(this._settings);
|
|
33962
34918
|
}
|
|
33963
34919
|
|
|
33964
34920
|
read(task) {
|
|
@@ -33982,21 +34938,21 @@ var sync$5 = createCommonjsModule(function (module, exports) {
|
|
|
33982
34938
|
|
|
33983
34939
|
exports.default = ProviderSync;
|
|
33984
34940
|
});
|
|
33985
|
-
unwrapExports(sync$
|
|
34941
|
+
unwrapExports(sync$6);
|
|
33986
34942
|
|
|
33987
34943
|
var settings$3 = createCommonjsModule(function (module, exports) {
|
|
33988
34944
|
|
|
33989
34945
|
Object.defineProperty(exports, "__esModule", {
|
|
33990
34946
|
value: true
|
|
33991
34947
|
});
|
|
33992
|
-
const CPU_COUNT = os.cpus().length;
|
|
34948
|
+
const CPU_COUNT = os$1.cpus().length;
|
|
33993
34949
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
33994
|
-
lstat: fs$
|
|
33995
|
-
lstatSync: fs$
|
|
33996
|
-
stat: fs$
|
|
33997
|
-
statSync: fs$
|
|
33998
|
-
readdir: fs$
|
|
33999
|
-
readdirSync: fs$
|
|
34950
|
+
lstat: fs$3.lstat,
|
|
34951
|
+
lstatSync: fs$3.lstatSync,
|
|
34952
|
+
stat: fs$3.stat,
|
|
34953
|
+
statSync: fs$3.statSync,
|
|
34954
|
+
readdir: fs$3.readdir,
|
|
34955
|
+
readdirSync: fs$3.readdirSync
|
|
34000
34956
|
};
|
|
34001
34957
|
|
|
34002
34958
|
class Settings {
|
|
@@ -34050,7 +35006,7 @@ var settings_1 = settings$3.DEFAULT_FILE_SYSTEM_ADAPTER;
|
|
|
34050
35006
|
|
|
34051
35007
|
async function FastGlob(source, options) {
|
|
34052
35008
|
assertPatternsInput(source);
|
|
34053
|
-
const works = getWorks(source, async$
|
|
35009
|
+
const works = getWorks(source, async$5.default, options);
|
|
34054
35010
|
const result = await Promise.all(works);
|
|
34055
35011
|
return utils$4.array.flatten(result);
|
|
34056
35012
|
} // https://github.com/typescript-eslint/typescript-eslint/issues/60
|
|
@@ -34060,7 +35016,7 @@ async function FastGlob(source, options) {
|
|
|
34060
35016
|
(function (FastGlob) {
|
|
34061
35017
|
function sync(source, options) {
|
|
34062
35018
|
assertPatternsInput(source);
|
|
34063
|
-
const works = getWorks(source, sync$
|
|
35019
|
+
const works = getWorks(source, sync$6.default, options);
|
|
34064
35020
|
return utils$4.array.flatten(works);
|
|
34065
35021
|
}
|
|
34066
35022
|
|
|
@@ -34068,7 +35024,7 @@ async function FastGlob(source, options) {
|
|
|
34068
35024
|
|
|
34069
35025
|
function stream(source, options) {
|
|
34070
35026
|
assertPatternsInput(source);
|
|
34071
|
-
const works = getWorks(source, stream$
|
|
35027
|
+
const works = getWorks(source, stream$4.default, options);
|
|
34072
35028
|
/**
|
|
34073
35029
|
* The stream returned by the provider cannot work with an asynchronous iterator.
|
|
34074
35030
|
* To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
|
|
@@ -34126,7 +35082,7 @@ var out$3 = FastGlob;
|
|
|
34126
35082
|
|
|
34127
35083
|
const {
|
|
34128
35084
|
promisify
|
|
34129
|
-
} = util$
|
|
35085
|
+
} = util$3;
|
|
34130
35086
|
|
|
34131
35087
|
async function isType(fsStatType, statsMethodName, filePath) {
|
|
34132
35088
|
if (typeof filePath !== 'string') {
|
|
@@ -34134,7 +35090,7 @@ async function isType(fsStatType, statsMethodName, filePath) {
|
|
|
34134
35090
|
}
|
|
34135
35091
|
|
|
34136
35092
|
try {
|
|
34137
|
-
const stats = await promisify(fs$
|
|
35093
|
+
const stats = await promisify(fs$3[fsStatType])(filePath);
|
|
34138
35094
|
return stats[statsMethodName]();
|
|
34139
35095
|
} catch (error) {
|
|
34140
35096
|
if (error.code === 'ENOENT') {
|
|
@@ -34151,7 +35107,7 @@ function isTypeSync(fsStatType, statsMethodName, filePath) {
|
|
|
34151
35107
|
}
|
|
34152
35108
|
|
|
34153
35109
|
try {
|
|
34154
|
-
return fs$
|
|
35110
|
+
return fs$3[fsStatType](filePath)[statsMethodName]();
|
|
34155
35111
|
} catch (error) {
|
|
34156
35112
|
if (error.code === 'ENOENT') {
|
|
34157
35113
|
return false;
|
|
@@ -34180,11 +35136,11 @@ const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(
|
|
|
34180
35136
|
|
|
34181
35137
|
const getPath = (filepath, cwd) => {
|
|
34182
35138
|
const pth = filepath[0] === '!' ? filepath.slice(1) : filepath;
|
|
34183
|
-
return path$
|
|
35139
|
+
return path$2.isAbsolute(pth) ? pth : path$2.join(cwd, pth);
|
|
34184
35140
|
};
|
|
34185
35141
|
|
|
34186
35142
|
const addExtensions = (file, extensions) => {
|
|
34187
|
-
if (path$
|
|
35143
|
+
if (path$2.extname(file)) {
|
|
34188
35144
|
return `**/${file}`;
|
|
34189
35145
|
}
|
|
34190
35146
|
|
|
@@ -34201,18 +35157,18 @@ const getGlob = (directory, options) => {
|
|
|
34201
35157
|
}
|
|
34202
35158
|
|
|
34203
35159
|
if (options.files && options.extensions) {
|
|
34204
|
-
return options.files.map(x => path$
|
|
35160
|
+
return options.files.map(x => path$2.posix.join(directory, addExtensions(x, options.extensions)));
|
|
34205
35161
|
}
|
|
34206
35162
|
|
|
34207
35163
|
if (options.files) {
|
|
34208
|
-
return options.files.map(x => path$
|
|
35164
|
+
return options.files.map(x => path$2.posix.join(directory, `**/${x}`));
|
|
34209
35165
|
}
|
|
34210
35166
|
|
|
34211
35167
|
if (options.extensions) {
|
|
34212
|
-
return [path$
|
|
35168
|
+
return [path$2.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)];
|
|
34213
35169
|
}
|
|
34214
35170
|
|
|
34215
|
-
return [path$
|
|
35171
|
+
return [path$2.posix.join(directory, '**')];
|
|
34216
35172
|
};
|
|
34217
35173
|
|
|
34218
35174
|
var dirGlob = async (input, options) => {
|
|
@@ -34231,7 +35187,7 @@ var dirGlob = async (input, options) => {
|
|
|
34231
35187
|
return [].concat.apply([], globs); // eslint-disable-line prefer-spread
|
|
34232
35188
|
};
|
|
34233
35189
|
|
|
34234
|
-
var sync$
|
|
35190
|
+
var sync$7 = (input, options) => {
|
|
34235
35191
|
options = Object.assign({
|
|
34236
35192
|
cwd: process.cwd()
|
|
34237
35193
|
}, options);
|
|
@@ -34243,7 +35199,7 @@ var sync$6 = (input, options) => {
|
|
|
34243
35199
|
const globs = [].concat(input).map(x => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x);
|
|
34244
35200
|
return [].concat.apply([], globs); // eslint-disable-line prefer-spread
|
|
34245
35201
|
};
|
|
34246
|
-
dirGlob.sync = sync$
|
|
35202
|
+
dirGlob.sync = sync$7;
|
|
34247
35203
|
|
|
34248
35204
|
// A simple implementation of make-array
|
|
34249
35205
|
function makeArray(subject) {
|
|
@@ -34654,20 +35610,20 @@ var slash$1 = path => {
|
|
|
34654
35610
|
|
|
34655
35611
|
const {
|
|
34656
35612
|
promisify: promisify$1
|
|
34657
|
-
} = util$
|
|
35613
|
+
} = util$3;
|
|
34658
35614
|
const DEFAULT_IGNORE = ['**/node_modules/**', '**/flow-typed/**', '**/coverage/**', '**/.git'];
|
|
34659
|
-
const readFileP = promisify$1(fs$
|
|
35615
|
+
const readFileP = promisify$1(fs$3.readFile);
|
|
34660
35616
|
|
|
34661
35617
|
const mapGitIgnorePatternTo = base => ignore => {
|
|
34662
35618
|
if (ignore.startsWith('!')) {
|
|
34663
|
-
return '!' + path$
|
|
35619
|
+
return '!' + path$2.posix.join(base, ignore.slice(1));
|
|
34664
35620
|
}
|
|
34665
35621
|
|
|
34666
|
-
return path$
|
|
35622
|
+
return path$2.posix.join(base, ignore);
|
|
34667
35623
|
};
|
|
34668
35624
|
|
|
34669
35625
|
const parseGitIgnore = (content, options) => {
|
|
34670
|
-
const base = slash$1(path$
|
|
35626
|
+
const base = slash$1(path$2.relative(options.cwd, path$2.dirname(options.fileName)));
|
|
34671
35627
|
return content.split(/\r?\n/).filter(Boolean).filter(line => !line.startsWith('#')).map(mapGitIgnorePatternTo(base));
|
|
34672
35628
|
};
|
|
34673
35629
|
|
|
@@ -34682,7 +35638,7 @@ const reduceIgnore = files => {
|
|
|
34682
35638
|
};
|
|
34683
35639
|
|
|
34684
35640
|
const ensureAbsolutePathForCwd = (cwd, p) => {
|
|
34685
|
-
if (path$
|
|
35641
|
+
if (path$2.isAbsolute(p)) {
|
|
34686
35642
|
if (p.startsWith(cwd)) {
|
|
34687
35643
|
return p;
|
|
34688
35644
|
}
|
|
@@ -34690,15 +35646,15 @@ const ensureAbsolutePathForCwd = (cwd, p) => {
|
|
|
34690
35646
|
throw new Error(`Path ${p} is not in cwd ${cwd}`);
|
|
34691
35647
|
}
|
|
34692
35648
|
|
|
34693
|
-
return path$
|
|
35649
|
+
return path$2.join(cwd, p);
|
|
34694
35650
|
};
|
|
34695
35651
|
|
|
34696
35652
|
const getIsIgnoredPredecate = (ignores, cwd) => {
|
|
34697
|
-
return p => ignores.ignores(slash$1(path$
|
|
35653
|
+
return p => ignores.ignores(slash$1(path$2.relative(cwd, ensureAbsolutePathForCwd(cwd, p))));
|
|
34698
35654
|
};
|
|
34699
35655
|
|
|
34700
35656
|
const getFile = async (file, cwd) => {
|
|
34701
|
-
const filePath = path$
|
|
35657
|
+
const filePath = path$2.join(cwd, file);
|
|
34702
35658
|
const content = await readFileP(filePath, 'utf8');
|
|
34703
35659
|
return {
|
|
34704
35660
|
cwd,
|
|
@@ -34708,8 +35664,8 @@ const getFile = async (file, cwd) => {
|
|
|
34708
35664
|
};
|
|
34709
35665
|
|
|
34710
35666
|
const getFileSync = (file, cwd) => {
|
|
34711
|
-
const filePath = path$
|
|
34712
|
-
const content = fs$
|
|
35667
|
+
const filePath = path$2.join(cwd, file);
|
|
35668
|
+
const content = fs$3.readFileSync(filePath, 'utf8');
|
|
34713
35669
|
return {
|
|
34714
35670
|
cwd,
|
|
34715
35671
|
filePath,
|
|
@@ -34717,7 +35673,7 @@ const getFileSync = (file, cwd) => {
|
|
|
34717
35673
|
};
|
|
34718
35674
|
};
|
|
34719
35675
|
|
|
34720
|
-
const normalizeOptions$
|
|
35676
|
+
const normalizeOptions$3 = ({
|
|
34721
35677
|
ignore = [],
|
|
34722
35678
|
cwd = slash$1(process.cwd())
|
|
34723
35679
|
} = {}) => {
|
|
@@ -34728,7 +35684,7 @@ const normalizeOptions$2 = ({
|
|
|
34728
35684
|
};
|
|
34729
35685
|
|
|
34730
35686
|
var gitignore = async options => {
|
|
34731
|
-
options = normalizeOptions$
|
|
35687
|
+
options = normalizeOptions$3(options);
|
|
34732
35688
|
const paths = await out$3('**/.gitignore', {
|
|
34733
35689
|
ignore: DEFAULT_IGNORE.concat(options.ignore),
|
|
34734
35690
|
cwd: options.cwd
|
|
@@ -34738,8 +35694,8 @@ var gitignore = async options => {
|
|
|
34738
35694
|
return getIsIgnoredPredecate(ignores, options.cwd);
|
|
34739
35695
|
};
|
|
34740
35696
|
|
|
34741
|
-
var sync$
|
|
34742
|
-
options = normalizeOptions$
|
|
35697
|
+
var sync$8 = options => {
|
|
35698
|
+
options = normalizeOptions$3(options);
|
|
34743
35699
|
const paths = out$3.sync('**/.gitignore', {
|
|
34744
35700
|
ignore: DEFAULT_IGNORE.concat(options.ignore),
|
|
34745
35701
|
cwd: options.cwd
|
|
@@ -34748,11 +35704,11 @@ var sync$7 = options => {
|
|
|
34748
35704
|
const ignores = reduceIgnore(files);
|
|
34749
35705
|
return getIsIgnoredPredecate(ignores, options.cwd);
|
|
34750
35706
|
};
|
|
34751
|
-
gitignore.sync = sync$
|
|
35707
|
+
gitignore.sync = sync$8;
|
|
34752
35708
|
|
|
34753
35709
|
const {
|
|
34754
35710
|
Transform
|
|
34755
|
-
} = stream$
|
|
35711
|
+
} = stream$6;
|
|
34756
35712
|
|
|
34757
35713
|
class ObjectTransform extends Transform {
|
|
34758
35714
|
constructor() {
|
|
@@ -34825,7 +35781,7 @@ const checkCwdOption = (options = {}) => {
|
|
|
34825
35781
|
let stat;
|
|
34826
35782
|
|
|
34827
35783
|
try {
|
|
34828
|
-
stat = fs$
|
|
35784
|
+
stat = fs$3.statSync(options.cwd);
|
|
34829
35785
|
} catch (_) {
|
|
34830
35786
|
return;
|
|
34831
35787
|
}
|
|
@@ -34835,7 +35791,7 @@ const checkCwdOption = (options = {}) => {
|
|
|
34835
35791
|
}
|
|
34836
35792
|
};
|
|
34837
35793
|
|
|
34838
|
-
const getPathString = p => p.stats instanceof fs$
|
|
35794
|
+
const getPathString = p => p.stats instanceof fs$3.Stats ? p.path : p;
|
|
34839
35795
|
|
|
34840
35796
|
const generateGlobTasks = (patterns, taskOptions) => {
|
|
34841
35797
|
patterns = arrayUnion([].concat(patterns));
|
|
@@ -34930,7 +35886,7 @@ var globby$1 = async (patterns, options) => {
|
|
|
34930
35886
|
return arrayUnion(...paths).filter(path_ => !filter(getPathString(path_)));
|
|
34931
35887
|
};
|
|
34932
35888
|
|
|
34933
|
-
var sync$
|
|
35889
|
+
var sync$9 = (patterns, options) => {
|
|
34934
35890
|
const globTasks = generateGlobTasks(patterns, options);
|
|
34935
35891
|
const tasks = globTasks.reduce((tasks, task) => {
|
|
34936
35892
|
const newTask = getPattern(task, dirGlob.sync).map(globToTask(task));
|
|
@@ -34940,7 +35896,7 @@ var sync$8 = (patterns, options) => {
|
|
|
34940
35896
|
return tasks.reduce((matches, task) => arrayUnion(matches, out$3.sync(task.pattern, task.options)), []).filter(path_ => !filter(path_));
|
|
34941
35897
|
};
|
|
34942
35898
|
|
|
34943
|
-
var stream$
|
|
35899
|
+
var stream$5 = (patterns, options) => {
|
|
34944
35900
|
const globTasks = generateGlobTasks(patterns, options);
|
|
34945
35901
|
const tasks = globTasks.reduce((tasks, task) => {
|
|
34946
35902
|
const newTask = getPattern(task, dirGlob.sync).map(globToTask(task));
|
|
@@ -34957,8 +35913,8 @@ var generateGlobTasks_1 = generateGlobTasks;
|
|
|
34957
35913
|
var hasMagic = (patterns, options) => [].concat(patterns).some(pattern => out$3.isDynamicPattern(pattern, options));
|
|
34958
35914
|
|
|
34959
35915
|
var gitignore_1 = gitignore;
|
|
34960
|
-
globby$1.sync = sync$
|
|
34961
|
-
globby$1.stream = stream$
|
|
35916
|
+
globby$1.sync = sync$9;
|
|
35917
|
+
globby$1.stream = stream$5;
|
|
34962
35918
|
globby$1.generateGlobTasks = generateGlobTasks_1;
|
|
34963
35919
|
globby$1.hasMagic = hasMagic;
|
|
34964
35920
|
globby$1.gitignore = gitignore_1;
|
|
@@ -35336,8 +36292,22 @@ function handleCallExpressionComments(precedingNode, enclosingNode, comment) {
|
|
|
35336
36292
|
|
|
35337
36293
|
function handleUnionTypeComments(precedingNode, enclosingNode, followingNode, comment) {
|
|
35338
36294
|
if (enclosingNode && (enclosingNode.type === "UnionTypeAnnotation" || enclosingNode.type === "TSUnionType")) {
|
|
35339
|
-
|
|
35340
|
-
|
|
36295
|
+
if (util$1.isNodeIgnoreComment(comment)) {
|
|
36296
|
+
followingNode.prettierIgnore = true;
|
|
36297
|
+
comment.unignore = true;
|
|
36298
|
+
}
|
|
36299
|
+
|
|
36300
|
+
if (precedingNode) {
|
|
36301
|
+
addTrailingComment$3(precedingNode, comment);
|
|
36302
|
+
return true;
|
|
36303
|
+
}
|
|
36304
|
+
|
|
36305
|
+
return false;
|
|
36306
|
+
}
|
|
36307
|
+
|
|
36308
|
+
if (followingNode && (followingNode.type === "UnionTypeAnnotation" || followingNode.type === "TSUnionType") && util$1.isNodeIgnoreComment(comment)) {
|
|
36309
|
+
followingNode.types[0].prettierIgnore = true;
|
|
36310
|
+
comment.unignore = true;
|
|
35341
36311
|
}
|
|
35342
36312
|
|
|
35343
36313
|
return false;
|
|
@@ -35523,7 +36493,7 @@ const {
|
|
|
35523
36493
|
dedentToRoot: dedentToRoot$1
|
|
35524
36494
|
},
|
|
35525
36495
|
utils: {
|
|
35526
|
-
mapDoc: mapDoc$
|
|
36496
|
+
mapDoc: mapDoc$1,
|
|
35527
36497
|
stripTrailingHardline: stripTrailingHardline$1
|
|
35528
36498
|
}
|
|
35529
36499
|
} = document;
|
|
@@ -35546,7 +36516,7 @@ function embed(path, print, textToDoc, options) {
|
|
|
35546
36516
|
return idx === 0 ? currVal : prevVal + "@prettier-placeholder-" + placeholderID++ + "-id" + currVal;
|
|
35547
36517
|
}, "");
|
|
35548
36518
|
const doc = textToDoc(text, {
|
|
35549
|
-
parser: "
|
|
36519
|
+
parser: "scss"
|
|
35550
36520
|
});
|
|
35551
36521
|
return transformCssDoc(doc, path, print);
|
|
35552
36522
|
}
|
|
@@ -35672,7 +36642,7 @@ function uncook(cookedValue) {
|
|
|
35672
36642
|
}
|
|
35673
36643
|
|
|
35674
36644
|
function escapeTemplateCharacters(doc, raw) {
|
|
35675
|
-
return mapDoc$
|
|
36645
|
+
return mapDoc$1(doc, currentDoc => {
|
|
35676
36646
|
if (!currentDoc.parts) {
|
|
35677
36647
|
return currentDoc;
|
|
35678
36648
|
}
|
|
@@ -35721,7 +36691,7 @@ function replacePlaceholders(quasisDoc, expressionDocs) {
|
|
|
35721
36691
|
|
|
35722
36692
|
const expressions = expressionDocs.slice();
|
|
35723
36693
|
let replaceCounter = 0;
|
|
35724
|
-
const newDoc = mapDoc$
|
|
36694
|
+
const newDoc = mapDoc$1(quasisDoc, doc => {
|
|
35725
36695
|
if (!doc || !doc.parts || !doc.parts.length) {
|
|
35726
36696
|
return doc;
|
|
35727
36697
|
}
|
|
@@ -35936,7 +36906,7 @@ function printHtmlTemplateLiteral(path, print, textToDoc, parser, options) {
|
|
|
35936
36906
|
|
|
35937
36907
|
const placeholderRegex = new RegExp(composePlaceholder("(\\d+)"), "g");
|
|
35938
36908
|
let topLevelCount = 0;
|
|
35939
|
-
const contentDoc = mapDoc$
|
|
36909
|
+
const contentDoc = mapDoc$1(stripTrailingHardline$1(textToDoc(text, {
|
|
35940
36910
|
parser,
|
|
35941
36911
|
|
|
35942
36912
|
__onHtmlRoot(root) {
|
|
@@ -36146,7 +37116,7 @@ var build = createCommonjsModule(function (module, exports) {
|
|
|
36146
37116
|
exports.print = print;
|
|
36147
37117
|
|
|
36148
37118
|
function _os() {
|
|
36149
|
-
const data = os;
|
|
37119
|
+
const data = os$1;
|
|
36150
37120
|
|
|
36151
37121
|
_os = function () {
|
|
36152
37122
|
return data;
|
|
@@ -36506,8 +37476,10 @@ function isTypeAnnotationAFunction(node, options) {
|
|
|
36506
37476
|
return (node.type === "TypeAnnotation" || node.type === "TSTypeAnnotation") && node.typeAnnotation.type === "FunctionTypeAnnotation" && !node.static && !sameLocStart(node, node.typeAnnotation, options);
|
|
36507
37477
|
}
|
|
36508
37478
|
|
|
37479
|
+
const binaryishNodeTypes = new Set(["BinaryExpression", "LogicalExpression", "NGPipeExpression"]);
|
|
37480
|
+
|
|
36509
37481
|
function isBinaryish(node) {
|
|
36510
|
-
return
|
|
37482
|
+
return binaryishNodeTypes.has(node.type);
|
|
36511
37483
|
}
|
|
36512
37484
|
|
|
36513
37485
|
function isMemberish(node) {
|
|
@@ -37060,7 +38032,7 @@ function isSimpleCallArgument(node, depth) {
|
|
|
37060
38032
|
}
|
|
37061
38033
|
|
|
37062
38034
|
if (node.type === "ArrayExpression") {
|
|
37063
|
-
return node.elements.every(isChildSimple);
|
|
38035
|
+
return node.elements.every(x => x == null || isChildSimple(x));
|
|
37064
38036
|
}
|
|
37065
38037
|
|
|
37066
38038
|
if (node.type === "CallExpression" || node.type === "OptionalCallExpression" || node.type === "NewExpression") {
|
|
@@ -37403,7 +38375,7 @@ function needsParens(path, options) {
|
|
|
37403
38375
|
}
|
|
37404
38376
|
|
|
37405
38377
|
if (pp === np && name === "right") {
|
|
37406
|
-
assert.strictEqual(parent.right, node);
|
|
38378
|
+
assert$1.strictEqual(parent.right, node);
|
|
37407
38379
|
return true;
|
|
37408
38380
|
}
|
|
37409
38381
|
|
|
@@ -37734,7 +38706,7 @@ function needsParens(path, options) {
|
|
|
37734
38706
|
}
|
|
37735
38707
|
|
|
37736
38708
|
function isStatement(node) {
|
|
37737
|
-
return node.type === "BlockStatement" || node.type === "BreakStatement" || node.type === "ClassBody" || node.type === "ClassDeclaration" || node.type === "ClassMethod" || node.type === "ClassProperty" || node.type === "ClassPrivateProperty" || node.type === "ContinueStatement" || node.type === "DebuggerStatement" || node.type === "DeclareClass" || node.type === "DeclareExportAllDeclaration" || node.type === "DeclareExportDeclaration" || node.type === "DeclareFunction" || node.type === "DeclareInterface" || node.type === "DeclareModule" || node.type === "DeclareModuleExports" || node.type === "DeclareVariable" || node.type === "DoWhileStatement" || node.type === "EnumDeclaration" || node.type === "ExportAllDeclaration" || node.type === "ExportDefaultDeclaration" || node.type === "ExportNamedDeclaration" || node.type === "ExpressionStatement" || node.type === "
|
|
38709
|
+
return node.type === "BlockStatement" || node.type === "BreakStatement" || node.type === "ClassBody" || node.type === "ClassDeclaration" || node.type === "ClassMethod" || node.type === "ClassProperty" || node.type === "ClassPrivateProperty" || node.type === "ContinueStatement" || node.type === "DebuggerStatement" || node.type === "DeclareClass" || node.type === "DeclareExportAllDeclaration" || node.type === "DeclareExportDeclaration" || node.type === "DeclareFunction" || node.type === "DeclareInterface" || node.type === "DeclareModule" || node.type === "DeclareModuleExports" || node.type === "DeclareVariable" || node.type === "DoWhileStatement" || node.type === "EnumDeclaration" || node.type === "ExportAllDeclaration" || node.type === "ExportDefaultDeclaration" || node.type === "ExportNamedDeclaration" || node.type === "ExpressionStatement" || node.type === "ForInStatement" || node.type === "ForOfStatement" || node.type === "ForStatement" || node.type === "FunctionDeclaration" || node.type === "IfStatement" || node.type === "ImportDeclaration" || node.type === "InterfaceDeclaration" || node.type === "LabeledStatement" || node.type === "MethodDefinition" || node.type === "ReturnStatement" || node.type === "SwitchStatement" || node.type === "ThrowStatement" || node.type === "TryStatement" || node.type === "TSDeclareFunction" || node.type === "TSEnumDeclaration" || node.type === "TSImportEqualsDeclaration" || node.type === "TSInterfaceDeclaration" || node.type === "TSModuleDeclaration" || node.type === "TSNamespaceExportDeclaration" || node.type === "TypeAlias" || node.type === "VariableDeclaration" || node.type === "WhileStatement" || node.type === "WithStatement";
|
|
37738
38710
|
}
|
|
37739
38711
|
|
|
37740
38712
|
function includesFunctionTypeInObjectType(node) {
|
|
@@ -38273,7 +39245,9 @@ function printPathNoParens(path, options, print, args) {
|
|
|
38273
39245
|
/* sameIndent */
|
|
38274
39246
|
true)); // Only force a trailing newline if there were any contents.
|
|
38275
39247
|
|
|
38276
|
-
if (n.body.
|
|
39248
|
+
if (!n.body.every(({
|
|
39249
|
+
type
|
|
39250
|
+
}) => type === "EmptyStatement") || n.comments) {
|
|
38277
39251
|
parts.push(hardline$4);
|
|
38278
39252
|
}
|
|
38279
39253
|
|
|
@@ -38448,7 +39422,6 @@ function printPathNoParens(path, options, print, args) {
|
|
|
38448
39422
|
|
|
38449
39423
|
case "SpreadElement":
|
|
38450
39424
|
case "SpreadElementPattern":
|
|
38451
|
-
case "RestProperty":
|
|
38452
39425
|
case "SpreadProperty":
|
|
38453
39426
|
case "SpreadPropertyPattern":
|
|
38454
39427
|
case "RestElement":
|
|
@@ -38815,11 +39788,23 @@ function printPathNoParens(path, options, print, args) {
|
|
|
38815
39788
|
});
|
|
38816
39789
|
|
|
38817
39790
|
if (n.inexact) {
|
|
38818
|
-
|
|
39791
|
+
let printed;
|
|
39792
|
+
|
|
39793
|
+
if (hasDanglingComments$1(n)) {
|
|
39794
|
+
const hasLineComments = !n.comments.every(comments$1.isBlockComment);
|
|
39795
|
+
const printedDanglingComments = comments.printDanglingComments(path, options,
|
|
39796
|
+
/* sameIndent */
|
|
39797
|
+
true);
|
|
39798
|
+
printed = concat$6([printedDanglingComments, hasLineComments || hasNewline$4(options.originalText, options.locEnd(n.comments[n.comments.length - 1])) ? hardline$4 : line$4, "..."]);
|
|
39799
|
+
} else {
|
|
39800
|
+
printed = "...";
|
|
39801
|
+
}
|
|
39802
|
+
|
|
39803
|
+
props.push(concat$6(separatorParts.concat(printed)));
|
|
38819
39804
|
}
|
|
38820
39805
|
|
|
38821
39806
|
const lastElem = getLast$2(n[propertiesField]);
|
|
38822
|
-
const canHaveTrailingSeparator = !(lastElem && (lastElem.type === "
|
|
39807
|
+
const canHaveTrailingSeparator = !(n.inexact || lastElem && (lastElem.type === "RestElement" || hasNodeIgnoreComment$2(lastElem)));
|
|
38823
39808
|
let content;
|
|
38824
39809
|
|
|
38825
39810
|
if (props.length === 0) {
|
|
@@ -39058,7 +40043,7 @@ function printPathNoParens(path, options, print, args) {
|
|
|
39058
40043
|
// semicolon, except when they in the () part of for loops.
|
|
39059
40044
|
|
|
39060
40045
|
const parentNode = path.getParentNode();
|
|
39061
|
-
const isParentForLoop = parentNode.type === "ForStatement" || parentNode.type === "ForInStatement" || parentNode.type === "ForOfStatement"
|
|
40046
|
+
const isParentForLoop = parentNode.type === "ForStatement" || parentNode.type === "ForInStatement" || parentNode.type === "ForOfStatement";
|
|
39062
40047
|
const hasValue = n.declarations.some(decl => decl.init);
|
|
39063
40048
|
let firstVariable;
|
|
39064
40049
|
|
|
@@ -39142,14 +40127,7 @@ function printPathNoParens(path, options, print, args) {
|
|
|
39142
40127
|
return group$2(concat$6([n.each ? "for each (" : "for (", path.call(print, "left"), " in ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))]));
|
|
39143
40128
|
|
|
39144
40129
|
case "ForOfStatement":
|
|
39145
|
-
|
|
39146
|
-
{
|
|
39147
|
-
// Babel 7 removed ForAwaitStatement in favor of ForOfStatement
|
|
39148
|
-
// with `"await": true`:
|
|
39149
|
-
// https://github.com/estree/estree/pull/138
|
|
39150
|
-
const isAwait = n.type === "ForAwaitStatement" || n.await;
|
|
39151
|
-
return group$2(concat$6(["for", isAwait ? " await" : "", " (", path.call(print, "left"), " of ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))]));
|
|
39152
|
-
}
|
|
40130
|
+
return group$2(concat$6(["for", n.await ? " await" : "", " (", path.call(print, "left"), " of ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))]));
|
|
39153
40131
|
|
|
39154
40132
|
case "DoWhileStatement":
|
|
39155
40133
|
{
|
|
@@ -39299,8 +40277,8 @@ function printPathNoParens(path, options, print, args) {
|
|
|
39299
40277
|
case "JSXExpressionContainer":
|
|
39300
40278
|
{
|
|
39301
40279
|
const parent = path.getParentNode(0);
|
|
39302
|
-
const
|
|
39303
|
-
const shouldInline =
|
|
40280
|
+
const hasComments = n.expression.comments && n.expression.comments.length > 0;
|
|
40281
|
+
const shouldInline = n.expression.type === "JSXEmptyExpression" || !hasComments && (n.expression.type === "ArrayExpression" || n.expression.type === "ObjectExpression" || n.expression.type === "ArrowFunctionExpression" || n.expression.type === "CallExpression" || n.expression.type === "OptionalCallExpression" || n.expression.type === "FunctionExpression" || n.expression.type === "TemplateLiteral" || n.expression.type === "TaggedTemplateExpression" || n.expression.type === "DoExpression" || isJSXNode$1(parent) && (n.expression.type === "ConditionalExpression" || isBinaryish$1(n.expression)));
|
|
39304
40282
|
|
|
39305
40283
|
if (shouldInline) {
|
|
39306
40284
|
return group$2(concat$6(["{", path.call(print, "expression"), lineSuffixBoundary$1, "}"]));
|
|
@@ -39506,7 +40484,7 @@ function printPathNoParens(path, options, print, args) {
|
|
|
39506
40484
|
if (!isSimple) {
|
|
39507
40485
|
// Breaks at the template element boundaries (${ and }) are preferred to breaking
|
|
39508
40486
|
// in the middle of a MemberExpression
|
|
39509
|
-
if (n.expressions[i].comments && n.expressions[i].comments.length || n.expressions[i].type === "MemberExpression" || n.expressions[i].type === "OptionalMemberExpression" || n.expressions[i].type === "ConditionalExpression" || n.expressions[i].type === "
|
|
40487
|
+
if (n.expressions[i].comments && n.expressions[i].comments.length || n.expressions[i].type === "MemberExpression" || n.expressions[i].type === "OptionalMemberExpression" || n.expressions[i].type === "ConditionalExpression" || n.expressions[i].type === "SequenceExpression" || n.expressions[i].type === "TSAsExpression" || isBinaryish$1(n.expressions[i])) {
|
|
39510
40488
|
printed = concat$6([indent$3(concat$6([softline$2, printed])), softline$2]);
|
|
39511
40489
|
}
|
|
39512
40490
|
}
|
|
@@ -39897,7 +40875,7 @@ function printPathNoParens(path, options, print, args) {
|
|
|
39897
40875
|
return nodeStr(n, options);
|
|
39898
40876
|
|
|
39899
40877
|
case "NumberLiteralTypeAnnotation":
|
|
39900
|
-
assert.strictEqual(typeof n.value, "number");
|
|
40878
|
+
assert$1.strictEqual(typeof n.value, "number");
|
|
39901
40879
|
|
|
39902
40880
|
if (n.extra != null) {
|
|
39903
40881
|
return printNumber$1(n.extra.raw);
|
|
@@ -40139,8 +41117,13 @@ function printPathNoParens(path, options, print, args) {
|
|
|
40139
41117
|
|
|
40140
41118
|
case "TSIndexSignature":
|
|
40141
41119
|
{
|
|
40142
|
-
const parent = path.getParentNode();
|
|
40143
|
-
|
|
41120
|
+
const parent = path.getParentNode(); // The typescript parser accepts multiple parameters here. If you're
|
|
41121
|
+
// using them, it makes sense to have a trailing comma. But if you
|
|
41122
|
+
// aren't, this is more like a computed property name than an array.
|
|
41123
|
+
// So we leave off the trailing comma when there's just one parameter.
|
|
41124
|
+
|
|
41125
|
+
const trailingComma = n.parameters.length > 1 ? ifBreak$1(shouldPrintComma(options) ? "," : "") : "";
|
|
41126
|
+
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]));
|
|
40144
41127
|
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 : ""]);
|
|
40145
41128
|
}
|
|
40146
41129
|
|
|
@@ -40347,7 +41330,7 @@ function printPathNoParens(path, options, print, args) {
|
|
|
40347
41330
|
return "";
|
|
40348
41331
|
|
|
40349
41332
|
case "NGQuotedExpression":
|
|
40350
|
-
return concat$6([n.prefix, ":", n.value]);
|
|
41333
|
+
return concat$6([n.prefix, ": ", n.value.trim()]);
|
|
40351
41334
|
|
|
40352
41335
|
case "NGMicrosyntax":
|
|
40353
41336
|
return concat$6(path.map((childPath, index) => concat$6([index === 0 ? "" : isNgForOf$1(childPath.getValue(), index, n) ? " " : concat$6([";", line$4]), print(childPath)]), "body"));
|
|
@@ -40509,7 +41492,7 @@ function printMethod(path, options, print) {
|
|
|
40509
41492
|
parts.push("*");
|
|
40510
41493
|
}
|
|
40511
41494
|
} else {
|
|
40512
|
-
assert.ok(kind === "get" || kind === "set");
|
|
41495
|
+
assert$1.ok(kind === "get" || kind === "set");
|
|
40513
41496
|
parts.push(kind, " ");
|
|
40514
41497
|
}
|
|
40515
41498
|
|
|
@@ -40992,7 +41975,7 @@ function printFlowDeclaration(path, parts) {
|
|
|
40992
41975
|
const parentExportDecl = getParentExportDeclaration$1(path);
|
|
40993
41976
|
|
|
40994
41977
|
if (parentExportDecl) {
|
|
40995
|
-
assert.strictEqual(parentExportDecl.type, "DeclareExportDeclaration");
|
|
41978
|
+
assert$1.strictEqual(parentExportDecl.type, "DeclareExportDeclaration");
|
|
40996
41979
|
} else {
|
|
40997
41980
|
// If the parent node has type DeclareExportDeclaration, then it
|
|
40998
41981
|
// will be responsible for printing the "declare" token. Otherwise
|
|
@@ -41904,7 +42887,7 @@ function printReturnAndThrowArgument(path, options, print) {
|
|
|
41904
42887
|
if (node.argument) {
|
|
41905
42888
|
if (returnArgumentHasLeadingComment$1(options, node.argument)) {
|
|
41906
42889
|
parts.push(concat$6([" (", indent$3(concat$6([hardline$4, path.call(print, "argument")])), hardline$4, ")"]));
|
|
41907
|
-
} else if (node.argument
|
|
42890
|
+
} else if (isBinaryish$1(node.argument) || node.argument.type === "SequenceExpression") {
|
|
41908
42891
|
parts.push(group$2(concat$6([ifBreak$1(" (", " "), indent$3(concat$6([softline$2, path.call(print, "argument")])), softline$2, ifBreak$1(")")])));
|
|
41909
42892
|
} else {
|
|
41910
42893
|
parts.push(" ", path.call(print, "argument"));
|
|
@@ -41936,7 +42919,7 @@ function willPrintOwnComments(path
|
|
|
41936
42919
|
) {
|
|
41937
42920
|
const node = path.getValue();
|
|
41938
42921
|
const parent = path.getParentNode();
|
|
41939
|
-
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);
|
|
42922
|
+
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");
|
|
41940
42923
|
}
|
|
41941
42924
|
|
|
41942
42925
|
function canAttachComment(node) {
|
|
@@ -42516,6 +43499,7 @@ var aliases$2 = [
|
|
|
42516
43499
|
"jsonc"
|
|
42517
43500
|
];
|
|
42518
43501
|
var extensions$5 = [
|
|
43502
|
+
".jsonc",
|
|
42519
43503
|
".sublime-build",
|
|
42520
43504
|
".sublime-commands",
|
|
42521
43505
|
".sublime-completions",
|
|
@@ -42797,7 +43781,7 @@ const {
|
|
|
42797
43781
|
markAsRoot: markAsRoot$1
|
|
42798
43782
|
},
|
|
42799
43783
|
utils: {
|
|
42800
|
-
mapDoc: mapDoc$
|
|
43784
|
+
mapDoc: mapDoc$2
|
|
42801
43785
|
}
|
|
42802
43786
|
} = document;
|
|
42803
43787
|
|
|
@@ -42815,7 +43799,7 @@ function embed$1(path, print, textToDoc
|
|
|
42815
43799
|
return null;
|
|
42816
43800
|
|
|
42817
43801
|
function replaceNewlinesWithLiterallines(doc) {
|
|
42818
|
-
return mapDoc$
|
|
43802
|
+
return mapDoc$2(doc, currentDoc => typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$8(currentDoc.split(/(\n)/g).map((v, i) => i % 2 === 0 ? v : literalline$3)) : currentDoc);
|
|
42819
43803
|
}
|
|
42820
43804
|
}
|
|
42821
43805
|
|
|
@@ -42826,7 +43810,7 @@ const DELIMITER_MAP = {
|
|
|
42826
43810
|
"+++": "toml"
|
|
42827
43811
|
};
|
|
42828
43812
|
|
|
42829
|
-
function parse$
|
|
43813
|
+
function parse$5(text) {
|
|
42830
43814
|
const delimiterRegex = Object.keys(DELIMITER_MAP).map(escapeStringRegexp$2).join("|");
|
|
42831
43815
|
const match = text.match( // trailing spaces after delimiters are allowed
|
|
42832
43816
|
new RegExp(`^(${delimiterRegex})[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)`));
|
|
@@ -42849,7 +43833,7 @@ function parse$4(text) {
|
|
|
42849
43833
|
};
|
|
42850
43834
|
}
|
|
42851
43835
|
|
|
42852
|
-
var frontMatter = parse$
|
|
43836
|
+
var frontMatter = parse$5;
|
|
42853
43837
|
|
|
42854
43838
|
function hasPragma$1(text) {
|
|
42855
43839
|
return pragma.hasPragma(frontMatter(text).content);
|
|
@@ -43100,7 +44084,7 @@ function getPropOfDeclNode(path) {
|
|
|
43100
44084
|
|
|
43101
44085
|
function isSCSS(parser, text) {
|
|
43102
44086
|
const hasExplicitParserChoice = parser === "less" || parser === "scss";
|
|
43103
|
-
const IS_POSSIBLY_SCSS = /(\w\s
|
|
44087
|
+
const IS_POSSIBLY_SCSS = /(\w\s*:\s*[^}:]+|#){|@import[^\n]+(?:url|,)/;
|
|
43104
44088
|
return hasExplicitParserChoice ? parser === "scss" : IS_POSSIBLY_SCSS.test(text);
|
|
43105
44089
|
}
|
|
43106
44090
|
|
|
@@ -43544,7 +44528,7 @@ function genericPrint$2(path, options, print) {
|
|
|
43544
44528
|
return concat$9(["@", // If a Less file ends up being parsed with the SCSS parser, Less
|
|
43545
44529
|
// variable declarations will be parsed as at-rules with names ending
|
|
43546
44530
|
// with a colon, so keep the original case then.
|
|
43547
|
-
isDetachedRulesetCallNode$1(node) || node.name.endsWith(":") ? node.name : maybeToLowerCase$1(node.name), node.params ? concat$9([isDetachedRulesetCallNode$1(node) ? "" : isTemplatePlaceholderNode$1(node)
|
|
44531
|
+
isDetachedRulesetCallNode$1(node) || node.name.endsWith(":") ? node.name : maybeToLowerCase$1(node.name), node.params ? concat$9([isDetachedRulesetCallNode$1(node) ? "" : isTemplatePlaceholderNode$1(node) ? node.raws.afterName === "" ? "" : node.name.endsWith(":") ? " " : /^\s*\n\s*\n/.test(node.raws.afterName) ? concat$9([hardline$7, hardline$7]) : /^\s*\n/.test(node.raws.afterName) ? hardline$7 : " " : " ", path.call(print, "params")]) : "", node.selector ? indent$5(concat$9([" ", path.call(print, "selector")])) : "", node.value ? group$6(concat$9([" ", path.call(print, "value"), isSCSSControlDirectiveNode$1(node) ? hasParensAroundNode$1(node) ? " " : line$5 : ""])) : node.name === "else" ? " " : "", node.nodes ? concat$9([isSCSSControlDirectiveNode$1(node) ? "" : " ", "{", indent$5(concat$9([node.nodes.length > 0 ? softline$3 : "", printNodeSequence(path, options, print)])), softline$3, "}"]) : isTemplatePlaceholderNodeWithoutSemiColon ? "" : ";"]);
|
|
43548
44532
|
}
|
|
43549
44533
|
// postcss-media-query-parser
|
|
43550
44534
|
|
|
@@ -43750,6 +44734,11 @@ function genericPrint$2(path, options, print) {
|
|
|
43750
44734
|
|
|
43751
44735
|
if (!iNextNode) {
|
|
43752
44736
|
continue;
|
|
44737
|
+
} // styled.div` background: var(--${one}); `
|
|
44738
|
+
|
|
44739
|
+
|
|
44740
|
+
if (!iPrevNode && iNode.value === "--" && iNextNode.type === "value-atword") {
|
|
44741
|
+
continue;
|
|
43753
44742
|
} // Ignore spaces before/after string interpolation (i.e. `"#{my-fn("_")}"`)
|
|
43754
44743
|
|
|
43755
44744
|
|
|
@@ -45395,7 +46384,7 @@ const {
|
|
|
45395
46384
|
markAsRoot: markAsRoot$2
|
|
45396
46385
|
},
|
|
45397
46386
|
utils: {
|
|
45398
|
-
mapDoc: mapDoc$
|
|
46387
|
+
mapDoc: mapDoc$3
|
|
45399
46388
|
}
|
|
45400
46389
|
} = document;
|
|
45401
46390
|
const {
|
|
@@ -45457,7 +46446,7 @@ function embed$2(path, print, textToDoc, options) {
|
|
|
45457
46446
|
}
|
|
45458
46447
|
|
|
45459
46448
|
function replaceNewlinesWithLiterallines(doc) {
|
|
45460
|
-
return mapDoc$
|
|
46449
|
+
return mapDoc$3(doc, currentDoc => typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$c(currentDoc.split(/(\n)/g).map((v, i) => i % 2 === 0 ? v : literalline$4)) : currentDoc);
|
|
45461
46450
|
}
|
|
45462
46451
|
}
|
|
45463
46452
|
|
|
@@ -45762,7 +46751,7 @@ const {
|
|
|
45762
46751
|
group: group$d
|
|
45763
46752
|
},
|
|
45764
46753
|
utils: {
|
|
45765
|
-
mapDoc: mapDoc$
|
|
46754
|
+
mapDoc: mapDoc$4
|
|
45766
46755
|
},
|
|
45767
46756
|
printer: {
|
|
45768
46757
|
printDocToString: printDocToString$3
|
|
@@ -46079,19 +47068,6 @@ function getAncestorNode$2(path, typeOrTypes) {
|
|
|
46079
47068
|
}
|
|
46080
47069
|
|
|
46081
47070
|
function printLine(path, value, options) {
|
|
46082
|
-
const greatGrandParentNode = path.getParentNode(2);
|
|
46083
|
-
|
|
46084
|
-
if (greatGrandParentNode && greatGrandParentNode.type === "listItem") {
|
|
46085
|
-
const parentNode = path.getParentNode();
|
|
46086
|
-
const grandParentNode = path.getParentNode(1);
|
|
46087
|
-
const index = grandParentNode.children.indexOf(parentNode);
|
|
46088
|
-
const prevGrandParentNode = grandParentNode.children[index - 1];
|
|
46089
|
-
|
|
46090
|
-
if (prevGrandParentNode && prevGrandParentNode.type === "break") {
|
|
46091
|
-
return "";
|
|
46092
|
-
}
|
|
46093
|
-
}
|
|
46094
|
-
|
|
46095
47071
|
if (options.proseWrap === "preserve" && value === "\n") {
|
|
46096
47072
|
return hardline$b;
|
|
46097
47073
|
}
|
|
@@ -46343,7 +47319,7 @@ function shouldRemainTheSameContent(path) {
|
|
|
46343
47319
|
}
|
|
46344
47320
|
|
|
46345
47321
|
function normalizeDoc(doc) {
|
|
46346
|
-
return mapDoc$
|
|
47322
|
+
return mapDoc$4(doc, currentDoc => {
|
|
46347
47323
|
if (!currentDoc.parts) {
|
|
46348
47324
|
return currentDoc;
|
|
46349
47325
|
}
|
|
@@ -46939,7 +47915,7 @@ var colgroup = [
|
|
|
46939
47915
|
"valign",
|
|
46940
47916
|
"width"
|
|
46941
47917
|
];
|
|
46942
|
-
var data = [
|
|
47918
|
+
var data$1 = [
|
|
46943
47919
|
"value"
|
|
46944
47920
|
];
|
|
46945
47921
|
var del$1 = [
|
|
@@ -47432,7 +48408,7 @@ var index$1 = {
|
|
|
47432
48408
|
caption: caption,
|
|
47433
48409
|
col: col,
|
|
47434
48410
|
colgroup: colgroup,
|
|
47435
|
-
data: data,
|
|
48411
|
+
data: data$1,
|
|
47436
48412
|
del: del$1,
|
|
47437
48413
|
details: details,
|
|
47438
48414
|
dfn: dfn,
|
|
@@ -47515,7 +48491,7 @@ var htmlElementAttributes = /*#__PURE__*/Object.freeze({
|
|
|
47515
48491
|
caption: caption,
|
|
47516
48492
|
col: col,
|
|
47517
48493
|
colgroup: colgroup,
|
|
47518
|
-
data: data,
|
|
48494
|
+
data: data$1,
|
|
47519
48495
|
del: del$1,
|
|
47520
48496
|
details: details,
|
|
47521
48497
|
dfn: dfn,
|
|
@@ -47692,7 +48668,7 @@ function isTextLikeNode(node) {
|
|
|
47692
48668
|
}
|
|
47693
48669
|
|
|
47694
48670
|
function isScriptLikeTag(node) {
|
|
47695
|
-
return node.type === "element" && (node.fullName === "script" || node.fullName === "style" || node.fullName === "svg:style");
|
|
48671
|
+
return node.type === "element" && (node.fullName === "script" || node.fullName === "style" || node.fullName === "svg:style" || isUnknownNamespace(node) && (node.name === "script" || node.name === "style"));
|
|
47696
48672
|
}
|
|
47697
48673
|
|
|
47698
48674
|
function isFrontMatterNode(node) {
|
|
@@ -48575,7 +49551,7 @@ function deepUnique(array) {
|
|
|
48575
49551
|
});
|
|
48576
49552
|
}
|
|
48577
49553
|
|
|
48578
|
-
var parse$
|
|
49554
|
+
var parse$6 = string => {
|
|
48579
49555
|
return deepUnique(string.split(',').map(part => {
|
|
48580
49556
|
const result = {};
|
|
48581
49557
|
part.trim().split(/\s+/).forEach((element, index) => {
|
|
@@ -48628,7 +49604,7 @@ var stringify$2 = array => {
|
|
|
48628
49604
|
};
|
|
48629
49605
|
|
|
48630
49606
|
var srcset = {
|
|
48631
|
-
parse: parse$
|
|
49607
|
+
parse: parse$6,
|
|
48632
49608
|
stringify: stringify$2
|
|
48633
49609
|
};
|
|
48634
49610
|
|
|
@@ -48693,7 +49669,7 @@ const {
|
|
|
48693
49669
|
builders,
|
|
48694
49670
|
utils: {
|
|
48695
49671
|
stripTrailingHardline: stripTrailingHardline$2,
|
|
48696
|
-
mapDoc: mapDoc$
|
|
49672
|
+
mapDoc: mapDoc$5
|
|
48697
49673
|
}
|
|
48698
49674
|
} = document;
|
|
48699
49675
|
const {
|
|
@@ -48807,7 +49783,7 @@ function embed$4(path, print, textToDoc, options) {
|
|
|
48807
49783
|
}, opts)), options);
|
|
48808
49784
|
|
|
48809
49785
|
if (embeddedAttributeValueDoc) {
|
|
48810
|
-
return concat$g([node.rawName, '="', group$f(mapDoc$
|
|
49786
|
+
return concat$g([node.rawName, '="', group$f(mapDoc$5(embeddedAttributeValueDoc, doc => typeof doc === "string" ? doc.replace(/"/g, """) : doc)), '"']);
|
|
48811
49787
|
}
|
|
48812
49788
|
|
|
48813
49789
|
break;
|
|
@@ -49015,7 +49991,7 @@ function printChildren$2(path, options, print) {
|
|
|
49015
49991
|
}
|
|
49016
49992
|
|
|
49017
49993
|
function printBetweenLine(prevNode, nextNode) {
|
|
49018
|
-
return isTextLikeNode$1(prevNode) && isTextLikeNode$1(nextNode) ? prevNode.isTrailingSpaceSensitive ? prevNode.hasTrailingSpaces ? preferHardlineAsLeadingSpaces$1(nextNode) ? hardline$c : line$a : "" : preferHardlineAsLeadingSpaces$1(nextNode) ? hardline$c : softline$7 : needsToBorrowNextOpeningTagStartMarker(prevNode) && (
|
|
49994
|
+
return isTextLikeNode$1(prevNode) && isTextLikeNode$1(nextNode) ? prevNode.isTrailingSpaceSensitive ? prevNode.hasTrailingSpaces ? preferHardlineAsLeadingSpaces$1(nextNode) ? hardline$c : line$a : "" : preferHardlineAsLeadingSpaces$1(nextNode) ? hardline$c : softline$7 : needsToBorrowNextOpeningTagStartMarker(prevNode) && (hasPrettierIgnore$6(nextNode) ||
|
|
49019
49995
|
/**
|
|
49020
49996
|
* 123<a
|
|
49021
49997
|
* ~
|
|
@@ -49203,7 +50179,7 @@ function printOpeningTagStartMarker(node) {
|
|
|
49203
50179
|
}
|
|
49204
50180
|
|
|
49205
50181
|
function printOpeningTagEndMarker(node) {
|
|
49206
|
-
assert(!node.isSelfClosing);
|
|
50182
|
+
assert$1(!node.isSelfClosing);
|
|
49207
50183
|
|
|
49208
50184
|
switch (node.type) {
|
|
49209
50185
|
case "ieConditionalComment":
|
|
@@ -49222,7 +50198,7 @@ function printOpeningTagEndMarker(node) {
|
|
|
49222
50198
|
}
|
|
49223
50199
|
|
|
49224
50200
|
function printClosingTagStartMarker(node, options) {
|
|
49225
|
-
assert(!node.isSelfClosing);
|
|
50201
|
+
assert$1(!node.isSelfClosing);
|
|
49226
50202
|
|
|
49227
50203
|
if (shouldNotPrintClosingTag$1(node, options)) {
|
|
49228
50204
|
return "";
|
|
@@ -50326,7 +51302,8 @@ var filenames$4 = [
|
|
|
50326
51302
|
".clang-format",
|
|
50327
51303
|
".clang-tidy",
|
|
50328
51304
|
".gemrc",
|
|
50329
|
-
"glide.lock"
|
|
51305
|
+
"glide.lock",
|
|
51306
|
+
"yarn.lock"
|
|
50330
51307
|
];
|
|
50331
51308
|
var aceMode$g = "yaml";
|
|
50332
51309
|
var codemirrorMode$c = "yaml";
|
|
@@ -50362,10 +51339,12 @@ var YAML$1 = /*#__PURE__*/Object.freeze({
|
|
|
50362
51339
|
|
|
50363
51340
|
var require$$0$7 = getCjsExportFromNamespace(YAML$1);
|
|
50364
51341
|
|
|
50365
|
-
const languages$6 = [createLanguage(require$$0$7,
|
|
51342
|
+
const languages$6 = [createLanguage(require$$0$7, data => ({
|
|
50366
51343
|
since: "1.14.0",
|
|
50367
51344
|
parsers: ["yaml"],
|
|
50368
|
-
vscodeLanguageIds: ["yaml"]
|
|
51345
|
+
vscodeLanguageIds: ["yaml"],
|
|
51346
|
+
// yarn.lock is not YAML: https://github.com/yarnpkg/yarn/issues/5629
|
|
51347
|
+
filenames: data.filenames.filter(filename => filename !== "yarn.lock")
|
|
50369
51348
|
}))];
|
|
50370
51349
|
var languageYaml = {
|
|
50371
51350
|
languages: languages$6,
|
|
@@ -50460,11 +51439,11 @@ languageCss, {
|
|
|
50460
51439
|
},
|
|
50461
51440
|
|
|
50462
51441
|
get less() {
|
|
50463
|
-
return require("./parser-postcss").parsers.
|
|
51442
|
+
return require("./parser-postcss").parsers.less;
|
|
50464
51443
|
},
|
|
50465
51444
|
|
|
50466
51445
|
get scss() {
|
|
50467
|
-
return require("./parser-postcss").parsers.
|
|
51446
|
+
return require("./parser-postcss").parsers.scss;
|
|
50468
51447
|
}
|
|
50469
51448
|
|
|
50470
51449
|
}
|
|
@@ -50567,10 +51546,10 @@ function load(plugins, pluginSearchDirs) {
|
|
|
50567
51546
|
|
|
50568
51547
|
try {
|
|
50569
51548
|
// try local files
|
|
50570
|
-
requirePath =
|
|
51549
|
+
requirePath = resolve_1(path$2.resolve(process.cwd(), pluginName));
|
|
50571
51550
|
} catch (_) {
|
|
50572
51551
|
// try node modules
|
|
50573
|
-
requirePath =
|
|
51552
|
+
requirePath = resolve_1(pluginName, {
|
|
50574
51553
|
paths: [process.cwd()]
|
|
50575
51554
|
});
|
|
50576
51555
|
}
|
|
@@ -50581,8 +51560,8 @@ function load(plugins, pluginSearchDirs) {
|
|
|
50581
51560
|
};
|
|
50582
51561
|
});
|
|
50583
51562
|
const externalAutoLoadPluginInfos = pluginSearchDirs.map(pluginSearchDir => {
|
|
50584
|
-
const resolvedPluginSearchDir = path$
|
|
50585
|
-
const nodeModulesDir = path$
|
|
51563
|
+
const resolvedPluginSearchDir = path$2.resolve(process.cwd(), pluginSearchDir);
|
|
51564
|
+
const nodeModulesDir = path$2.resolve(resolvedPluginSearchDir, "node_modules"); // In some fringe cases (ex: files "mounted" as virtual directories), the
|
|
50586
51565
|
// isDirectory(resolvedPluginSearchDir) check might be false even though
|
|
50587
51566
|
// the node_modules actually exists.
|
|
50588
51567
|
|
|
@@ -50592,7 +51571,7 @@ function load(plugins, pluginSearchDirs) {
|
|
|
50592
51571
|
|
|
50593
51572
|
return memoizedSearch(nodeModulesDir).map(pluginName => ({
|
|
50594
51573
|
name: pluginName,
|
|
50595
|
-
requirePath:
|
|
51574
|
+
requirePath: resolve_1(pluginName, {
|
|
50596
51575
|
paths: [resolvedPluginSearchDir]
|
|
50597
51576
|
})
|
|
50598
51577
|
}));
|
|
@@ -50608,12 +51587,12 @@ function findPluginsInNodeModules(nodeModulesDir) {
|
|
|
50608
51587
|
cwd: nodeModulesDir,
|
|
50609
51588
|
expandDirectories: false
|
|
50610
51589
|
});
|
|
50611
|
-
return pluginPackageJsonPaths.map(path$
|
|
51590
|
+
return pluginPackageJsonPaths.map(path$2.dirname);
|
|
50612
51591
|
}
|
|
50613
51592
|
|
|
50614
51593
|
function isDirectory$1(dir) {
|
|
50615
51594
|
try {
|
|
50616
|
-
return fs$
|
|
51595
|
+
return fs$3.statSync(dir).isDirectory();
|
|
50617
51596
|
} catch (e) {
|
|
50618
51597
|
return false;
|
|
50619
51598
|
}
|