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/index.js CHANGED
@@ -12,7 +12,7 @@ var stream$5 = _interopDefault(require('stream'));
12
12
  var events = _interopDefault(require('events'));
13
13
 
14
14
  var name = "prettier";
15
- var version = "2.0.0";
15
+ var version = "2.0.4";
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.2",
30
- "@glimmer/syntax": "0.48.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.24.0",
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: "3.0.0",
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.121.0",
50
+ "flow-parser": "0.122.0",
51
51
  "get-stream": "5.1.0",
52
52
  globby: "11.0.0",
53
- graphql: "14.6.0",
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.1.0",
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.8.0",
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",
@@ -78,40 +79,39 @@ var dependencies = {
78
79
  "string-width": "4.2.0",
79
80
  typescript: "3.8.3",
80
81
  "unicode-regex": "3.0.0",
81
- unified: "8.4.2",
82
+ unified: "9.0.0",
82
83
  vnopts: "1.0.2",
83
84
  "yaml-unist-parser": "1.1.1"
84
85
  };
85
86
  var devDependencies = {
86
- "@babel/core": "7.8.7",
87
- "@babel/preset-env": "7.8.7",
87
+ "@babel/core": "7.9.0",
88
+ "@babel/preset-env": "7.9.0",
88
89
  "@rollup/plugin-alias": "3.0.1",
89
90
  "@rollup/plugin-commonjs": "11.0.2",
90
91
  "@rollup/plugin-json": "4.0.2",
91
92
  "@rollup/plugin-node-resolve": "7.1.1",
92
93
  "@rollup/plugin-replace": "2.3.1",
93
- "babel-loader": "8.0.6",
94
+ "babel-loader": "8.1.0",
94
95
  benchmark: "2.1.4",
95
96
  "builtin-modules": "3.1.0",
96
97
  codecov: "3.6.5",
97
98
  "cross-env": "7.0.2",
98
99
  cspell: "4.0.55",
99
100
  eslint: "6.8.0",
100
- "eslint-config-prettier": "6.10.0",
101
+ "eslint-config-prettier": "6.10.1",
101
102
  "eslint-formatter-friendly": "7.0.0",
102
- "eslint-plugin-import": "2.20.1",
103
+ "eslint-plugin-import": "2.20.2",
103
104
  "eslint-plugin-prettier": "3.1.2",
104
105
  "eslint-plugin-react": "7.19.0",
105
- "eslint-plugin-unicorn": "17.2.0",
106
+ "eslint-plugin-unicorn": "18.0.1",
106
107
  execa: "4.0.0",
107
- jest: "25.1.0",
108
- "jest-junit": "10.0.0",
108
+ jest: "25.2.7",
109
109
  "jest-snapshot-serializer-ansi": "1.0.0",
110
110
  "jest-snapshot-serializer-raw": "1.1.0",
111
- "jest-watch-typeahead": "0.4.2",
112
- prettier: "1.19.1",
111
+ "jest-watch-typeahead": "0.5.0",
112
+ prettier: "2.0.3",
113
113
  rimraf: "3.0.2",
114
- rollup: "2.1.0",
114
+ rollup: "2.3.2",
115
115
  "rollup-plugin-babel": "4.4.0",
116
116
  "rollup-plugin-node-globals": "1.4.0",
117
117
  "rollup-plugin-terser": "5.3.0",
@@ -121,7 +121,7 @@ var devDependencies = {
121
121
  "synchronous-promise": "2.0.10",
122
122
  tempy: "0.5.0",
123
123
  "terser-webpack-plugin": "2.3.5",
124
- webpack: "4.42.0"
124
+ webpack: "4.42.1"
125
125
  };
126
126
  var scripts = {
127
127
  prepublishOnly: "echo \"Error: must publish from dist/\" && exit 1",
@@ -137,7 +137,7 @@ var scripts = {
137
137
  "lint:changelog": "node ./scripts/lint-changelog.js",
138
138
  "lint:prettier": "prettier \"**/*.{md,json,yml,html,css}\" --check",
139
139
  "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",
140
+ "lint:spellcheck": "cspell {bin,scripts,src,website}/**/*.js {docs,website/blog,changelog_unreleased}/**/*.md",
141
141
  "lint:deps": "node ./scripts/check-deps.js",
142
142
  build: "node --max-old-space-size=3072 ./scripts/build/build.js",
143
143
  "build-docs": "node ./scripts/build-docs.js"
@@ -7826,7 +7826,7 @@ var util = {
7826
7826
  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
7827
  const STYLE_REGEX$1 = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
7828
7828
  const STRING_REGEX$1 = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
7829
- const ESCAPE_REGEX$1 = /\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi;
7829
+ const ESCAPE_REGEX$1 = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
7830
7830
  const ESCAPES$1 = new Map([['n', '\n'], ['r', '\r'], ['t', '\t'], ['b', '\b'], ['f', '\f'], ['v', '\v'], ['0', '\0'], ['\\', '\\'], ['e', '\u001B'], ['a', '\u0007']]);
7831
7831
 
7832
7832
  function unescape$1(c) {
@@ -7940,8 +7940,8 @@ var templates$1 = (chalk, temporary) => {
7940
7940
  chunks.push(chunk.join(''));
7941
7941
 
7942
7942
  if (styles.length > 0) {
7943
- const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
7944
- throw new Error(errMsg);
7943
+ const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
7944
+ throw new Error(errMessage);
7945
7945
  }
7946
7946
 
7947
7947
  return chunks.join('');
@@ -7960,7 +7960,7 @@ const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];
7960
7960
  const styles = Object.create(null);
7961
7961
 
7962
7962
  const applyOptions = (object, options = {}) => {
7963
- if (options.level > 3 || options.level < 0) {
7963
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
7964
7964
  throw new Error('The `level` option should be an integer from 0 to 3');
7965
7965
  } // Detect level if not set manually
7966
7966
 
@@ -7971,6 +7971,7 @@ const applyOptions = (object, options = {}) => {
7971
7971
 
7972
7972
  class ChalkClass {
7973
7973
  constructor(options) {
7974
+ // eslint-disable-next-line no-constructor-return
7974
7975
  return chalkFactory(options);
7975
7976
  }
7976
7977
 
@@ -8094,12 +8095,11 @@ const createBuilder = (self, _styler, _isEmpty) => {
8094
8095
  // Single argument is hot path, implicit coercion is faster than anything
8095
8096
  // eslint-disable-next-line no-implicit-coercion
8096
8097
  return applyStyle(builder, arguments_.length === 1 ? '' + arguments_[0] : arguments_.join(' '));
8097
- }; // `__proto__` is used because we must return a function, but there is
8098
+ }; // We alter the prototype because we must return a function, but there is
8098
8099
  // no way to create a function with a different prototype
8099
8100
 
8100
8101
 
8101
- builder.__proto__ = proto; // eslint-disable-line no-proto
8102
-
8102
+ Object.setPrototypeOf(builder, proto);
8103
8103
  builder._generator = self;
8104
8104
  builder._styler = _styler;
8105
8105
  builder._isEmpty = _isEmpty;
@@ -8177,18 +8177,7 @@ chalk$1.stderr = Chalk({
8177
8177
  level: stderrColor ? stderrColor.level : 0
8178
8178
  }); // eslint-disable-line new-cap
8179
8179
 
8180
- chalk$1.stderr.supportsColor = stderrColor; // For TypeScript
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
- };
8180
+ chalk$1.stderr.supportsColor = stderrColor;
8192
8181
  var source = chalk$1;
8193
8182
 
8194
8183
  const cliDescriptor = {
@@ -11500,6 +11489,7 @@ function getInterpreter(filepath) {
11500
11489
  try {
11501
11490
  fd = fs$2.openSync(filepath, "r");
11502
11491
  } catch (err) {
11492
+ // istanbul ignore next
11503
11493
  return "";
11504
11494
  }
11505
11495
 
@@ -11536,13 +11526,20 @@ function getInterpreter(filepath) {
11536
11526
  }
11537
11527
 
11538
11528
  function inferParser(filepath, plugins) {
11539
- const filename = path$1.basename(filepath).toLowerCase(); // If the file has no extension, we can try to infer the language from the
11529
+ const filename = path$1.basename(filepath).toLowerCase();
11530
+ const languages = getSupportInfo$1({
11531
+ plugins
11532
+ }).languages.filter(language => language.since !== null); // If the file has no extension, we can try to infer the language from the
11540
11533
  // interpreter in the shebang line, if any; but since this requires FS access,
11541
11534
  // do it last.
11542
11535
 
11543
- const language = getSupportInfo$1({
11544
- plugins
11545
- }).languages.find(language => language.since !== null && (language.extensions && language.extensions.some(extension => filename.endsWith(extension)) || language.filenames && language.filenames.find(name => name.toLowerCase() === filename) || !filename.includes(".") && language.interpreters && language.interpreters.includes(getInterpreter(filepath))));
11536
+ let language = languages.find(language => language.extensions && language.extensions.some(extension => filename.endsWith(extension)) || language.filenames && language.filenames.find(name => name.toLowerCase() === filename));
11537
+
11538
+ if (!language && !filename.includes(".")) {
11539
+ const interpreter = getInterpreter(filepath);
11540
+ language = languages.find(language => language.interpreters && language.interpreters.includes(interpreter));
11541
+ }
11542
+
11546
11543
  return language && language.parsers[0];
11547
11544
  }
11548
11545
 
@@ -12636,7 +12633,11 @@ function hasIgnoreComment(path) {
12636
12633
  }
12637
12634
 
12638
12635
  function hasNodeIgnoreComment(node) {
12639
- return node && node.comments && node.comments.length > 0 && node.comments.some(comment => comment.value.trim() === "prettier-ignore");
12636
+ return node && (node.comments && node.comments.length > 0 && node.comments.some(comment => isNodeIgnoreComment(comment) && !comment.unignore) || node.prettierIgnore);
12637
+ }
12638
+
12639
+ function isNodeIgnoreComment(comment) {
12640
+ return comment.value.trim() === "prettier-ignore";
12640
12641
  }
12641
12642
 
12642
12643
  function addCommentHelper(node, comment) {
@@ -12736,6 +12737,7 @@ var util$1 = {
12736
12737
  printNumber,
12737
12738
  hasIgnoreComment,
12738
12739
  hasNodeIgnoreComment,
12740
+ isNodeIgnoreComment,
12739
12741
  makeString,
12740
12742
  addLeadingComment,
12741
12743
  addDanglingComment,
@@ -13048,8 +13050,9 @@ function printDocToString(doc, options) {
13048
13050
  const [ind, mode, doc] = cmds.pop();
13049
13051
 
13050
13052
  if (typeof doc === "string") {
13051
- out.push(doc);
13052
- pos += getStringWidth$1(doc);
13053
+ const formatted = newLine !== "\n" && doc.includes("\n") ? doc.replace(/\n/g, newLine) : doc;
13054
+ out.push(formatted);
13055
+ pos += getStringWidth$1(formatted);
13053
13056
  } else {
13054
13057
  switch (doc.type) {
13055
13058
  case "cursor":
@@ -14717,9 +14720,6 @@ const {
14717
14720
  convertEndOfLineToChars: convertEndOfLineToChars$2
14718
14721
  } = endOfLine;
14719
14722
  const {
14720
- utils: {
14721
- mapDoc: mapDoc$1
14722
- },
14723
14723
  printer: {
14724
14724
  printDocToString: printDocToString$1
14725
14725
  },
@@ -14741,7 +14741,7 @@ function ensureAllCommentsPrinted(astComments) {
14741
14741
  }
14742
14742
 
14743
14743
  for (let i = 0; i < astComments.length; ++i) {
14744
- if (astComments[i].value.trim() === "prettier-ignore") {
14744
+ if (util$1.isNodeIgnoreComment(astComments[i])) {
14745
14745
  // If there's a prettier-ignore, we're not printing that sub-tree so we
14746
14746
  // don't know if the comments was printed or not.
14747
14747
  return;
@@ -14795,8 +14795,7 @@ function coreFormat(text, opts, addAlignmentSize) {
14795
14795
 
14796
14796
  const astComments = attachComments(text, ast, opts);
14797
14797
  const doc = astToDoc(ast, opts, addAlignmentSize);
14798
- const eol = convertEndOfLineToChars$2(opts.endOfLine);
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);
14798
+ const result = printDocToString$1(doc, opts);
14800
14799
  ensureAllCommentsPrinted(astComments); // Remove extra leading indentation as well as the added indentation after last newline
14801
14800
 
14802
14801
  if (addAlignmentSize > 0) {
@@ -23257,6 +23256,19 @@ var loadToml = function (filePath, content) {
23257
23256
  }
23258
23257
  };
23259
23258
 
23259
+ let {
23260
+ resolve
23261
+ } = eval("require"); // In the VS Code extension `require` is overridden and `require.resolve` doesn't support the 2nd argument.
23262
+
23263
+ if (resolve.length === 1) {
23264
+ const Module = require("module");
23265
+
23266
+ const createRequire = Module.createRequire || Module.createRequireFromPath;
23267
+ resolve = createRequire(__dirname).resolve;
23268
+ }
23269
+
23270
+ var resolve_1 = resolve;
23271
+
23260
23272
  const getExplorerMemoized = mem_1(opts => {
23261
23273
  const cosmiconfig = thirdParty["cosmiconfig" + (opts.sync ? "Sync" : "")];
23262
23274
  const explorer = cosmiconfig("prettier", {
@@ -23267,10 +23279,9 @@ const getExplorerMemoized = mem_1(opts => {
23267
23279
  const dir = path$1.dirname(result.filepath);
23268
23280
 
23269
23281
  try {
23270
- const modulePath = require.resolve(result.config, {
23282
+ const modulePath = resolve_1(result.config, {
23271
23283
  paths: [dir]
23272
23284
  });
23273
-
23274
23285
  result.config = require(modulePath);
23275
23286
  } catch (error) {
23276
23287
  // Original message contains `__filename`, can't pass tests
@@ -35336,8 +35347,22 @@ function handleCallExpressionComments(precedingNode, enclosingNode, comment) {
35336
35347
 
35337
35348
  function handleUnionTypeComments(precedingNode, enclosingNode, followingNode, comment) {
35338
35349
  if (enclosingNode && (enclosingNode.type === "UnionTypeAnnotation" || enclosingNode.type === "TSUnionType")) {
35339
- addTrailingComment$3(precedingNode, comment);
35340
- return true;
35350
+ if (util$1.isNodeIgnoreComment(comment)) {
35351
+ followingNode.prettierIgnore = true;
35352
+ comment.unignore = true;
35353
+ }
35354
+
35355
+ if (precedingNode) {
35356
+ addTrailingComment$3(precedingNode, comment);
35357
+ return true;
35358
+ }
35359
+
35360
+ return false;
35361
+ }
35362
+
35363
+ if (followingNode && (followingNode.type === "UnionTypeAnnotation" || followingNode.type === "TSUnionType") && util$1.isNodeIgnoreComment(comment)) {
35364
+ followingNode.types[0].prettierIgnore = true;
35365
+ comment.unignore = true;
35341
35366
  }
35342
35367
 
35343
35368
  return false;
@@ -35523,7 +35548,7 @@ const {
35523
35548
  dedentToRoot: dedentToRoot$1
35524
35549
  },
35525
35550
  utils: {
35526
- mapDoc: mapDoc$2,
35551
+ mapDoc: mapDoc$1,
35527
35552
  stripTrailingHardline: stripTrailingHardline$1
35528
35553
  }
35529
35554
  } = document;
@@ -35546,7 +35571,7 @@ function embed(path, print, textToDoc, options) {
35546
35571
  return idx === 0 ? currVal : prevVal + "@prettier-placeholder-" + placeholderID++ + "-id" + currVal;
35547
35572
  }, "");
35548
35573
  const doc = textToDoc(text, {
35549
- parser: "css"
35574
+ parser: "scss"
35550
35575
  });
35551
35576
  return transformCssDoc(doc, path, print);
35552
35577
  }
@@ -35672,7 +35697,7 @@ function uncook(cookedValue) {
35672
35697
  }
35673
35698
 
35674
35699
  function escapeTemplateCharacters(doc, raw) {
35675
- return mapDoc$2(doc, currentDoc => {
35700
+ return mapDoc$1(doc, currentDoc => {
35676
35701
  if (!currentDoc.parts) {
35677
35702
  return currentDoc;
35678
35703
  }
@@ -35721,7 +35746,7 @@ function replacePlaceholders(quasisDoc, expressionDocs) {
35721
35746
 
35722
35747
  const expressions = expressionDocs.slice();
35723
35748
  let replaceCounter = 0;
35724
- const newDoc = mapDoc$2(quasisDoc, doc => {
35749
+ const newDoc = mapDoc$1(quasisDoc, doc => {
35725
35750
  if (!doc || !doc.parts || !doc.parts.length) {
35726
35751
  return doc;
35727
35752
  }
@@ -35936,7 +35961,7 @@ function printHtmlTemplateLiteral(path, print, textToDoc, parser, options) {
35936
35961
 
35937
35962
  const placeholderRegex = new RegExp(composePlaceholder("(\\d+)"), "g");
35938
35963
  let topLevelCount = 0;
35939
- const contentDoc = mapDoc$2(stripTrailingHardline$1(textToDoc(text, {
35964
+ const contentDoc = mapDoc$1(stripTrailingHardline$1(textToDoc(text, {
35940
35965
  parser,
35941
35966
 
35942
35967
  __onHtmlRoot(root) {
@@ -36506,8 +36531,10 @@ function isTypeAnnotationAFunction(node, options) {
36506
36531
  return (node.type === "TypeAnnotation" || node.type === "TSTypeAnnotation") && node.typeAnnotation.type === "FunctionTypeAnnotation" && !node.static && !sameLocStart(node, node.typeAnnotation, options);
36507
36532
  }
36508
36533
 
36534
+ const binaryishNodeTypes = new Set(["BinaryExpression", "LogicalExpression", "NGPipeExpression"]);
36535
+
36509
36536
  function isBinaryish(node) {
36510
- return node.type === "BinaryExpression" || node.type === "LogicalExpression" || node.type === "NGPipeExpression";
36537
+ return binaryishNodeTypes.has(node.type);
36511
36538
  }
36512
36539
 
36513
36540
  function isMemberish(node) {
@@ -37060,7 +37087,7 @@ function isSimpleCallArgument(node, depth) {
37060
37087
  }
37061
37088
 
37062
37089
  if (node.type === "ArrayExpression") {
37063
- return node.elements.every(isChildSimple);
37090
+ return node.elements.every(x => x == null || isChildSimple(x));
37064
37091
  }
37065
37092
 
37066
37093
  if (node.type === "CallExpression" || node.type === "OptionalCallExpression" || node.type === "NewExpression") {
@@ -37734,7 +37761,7 @@ function needsParens(path, options) {
37734
37761
  }
37735
37762
 
37736
37763
  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 === "ForAwaitStatement" || 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";
37764
+ 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
37765
  }
37739
37766
 
37740
37767
  function includesFunctionTypeInObjectType(node) {
@@ -38273,7 +38300,9 @@ function printPathNoParens(path, options, print, args) {
38273
38300
  /* sameIndent */
38274
38301
  true)); // Only force a trailing newline if there were any contents.
38275
38302
 
38276
- if (n.body.length || n.comments) {
38303
+ if (!n.body.every(({
38304
+ type
38305
+ }) => type === "EmptyStatement") || n.comments) {
38277
38306
  parts.push(hardline$4);
38278
38307
  }
38279
38308
 
@@ -38448,7 +38477,6 @@ function printPathNoParens(path, options, print, args) {
38448
38477
 
38449
38478
  case "SpreadElement":
38450
38479
  case "SpreadElementPattern":
38451
- case "RestProperty":
38452
38480
  case "SpreadProperty":
38453
38481
  case "SpreadPropertyPattern":
38454
38482
  case "RestElement":
@@ -38815,11 +38843,23 @@ function printPathNoParens(path, options, print, args) {
38815
38843
  });
38816
38844
 
38817
38845
  if (n.inexact) {
38818
- props.push(concat$6(separatorParts.concat(group$2("..."))));
38846
+ let printed;
38847
+
38848
+ if (hasDanglingComments$1(n)) {
38849
+ const hasLineComments = !n.comments.every(comments$1.isBlockComment);
38850
+ const printedDanglingComments = comments.printDanglingComments(path, options,
38851
+ /* sameIndent */
38852
+ true);
38853
+ printed = concat$6([printedDanglingComments, hasLineComments || hasNewline$4(options.originalText, options.locEnd(n.comments[n.comments.length - 1])) ? hardline$4 : line$4, "..."]);
38854
+ } else {
38855
+ printed = "...";
38856
+ }
38857
+
38858
+ props.push(concat$6(separatorParts.concat(printed)));
38819
38859
  }
38820
38860
 
38821
38861
  const lastElem = getLast$2(n[propertiesField]);
38822
- const canHaveTrailingSeparator = !(lastElem && (lastElem.type === "RestProperty" || lastElem.type === "RestElement" || hasNodeIgnoreComment$2(lastElem) || n.inexact));
38862
+ const canHaveTrailingSeparator = !(n.inexact || lastElem && (lastElem.type === "RestElement" || hasNodeIgnoreComment$2(lastElem)));
38823
38863
  let content;
38824
38864
 
38825
38865
  if (props.length === 0) {
@@ -39058,7 +39098,7 @@ function printPathNoParens(path, options, print, args) {
39058
39098
  // semicolon, except when they in the () part of for loops.
39059
39099
 
39060
39100
  const parentNode = path.getParentNode();
39061
- const isParentForLoop = parentNode.type === "ForStatement" || parentNode.type === "ForInStatement" || parentNode.type === "ForOfStatement" || parentNode.type === "ForAwaitStatement";
39101
+ const isParentForLoop = parentNode.type === "ForStatement" || parentNode.type === "ForInStatement" || parentNode.type === "ForOfStatement";
39062
39102
  const hasValue = n.declarations.some(decl => decl.init);
39063
39103
  let firstVariable;
39064
39104
 
@@ -39142,14 +39182,7 @@ function printPathNoParens(path, options, print, args) {
39142
39182
  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
39183
 
39144
39184
  case "ForOfStatement":
39145
- case "ForAwaitStatement":
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
- }
39185
+ 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
39186
 
39154
39187
  case "DoWhileStatement":
39155
39188
  {
@@ -39299,8 +39332,8 @@ function printPathNoParens(path, options, print, args) {
39299
39332
  case "JSXExpressionContainer":
39300
39333
  {
39301
39334
  const parent = path.getParentNode(0);
39302
- const preventInline = parent.type === "JSXAttribute" && n.expression.comments && n.expression.comments.length > 0;
39303
- const shouldInline = !preventInline && (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 === "JSXEmptyExpression" || n.expression.type === "TemplateLiteral" || n.expression.type === "TaggedTemplateExpression" || n.expression.type === "DoExpression" || isJSXNode$1(parent) && (n.expression.type === "ConditionalExpression" || isBinaryish$1(n.expression)));
39335
+ const hasComments = n.expression.comments && n.expression.comments.length > 0;
39336
+ 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
39337
 
39305
39338
  if (shouldInline) {
39306
39339
  return group$2(concat$6(["{", path.call(print, "expression"), lineSuffixBoundary$1, "}"]));
@@ -39506,7 +39539,7 @@ function printPathNoParens(path, options, print, args) {
39506
39539
  if (!isSimple) {
39507
39540
  // Breaks at the template element boundaries (${ and }) are preferred to breaking
39508
39541
  // 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 === "LogicalExpression" || n.expressions[i].type === "BinaryExpression" || n.expressions[i].type === "SequenceExpression" || n.expressions[i].type === "TSAsExpression") {
39542
+ 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
39543
  printed = concat$6([indent$3(concat$6([softline$2, printed])), softline$2]);
39511
39544
  }
39512
39545
  }
@@ -40139,8 +40172,13 @@ function printPathNoParens(path, options, print, args) {
40139
40172
 
40140
40173
  case "TSIndexSignature":
40141
40174
  {
40142
- const parent = path.getParentNode();
40143
- const parametersGroup = group$2(concat$6([indent$3(concat$6([softline$2, join$4(concat$6([", ", softline$2]), path.map(print, "parameters"))])), ifBreak$1(shouldPrintComma(options) ? "," : ""), softline$2]));
40175
+ const parent = path.getParentNode(); // The typescript parser accepts multiple parameters here. If you're
40176
+ // using them, it makes sense to have a trailing comma. But if you
40177
+ // aren't, this is more like a computed property name than an array.
40178
+ // So we leave off the trailing comma when there's just one parameter.
40179
+
40180
+ const trailingComma = n.parameters.length > 1 ? ifBreak$1(shouldPrintComma(options) ? "," : "") : "";
40181
+ 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
40182
  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
40183
  }
40146
40184
 
@@ -40347,7 +40385,7 @@ function printPathNoParens(path, options, print, args) {
40347
40385
  return "";
40348
40386
 
40349
40387
  case "NGQuotedExpression":
40350
- return concat$6([n.prefix, ":", n.value]);
40388
+ return concat$6([n.prefix, ": ", n.value.trim()]);
40351
40389
 
40352
40390
  case "NGMicrosyntax":
40353
40391
  return concat$6(path.map((childPath, index) => concat$6([index === 0 ? "" : isNgForOf$1(childPath.getValue(), index, n) ? " " : concat$6([";", line$4]), print(childPath)]), "body"));
@@ -41904,7 +41942,7 @@ function printReturnAndThrowArgument(path, options, print) {
41904
41942
  if (node.argument) {
41905
41943
  if (returnArgumentHasLeadingComment$1(options, node.argument)) {
41906
41944
  parts.push(concat$6([" (", indent$3(concat$6([hardline$4, path.call(print, "argument")])), hardline$4, ")"]));
41907
- } else if (node.argument.type === "LogicalExpression" || node.argument.type === "BinaryExpression" || node.argument.type === "SequenceExpression") {
41945
+ } else if (isBinaryish$1(node.argument) || node.argument.type === "SequenceExpression") {
41908
41946
  parts.push(group$2(concat$6([ifBreak$1(" (", " "), indent$3(concat$6([softline$2, path.call(print, "argument")])), softline$2, ifBreak$1(")")])));
41909
41947
  } else {
41910
41948
  parts.push(" ", path.call(print, "argument"));
@@ -41936,7 +41974,7 @@ function willPrintOwnComments(path
41936
41974
  ) {
41937
41975
  const node = path.getValue();
41938
41976
  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);
41977
+ 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
41978
  }
41941
41979
 
41942
41980
  function canAttachComment(node) {
@@ -42516,6 +42554,7 @@ var aliases$2 = [
42516
42554
  "jsonc"
42517
42555
  ];
42518
42556
  var extensions$5 = [
42557
+ ".jsonc",
42519
42558
  ".sublime-build",
42520
42559
  ".sublime-commands",
42521
42560
  ".sublime-completions",
@@ -42797,7 +42836,7 @@ const {
42797
42836
  markAsRoot: markAsRoot$1
42798
42837
  },
42799
42838
  utils: {
42800
- mapDoc: mapDoc$3
42839
+ mapDoc: mapDoc$2
42801
42840
  }
42802
42841
  } = document;
42803
42842
 
@@ -42815,7 +42854,7 @@ function embed$1(path, print, textToDoc
42815
42854
  return null;
42816
42855
 
42817
42856
  function replaceNewlinesWithLiterallines(doc) {
42818
- return mapDoc$3(doc, currentDoc => typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$8(currentDoc.split(/(\n)/g).map((v, i) => i % 2 === 0 ? v : literalline$3)) : currentDoc);
42857
+ 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
42858
  }
42820
42859
  }
42821
42860
 
@@ -43100,7 +43139,7 @@ function getPropOfDeclNode(path) {
43100
43139
 
43101
43140
  function isSCSS(parser, text) {
43102
43141
  const hasExplicitParserChoice = parser === "less" || parser === "scss";
43103
- const IS_POSSIBLY_SCSS = /(\w\s*: [^}:]+|#){|@import[^\n]+(url|,)/;
43142
+ const IS_POSSIBLY_SCSS = /(\w\s*:\s*[^}:]+|#){|@import[^\n]+(?:url|,)/;
43104
43143
  return hasExplicitParserChoice ? parser === "scss" : IS_POSSIBLY_SCSS.test(text);
43105
43144
  }
43106
43145
 
@@ -43544,7 +43583,7 @@ function genericPrint$2(path, options, print) {
43544
43583
  return concat$9(["@", // If a Less file ends up being parsed with the SCSS parser, Less
43545
43584
  // variable declarations will be parsed as at-rules with names ending
43546
43585
  // 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) && /^\s*\n/.test(node.raws.afterName) ? /^\s*\n\s*\n/.test(node.raws.afterName) ? concat$9([hardline$7, hardline$7]) : 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 ? "" : ";"]);
43586
+ 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
43587
  }
43549
43588
  // postcss-media-query-parser
43550
43589
 
@@ -43750,6 +43789,11 @@ function genericPrint$2(path, options, print) {
43750
43789
 
43751
43790
  if (!iNextNode) {
43752
43791
  continue;
43792
+ } // styled.div` background: var(--${one}); `
43793
+
43794
+
43795
+ if (!iPrevNode && iNode.value === "--" && iNextNode.type === "value-atword") {
43796
+ continue;
43753
43797
  } // Ignore spaces before/after string interpolation (i.e. `"#{my-fn("_")}"`)
43754
43798
 
43755
43799
 
@@ -45395,7 +45439,7 @@ const {
45395
45439
  markAsRoot: markAsRoot$2
45396
45440
  },
45397
45441
  utils: {
45398
- mapDoc: mapDoc$4
45442
+ mapDoc: mapDoc$3
45399
45443
  }
45400
45444
  } = document;
45401
45445
  const {
@@ -45457,7 +45501,7 @@ function embed$2(path, print, textToDoc, options) {
45457
45501
  }
45458
45502
 
45459
45503
  function replaceNewlinesWithLiterallines(doc) {
45460
- return mapDoc$4(doc, currentDoc => typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$c(currentDoc.split(/(\n)/g).map((v, i) => i % 2 === 0 ? v : literalline$4)) : currentDoc);
45504
+ 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
45505
  }
45462
45506
  }
45463
45507
 
@@ -45762,7 +45806,7 @@ const {
45762
45806
  group: group$d
45763
45807
  },
45764
45808
  utils: {
45765
- mapDoc: mapDoc$5
45809
+ mapDoc: mapDoc$4
45766
45810
  },
45767
45811
  printer: {
45768
45812
  printDocToString: printDocToString$3
@@ -46079,19 +46123,6 @@ function getAncestorNode$2(path, typeOrTypes) {
46079
46123
  }
46080
46124
 
46081
46125
  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
46126
  if (options.proseWrap === "preserve" && value === "\n") {
46096
46127
  return hardline$b;
46097
46128
  }
@@ -46343,7 +46374,7 @@ function shouldRemainTheSameContent(path) {
46343
46374
  }
46344
46375
 
46345
46376
  function normalizeDoc(doc) {
46346
- return mapDoc$5(doc, currentDoc => {
46377
+ return mapDoc$4(doc, currentDoc => {
46347
46378
  if (!currentDoc.parts) {
46348
46379
  return currentDoc;
46349
46380
  }
@@ -47692,7 +47723,7 @@ function isTextLikeNode(node) {
47692
47723
  }
47693
47724
 
47694
47725
  function isScriptLikeTag(node) {
47695
- return node.type === "element" && (node.fullName === "script" || node.fullName === "style" || node.fullName === "svg:style");
47726
+ return node.type === "element" && (node.fullName === "script" || node.fullName === "style" || node.fullName === "svg:style" || isUnknownNamespace(node) && (node.name === "script" || node.name === "style"));
47696
47727
  }
47697
47728
 
47698
47729
  function isFrontMatterNode(node) {
@@ -48693,7 +48724,7 @@ const {
48693
48724
  builders,
48694
48725
  utils: {
48695
48726
  stripTrailingHardline: stripTrailingHardline$2,
48696
- mapDoc: mapDoc$6
48727
+ mapDoc: mapDoc$5
48697
48728
  }
48698
48729
  } = document;
48699
48730
  const {
@@ -48807,7 +48838,7 @@ function embed$4(path, print, textToDoc, options) {
48807
48838
  }, opts)), options);
48808
48839
 
48809
48840
  if (embeddedAttributeValueDoc) {
48810
- return concat$g([node.rawName, '="', group$f(mapDoc$6(embeddedAttributeValueDoc, doc => typeof doc === "string" ? doc.replace(/"/g, "&quot;") : doc)), '"']);
48841
+ return concat$g([node.rawName, '="', group$f(mapDoc$5(embeddedAttributeValueDoc, doc => typeof doc === "string" ? doc.replace(/"/g, "&quot;") : doc)), '"']);
48811
48842
  }
48812
48843
 
48813
48844
  break;
@@ -49015,7 +49046,7 @@ function printChildren$2(path, options, print) {
49015
49046
  }
49016
49047
 
49017
49048
  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) && (
49049
+ 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
49050
  /**
49020
49051
  * 123<a
49021
49052
  * ~
@@ -50326,7 +50357,8 @@ var filenames$4 = [
50326
50357
  ".clang-format",
50327
50358
  ".clang-tidy",
50328
50359
  ".gemrc",
50329
- "glide.lock"
50360
+ "glide.lock",
50361
+ "yarn.lock"
50330
50362
  ];
50331
50363
  var aceMode$g = "yaml";
50332
50364
  var codemirrorMode$c = "yaml";
@@ -50362,10 +50394,12 @@ var YAML$1 = /*#__PURE__*/Object.freeze({
50362
50394
 
50363
50395
  var require$$0$7 = getCjsExportFromNamespace(YAML$1);
50364
50396
 
50365
- const languages$6 = [createLanguage(require$$0$7, () => ({
50397
+ const languages$6 = [createLanguage(require$$0$7, data => ({
50366
50398
  since: "1.14.0",
50367
50399
  parsers: ["yaml"],
50368
- vscodeLanguageIds: ["yaml"]
50400
+ vscodeLanguageIds: ["yaml"],
50401
+ // yarn.lock is not YAML: https://github.com/yarnpkg/yarn/issues/5629
50402
+ filenames: data.filenames.filter(filename => filename !== "yarn.lock")
50369
50403
  }))];
50370
50404
  var languageYaml = {
50371
50405
  languages: languages$6,
@@ -50460,11 +50494,11 @@ languageCss, {
50460
50494
  },
50461
50495
 
50462
50496
  get less() {
50463
- return require("./parser-postcss").parsers.css;
50497
+ return require("./parser-postcss").parsers.less;
50464
50498
  },
50465
50499
 
50466
50500
  get scss() {
50467
- return require("./parser-postcss").parsers.css;
50501
+ return require("./parser-postcss").parsers.scss;
50468
50502
  }
50469
50503
 
50470
50504
  }
@@ -50567,10 +50601,10 @@ function load(plugins, pluginSearchDirs) {
50567
50601
 
50568
50602
  try {
50569
50603
  // try local files
50570
- requirePath = require.resolve(path$1.resolve(process.cwd(), pluginName));
50604
+ requirePath = resolve_1(path$1.resolve(process.cwd(), pluginName));
50571
50605
  } catch (_) {
50572
50606
  // try node modules
50573
- requirePath = require.resolve(pluginName, {
50607
+ requirePath = resolve_1(pluginName, {
50574
50608
  paths: [process.cwd()]
50575
50609
  });
50576
50610
  }
@@ -50592,7 +50626,7 @@ function load(plugins, pluginSearchDirs) {
50592
50626
 
50593
50627
  return memoizedSearch(nodeModulesDir).map(pluginName => ({
50594
50628
  name: pluginName,
50595
- requirePath: require.resolve(pluginName, {
50629
+ requirePath: resolve_1(pluginName, {
50596
50630
  paths: [resolvedPluginSearchDir]
50597
50631
  })
50598
50632
  }));