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/bin-prettier.js CHANGED
@@ -14,7 +14,7 @@ var thirdParty__default = thirdParty['default'];
14
14
  var readline = _interopDefault(require('readline'));
15
15
 
16
16
  var name = "prettier";
17
- var version$1 = "1.16.2";
17
+ var version$1 = "1.16.3";
18
18
  var description = "Prettier is an opinionated code formatter";
19
19
  var bin = {
20
20
  "prettier": "./bin/prettier.js"
@@ -33,7 +33,6 @@ var dependencies = {
33
33
  "@babel/parser": "7.2.0",
34
34
  "@glimmer/syntax": "0.30.3",
35
35
  "@iarna/toml": "2.0.0",
36
- "@typescript-eslint/typescript-estree": "1.1.0",
37
36
  "angular-estree-parser": "1.1.5",
38
37
  "angular-html-parser": "1.2.0",
39
38
  "camelcase": "4.1.0",
@@ -82,6 +81,7 @@ var dependencies = {
82
81
  "semver": "5.4.1",
83
82
  "string-width": "3.0.0",
84
83
  "typescript": "3.2.2",
84
+ "typescript-estree": "18.0.0",
85
85
  "unicode-regex": "2.0.0",
86
86
  "unified": "6.1.6",
87
87
  "vnopts": "1.0.2",
@@ -110,7 +110,7 @@ var devDependencies = {
110
110
  "jest-snapshot-serializer-raw": "1.1.0",
111
111
  "jest-watch-typeahead": "0.1.0",
112
112
  "mkdirp": "0.5.1",
113
- "prettier": "1.16.1",
113
+ "prettier": "1.16.2",
114
114
  "prettylint": "1.0.0",
115
115
  "rimraf": "2.6.2",
116
116
  "rollup": "0.47.6",
@@ -23089,6 +23089,7 @@ function needsParens(path$$1, options) {
23089
23089
 
23090
23090
  case "ClassExpression":
23091
23091
  case "ClassDeclaration":
23092
+ case "TSAbstractClassDeclaration":
23092
23093
  return name === "superClass" && parent.superClass === node;
23093
23094
 
23094
23095
  case "TSTypeAssertion":
@@ -23424,7 +23425,7 @@ function needsParens(path$$1, options) {
23424
23425
  }
23425
23426
 
23426
23427
  function isStatement(node) {
23427
- 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";
23428
+ 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";
23428
23429
  }
23429
23430
 
23430
23431
  function getUnparenthesizedNode(node) {
@@ -25142,6 +25143,7 @@ function printPathNoParens(path$$1, options, print, args) {
25142
25143
 
25143
25144
  case "ClassDeclaration":
25144
25145
  case "ClassExpression":
25146
+ case "TSAbstractClassDeclaration":
25145
25147
  if (isNodeStartingWithDeclare(n, options)) {
25146
25148
  parts.push("declare ");
25147
25149
  }
@@ -26645,7 +26647,7 @@ function printExportDeclaration(path$$1, options, print) {
26645
26647
  if (decl.declaration) {
26646
26648
  parts.push(path$$1.call(print, "declaration"));
26647
26649
 
26648
- 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") {
26650
+ 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") {
26649
26651
  parts.push(semi);
26650
26652
  }
26651
26653
  } else {
@@ -26756,7 +26758,7 @@ function printClass(path$$1, options, print) {
26756
26758
  var n = path$$1.getValue();
26757
26759
  var parts = [];
26758
26760
 
26759
- if (n.abstract) {
26761
+ if (n.type === "TSAbstractClassDeclaration") {
26760
26762
  parts.push("abstract ");
26761
26763
  }
26762
26764
 
package/index.js CHANGED
@@ -12,7 +12,7 @@ var thirdParty = require('./third-party');
12
12
  var thirdParty__default = thirdParty['default'];
13
13
 
14
14
  var name = "prettier";
15
- var version$1 = "1.16.2";
15
+ var version$1 = "1.16.3";
16
16
  var description = "Prettier is an opinionated code formatter";
17
17
  var bin = {
18
18
  "prettier": "./bin/prettier.js"
@@ -31,7 +31,6 @@ var dependencies = {
31
31
  "@babel/parser": "7.2.0",
32
32
  "@glimmer/syntax": "0.30.3",
33
33
  "@iarna/toml": "2.0.0",
34
- "@typescript-eslint/typescript-estree": "1.1.0",
35
34
  "angular-estree-parser": "1.1.5",
36
35
  "angular-html-parser": "1.2.0",
37
36
  "camelcase": "4.1.0",
@@ -80,6 +79,7 @@ var dependencies = {
80
79
  "semver": "5.4.1",
81
80
  "string-width": "3.0.0",
82
81
  "typescript": "3.2.2",
82
+ "typescript-estree": "18.0.0",
83
83
  "unicode-regex": "2.0.0",
84
84
  "unified": "6.1.6",
85
85
  "vnopts": "1.0.2",
@@ -108,7 +108,7 @@ var devDependencies = {
108
108
  "jest-snapshot-serializer-raw": "1.1.0",
109
109
  "jest-watch-typeahead": "0.1.0",
110
110
  "mkdirp": "0.5.1",
111
- "prettier": "1.16.1",
111
+ "prettier": "1.16.2",
112
112
  "prettylint": "1.0.0",
113
113
  "rimraf": "2.6.2",
114
114
  "rollup": "0.47.6",
@@ -23087,6 +23087,7 @@ function needsParens(path$$1, options) {
23087
23087
 
23088
23088
  case "ClassExpression":
23089
23089
  case "ClassDeclaration":
23090
+ case "TSAbstractClassDeclaration":
23090
23091
  return name === "superClass" && parent.superClass === node;
23091
23092
 
23092
23093
  case "TSTypeAssertion":
@@ -23422,7 +23423,7 @@ function needsParens(path$$1, options) {
23422
23423
  }
23423
23424
 
23424
23425
  function isStatement(node) {
23425
- 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";
23426
+ 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";
23426
23427
  }
23427
23428
 
23428
23429
  function getUnparenthesizedNode(node) {
@@ -25140,6 +25141,7 @@ function printPathNoParens(path$$1, options, print, args) {
25140
25141
 
25141
25142
  case "ClassDeclaration":
25142
25143
  case "ClassExpression":
25144
+ case "TSAbstractClassDeclaration":
25143
25145
  if (isNodeStartingWithDeclare(n, options)) {
25144
25146
  parts.push("declare ");
25145
25147
  }
@@ -26643,7 +26645,7 @@ function printExportDeclaration(path$$1, options, print) {
26643
26645
  if (decl.declaration) {
26644
26646
  parts.push(path$$1.call(print, "declaration"));
26645
26647
 
26646
- 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") {
26648
+ 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") {
26647
26649
  parts.push(semi);
26648
26650
  }
26649
26651
  } else {
@@ -26754,7 +26756,7 @@ function printClass(path$$1, options, print) {
26754
26756
  var n = path$$1.getValue();
26755
26757
  var parts = [];
26756
26758
 
26757
- if (n.abstract) {
26759
+ if (n.type === "TSAbstractClassDeclaration") {
26758
26760
  parts.push("abstract ");
26759
26761
  }
26760
26762
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prettier",
3
- "version": "1.16.2",
3
+ "version": "1.16.3",
4
4
  "description": "Prettier is an opinionated code formatter",
5
5
  "bin": "./bin-prettier.js",
6
6
  "repository": "prettier/prettier",