1.4.2
parent
6697122e28
commit
86febfe797
|
@ -1,3 +1,12 @@
|
||||||
|
# 1.4.2
|
||||||
|
|
||||||
|
[link](https://github.com/jlongster/prettier/compare/1.4.1...1.4.2)
|
||||||
|
|
||||||
|
* fix(decorators): do not inline methods with decorators with babylon (#1934)
|
||||||
|
* fix(typescript): print semi with inline interfaces/types (#1936)
|
||||||
|
* fix(typescript): no semi after export default abstract class, fixes (#1937)
|
||||||
|
* TypeScript: fix trailing comma in enum (#1938)
|
||||||
|
|
||||||
# 1.4.1
|
# 1.4.1
|
||||||
|
|
||||||
[link](https://github.com/jlongster/prettier/compare/1.4.0...1.4.1)
|
[link](https://github.com/jlongster/prettier/compare/1.4.0...1.4.1)
|
||||||
|
|
|
@ -1521,7 +1521,7 @@ var comments$1 = {
|
||||||
};
|
};
|
||||||
|
|
||||||
var name = "prettier";
|
var name = "prettier";
|
||||||
var version$1 = "1.4.1";
|
var version$1 = "1.4.2";
|
||||||
var description = "Prettier is an opinionated JavaScript formatter";
|
var description = "Prettier is an opinionated JavaScript formatter";
|
||||||
var bin = {"prettier":"./bin/prettier.js"};
|
var bin = {"prettier":"./bin/prettier.js"};
|
||||||
var repository = "prettier/prettier";
|
var repository = "prettier/prettier";
|
||||||
|
@ -2899,6 +2899,7 @@ function genericPrint(path, options, printPath, args) {
|
||||||
node.decorators.length === 1 &&
|
node.decorators.length === 1 &&
|
||||||
node.type !== "ClassDeclaration" &&
|
node.type !== "ClassDeclaration" &&
|
||||||
node.type !== "MethodDefinition" &&
|
node.type !== "MethodDefinition" &&
|
||||||
|
node.type !== "ClassMethod" &&
|
||||||
(decorator.type === "Identifier" ||
|
(decorator.type === "Identifier" ||
|
||||||
decorator.type === "MemberExpression" ||
|
decorator.type === "MemberExpression" ||
|
||||||
(decorator.type === "CallExpression" &&
|
(decorator.type === "CallExpression" &&
|
||||||
|
@ -3618,9 +3619,16 @@ function genericPrintNoParens(path, options, print, args) {
|
||||||
case "TSInterfaceBody":
|
case "TSInterfaceBody":
|
||||||
case "TSTypeLiteral": {
|
case "TSTypeLiteral": {
|
||||||
const isTypeAnnotation = n.type === "ObjectTypeAnnotation";
|
const isTypeAnnotation = n.type === "ObjectTypeAnnotation";
|
||||||
|
const shouldBreak =
|
||||||
|
n.type !== "ObjectPattern" &&
|
||||||
|
util$4.hasNewlineInRange(
|
||||||
|
options.originalText,
|
||||||
|
util$4.locStart(n),
|
||||||
|
util$4.locEnd(n)
|
||||||
|
);
|
||||||
const separator = n.type === "TSInterfaceBody" ||
|
const separator = n.type === "TSInterfaceBody" ||
|
||||||
n.type === "TSTypeLiteral"
|
n.type === "TSTypeLiteral"
|
||||||
? semi
|
? shouldBreak ? semi : ";"
|
||||||
: ",";
|
: ",";
|
||||||
const fields = [];
|
const fields = [];
|
||||||
const leftBrace = n.exact ? "{|" : "{";
|
const leftBrace = n.exact ? "{|" : "{";
|
||||||
|
@ -3723,14 +3731,6 @@ function genericPrintNoParens(path, options, print, args) {
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
const shouldBreak =
|
|
||||||
n.type !== "ObjectPattern" &&
|
|
||||||
util$4.hasNewlineInRange(
|
|
||||||
options.originalText,
|
|
||||||
util$4.locStart(n),
|
|
||||||
util$4.locEnd(n)
|
|
||||||
);
|
|
||||||
|
|
||||||
return group$1(content, { shouldBreak });
|
return group$1(content, { shouldBreak });
|
||||||
}
|
}
|
||||||
case "PropertyPattern":
|
case "PropertyPattern":
|
||||||
|
@ -5262,7 +5262,8 @@ function genericPrintNoParens(path, options, print, args) {
|
||||||
indent$2(
|
indent$2(
|
||||||
concat$2([
|
concat$2([
|
||||||
hardline$2,
|
hardline$2,
|
||||||
printArrayItems(path, options, "members", print)
|
printArrayItems(path, options, "members", print),
|
||||||
|
shouldPrintComma(options, "es5") ? "," : ""
|
||||||
])
|
])
|
||||||
),
|
),
|
||||||
comments$3.printDanglingComments(
|
comments$3.printDanglingComments(
|
||||||
|
@ -6216,7 +6217,8 @@ function printExportDeclaration(path, options, print) {
|
||||||
if (
|
if (
|
||||||
decl.type === "ExportDefaultDeclaration" &&
|
decl.type === "ExportDefaultDeclaration" &&
|
||||||
(decl.declaration.type !== "ClassDeclaration" &&
|
(decl.declaration.type !== "ClassDeclaration" &&
|
||||||
decl.declaration.type !== "FunctionDeclaration")
|
decl.declaration.type !== "FunctionDeclaration" &&
|
||||||
|
decl.declaration.type !== "TSAbstractClassDeclaration")
|
||||||
) {
|
) {
|
||||||
parts.push(semi);
|
parts.push(semi);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "prettier",
|
"name": "prettier",
|
||||||
"version": "1.4.1",
|
"version": "1.4.2",
|
||||||
"description": "Prettier is an opinionated JavaScript formatter",
|
"description": "Prettier is an opinionated JavaScript formatter",
|
||||||
"bin": {
|
"bin": {
|
||||||
"prettier": "./bin/prettier.js"
|
"prettier": "./bin/prettier.js"
|
||||||
|
|
Loading…
Reference in New Issue