prettier 1.16.2 → 1.16.3

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/standalone.js CHANGED
@@ -5,7 +5,7 @@
5
5
  }(this, (function () { 'use strict';
6
6
 
7
7
  var name = "prettier";
8
- var version$1 = "1.16.2";
8
+ var version$1 = "1.16.3";
9
9
  var description = "Prettier is an opinionated code formatter";
10
10
  var bin = {
11
11
  "prettier": "./bin/prettier.js"
@@ -24,7 +24,6 @@ var dependencies = {
24
24
  "@babel/parser": "7.2.0",
25
25
  "@glimmer/syntax": "0.30.3",
26
26
  "@iarna/toml": "2.0.0",
27
- "@typescript-eslint/typescript-estree": "1.1.0",
28
27
  "angular-estree-parser": "1.1.5",
29
28
  "angular-html-parser": "1.2.0",
30
29
  "camelcase": "4.1.0",
@@ -73,6 +72,7 @@ var dependencies = {
73
72
  "semver": "5.4.1",
74
73
  "string-width": "3.0.0",
75
74
  "typescript": "3.2.2",
75
+ "typescript-estree": "18.0.0",
76
76
  "unicode-regex": "2.0.0",
77
77
  "unified": "6.1.6",
78
78
  "vnopts": "1.0.2",
@@ -101,7 +101,7 @@ var devDependencies = {
101
101
  "jest-snapshot-serializer-raw": "1.1.0",
102
102
  "jest-watch-typeahead": "0.1.0",
103
103
  "mkdirp": "0.5.1",
104
- "prettier": "1.16.1",
104
+ "prettier": "1.16.2",
105
105
  "prettylint": "1.0.0",
106
106
  "rimraf": "2.6.2",
107
107
  "rollup": "0.47.6",
@@ -22968,6 +22968,7 @@ function needsParens(path, options) {
22968
22968
 
22969
22969
  case "ClassExpression":
22970
22970
  case "ClassDeclaration":
22971
+ case "TSAbstractClassDeclaration":
22971
22972
  return name === "superClass" && parent.superClass === node;
22972
22973
 
22973
22974
  case "TSTypeAssertion":
@@ -23303,7 +23304,7 @@ function needsParens(path, options) {
23303
23304
  }
23304
23305
 
23305
23306
  function isStatement(node) {
23306
- 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 === "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";
23307
+ 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 === "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 === "TSAbstractClassDeclaration" || 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";
23307
23308
  }
23308
23309
 
23309
23310
  function getUnparenthesizedNode(node) {
@@ -25021,6 +25022,7 @@ function printPathNoParens(path, options, print, args) {
25021
25022
 
25022
25023
  case "ClassDeclaration":
25023
25024
  case "ClassExpression":
25025
+ case "TSAbstractClassDeclaration":
25024
25026
  if (isNodeStartingWithDeclare(n, options)) {
25025
25027
  parts.push("declare ");
25026
25028
  }
@@ -26524,7 +26526,7 @@ function printExportDeclaration(path, options, print) {
26524
26526
  if (decl.declaration) {
26525
26527
  parts.push(path.call(print, "declaration"));
26526
26528
 
26527
- if (isDefault && decl.declaration.type !== "ClassDeclaration" && decl.declaration.type !== "FunctionDeclaration" && decl.declaration.type !== "TSInterfaceDeclaration" && decl.declaration.type !== "DeclareClass" && decl.declaration.type !== "DeclareFunction" && decl.declaration.type !== "TSDeclareFunction") {
26529
+ if (isDefault && decl.declaration.type !== "ClassDeclaration" && decl.declaration.type !== "FunctionDeclaration" && decl.declaration.type !== "TSAbstractClassDeclaration" && decl.declaration.type !== "TSInterfaceDeclaration" && decl.declaration.type !== "DeclareClass" && decl.declaration.type !== "DeclareFunction" && decl.declaration.type !== "TSDeclareFunction") {
26528
26530
  parts.push(semi);
26529
26531
  }
26530
26532
  } else {
@@ -26635,7 +26637,7 @@ function printClass(path, options, print) {
26635
26637
  var n = path.getValue();
26636
26638
  var parts = [];
26637
26639
 
26638
- if (n.abstract) {
26640
+ if (n.type === "TSAbstractClassDeclaration") {
26639
26641
  parts.push("abstract ");
26640
26642
  }
26641
26643