master
Lucas Azzola 2017-09-30 20:44:28 +10:00
parent 808dc4e7e3
commit ecf0281b31
5 changed files with 59 additions and 51 deletions

View File

@ -1,12 +1,20 @@
# 1.7.3
[link](https://github.com/prettier/prettier/compare/1.7.2...1.7.3)
* Fix cosmiconfig in the built version of Prettier (#2930 by lydell)
* Fix: ignore and show warning for unknown option from config file (#2929 by ikatyang)
* Don't use parens with optional chaining meber expressions (#2921 by azz)
# 1.7.2
[link](https://github.com/jlongster/prettier/compare/1.7.1...1.7.2)
[link](https://github.com/prettier/prettier/compare/1.7.1...1.7.2)
* Revert "Fix line break in test declarations with a single argument function declaration" (#2912)
# 1.7.1
[link](https://github.com/jlongster/prettier/compare/1.7.0...1.7.1)
[link](https://github.com/prettier/prettier/compare/1.7.0...1.7.1)
* Enable cosmiconfig rcExtensions (#2749 by elektronik2k5)
* Keep original empty lines in argument list (#2763 by jackyho112)
@ -35,13 +43,13 @@
# 1.7.0
[link](https://github.com/jlongster/prettier/compare/1.6.1...1.7.0)
[link](https://github.com/prettier/prettier/compare/1.6.1...1.7.0)
* [Release Notes](https://github.com/prettier/prettier/releases/tag/1.7.0)
# 1.6.1
[link](https://github.com/jlongster/prettier/compare/1.6.0...1.6.1)
[link](https://github.com/prettier/prettier/compare/1.6.0...1.6.1)
* Fix CLI option parsing with no arguments (#2684)
* Fix config file finding when using stdin (#2692)
@ -50,33 +58,33 @@
# 1.6.0
[link](https://github.com/jlongster/prettier/compare/1.5.3...1.6.0)
[link](https://github.com/prettier/prettier/compare/1.5.3...1.6.0)
* [Release Notes](https://github.com/prettier/prettier/releases/tag/1.6.0)
# 1.5.3
[link](https://github.com/jlongster/prettier/compare/1.5.2...1.5.3)
[link](https://github.com/prettier/prettier/compare/1.5.2...1.5.3)
* Force trailingComma option to "none" when parser is JSON (#2335)
# 1.5.2
[link](https://github.com/jlongster/prettier/compare/1.5.1...1.5.2)
[link](https://github.com/prettier/prettier/compare/1.5.1...1.5.2)
* Full printing support for GraphQL and various bug fixes
* Fixes for range formatting for JSON and CSS (#2295, #2298)
# 1.5.1
[link](https://github.com/jlongster/prettier/compare/1.5.0...1.5.1)
[link](https://github.com/prettier/prettier/compare/1.5.0...1.5.1)
* Go back to babylon beta 13 (#2289)
* Inline import('x') to avoid having trailing comma (#2288)
# 1.5.0
[link](https://github.com/jlongster/prettier/compare/1.4.4...1.5.0)
[link](https://github.com/prettier/prettier/compare/1.4.4...1.5.0)
* [Release Notes](https://github.com/prettier/prettier/releases/tag/1.5.0)
@ -86,7 +94,7 @@
# 1.4.3
[link](https://github.com/jlongster/prettier/compare/1.4.2...1.4.3)
[link](https://github.com/prettier/prettier/compare/1.4.2...1.4.3)
* Fix support for node 4 (#1988)
* Fix website on iOS Safari (#1970)
@ -98,7 +106,7 @@ Lots of small fixes, mainly for TypeScript.
# 1.4.2
[link](https://github.com/jlongster/prettier/compare/1.4.1...1.4.2)
[link](https://github.com/prettier/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)
@ -107,13 +115,13 @@ Lots of small fixes, mainly for TypeScript.
# 1.4.1
[link](https://github.com/jlongster/prettier/compare/1.4.0...1.4.1)
[link](https://github.com/prettier/prettier/compare/1.4.0...1.4.1)
* Lots of fixes for TypeScript and regressions from 1.4.0. If you are using 1.4.0, you should migrate to 1.4.1 asap ;)
# 1.4.0
[link](https://github.com/jlongster/prettier/compare/1.3.1...1.4.0)
[link](https://github.com/prettier/prettier/compare/1.3.1...1.4.0)
* [Release Notes](https://github.com/prettier/prettier/releases/tag/1.4.0)
@ -123,7 +131,7 @@ Lots of small fixes, mainly for TypeScript.
# 1.3.0
[link](https://github.com/jlongster/prettier/compare/1.2.2...1.3.0)
[link](https://github.com/prettier/prettier/compare/1.2.2...1.3.0)
* add printer branches for some TypeScript nodes (#1331)
* Skip trailing commas with FlowShorthandWithOneArg (#1364)
@ -175,19 +183,19 @@ Lots of small fixes, mainly for TypeScript.
# 1.2.2
[link](https://github.com/jlongster/prettier/compare/1.2.1...1.2.2)
[link](https://github.com/prettier/prettier/compare/1.2.1...1.2.2)
* Only break for conditionals (#1350)
# 1.2.1
[link](https://github.com/jlongster/prettier/compare/1.2.0...1.2.1)
[link](https://github.com/prettier/prettier/compare/1.2.0...1.2.1)
* Fix duplicate comments in classes (#1349)
# 1.2.0
[link](https://github.com/jlongster/prettier/compare/1.1.0...1.2.0)
[link](https://github.com/prettier/prettier/compare/1.1.0...1.2.0)
* match jsx files in pre-commit hook (#1276)
* Fix isPreviousLineEmpty on Windows (#1263)
@ -217,7 +225,7 @@ Lots of small fixes, mainly for TypeScript.
# 1.1.0
[link](https://github.com/jlongster/prettier/compare/1.0.0...1.1.0)
[link](https://github.com/prettier/prettier/compare/1.0.0...1.1.0)
* Prettier 1.0 is the stabler release we've been waiting for (#1242)
* fix small typo (#1255)
@ -237,13 +245,13 @@ Lots of small fixes, mainly for TypeScript.
# 1.0.0
[link](https://github.com/jlongster/prettier/compare/0.22.0...1.0.0)
[link](https://github.com/prettier/prettier/compare/0.22.0...1.0.0)
* See announcement blog post: [http://jlongster.com/prettier-1.0](http://jlongster.com/prettier-1.0)
# 0.22.0
[link](https://github.com/jlongster/prettier/compare/0.21.0...0.22.0)
[link](https://github.com/prettier/prettier/compare/0.21.0...0.22.0)
* Run 0.21.0 (#876)
* Fix paren removal on UnionTypeAnnotation (#878)
@ -278,7 +286,7 @@ Lots of small fixes, mainly for TypeScript.
# 0.21.0
[link](https://github.com/jlongster/prettier/compare/0.20.0...0.21.0)
[link](https://github.com/prettier/prettier/compare/0.20.0...0.21.0)
* [JSX] Break before and after jsx whitespace (#836)
* re-run snapshot tests
@ -301,7 +309,7 @@ Lots of small fixes, mainly for TypeScript.
# 0.20.0
[link](https://github.com/jlongster/prettier/compare/0.19.0...0.20.0)
[link](https://github.com/prettier/prettier/compare/0.19.0...0.20.0)
* Fix extra parens for update expressions (#796)
* Fix empty options (#803)
@ -323,7 +331,7 @@ Lots of small fixes, mainly for TypeScript.
# 0.19.0
[link](https://github.com/jlongster/prettier/compare/0.18.0...0.19.0)
[link](https://github.com/prettier/prettier/compare/0.18.0...0.19.0)
* docs(README): use yarn add for consistency (#734)
* Make trailing-comma option support 2 different modes (#641)
@ -357,7 +365,7 @@ Lots of small fixes, mainly for TypeScript.
# 0.18.0
[link](https://github.com/jlongster/prettier/compare/0.17.0...0.18.0)
[link](https://github.com/prettier/prettier/compare/0.17.0...0.18.0)
* fix --debug-check
* [JSX] Don't add newline following newline (#690)
@ -380,7 +388,7 @@ Lots of small fixes, mainly for TypeScript.
# 0.17.0
[link](https://github.com/jlongster/prettier/compare/0.16.0...0.17.0)
[link](https://github.com/prettier/prettier/compare/0.16.0...0.17.0)
* [JSX] Fix spurious newline (fixes #614) (#628)
* Add --debug-check cli option (#627)
@ -415,7 +423,7 @@ Lots of small fixes, mainly for TypeScript.
# 0.16.0
[link](https://github.com/jlongster/prettier/compare/0.15.0...0.16.0)
[link](https://github.com/prettier/prettier/compare/0.15.0...0.16.0)
* Revert "Print \x and \u escapes in strings and regexes lowercase (#522)
* Fix ternary indent bug (#577)
@ -440,7 +448,7 @@ Lots of small fixes, mainly for TypeScript.
# 0.15.0
[link](https://github.com/jlongster/prettier/compare/0.14.1...0.15.0)
[link](https://github.com/prettier/prettier/compare/0.14.1...0.15.0)
* Fix syntax error in empty object with dangling comment (#533)
* Fix closing call expression commented out (#530)
@ -461,14 +469,14 @@ Lots of small fixes, mainly for TypeScript.
# 0.14.1
[link](https://github.com/jlongster/prettier/compare/0.14.0...0.14.1)
[link](https://github.com/prettier/prettier/compare/0.14.0...0.14.1)
* Fix range for object newline detection (#520)
* a bugfix for "Keep expanded objects expanded" (#495)
# 0.14.0
[link](https://github.com/jlongster/prettier/compare/0.13.0...0.14.0)
[link](https://github.com/prettier/prettier/compare/0.13.0...0.14.0)
* Only write to files if the change (#511)
* Remove extra group when printing object values (#502)
@ -481,7 +489,7 @@ Lots of small fixes, mainly for TypeScript.
# 0.13.0
[link](https://github.com/jlongster/prettier/compare/0.12.0...0.13.0)
[link](https://github.com/prettier/prettier/compare/0.12.0...0.13.0)
* Simplify arrow functions that use blocks (#496)
* Properly print comments for BinaryExpression (#494)
@ -491,7 +499,7 @@ Lots of small fixes, mainly for TypeScript.
# 0.12.0
[link](https://github.com/jlongster/prettier/compare/0.11.0...0.12.0)
[link](https://github.com/prettier/prettier/compare/0.11.0...0.12.0)
* [WIP] Add rationale document (#372)
* Proper parenthesis for yield and await in conditional (#436)
@ -532,7 +540,7 @@ Lots of small fixes, mainly for TypeScript.
# 0.11.0
[link](https://github.com/jlongster/prettier/compare/0.0.10...0.11.0)
[link](https://github.com/prettier/prettier/compare/0.0.10...0.11.0)
Now using minor versions instead of patch versions for the releases.
@ -583,7 +591,7 @@ Now using minor versions instead of patch versions for the releases.
# 0.0.10
[link](https://github.com/jlongster/prettier/compare/0.0.9...0.0.10)
[link](https://github.com/prettier/prettier/compare/0.0.9...0.0.10)
* Add description to package.json (#320)
* Fix crash for single rest on class declaration (#315)
@ -609,7 +617,7 @@ Now using minor versions instead of patch versions for the releases.
# 0.0.9
[link](https://github.com/jlongster/prettier/compare/0.0.8...0.0.9)
[link](https://github.com/prettier/prettier/compare/0.0.8...0.0.9)
* Workaround flow bug parsing astral unicode characters (#277)
* Allow specifying the major mode that `defun-before-save` will use. (#276
@ -639,7 +647,7 @@ Now using minor versions instead of patch versions for the releases.
# 0.0.8
[link](https://github.com/jlongster/prettier/compare/e447971...0192d58)
[link](https://github.com/prettier/prettier/compare/e447971...0192d58)
* Fix await parenthesis (#185)
* Add note about Sublime Test github issue in readme
@ -670,7 +678,7 @@ Now using minor versions instead of patch versions for the releases.
# 0.0.7
[link](https://github.com/jlongster/prettier/compare/7e31610...6f5df0e2b6b7db252e28ce80ebc54814fdc61497)
[link](https://github.com/prettier/prettier/compare/7e31610...6f5df0e2b6b7db252e28ce80ebc54814fdc61497)
* Update live editor to 0.0.6
* Adds various prettier-browser changes (#175)
@ -685,7 +693,7 @@ Now using minor versions instead of patch versions for the releases.
# 0.0.6
[link](https://github.com/jlongster/prettier/compare/faed09ceea32fcdd58b525aa09b880afb9fa55b7...3af7da5748d64efaed781104ec198924c8c369f9)
[link](https://github.com/prettier/prettier/compare/faed09ceea32fcdd58b525aa09b880afb9fa55b7...3af7da5748d64efaed781104ec198924c8c369f9)
* Format property names consistently
* remove node 0.10 from travis config, add travis badge to readme

View File

@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "1.7.2",
"version": "1.7.3",
"description": "Prettier is an opinionated code formatter",
"bin": {
"prettier": "./bin/prettier.js"

View File

@ -176,7 +176,7 @@ if(isBlock){return concat([contents,util$2.hasNewline(options.originalText,locEn
// if this a comment on its own line; normal trailing comments are
// always at the end of another expression.
var isLineBeforeEmpty=util$2.isPreviousLineEmpty(options.originalText,comment);return lineSuffix(concat([hardline,isLineBeforeEmpty?hardline:"",contents]));}else if(isBlock){// Trailing block comments never need a newline
return concat([" ",contents]);}return concat([lineSuffix(" "+contents),!isBlock?breakParent:""]);}function printDanglingComments(path,options,sameIndent){var parts=[];var node=path.getValue();if(!node||!node.comments){return"";}path.each(function(commentPath){var comment=commentPath.getValue();if(comment&&!comment.leading&&!comment.trailing){parts.push(printComment(commentPath,options));}},"comments");if(parts.length===0){return"";}if(sameIndent){return join(hardline,parts);}return indent(concat([hardline,join(hardline,parts)]));}function prependCursorPlaceholder(path,options,printed){if(path.getNode()===options.cursorNode&&path.getValue()){return concat([cursor,printed]);}return printed;}function printComments(path,print,options,needsSemi){var value=path.getValue();var printed=print(path);var comments=value&&value.comments;if(!comments||comments.length===0){return prependCursorPlaceholder(path,options,printed);}var leadingParts=[];var trailingParts=[needsSemi?";":"",printed];path.each(function(commentPath){var comment=commentPath.getValue();var leading=comment.leading;var trailing=comment.trailing;if(leading){var contents=printLeadingComment(commentPath,print,options);if(!contents){return;}leadingParts.push(contents);var text=options.originalText;if(util$2.hasNewline(text,util$2.skipNewline(text,util$2.locEnd(comment)))){leadingParts.push(hardline);}}else if(trailing){trailingParts.push(printTrailingComment(commentPath,print,options));}},"comments");return prependCursorPlaceholder(path,options,concat(leadingParts.concat(trailingParts)));}var comments$1={attach:attach,printComments:printComments,printDanglingComments:printDanglingComments,getSortedChildNodes:getSortedChildNodes};var name="prettier";var version$1="1.7.2";var description="Prettier is an opinionated code formatter";var bin={"prettier":"./bin/prettier.js"};var repository="prettier/prettier";var homepage="https://prettier.io";var author="James Long";var license="MIT";var main="./index.js";var engines={"node":">=4"};var dependencies={"babel-code-frame":"7.0.0-alpha.12","babylon":"7.0.0-beta.23","camelcase":"4.1.0","chalk":"2.1.0","cosmiconfig":"3.0.1","dashify":"0.2.2","diff":"3.2.0","esutils":"2.0.2","flow-parser":"0.51.0","get-stream":"3.0.0","globby":"^6.1.0","graphql":"0.10.1","ignore":"^3.3.3","jest-docblock":"21.1.0","jest-validate":"21.1.0","leven":"2.1.0","mem":"1.1.0","minimatch":"3.0.4","minimist":"1.2.0","parse5":"3.0.2","postcss-less":"^1.0.0","postcss-media-query-parser":"0.2.3","postcss-scss":"1.0.0","postcss-selector-parser":"2.2.3","postcss-values-parser":"git://github.com/lydell/postcss-values-parser.git#af2c80b2bb558a6e7d61540d97f068f9fa162b38","strip-bom":"3.0.0","typescript":"2.5.3","typescript-eslint-parser":"git://github.com/eslint/typescript-eslint-parser.git#9c71a627da36e97da52ed2731d58509c952b67ae"};var devDependencies={"babel-cli":"6.24.1","babel-preset-es2015":"6.24.1","codecov":"2.2.0","cross-env":"5.0.1","eslint":"4.1.1","eslint-friendly-formatter":"3.0.0","eslint-plugin-import":"2.6.1","eslint-plugin-prettier":"2.1.2","eslint-plugin-react":"7.1.0","jest":"21.1.0","markdown-toc":"1.1.0","mkdirp":"^0.5.1","prettier":"1.7.0","rimraf":"2.6.1","rollup":"0.41.1","rollup-plugin-commonjs":"7.0.0","rollup-plugin-json":"2.1.0","rollup-plugin-node-builtins":"2.0.0","rollup-plugin-node-globals":"1.1.0","rollup-plugin-node-resolve":"2.0.0","rollup-plugin-replace":"1.1.1","shelljs":"0.7.8","sw-toolbox":"3.6.0","uglify-es":"3.0.15","webpack":"2.6.1"};var scripts={"test":"jest","test-integration":"jest tests_integration","lint":"cross-env EFF_NO_LINK_RULES=true eslint . --format node_modules/eslint-friendly-formatter","build":"node ./scripts/build/build.js","toc":"node ./scripts/table-of-contents.js"};var _package={name:name,version:version$1,description:description,bin:bin,repository:repository,homepage:homepage,author:author,license:license,main:main,engines:engines,dependencies:dependencies,devDependencies:devDependencies,scripts:scripts};var _package$1=Object.freeze({name:name,version:version$1,description:description,bin:bin,repository:repository,homepage:homepage,author:author,license:license,main:main,engines:engines,dependencies:dependencies,devDependencies:devDependencies,scripts:scripts,default:_package});var assert$2=require$$0;var util$6=util$3;var startsWithNoLookaheadToken$1=util$6.startsWithNoLookaheadToken;function FastPath$1(value){assert$2.ok(this instanceof FastPath$1);this.stack=[value];}// The name of the current property is always the penultimate element of
return concat([" ",contents]);}return concat([lineSuffix(" "+contents),!isBlock?breakParent:""]);}function printDanglingComments(path,options,sameIndent){var parts=[];var node=path.getValue();if(!node||!node.comments){return"";}path.each(function(commentPath){var comment=commentPath.getValue();if(comment&&!comment.leading&&!comment.trailing){parts.push(printComment(commentPath,options));}},"comments");if(parts.length===0){return"";}if(sameIndent){return join(hardline,parts);}return indent(concat([hardline,join(hardline,parts)]));}function prependCursorPlaceholder(path,options,printed){if(path.getNode()===options.cursorNode&&path.getValue()){return concat([cursor,printed]);}return printed;}function printComments(path,print,options,needsSemi){var value=path.getValue();var printed=print(path);var comments=value&&value.comments;if(!comments||comments.length===0){return prependCursorPlaceholder(path,options,printed);}var leadingParts=[];var trailingParts=[needsSemi?";":"",printed];path.each(function(commentPath){var comment=commentPath.getValue();var leading=comment.leading;var trailing=comment.trailing;if(leading){var contents=printLeadingComment(commentPath,print,options);if(!contents){return;}leadingParts.push(contents);var text=options.originalText;if(util$2.hasNewline(text,util$2.skipNewline(text,util$2.locEnd(comment)))){leadingParts.push(hardline);}}else if(trailing){trailingParts.push(printTrailingComment(commentPath,print,options));}},"comments");return prependCursorPlaceholder(path,options,concat(leadingParts.concat(trailingParts)));}var comments$1={attach:attach,printComments:printComments,printDanglingComments:printDanglingComments,getSortedChildNodes:getSortedChildNodes};var name="prettier";var version$1="1.7.2";var description="Prettier is an opinionated code formatter";var bin={"prettier":"./bin/prettier.js"};var repository="prettier/prettier";var homepage="https://prettier.io";var author="James Long";var license="MIT";var main="./index.js";var engines={"node":">=4"};var dependencies={"babel-code-frame":"7.0.0-alpha.12","babylon":"7.0.0-beta.23","camelcase":"4.1.0","chalk":"2.1.0","cosmiconfig":"3.0.1","dashify":"0.2.2","diff":"3.2.0","esutils":"2.0.2","flow-parser":"0.51.0","get-stream":"3.0.0","globby":"^6.1.0","graphql":"0.10.1","ignore":"^3.3.3","jest-docblock":"21.1.0","jest-validate":"21.1.0","leven":"2.1.0","mem":"1.1.0","minimatch":"3.0.4","minimist":"1.2.0","parse5":"3.0.2","postcss-less":"^1.0.0","postcss-media-query-parser":"0.2.3","postcss-scss":"1.0.0","postcss-selector-parser":"2.2.3","postcss-values-parser":"1.3.1","strip-bom":"3.0.0","typescript":"2.5.3","typescript-eslint-parser":"git://github.com/eslint/typescript-eslint-parser.git#9c71a627da36e97da52ed2731d58509c952b67ae"};var devDependencies={"babel-cli":"6.24.1","babel-preset-es2015":"6.24.1","codecov":"2.2.0","cross-env":"5.0.1","eslint":"4.1.1","eslint-friendly-formatter":"3.0.0","eslint-plugin-import":"2.6.1","eslint-plugin-prettier":"2.1.2","eslint-plugin-react":"7.1.0","jest":"21.1.0","markdown-toc":"1.1.0","mkdirp":"^0.5.1","prettier":"1.7.0","rimraf":"2.6.1","rollup":"0.41.1","rollup-plugin-commonjs":"7.0.0","rollup-plugin-json":"2.1.0","rollup-plugin-node-builtins":"2.0.0","rollup-plugin-node-globals":"1.1.0","rollup-plugin-node-resolve":"2.0.0","rollup-plugin-replace":"1.1.1","shelljs":"0.7.8","sw-toolbox":"3.6.0","uglify-es":"3.0.15","webpack":"2.6.1"};var scripts={"test":"jest","test-integration":"jest tests_integration","lint":"cross-env EFF_NO_LINK_RULES=true eslint . --format node_modules/eslint-friendly-formatter","build":"node ./scripts/build/build.js","toc":"node ./scripts/table-of-contents.js"};var _package={name:name,version:version$1,description:description,bin:bin,repository:repository,homepage:homepage,author:author,license:license,main:main,engines:engines,dependencies:dependencies,devDependencies:devDependencies,scripts:scripts};var _package$1=Object.freeze({name:name,version:version$1,description:description,bin:bin,repository:repository,homepage:homepage,author:author,license:license,main:main,engines:engines,dependencies:dependencies,devDependencies:devDependencies,scripts:scripts,default:_package});var assert$2=require$$0;var util$6=util$3;var startsWithNoLookaheadToken$1=util$6.startsWithNoLookaheadToken;function FastPath$1(value){assert$2.ok(this instanceof FastPath$1);this.stack=[value];}// The name of the current property is always the penultimate element of
// this.stack, and always a String.
FastPath$1.prototype.getName=function getName(){var s=this.stack;var len=s.length;if(len>1){return s[len-2];}// Since the name is always a string, null is a safe sentinel value to
// return if we do not know the name of the (root) value.
@ -206,7 +206,7 @@ if(util$6.hasClosureCompilerTypeCastComment(options.originalText,node)){return t
if(node.type==="Identifier"){return false;}if(parent.type==="ParenthesizedExpression"){return false;}// Add parens around the extends clause of a class. It is needed for almost
// all expressions.
if((parent.type==="ClassDeclaration"||parent.type==="ClassExpression")&&parent.superClass===node&&(node.type==="ArrowFunctionExpression"||node.type==="AssignmentExpression"||node.type==="AwaitExpression"||node.type==="BinaryExpression"||node.type==="ConditionalExpression"||node.type==="LogicalExpression"||node.type==="NewExpression"||node.type==="ObjectExpression"||node.type==="ParenthesizedExpression"||node.type==="SequenceExpression"||node.type==="TaggedTemplateExpression"||node.type==="UnaryExpression"||node.type==="UpdateExpression"||node.type==="YieldExpression")){return true;}if(parent.type==="ArrowFunctionExpression"&&parent.body===node&&node.type!=="SequenceExpression"&&// these have parens added anyway
startsWithNoLookaheadToken$1(node,/* forbidFunctionAndClass */false)||parent.type==="ExpressionStatement"&&startsWithNoLookaheadToken$1(node,/* forbidFunctionAndClass */true)){return true;}switch(node.type){case"CallExpression":{var firstParentNotMemberExpression=parent;var _i16=0;while(firstParentNotMemberExpression&&firstParentNotMemberExpression.type==="MemberExpression"){firstParentNotMemberExpression=this.getParentNode(++_i16);}if(firstParentNotMemberExpression.type==="NewExpression"&&firstParentNotMemberExpression.callee===this.getParentNode(_i16-1)){return true;}return false;}case"MemberExpression":{return parent.type==="MemberExpression"&&parent.object===node&&node.optional;}case"SpreadElement":case"SpreadProperty":return parent.type==="MemberExpression"&&name==="object"&&parent.object===node;case"UpdateExpression":if(parent.type==="UnaryExpression"){return node.prefix&&(node.operator==="++"&&parent.operator==="+"||node.operator==="--"&&parent.operator==="-");}// else fallthrough
startsWithNoLookaheadToken$1(node,/* forbidFunctionAndClass */false)||parent.type==="ExpressionStatement"&&startsWithNoLookaheadToken$1(node,/* forbidFunctionAndClass */true)){return true;}switch(node.type){case"CallExpression":{var firstParentNotMemberExpression=parent;var _i16=0;while(firstParentNotMemberExpression&&firstParentNotMemberExpression.type==="MemberExpression"){firstParentNotMemberExpression=this.getParentNode(++_i16);}if(firstParentNotMemberExpression.type==="NewExpression"&&firstParentNotMemberExpression.callee===this.getParentNode(_i16-1)){return true;}return false;}case"SpreadElement":case"SpreadProperty":return parent.type==="MemberExpression"&&name==="object"&&parent.object===node;case"UpdateExpression":if(parent.type==="UnaryExpression"){return node.prefix&&(node.operator==="++"&&parent.operator==="+"||node.operator==="--"&&parent.operator==="-");}// else fallthrough
case"UnaryExpression":switch(parent.type){case"UnaryExpression":return node.operator===parent.operator&&(node.operator==="+"||node.operator==="-");case"MemberExpression":return name==="object"&&parent.object===node;case"TaggedTemplateExpression":return true;case"NewExpression":case"CallExpression":return name==="callee"&&parent.callee===node;case"BinaryExpression":return parent.operator==="**"&&name==="left";default:return false;}case"BinaryExpression":{if(parent.type==="UpdateExpression"){return true;}var isLeftOfAForStatement=function isLeftOfAForStatement(node){var i=0;while(node){var _parent=_this.getParentNode(i++);if(!_parent){return false;}if(_parent.type==="ForStatement"&&_parent.init===node){return true;}node=_parent;}return false;};if(node.operator==="in"&&isLeftOfAForStatement(node)){return true;}}// fallthrough
case"TSTypeAssertionExpression":case"TSAsExpression":case"LogicalExpression":switch(parent.type){case"CallExpression":case"NewExpression":return name==="callee"&&parent.callee===node;case"ClassDeclaration":return name==="superClass"&&parent.superClass===node;case"TSTypeAssertionExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"ExperimentalSpreadProperty":case"BindExpression":case"AwaitExpression":case"TSAsExpression":case"TSNonNullExpression":return true;case"MemberExpression":return name==="object"&&parent.object===node;case"AssignmentExpression":return parent.left===node&&(node.type==="TSTypeAssertionExpression"||node.type==="TSAsExpression");case"BinaryExpression":case"LogicalExpression":{if(!node.operator&&node.type!=="TSTypeAssertionExpression"){return true;}var po=parent.operator;var pp=util$6.getPrecedence(po);var no=node.operator;var np=util$6.getPrecedence(no);if(pp>np){return true;}if(po==="||"&&no==="&&"){return true;}if(pp===np&&name==="right"){assert$2.strictEqual(parent.right,node);return true;}if(pp===np&&!util$6.shouldFlatten(po,no)){return true;}// Add parenthesis when working with binary operators
// It's not stricly needed but helps with code understanding
@ -1579,7 +1579,7 @@ _result+=pairBuffer;}state.tag=_tag;state.dump=_result||'{}';// Empty mapping if
//
function writeNode(state,level,object,block,compact,iskey){state.tag=null;state.dump=object;if(!detectType(state,object,false)){detectType(state,object,true);}var type=_toString$2.call(state.dump);if(block){block=state.flowLevel<0||state.flowLevel>level;}var objectOrArray=type==='[object Object]'||type==='[object Array]',duplicateIndex,duplicate;if(objectOrArray){duplicateIndex=state.duplicates.indexOf(object);duplicate=duplicateIndex!==-1;}if(state.tag!==null&&state.tag!=='?'||duplicate||state.indent!==2&&level>0){compact=false;}if(duplicate&&state.usedDuplicates[duplicateIndex]){state.dump='*ref_'+duplicateIndex;}else{if(objectOrArray&&duplicate&&!state.usedDuplicates[duplicateIndex]){state.usedDuplicates[duplicateIndex]=true;}if(type==='[object Object]'){if(block&&Object.keys(state.dump).length!==0){writeBlockMapping(state,level,state.dump,compact);if(duplicate){state.dump='&ref_'+duplicateIndex+state.dump;}}else{writeFlowMapping(state,level,state.dump);if(duplicate){state.dump='&ref_'+duplicateIndex+' '+state.dump;}}}else if(type==='[object Array]'){if(block&&state.dump.length!==0){writeBlockSequence(state,level,state.dump,compact);if(duplicate){state.dump='&ref_'+duplicateIndex+state.dump;}}else{writeFlowSequence(state,level,state.dump);if(duplicate){state.dump='&ref_'+duplicateIndex+' '+state.dump;}}}else if(type==='[object String]'){if(state.tag!=='?'){writeScalar(state,state.dump,level,iskey);}}else{if(state.skipInvalid)return false;throw new YAMLException$5('unacceptable kind of an object to dump '+type);}if(state.tag!==null&&state.tag!=='?'){state.dump='!<'+state.tag+'> '+state.dump;}}return true;}function getDuplicateReferences(object,state){var objects=[],duplicatesIndexes=[],index,length;inspectNode(object,objects,duplicatesIndexes);for(index=0,length=duplicatesIndexes.length;index<length;index+=1){state.duplicates.push(objects[duplicatesIndexes[index]]);}state.usedDuplicates=new Array(length);}function inspectNode(object,objects,duplicatesIndexes){var objectKeyList,index,length;if(object!==null&&(typeof object==='undefined'?'undefined':_typeof(object))==='object'){index=objects.indexOf(object);if(index!==-1){if(duplicatesIndexes.indexOf(index)===-1){duplicatesIndexes.push(index);}}else{objects.push(object);if(Array.isArray(object)){for(index=0,length=object.length;index<length;index+=1){inspectNode(object[index],objects,duplicatesIndexes);}}else{objectKeyList=Object.keys(object);for(index=0,length=objectKeyList.length;index<length;index+=1){inspectNode(object[objectKeyList[index]],objects,duplicatesIndexes);}}}}}function dump$1(input,options){options=options||{};var state=new State$1(options);if(!state.noRefs)getDuplicateReferences(input,state);if(writeNode(state,0,input,true,true))return state.dump+'\n';return'';}function safeDump$1(input,options){return dump$1(input,common$7.extend({schema:DEFAULT_SAFE_SCHEMA$2},options));}var dump_1=dump$1;var safeDump_1=safeDump$1;var dumper$1={dump:dump_1,safeDump:safeDump_1};var loader=loader$1;var dumper=dumper$1;function deprecated$3(name){return function(){throw new Error('Function '+name+' is deprecated and cannot be used.');};}var Type=type;var Schema=schema;var FAILSAFE_SCHEMA=failsafe;var JSON_SCHEMA=json;var CORE_SCHEMA=core;var DEFAULT_SAFE_SCHEMA=default_safe;var DEFAULT_FULL_SCHEMA=default_full;var load=loader.load;var loadAll=loader.loadAll;var safeLoad=loader.safeLoad;var safeLoadAll=loader.safeLoadAll;var dump=dumper.dump;var safeDump=dumper.safeDump;var YAMLException=exception;// Deprecated schema names from JS-YAML 2.0.x
var MINIMAL_SCHEMA=failsafe;var SAFE_SCHEMA=default_safe;var DEFAULT_SCHEMA=default_full;// Deprecated functions from JS-YAML 1.x.x
var scan=deprecated$3('scan');var parse$1=deprecated$3('parse');var compose=deprecated$3('compose');var addConstructor=deprecated$3('addConstructor');var jsYaml={Type:Type,Schema:Schema,FAILSAFE_SCHEMA:FAILSAFE_SCHEMA,JSON_SCHEMA:JSON_SCHEMA,CORE_SCHEMA:CORE_SCHEMA,DEFAULT_SAFE_SCHEMA:DEFAULT_SAFE_SCHEMA,DEFAULT_FULL_SCHEMA:DEFAULT_FULL_SCHEMA,load:load,loadAll:loadAll,safeLoad:safeLoad,safeLoadAll:safeLoadAll,dump:dump,safeDump:safeDump,YAMLException:YAMLException,MINIMAL_SCHEMA:MINIMAL_SCHEMA,SAFE_SCHEMA:SAFE_SCHEMA,DEFAULT_SCHEMA:DEFAULT_SCHEMA,scan:scan,parse:parse$1,compose:compose,addConstructor:addConstructor};var yaml$1=jsYaml;var index$54=yaml$1;var index$56=createCommonjsModule(function(module){'use strict';var Module=module$1;var path=require$$0$1;module.exports=function requireFromString(code,filename,opts){if((typeof filename==='undefined'?'undefined':_typeof(filename))==='object'){opts=filename;filename=undefined;}opts=opts||{};filename=filename||'';opts.appendPaths=opts.appendPaths||[];opts.prependPaths=opts.prependPaths||[];if(typeof code!=='string'){throw new Error('code must be a string, not '+(typeof code==='undefined'?'undefined':_typeof(code)));}var paths=Module._nodeModulePaths(path.dirname(filename));var parent=module.parent;var m=new Module(filename,parent);m.filename=filename;m.paths=[].concat(opts.prependPaths).concat(paths).concat(opts.appendPaths);m._compile(code,filename);var exports=m.exports;parent.children&&parent.children.splice(parent.children.indexOf(m),1);return exports;};});//
var scan=deprecated$3('scan');var parse$1=deprecated$3('parse');var compose=deprecated$3('compose');var addConstructor=deprecated$3('addConstructor');var jsYaml={Type:Type,Schema:Schema,FAILSAFE_SCHEMA:FAILSAFE_SCHEMA,JSON_SCHEMA:JSON_SCHEMA,CORE_SCHEMA:CORE_SCHEMA,DEFAULT_SAFE_SCHEMA:DEFAULT_SAFE_SCHEMA,DEFAULT_FULL_SCHEMA:DEFAULT_FULL_SCHEMA,load:load,loadAll:loadAll,safeLoad:safeLoad,safeLoadAll:safeLoadAll,dump:dump,safeDump:safeDump,YAMLException:YAMLException,MINIMAL_SCHEMA:MINIMAL_SCHEMA,SAFE_SCHEMA:SAFE_SCHEMA,DEFAULT_SCHEMA:DEFAULT_SCHEMA,scan:scan,parse:parse$1,compose:compose,addConstructor:addConstructor};var yaml$1=jsYaml;var index$54=yaml$1;var index$56=createCommonjsModule(function(module){'use strict';var Module=module$1;var path=require$$0$1;module.exports=function requireFromString(code,filename,opts){if((typeof filename==='undefined'?'undefined':_typeof(filename))==='object'){opts=filename;filename=undefined;}opts=opts||{};filename=filename||'';opts.appendPaths=opts.appendPaths||[];opts.prependPaths=opts.prependPaths||[];if(typeof code!=='string'){throw new Error('code must be a string, not '+(typeof code==='undefined'?'undefined':_typeof(code)));}var paths=Module._nodeModulePaths(path.dirname(filename));var parent=module.parent||module;var m=new Module(filename,parent);m.filename=filename;m.paths=[].concat(opts.prependPaths).concat(paths).concat(opts.appendPaths);m._compile(code,filename);var exports=m.exports;parent.children&&parent.children.splice(parent.children.indexOf(m),1);return exports;};});//
var chainFuncsAsync=function chainFuncsAsync(result,func){return result.then(func);};var chainFuncsSync=function chainFuncsSync(result,func){return func(result);};/**
* Runs the given functions sequentially. If the `init` param is a promise,
* functions are chained using `p.then()`. Otherwise, functions are chained by passing

View File

@ -20952,8 +20952,8 @@ const feed = '\f'.charCodeAt(0);
const tab = '\t'.charCodeAt(0);
const cr = '\r'.charCodeAt(0);
const at = '@'.charCodeAt(0);
const smallE = 'e'.charCodeAt(0);
const bigE = 'E'.charCodeAt(0);
const lowerE = 'e'.charCodeAt(0);
const upperE = 'E'.charCodeAt(0);
const digit0 = '0'.charCodeAt(0);
const digit9 = '9'.charCodeAt(0);
const atEnd = /[ \n\t\r\{\(\)'"\\;,/]/g;
@ -21246,14 +21246,14 @@ module.exports = function tokenize (input, options) {
// Exponential number notation with minus or plus: 1e-10, 1e+10
if (regex === wordEndNum || code === period) {
let code1 = css.charCodeAt(next),
code2 = css.charCodeAt(next + 1),
code3 = css.charCodeAt(next + 2);
let ncode = css.charCodeAt(next),
ncode1 = css.charCodeAt(next + 1),
ncode2 = css.charCodeAt(next + 2);
if (
(code1 === smallE || code1 === bigE) &&
(code2 === minus || code2 === plus) &&
(code3 >= digit0 && code3 <= digit9)
(ncode === lowerE || ncode === upperE) &&
(ncode1 === minus || ncode1 === plus) &&
(ncode2 >= digit0 && ncode2 <= digit9)
) {
wordEndNum.lastIndex = next + 2;
wordEndNum.test(css);

View File

@ -232,9 +232,9 @@ var process = {
uptime: uptime
};
var __dirname = '/Users/suchipi/p/prettier/dist';
var __dirname = '/Users/azz/code/prettier/dist';
var __filename = '/Users/suchipi/p/prettier/dist/parser-typescript.js';
var __filename = '/Users/azz/code/prettier/dist/parser-typescript.js';
var browser$1 = true;