prettier 2.0.0 → 2.0.4
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 +568 -496
- package/doc.js +9 -3
- package/index.js +155 -121
- 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 +136 -114
- package/third-party.js +1 -1
package/standalone.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
}(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
7
|
var name = "prettier";
|
|
8
|
-
var version = "2.0.
|
|
8
|
+
var version = "2.0.4";
|
|
9
9
|
var description = "Prettier is an opinionated code formatter";
|
|
10
10
|
var bin = "./bin/prettier.js";
|
|
11
11
|
var repository = "prettier/prettier";
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
var dependencies = {
|
|
20
20
|
"@angular/compiler": "9.0.5",
|
|
21
21
|
"@babel/code-frame": "7.8.0",
|
|
22
|
-
"@babel/parser": "7.9.
|
|
23
|
-
"@glimmer/syntax": "0.
|
|
22
|
+
"@babel/parser": "7.9.4",
|
|
23
|
+
"@glimmer/syntax": "0.50.0",
|
|
24
24
|
"@iarna/toml": "2.2.3",
|
|
25
|
-
"@typescript-eslint/typescript-estree": "2.
|
|
25
|
+
"@typescript-eslint/typescript-estree": "2.26.0",
|
|
26
26
|
"angular-estree-parser": "1.3.0",
|
|
27
27
|
"angular-html-parser": "1.4.0",
|
|
28
28
|
camelcase: "5.3.1",
|
|
29
|
-
chalk: "
|
|
29
|
+
chalk: "4.0.0",
|
|
30
30
|
"ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540",
|
|
31
31
|
"cjk-regex": "2.0.0",
|
|
32
32
|
cosmiconfig: "6.0.0",
|
|
@@ -40,24 +40,25 @@
|
|
|
40
40
|
"fast-glob": "3.2.2",
|
|
41
41
|
"find-parent-dir": "0.3.0",
|
|
42
42
|
"find-project-root": "1.1.1",
|
|
43
|
-
"flow-parser": "0.
|
|
43
|
+
"flow-parser": "0.122.0",
|
|
44
44
|
"get-stream": "5.1.0",
|
|
45
45
|
globby: "11.0.0",
|
|
46
|
-
graphql: "
|
|
46
|
+
graphql: "15.0.0",
|
|
47
47
|
"html-element-attributes": "2.2.1",
|
|
48
48
|
"html-styles": "1.0.0",
|
|
49
49
|
"html-tag-names": "1.1.5",
|
|
50
50
|
ignore: "4.0.6",
|
|
51
|
-
"jest-docblock": "25.
|
|
51
|
+
"jest-docblock": "25.2.6",
|
|
52
52
|
"json-stable-stringify": "1.0.1",
|
|
53
53
|
leven: "3.1.0",
|
|
54
54
|
"lines-and-columns": "1.1.6",
|
|
55
|
-
"linguist-languages": "7.
|
|
55
|
+
"linguist-languages": "7.9.0",
|
|
56
56
|
lodash: "4.17.15",
|
|
57
57
|
mem: "6.0.1",
|
|
58
58
|
minimatch: "3.0.4",
|
|
59
59
|
minimist: "1.2.5",
|
|
60
60
|
"n-readlines": "1.0.0",
|
|
61
|
+
"please-upgrade-node": "3.2.0",
|
|
61
62
|
"postcss-less": "3.1.4",
|
|
62
63
|
"postcss-media-query-parser": "0.2.3",
|
|
63
64
|
"postcss-scss": "2.0.0",
|
|
@@ -71,40 +72,39 @@
|
|
|
71
72
|
"string-width": "4.2.0",
|
|
72
73
|
typescript: "3.8.3",
|
|
73
74
|
"unicode-regex": "3.0.0",
|
|
74
|
-
unified: "
|
|
75
|
+
unified: "9.0.0",
|
|
75
76
|
vnopts: "1.0.2",
|
|
76
77
|
"yaml-unist-parser": "1.1.1"
|
|
77
78
|
};
|
|
78
79
|
var devDependencies = {
|
|
79
|
-
"@babel/core": "7.
|
|
80
|
-
"@babel/preset-env": "7.
|
|
80
|
+
"@babel/core": "7.9.0",
|
|
81
|
+
"@babel/preset-env": "7.9.0",
|
|
81
82
|
"@rollup/plugin-alias": "3.0.1",
|
|
82
83
|
"@rollup/plugin-commonjs": "11.0.2",
|
|
83
84
|
"@rollup/plugin-json": "4.0.2",
|
|
84
85
|
"@rollup/plugin-node-resolve": "7.1.1",
|
|
85
86
|
"@rollup/plugin-replace": "2.3.1",
|
|
86
|
-
"babel-loader": "8.0
|
|
87
|
+
"babel-loader": "8.1.0",
|
|
87
88
|
benchmark: "2.1.4",
|
|
88
89
|
"builtin-modules": "3.1.0",
|
|
89
90
|
codecov: "3.6.5",
|
|
90
91
|
"cross-env": "7.0.2",
|
|
91
92
|
cspell: "4.0.55",
|
|
92
93
|
eslint: "6.8.0",
|
|
93
|
-
"eslint-config-prettier": "6.10.
|
|
94
|
+
"eslint-config-prettier": "6.10.1",
|
|
94
95
|
"eslint-formatter-friendly": "7.0.0",
|
|
95
|
-
"eslint-plugin-import": "2.20.
|
|
96
|
+
"eslint-plugin-import": "2.20.2",
|
|
96
97
|
"eslint-plugin-prettier": "3.1.2",
|
|
97
98
|
"eslint-plugin-react": "7.19.0",
|
|
98
|
-
"eslint-plugin-unicorn": "
|
|
99
|
+
"eslint-plugin-unicorn": "18.0.1",
|
|
99
100
|
execa: "4.0.0",
|
|
100
|
-
jest: "25.
|
|
101
|
-
"jest-junit": "10.0.0",
|
|
101
|
+
jest: "25.2.7",
|
|
102
102
|
"jest-snapshot-serializer-ansi": "1.0.0",
|
|
103
103
|
"jest-snapshot-serializer-raw": "1.1.0",
|
|
104
|
-
"jest-watch-typeahead": "0.
|
|
105
|
-
prettier: "
|
|
104
|
+
"jest-watch-typeahead": "0.5.0",
|
|
105
|
+
prettier: "2.0.3",
|
|
106
106
|
rimraf: "3.0.2",
|
|
107
|
-
rollup: "2.
|
|
107
|
+
rollup: "2.3.2",
|
|
108
108
|
"rollup-plugin-babel": "4.4.0",
|
|
109
109
|
"rollup-plugin-node-globals": "1.4.0",
|
|
110
110
|
"rollup-plugin-terser": "5.3.0",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"synchronous-promise": "2.0.10",
|
|
115
115
|
tempy: "0.5.0",
|
|
116
116
|
"terser-webpack-plugin": "2.3.5",
|
|
117
|
-
webpack: "4.42.
|
|
117
|
+
webpack: "4.42.1"
|
|
118
118
|
};
|
|
119
119
|
var scripts = {
|
|
120
120
|
prepublishOnly: "echo \"Error: must publish from dist/\" && exit 1",
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"lint:changelog": "node ./scripts/lint-changelog.js",
|
|
131
131
|
"lint:prettier": "prettier \"**/*.{md,json,yml,html,css}\" --check",
|
|
132
132
|
"lint:dist": "eslint --no-eslintrc --no-ignore --env=es6,browser --parser-options=ecmaVersion:2016 \"dist/!(bin-prettier|index|third-party).js\"",
|
|
133
|
-
"lint:spellcheck": "cspell {bin,scripts,src}/**/*.js {docs,website/blog,changelog_unreleased}/**/*.md",
|
|
133
|
+
"lint:spellcheck": "cspell {bin,scripts,src,website}/**/*.js {docs,website/blog,changelog_unreleased}/**/*.md",
|
|
134
134
|
"lint:deps": "node ./scripts/check-deps.js",
|
|
135
135
|
build: "node --max-old-space-size=3072 ./scripts/build/build.js",
|
|
136
136
|
"build-docs": "node ./scripts/build-docs.js"
|
|
@@ -10178,7 +10178,7 @@
|
|
|
10178
10178
|
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;
|
|
10179
10179
|
const STYLE_REGEX$1 = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
10180
10180
|
const STRING_REGEX$1 = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
|
10181
|
-
const ESCAPE_REGEX$1 = /\\(u(?:[a-f\d]{4}
|
|
10181
|
+
const ESCAPE_REGEX$1 = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
|
|
10182
10182
|
const ESCAPES$1 = new Map([['n', '\n'], ['r', '\r'], ['t', '\t'], ['b', '\b'], ['f', '\f'], ['v', '\v'], ['0', '\0'], ['\\', '\\'], ['e', '\u001B'], ['a', '\u0007']]);
|
|
10183
10183
|
|
|
10184
10184
|
function unescape$1(c) {
|
|
@@ -10292,8 +10292,8 @@
|
|
|
10292
10292
|
chunks.push(chunk.join(''));
|
|
10293
10293
|
|
|
10294
10294
|
if (styles.length > 0) {
|
|
10295
|
-
const
|
|
10296
|
-
throw new Error(
|
|
10295
|
+
const errMessage = "Chalk template literal is missing ".concat(styles.length, " closing bracket").concat(styles.length === 1 ? '' : 's', " (`}`)");
|
|
10296
|
+
throw new Error(errMessage);
|
|
10297
10297
|
}
|
|
10298
10298
|
|
|
10299
10299
|
return chunks.join('');
|
|
@@ -10312,7 +10312,7 @@
|
|
|
10312
10312
|
const styles = Object.create(null);
|
|
10313
10313
|
|
|
10314
10314
|
const applyOptions = (object, options = {}) => {
|
|
10315
|
-
if (options.level
|
|
10315
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
10316
10316
|
throw new Error('The `level` option should be an integer from 0 to 3');
|
|
10317
10317
|
} // Detect level if not set manually
|
|
10318
10318
|
|
|
@@ -10323,6 +10323,7 @@
|
|
|
10323
10323
|
|
|
10324
10324
|
class ChalkClass {
|
|
10325
10325
|
constructor(options) {
|
|
10326
|
+
// eslint-disable-next-line no-constructor-return
|
|
10326
10327
|
return chalkFactory(options);
|
|
10327
10328
|
}
|
|
10328
10329
|
|
|
@@ -10446,12 +10447,11 @@
|
|
|
10446
10447
|
// Single argument is hot path, implicit coercion is faster than anything
|
|
10447
10448
|
// eslint-disable-next-line no-implicit-coercion
|
|
10448
10449
|
return applyStyle(builder, arguments_.length === 1 ? '' + arguments_[0] : arguments_.join(' '));
|
|
10449
|
-
}; //
|
|
10450
|
+
}; // We alter the prototype because we must return a function, but there is
|
|
10450
10451
|
// no way to create a function with a different prototype
|
|
10451
10452
|
|
|
10452
10453
|
|
|
10453
|
-
builder
|
|
10454
|
-
|
|
10454
|
+
Object.setPrototypeOf(builder, proto);
|
|
10455
10455
|
builder._generator = self;
|
|
10456
10456
|
builder._styler = _styler;
|
|
10457
10457
|
builder._isEmpty = _isEmpty;
|
|
@@ -10529,18 +10529,7 @@
|
|
|
10529
10529
|
level: stderrColor ? stderrColor.level : 0
|
|
10530
10530
|
}); // eslint-disable-line new-cap
|
|
10531
10531
|
|
|
10532
|
-
chalk$1.stderr.supportsColor = stderrColor;
|
|
10533
|
-
|
|
10534
|
-
chalk$1.Level = {
|
|
10535
|
-
None: 0,
|
|
10536
|
-
Basic: 1,
|
|
10537
|
-
Ansi256: 2,
|
|
10538
|
-
TrueColor: 3,
|
|
10539
|
-
0: 'None',
|
|
10540
|
-
1: 'Basic',
|
|
10541
|
-
2: 'Ansi256',
|
|
10542
|
-
3: 'TrueColor'
|
|
10543
|
-
};
|
|
10532
|
+
chalk$1.stderr.supportsColor = stderrColor;
|
|
10544
10533
|
var source = chalk$1;
|
|
10545
10534
|
|
|
10546
10535
|
const cliDescriptor = {
|
|
@@ -13842,6 +13831,7 @@
|
|
|
13842
13831
|
try {
|
|
13843
13832
|
fd = fs.openSync(filepath, "r");
|
|
13844
13833
|
} catch (err) {
|
|
13834
|
+
// istanbul ignore next
|
|
13845
13835
|
return "";
|
|
13846
13836
|
}
|
|
13847
13837
|
|
|
@@ -13878,13 +13868,20 @@
|
|
|
13878
13868
|
}
|
|
13879
13869
|
|
|
13880
13870
|
function inferParser(filepath, plugins) {
|
|
13881
|
-
const filename = path.basename(filepath).toLowerCase();
|
|
13871
|
+
const filename = path.basename(filepath).toLowerCase();
|
|
13872
|
+
const languages = getSupportInfo$1({
|
|
13873
|
+
plugins
|
|
13874
|
+
}).languages.filter(language => language.since !== null); // If the file has no extension, we can try to infer the language from the
|
|
13882
13875
|
// interpreter in the shebang line, if any; but since this requires FS access,
|
|
13883
13876
|
// do it last.
|
|
13884
13877
|
|
|
13885
|
-
|
|
13886
|
-
|
|
13887
|
-
|
|
13878
|
+
let language = languages.find(language => language.extensions && language.extensions.some(extension => filename.endsWith(extension)) || language.filenames && language.filenames.find(name => name.toLowerCase() === filename));
|
|
13879
|
+
|
|
13880
|
+
if (!language && !filename.includes(".")) {
|
|
13881
|
+
const interpreter = getInterpreter(filepath);
|
|
13882
|
+
language = languages.find(language => language.interpreters && language.interpreters.includes(interpreter));
|
|
13883
|
+
}
|
|
13884
|
+
|
|
13888
13885
|
return language && language.parsers[0];
|
|
13889
13886
|
}
|
|
13890
13887
|
|
|
@@ -14984,7 +14981,11 @@
|
|
|
14984
14981
|
}
|
|
14985
14982
|
|
|
14986
14983
|
function hasNodeIgnoreComment(node) {
|
|
14987
|
-
return node && node.comments && node.comments.length > 0 && node.comments.some(comment => comment.
|
|
14984
|
+
return node && (node.comments && node.comments.length > 0 && node.comments.some(comment => isNodeIgnoreComment(comment) && !comment.unignore) || node.prettierIgnore);
|
|
14985
|
+
}
|
|
14986
|
+
|
|
14987
|
+
function isNodeIgnoreComment(comment) {
|
|
14988
|
+
return comment.value.trim() === "prettier-ignore";
|
|
14988
14989
|
}
|
|
14989
14990
|
|
|
14990
14991
|
function addCommentHelper(node, comment) {
|
|
@@ -15084,6 +15085,7 @@
|
|
|
15084
15085
|
printNumber,
|
|
15085
15086
|
hasIgnoreComment,
|
|
15086
15087
|
hasNodeIgnoreComment,
|
|
15088
|
+
isNodeIgnoreComment,
|
|
15087
15089
|
makeString,
|
|
15088
15090
|
addLeadingComment,
|
|
15089
15091
|
addDanglingComment,
|
|
@@ -15396,8 +15398,9 @@
|
|
|
15396
15398
|
const [ind, mode, doc] = cmds.pop();
|
|
15397
15399
|
|
|
15398
15400
|
if (typeof doc === "string") {
|
|
15399
|
-
|
|
15400
|
-
|
|
15401
|
+
const formatted = newLine !== "\n" && doc.includes("\n") ? doc.replace(/\n/g, newLine) : doc;
|
|
15402
|
+
out.push(formatted);
|
|
15403
|
+
pos += getStringWidth$1(formatted);
|
|
15401
15404
|
} else {
|
|
15402
15405
|
switch (doc.type) {
|
|
15403
15406
|
case "cursor":
|
|
@@ -17067,9 +17070,6 @@
|
|
|
17067
17070
|
convertEndOfLineToChars: convertEndOfLineToChars$2
|
|
17068
17071
|
} = endOfLine;
|
|
17069
17072
|
const {
|
|
17070
|
-
utils: {
|
|
17071
|
-
mapDoc: mapDoc$1
|
|
17072
|
-
},
|
|
17073
17073
|
printer: {
|
|
17074
17074
|
printDocToString: printDocToString$1
|
|
17075
17075
|
},
|
|
@@ -17091,7 +17091,7 @@
|
|
|
17091
17091
|
}
|
|
17092
17092
|
|
|
17093
17093
|
for (let i = 0; i < astComments.length; ++i) {
|
|
17094
|
-
if (astComments[i]
|
|
17094
|
+
if (util$1.isNodeIgnoreComment(astComments[i])) {
|
|
17095
17095
|
// If there's a prettier-ignore, we're not printing that sub-tree so we
|
|
17096
17096
|
// don't know if the comments was printed or not.
|
|
17097
17097
|
return;
|
|
@@ -17145,8 +17145,7 @@
|
|
|
17145
17145
|
|
|
17146
17146
|
const astComments = attachComments(text, ast, opts);
|
|
17147
17147
|
const doc = astToDoc(ast, opts, addAlignmentSize);
|
|
17148
|
-
const
|
|
17149
|
-
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);
|
|
17148
|
+
const result = printDocToString$1(doc, opts);
|
|
17150
17149
|
ensureAllCommentsPrinted(astComments); // Remove extra leading indentation as well as the added indentation after last newline
|
|
17151
17150
|
|
|
17152
17151
|
if (addAlignmentSize > 0) {
|
|
@@ -17552,7 +17551,7 @@
|
|
|
17552
17551
|
markAsRoot: markAsRoot$1
|
|
17553
17552
|
},
|
|
17554
17553
|
utils: {
|
|
17555
|
-
mapDoc: mapDoc$
|
|
17554
|
+
mapDoc: mapDoc$1
|
|
17556
17555
|
}
|
|
17557
17556
|
} = document;
|
|
17558
17557
|
|
|
@@ -17570,7 +17569,7 @@
|
|
|
17570
17569
|
return null;
|
|
17571
17570
|
|
|
17572
17571
|
function replaceNewlinesWithLiterallines(doc) {
|
|
17573
|
-
return mapDoc$
|
|
17572
|
+
return mapDoc$1(doc, currentDoc => typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$4(currentDoc.split(/(\n)/g).map((v, i) => i % 2 === 0 ? v : literalline$1)) : currentDoc);
|
|
17574
17573
|
}
|
|
17575
17574
|
}
|
|
17576
17575
|
|
|
@@ -18041,7 +18040,7 @@
|
|
|
18041
18040
|
|
|
18042
18041
|
function isSCSS(parser, text) {
|
|
18043
18042
|
const hasExplicitParserChoice = parser === "less" || parser === "scss";
|
|
18044
|
-
const IS_POSSIBLY_SCSS = /(\w\s
|
|
18043
|
+
const IS_POSSIBLY_SCSS = /(\w\s*:\s*[^}:]+|#){|@import[^\n]+(?:url|,)/;
|
|
18045
18044
|
return hasExplicitParserChoice ? parser === "scss" : IS_POSSIBLY_SCSS.test(text);
|
|
18046
18045
|
}
|
|
18047
18046
|
|
|
@@ -18485,7 +18484,7 @@
|
|
|
18485
18484
|
return concat$5(["@", // If a Less file ends up being parsed with the SCSS parser, Less
|
|
18486
18485
|
// variable declarations will be parsed as at-rules with names ending
|
|
18487
18486
|
// with a colon, so keep the original case then.
|
|
18488
|
-
isDetachedRulesetCallNode$1(node) || node.name.endsWith(":") ? node.name : maybeToLowerCase$1(node.name), node.params ? concat$5([isDetachedRulesetCallNode$1(node) ? "" : isTemplatePlaceholderNode$1(node)
|
|
18487
|
+
isDetachedRulesetCallNode$1(node) || node.name.endsWith(":") ? node.name : maybeToLowerCase$1(node.name), node.params ? concat$5([isDetachedRulesetCallNode$1(node) ? "" : isTemplatePlaceholderNode$1(node) ? node.raws.afterName === "" ? "" : node.name.endsWith(":") ? " " : /^\s*\n\s*\n/.test(node.raws.afterName) ? concat$5([hardline$4, hardline$4]) : /^\s*\n/.test(node.raws.afterName) ? hardline$4 : " " : " ", path.call(print, "params")]) : "", node.selector ? indent$2(concat$5([" ", path.call(print, "selector")])) : "", node.value ? group$1(concat$5([" ", path.call(print, "value"), isSCSSControlDirectiveNode$1(node) ? hasParensAroundNode$1(node) ? " " : line$2 : ""])) : node.name === "else" ? " " : "", node.nodes ? concat$5([isSCSSControlDirectiveNode$1(node) ? "" : " ", "{", indent$2(concat$5([node.nodes.length > 0 ? softline$1 : "", printNodeSequence(path, options, print)])), softline$1, "}"]) : isTemplatePlaceholderNodeWithoutSemiColon ? "" : ";"]);
|
|
18489
18488
|
}
|
|
18490
18489
|
// postcss-media-query-parser
|
|
18491
18490
|
|
|
@@ -18691,6 +18690,11 @@
|
|
|
18691
18690
|
|
|
18692
18691
|
if (!iNextNode) {
|
|
18693
18692
|
continue;
|
|
18693
|
+
} // styled.div` background: var(--${one}); `
|
|
18694
|
+
|
|
18695
|
+
|
|
18696
|
+
if (!iPrevNode && iNode.value === "--" && iNextNode.type === "value-atword") {
|
|
18697
|
+
continue;
|
|
18694
18698
|
} // Ignore spaces before/after string interpolation (i.e. `"#{my-fn("_")}"`)
|
|
18695
18699
|
|
|
18696
18700
|
|
|
@@ -21344,7 +21348,7 @@
|
|
|
21344
21348
|
}
|
|
21345
21349
|
|
|
21346
21350
|
function isScriptLikeTag(node) {
|
|
21347
|
-
return node.type === "element" && (node.fullName === "script" || node.fullName === "style" || node.fullName === "svg:style");
|
|
21351
|
+
return node.type === "element" && (node.fullName === "script" || node.fullName === "style" || node.fullName === "svg:style" || isUnknownNamespace(node) && (node.name === "script" || node.name === "style"));
|
|
21348
21352
|
}
|
|
21349
21353
|
|
|
21350
21354
|
function isFrontMatterNode(node) {
|
|
@@ -22345,7 +22349,7 @@
|
|
|
22345
22349
|
builders,
|
|
22346
22350
|
utils: {
|
|
22347
22351
|
stripTrailingHardline: stripTrailingHardline$1,
|
|
22348
|
-
mapDoc: mapDoc$
|
|
22352
|
+
mapDoc: mapDoc$2
|
|
22349
22353
|
}
|
|
22350
22354
|
} = document;
|
|
22351
22355
|
const {
|
|
@@ -22459,7 +22463,7 @@
|
|
|
22459
22463
|
}, opts)), options);
|
|
22460
22464
|
|
|
22461
22465
|
if (embeddedAttributeValueDoc) {
|
|
22462
|
-
return concat$a([node.rawName, '="', group$9(mapDoc$
|
|
22466
|
+
return concat$a([node.rawName, '="', group$9(mapDoc$2(embeddedAttributeValueDoc, doc => typeof doc === "string" ? doc.replace(/"/g, """) : doc)), '"']);
|
|
22463
22467
|
}
|
|
22464
22468
|
|
|
22465
22469
|
break;
|
|
@@ -22667,7 +22671,7 @@
|
|
|
22667
22671
|
}
|
|
22668
22672
|
|
|
22669
22673
|
function printBetweenLine(prevNode, nextNode) {
|
|
22670
|
-
return isTextLikeNode$1(prevNode) && isTextLikeNode$1(nextNode) ? prevNode.isTrailingSpaceSensitive ? prevNode.hasTrailingSpaces ? preferHardlineAsLeadingSpaces$1(nextNode) ? hardline$7 : line$6 : "" : preferHardlineAsLeadingSpaces$1(nextNode) ? hardline$7 : softline$4 : needsToBorrowNextOpeningTagStartMarker(prevNode) && (
|
|
22674
|
+
return isTextLikeNode$1(prevNode) && isTextLikeNode$1(nextNode) ? prevNode.isTrailingSpaceSensitive ? prevNode.hasTrailingSpaces ? preferHardlineAsLeadingSpaces$1(nextNode) ? hardline$7 : line$6 : "" : preferHardlineAsLeadingSpaces$1(nextNode) ? hardline$7 : softline$4 : needsToBorrowNextOpeningTagStartMarker(prevNode) && (hasPrettierIgnore$3(nextNode) ||
|
|
22671
22675
|
/**
|
|
22672
22676
|
* 123<a
|
|
22673
22677
|
* ~
|
|
@@ -23638,8 +23642,22 @@
|
|
|
23638
23642
|
|
|
23639
23643
|
function handleUnionTypeComments(precedingNode, enclosingNode, followingNode, comment) {
|
|
23640
23644
|
if (enclosingNode && (enclosingNode.type === "UnionTypeAnnotation" || enclosingNode.type === "TSUnionType")) {
|
|
23641
|
-
|
|
23642
|
-
|
|
23645
|
+
if (util$1.isNodeIgnoreComment(comment)) {
|
|
23646
|
+
followingNode.prettierIgnore = true;
|
|
23647
|
+
comment.unignore = true;
|
|
23648
|
+
}
|
|
23649
|
+
|
|
23650
|
+
if (precedingNode) {
|
|
23651
|
+
addTrailingComment$3(precedingNode, comment);
|
|
23652
|
+
return true;
|
|
23653
|
+
}
|
|
23654
|
+
|
|
23655
|
+
return false;
|
|
23656
|
+
}
|
|
23657
|
+
|
|
23658
|
+
if (followingNode && (followingNode.type === "UnionTypeAnnotation" || followingNode.type === "TSUnionType") && util$1.isNodeIgnoreComment(comment)) {
|
|
23659
|
+
followingNode.types[0].prettierIgnore = true;
|
|
23660
|
+
comment.unignore = true;
|
|
23643
23661
|
}
|
|
23644
23662
|
|
|
23645
23663
|
return false;
|
|
@@ -23825,7 +23843,7 @@
|
|
|
23825
23843
|
dedentToRoot: dedentToRoot$2
|
|
23826
23844
|
},
|
|
23827
23845
|
utils: {
|
|
23828
|
-
mapDoc: mapDoc$
|
|
23846
|
+
mapDoc: mapDoc$3,
|
|
23829
23847
|
stripTrailingHardline: stripTrailingHardline$2
|
|
23830
23848
|
}
|
|
23831
23849
|
} = document;
|
|
@@ -23848,7 +23866,7 @@
|
|
|
23848
23866
|
return idx === 0 ? currVal : prevVal + "@prettier-placeholder-" + placeholderID++ + "-id" + currVal;
|
|
23849
23867
|
}, "");
|
|
23850
23868
|
const doc = textToDoc(text, {
|
|
23851
|
-
parser: "
|
|
23869
|
+
parser: "scss"
|
|
23852
23870
|
});
|
|
23853
23871
|
return transformCssDoc(doc, path, print);
|
|
23854
23872
|
}
|
|
@@ -23974,7 +23992,7 @@
|
|
|
23974
23992
|
}
|
|
23975
23993
|
|
|
23976
23994
|
function escapeTemplateCharacters(doc, raw) {
|
|
23977
|
-
return mapDoc$
|
|
23995
|
+
return mapDoc$3(doc, currentDoc => {
|
|
23978
23996
|
if (!currentDoc.parts) {
|
|
23979
23997
|
return currentDoc;
|
|
23980
23998
|
}
|
|
@@ -24023,7 +24041,7 @@
|
|
|
24023
24041
|
|
|
24024
24042
|
const expressions = expressionDocs.slice();
|
|
24025
24043
|
let replaceCounter = 0;
|
|
24026
|
-
const newDoc = mapDoc$
|
|
24044
|
+
const newDoc = mapDoc$3(quasisDoc, doc => {
|
|
24027
24045
|
if (!doc || !doc.parts || !doc.parts.length) {
|
|
24028
24046
|
return doc;
|
|
24029
24047
|
}
|
|
@@ -24238,7 +24256,7 @@
|
|
|
24238
24256
|
|
|
24239
24257
|
const placeholderRegex = new RegExp(composePlaceholder("(\\d+)"), "g");
|
|
24240
24258
|
let topLevelCount = 0;
|
|
24241
|
-
const contentDoc = mapDoc$
|
|
24259
|
+
const contentDoc = mapDoc$3(stripTrailingHardline$2(textToDoc(text, {
|
|
24242
24260
|
parser,
|
|
24243
24261
|
|
|
24244
24262
|
__onHtmlRoot(root) {
|
|
@@ -24622,8 +24640,10 @@
|
|
|
24622
24640
|
return (node.type === "TypeAnnotation" || node.type === "TSTypeAnnotation") && node.typeAnnotation.type === "FunctionTypeAnnotation" && !node.static && !sameLocStart(node, node.typeAnnotation, options);
|
|
24623
24641
|
}
|
|
24624
24642
|
|
|
24643
|
+
const binaryishNodeTypes = new Set(["BinaryExpression", "LogicalExpression", "NGPipeExpression"]);
|
|
24644
|
+
|
|
24625
24645
|
function isBinaryish(node) {
|
|
24626
|
-
return
|
|
24646
|
+
return binaryishNodeTypes.has(node.type);
|
|
24627
24647
|
}
|
|
24628
24648
|
|
|
24629
24649
|
function isMemberish(node) {
|
|
@@ -25176,7 +25196,7 @@
|
|
|
25176
25196
|
}
|
|
25177
25197
|
|
|
25178
25198
|
if (node.type === "ArrayExpression") {
|
|
25179
|
-
return node.elements.every(isChildSimple);
|
|
25199
|
+
return node.elements.every(x => x == null || isChildSimple(x));
|
|
25180
25200
|
}
|
|
25181
25201
|
|
|
25182
25202
|
if (node.type === "CallExpression" || node.type === "OptionalCallExpression" || node.type === "NewExpression") {
|
|
@@ -25850,7 +25870,7 @@
|
|
|
25850
25870
|
}
|
|
25851
25871
|
|
|
25852
25872
|
function isStatement(node) {
|
|
25853
|
-
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 === "
|
|
25873
|
+
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";
|
|
25854
25874
|
}
|
|
25855
25875
|
|
|
25856
25876
|
function includesFunctionTypeInObjectType(node) {
|
|
@@ -26389,7 +26409,9 @@
|
|
|
26389
26409
|
/* sameIndent */
|
|
26390
26410
|
true)); // Only force a trailing newline if there were any contents.
|
|
26391
26411
|
|
|
26392
|
-
if (n.body.
|
|
26412
|
+
if (!n.body.every(({
|
|
26413
|
+
type
|
|
26414
|
+
}) => type === "EmptyStatement") || n.comments) {
|
|
26393
26415
|
parts.push(hardline$9);
|
|
26394
26416
|
}
|
|
26395
26417
|
|
|
@@ -26564,7 +26586,6 @@
|
|
|
26564
26586
|
|
|
26565
26587
|
case "SpreadElement":
|
|
26566
26588
|
case "SpreadElementPattern":
|
|
26567
|
-
case "RestProperty":
|
|
26568
26589
|
case "SpreadProperty":
|
|
26569
26590
|
case "SpreadPropertyPattern":
|
|
26570
26591
|
case "RestElement":
|
|
@@ -26931,11 +26952,23 @@
|
|
|
26931
26952
|
});
|
|
26932
26953
|
|
|
26933
26954
|
if (n.inexact) {
|
|
26934
|
-
|
|
26955
|
+
let printed;
|
|
26956
|
+
|
|
26957
|
+
if (hasDanglingComments$1(n)) {
|
|
26958
|
+
const hasLineComments = !n.comments.every(comments$1.isBlockComment);
|
|
26959
|
+
const printedDanglingComments = comments.printDanglingComments(path, options,
|
|
26960
|
+
/* sameIndent */
|
|
26961
|
+
true);
|
|
26962
|
+
printed = concat$d([printedDanglingComments, hasLineComments || hasNewline$5(options.originalText, options.locEnd(n.comments[n.comments.length - 1])) ? hardline$9 : line$9, "..."]);
|
|
26963
|
+
} else {
|
|
26964
|
+
printed = "...";
|
|
26965
|
+
}
|
|
26966
|
+
|
|
26967
|
+
props.push(concat$d(separatorParts.concat(printed)));
|
|
26935
26968
|
}
|
|
26936
26969
|
|
|
26937
26970
|
const lastElem = getLast$3(n[propertiesField]);
|
|
26938
|
-
const canHaveTrailingSeparator = !(lastElem && (lastElem.type === "
|
|
26971
|
+
const canHaveTrailingSeparator = !(n.inexact || lastElem && (lastElem.type === "RestElement" || hasNodeIgnoreComment$2(lastElem)));
|
|
26939
26972
|
let content;
|
|
26940
26973
|
|
|
26941
26974
|
if (props.length === 0) {
|
|
@@ -27174,7 +27207,7 @@
|
|
|
27174
27207
|
// semicolon, except when they in the () part of for loops.
|
|
27175
27208
|
|
|
27176
27209
|
const parentNode = path.getParentNode();
|
|
27177
|
-
const isParentForLoop = parentNode.type === "ForStatement" || parentNode.type === "ForInStatement" || parentNode.type === "ForOfStatement"
|
|
27210
|
+
const isParentForLoop = parentNode.type === "ForStatement" || parentNode.type === "ForInStatement" || parentNode.type === "ForOfStatement";
|
|
27178
27211
|
const hasValue = n.declarations.some(decl => decl.init);
|
|
27179
27212
|
let firstVariable;
|
|
27180
27213
|
|
|
@@ -27258,14 +27291,7 @@
|
|
|
27258
27291
|
return group$b(concat$d([n.each ? "for each (" : "for (", path.call(print, "left"), " in ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))]));
|
|
27259
27292
|
|
|
27260
27293
|
case "ForOfStatement":
|
|
27261
|
-
|
|
27262
|
-
{
|
|
27263
|
-
// Babel 7 removed ForAwaitStatement in favor of ForOfStatement
|
|
27264
|
-
// with `"await": true`:
|
|
27265
|
-
// https://github.com/estree/estree/pull/138
|
|
27266
|
-
const isAwait = n.type === "ForAwaitStatement" || n.await;
|
|
27267
|
-
return group$b(concat$d(["for", isAwait ? " await" : "", " (", path.call(print, "left"), " of ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))]));
|
|
27268
|
-
}
|
|
27294
|
+
return group$b(concat$d(["for", n.await ? " await" : "", " (", path.call(print, "left"), " of ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))]));
|
|
27269
27295
|
|
|
27270
27296
|
case "DoWhileStatement":
|
|
27271
27297
|
{
|
|
@@ -27415,8 +27441,8 @@
|
|
|
27415
27441
|
case "JSXExpressionContainer":
|
|
27416
27442
|
{
|
|
27417
27443
|
const parent = path.getParentNode(0);
|
|
27418
|
-
const
|
|
27419
|
-
const shouldInline =
|
|
27444
|
+
const hasComments = n.expression.comments && n.expression.comments.length > 0;
|
|
27445
|
+
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)));
|
|
27420
27446
|
|
|
27421
27447
|
if (shouldInline) {
|
|
27422
27448
|
return group$b(concat$d(["{", path.call(print, "expression"), lineSuffixBoundary$1, "}"]));
|
|
@@ -27622,7 +27648,7 @@
|
|
|
27622
27648
|
if (!isSimple) {
|
|
27623
27649
|
// Breaks at the template element boundaries (${ and }) are preferred to breaking
|
|
27624
27650
|
// in the middle of a MemberExpression
|
|
27625
|
-
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 === "
|
|
27651
|
+
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])) {
|
|
27626
27652
|
printed = concat$d([indent$7(concat$d([softline$6, printed])), softline$6]);
|
|
27627
27653
|
}
|
|
27628
27654
|
}
|
|
@@ -28255,8 +28281,13 @@
|
|
|
28255
28281
|
|
|
28256
28282
|
case "TSIndexSignature":
|
|
28257
28283
|
{
|
|
28258
|
-
const parent = path.getParentNode();
|
|
28259
|
-
|
|
28284
|
+
const parent = path.getParentNode(); // The typescript parser accepts multiple parameters here. If you're
|
|
28285
|
+
// using them, it makes sense to have a trailing comma. But if you
|
|
28286
|
+
// aren't, this is more like a computed property name than an array.
|
|
28287
|
+
// So we leave off the trailing comma when there's just one parameter.
|
|
28288
|
+
|
|
28289
|
+
const trailingComma = n.parameters.length > 1 ? ifBreak$6(shouldPrintComma$1(options) ? "," : "") : "";
|
|
28290
|
+
const parametersGroup = group$b(concat$d([indent$7(concat$d([softline$6, join$9(concat$d([", ", softline$6]), path.map(print, "parameters"))])), trailingComma, softline$6]));
|
|
28260
28291
|
return concat$d([n.export ? "export " : "", n.accessibility ? concat$d([n.accessibility, " "]) : "", n.static ? "static " : "", n.readonly ? "readonly " : "", "[", n.parameters ? parametersGroup : "", n.typeAnnotation ? "]: " : "]", n.typeAnnotation ? path.call(print, "typeAnnotation") : "", parent.type === "ClassBody" ? semi : ""]);
|
|
28261
28292
|
}
|
|
28262
28293
|
|
|
@@ -28463,7 +28494,7 @@
|
|
|
28463
28494
|
return "";
|
|
28464
28495
|
|
|
28465
28496
|
case "NGQuotedExpression":
|
|
28466
|
-
return concat$d([n.prefix, ":", n.value]);
|
|
28497
|
+
return concat$d([n.prefix, ": ", n.value.trim()]);
|
|
28467
28498
|
|
|
28468
28499
|
case "NGMicrosyntax":
|
|
28469
28500
|
return concat$d(path.map((childPath, index) => concat$d([index === 0 ? "" : isNgForOf$1(childPath.getValue(), index, n) ? " " : concat$d([";", line$9]), print(childPath)]), "body"));
|
|
@@ -30020,7 +30051,7 @@
|
|
|
30020
30051
|
if (node.argument) {
|
|
30021
30052
|
if (returnArgumentHasLeadingComment$1(options, node.argument)) {
|
|
30022
30053
|
parts.push(concat$d([" (", indent$7(concat$d([hardline$9, path.call(print, "argument")])), hardline$9, ")"]));
|
|
30023
|
-
} else if (node.argument
|
|
30054
|
+
} else if (isBinaryish$1(node.argument) || node.argument.type === "SequenceExpression") {
|
|
30024
30055
|
parts.push(group$b(concat$d([ifBreak$6(" (", " "), indent$7(concat$d([softline$6, path.call(print, "argument")])), softline$6, ifBreak$6(")")])));
|
|
30025
30056
|
} else {
|
|
30026
30057
|
parts.push(" ", path.call(print, "argument"));
|
|
@@ -30052,7 +30083,7 @@
|
|
|
30052
30083
|
) {
|
|
30053
30084
|
const node = path.getValue();
|
|
30054
30085
|
const parent = path.getParentNode();
|
|
30055
|
-
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$4(path);
|
|
30086
|
+
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$4(path) || parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType");
|
|
30056
30087
|
}
|
|
30057
30088
|
|
|
30058
30089
|
function canAttachComment$1(node) {
|
|
@@ -30575,6 +30606,7 @@
|
|
|
30575
30606
|
"jsonc"
|
|
30576
30607
|
];
|
|
30577
30608
|
var extensions$d = [
|
|
30609
|
+
".jsonc",
|
|
30578
30610
|
".sublime-build",
|
|
30579
30611
|
".sublime-commands",
|
|
30580
30612
|
".sublime-completions",
|
|
@@ -30928,7 +30960,7 @@
|
|
|
30928
30960
|
markAsRoot: markAsRoot$3
|
|
30929
30961
|
},
|
|
30930
30962
|
utils: {
|
|
30931
|
-
mapDoc: mapDoc$
|
|
30963
|
+
mapDoc: mapDoc$4
|
|
30932
30964
|
}
|
|
30933
30965
|
} = document;
|
|
30934
30966
|
const {
|
|
@@ -30990,7 +31022,7 @@
|
|
|
30990
31022
|
}
|
|
30991
31023
|
|
|
30992
31024
|
function replaceNewlinesWithLiterallines(doc) {
|
|
30993
|
-
return mapDoc$
|
|
31025
|
+
return mapDoc$4(doc, currentDoc => typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$f(currentDoc.split(/(\n)/g).map((v, i) => i % 2 === 0 ? v : literalline$5)) : currentDoc);
|
|
30994
31026
|
}
|
|
30995
31027
|
}
|
|
30996
31028
|
|
|
@@ -31295,7 +31327,7 @@
|
|
|
31295
31327
|
group: group$f
|
|
31296
31328
|
},
|
|
31297
31329
|
utils: {
|
|
31298
|
-
mapDoc: mapDoc$
|
|
31330
|
+
mapDoc: mapDoc$5
|
|
31299
31331
|
},
|
|
31300
31332
|
printer: {
|
|
31301
31333
|
printDocToString: printDocToString$3
|
|
@@ -31612,19 +31644,6 @@
|
|
|
31612
31644
|
}
|
|
31613
31645
|
|
|
31614
31646
|
function printLine(path, value, options) {
|
|
31615
|
-
const greatGrandParentNode = path.getParentNode(2);
|
|
31616
|
-
|
|
31617
|
-
if (greatGrandParentNode && greatGrandParentNode.type === "listItem") {
|
|
31618
|
-
const parentNode = path.getParentNode();
|
|
31619
|
-
const grandParentNode = path.getParentNode(1);
|
|
31620
|
-
const index = grandParentNode.children.indexOf(parentNode);
|
|
31621
|
-
const prevGrandParentNode = grandParentNode.children[index - 1];
|
|
31622
|
-
|
|
31623
|
-
if (prevGrandParentNode && prevGrandParentNode.type === "break") {
|
|
31624
|
-
return "";
|
|
31625
|
-
}
|
|
31626
|
-
}
|
|
31627
|
-
|
|
31628
31647
|
if (options.proseWrap === "preserve" && value === "\n") {
|
|
31629
31648
|
return hardline$c;
|
|
31630
31649
|
}
|
|
@@ -31876,7 +31895,7 @@
|
|
|
31876
31895
|
}
|
|
31877
31896
|
|
|
31878
31897
|
function normalizeDoc(doc) {
|
|
31879
|
-
return mapDoc$
|
|
31898
|
+
return mapDoc$5(doc, currentDoc => {
|
|
31880
31899
|
if (!currentDoc.parts) {
|
|
31881
31900
|
return currentDoc;
|
|
31882
31901
|
}
|
|
@@ -32795,7 +32814,8 @@
|
|
|
32795
32814
|
".clang-format",
|
|
32796
32815
|
".clang-tidy",
|
|
32797
32816
|
".gemrc",
|
|
32798
|
-
"glide.lock"
|
|
32817
|
+
"glide.lock",
|
|
32818
|
+
"yarn.lock"
|
|
32799
32819
|
];
|
|
32800
32820
|
var aceMode$g = "yaml";
|
|
32801
32821
|
var codemirrorMode$c = "yaml";
|
|
@@ -32831,10 +32851,12 @@
|
|
|
32831
32851
|
|
|
32832
32852
|
var require$$0$8 = getCjsExportFromNamespace(YAML$1);
|
|
32833
32853
|
|
|
32834
|
-
const languages$6 = [createLanguage(require$$0$8,
|
|
32854
|
+
const languages$6 = [createLanguage(require$$0$8, data => ({
|
|
32835
32855
|
since: "1.14.0",
|
|
32836
32856
|
parsers: ["yaml"],
|
|
32837
|
-
vscodeLanguageIds: ["yaml"]
|
|
32857
|
+
vscodeLanguageIds: ["yaml"],
|
|
32858
|
+
// yarn.lock is not YAML: https://github.com/yarnpkg/yarn/issues/5629
|
|
32859
|
+
filenames: data.filenames.filter(filename => filename !== "yarn.lock")
|
|
32838
32860
|
}))];
|
|
32839
32861
|
var languageYaml = {
|
|
32840
32862
|
languages: languages$6,
|