Commit Graph
68 Commits
Author SHA1 Message Date
Georgii Dolzhykov 488e08d70b Remove the need to add full GitHub links in changelog entry titles (#9104) 2020-09-01 08:51:32 +08:00
Sosuke Suzuki cc63358c90 Respect spacing between template values in embedded css (#9078)
* Respect no space for embedded css

* Fix by lint

* Add changelog
2020-08-28 11:08:29 +09:00
18b4cabc0c Add 2.1 blog post (#8932)
* Add draft for 2.1 blog post

* Update cspell.json

* Update website/blog/2020-08-04-2.1.0.md

Co-authored-by: Chris Brody <chris.brody+brodybits@gmail.com>

* Update website/blog/2020-08-04-2.1.0.md

Co-authored-by: Chris Brody <chris.brody+brodybits@gmail.com>

* Update website/blog/2020-08-04-2.1.0.md

Co-authored-by: Chris Brody <chris.brody+brodybits@gmail.com>

* Update website/blog/2020-08-04-2.1.0.md

Co-authored-by: Chris Brody <chris.brody+brodybits@gmail.com>

* Update website/blog/2020-08-04-2.1.0.md

Co-authored-by: Chris Brody <chris.brody+brodybits@gmail.com>

* Update changelogs

* Add author to cspell ignore patterns

* Update cspell.json

* Fix original changelog

* Run draft script

* Update

* Fix TypeScript on Highlights

* Fix heading

* Fix author

* Fix changelog for 8410

* Fix syntax highlight

* Move changelog for 7844 to /scss

* Update website/blog/2020-08-21-2.1.0.md

Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com>

* Remove changelog_unreleased

* Update filename

* Replace to actual version manually

Co-authored-by: Chris Brody <chris.brody+brodybits@gmail.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com>
2020-08-24 20:36:52 +09:00
fisker Cheung dc46155962 Revert #7367 "Fix: remove unnecessary parens when yielding jsx" (#9011) 2020-08-21 09:09:45 +08:00
Sosuke Suzuki e3f075b3e7 Revert #7889 (#8861)
* Revert #7889

* Remove changelog

* Run prettier
2020-08-20 00:00:27 +09:00
fisker Cheung 797e93fc0a Support Decimal Proposal (#8901) 2020-08-05 11:04:30 +08:00
fisker Cheung d725261fc5 MDX: fix unstable format when embedded off (#8825) 2020-07-25 02:06:22 +08:00
fisker CheungandGeorgii Dolzhykov 07e5b06a1f Fix unstable pair of comments between class methods (#8731)
Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-07-15 12:16:49 +08:00
fisker Cheung 639e7fc869 Fix duplicated comments (#8742)
* Add failed test

* Fix issue

* more tests

* Restore verify parser

* Add changelog

* Update snapshots
2020-07-14 15:06:57 +03:00
Sosuke Suzuki 02137069a7 JavaScript: Break ternary expressions containing a multi-line block comment (#8592)
* Break ternary expression when there is multiline block comment

* Add changelog
2020-06-21 17:02:58 +09:00
Simon Lydell 9184743081 Quote and unquote number keys (#8508)
* Quote and unquote number keys

* Add changelog entry

* Add tests for escapes

* Fix idempotency

* Only run flow-repo/ tests with flow

271 jsfmt.spec.js in flow-repo use only the flow parser.
18 use flow and babel.
Now, all of them use only flow.

* Don’t unquote negative numbers

* Don’t quote/unquote numbers in TypeScript

* Quote BigInt

* Fix AST check

* Fix condition

* Fix BigInt to string

* Fix ESLint not recognizing BigInt

* Only quote/unquote “simple” numbers

* No need to clean BigIntLiteral anymore

* Add tests for 1. and .1

* Fix 1. and .1

* Remove unnecessary babel-ts from tests

* Only unquote numbers for babel

* Update changelog
2020-06-18 18:13:25 +03:00
Sosuke Suzuki 29959103a9 TypeScript: Prefer leading comment when there is a comment on after "?" in conditional types (#8557)
* Fix #8555

* Add changelog
2020-06-15 20:08:43 +09:00
Mellina Yonashiro ad855e4e03 Fix: don't wrap arrays in test.each template strings (#8354) 2020-06-15 00:09:23 +03:00
Georgii Dolzhykov 3094ad5aa2 Fix unstable comments in binary expressions (#8491) 2020-06-05 09:55:22 +03:00
Georgii Dolzhykov 1df6838b0e Revert #7787 (#8495) 2020-06-04 14:38:51 +03:00
Sosuke SuzukiandGeorgii Dolzhykov 9c67e7b7f1 JavaScript: Fix indentation for binary expressions with trailing comments (#8476)
* Modify to align binaryish expression with trailing comment

* Add tests

* Add comment

* Add test

* Add changelog

* Fix by lint

* Modify to move transformation to printBinaryishExpressions

* Remove unnecessary new line

* Fix hasTrailingCommentInBinaryish

* Add shouldReturnParts option to printComments

* Add tests from review

* Fix by lint

* Extract and use normalizeParts

* Group CallExpression when parent node is binaryish

* Fix by lint

* Remove unnecessary change

* Wrap the doc of most left node with group

* Add tests

* Update pr-8476.md

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-06-04 08:59:05 +03:00
Sosuke Suzuki 85f0b0cc79 Fix Stage-1 => Stage-2 (#8487) 2020-06-03 19:22:11 +09:00
fisker Cheung 2b68f981fd Babel: support record and tuple syntax (#8453) 2020-06-03 09:35:13 +08:00
fisker Cheung 7d2e57c67f Babel: support moduleAttributes (#8436) 2020-06-02 20:31:33 +08:00
Sosuke Suzuki 6b4c4066aa JSX: Wrap jsx element on the left of "<" with parentheses (#8461)
* Modify to wrap jsx on the left of "<"

* Only left

* Add changelog
2020-06-01 10:27:55 +09:00
Georgii Dolzhykov 5a0e33cc84 fix(range): improve detection of JS source elements (#8419)
* fix(range): improve detection of JS source elements

* Add changelog entry

* Remove unneeded comment

* Add more types and update snapshots
2020-05-29 07:29:09 +03:00
Sosuke Suzuki f31430d7be JavaScript: Support Babel 7.10 private field in in (#8431)
* Support Babel 7.10 private in

* Add changelog

* Fix changelog
2020-05-28 03:02:10 +09:00
Georgii Dolzhykov 81d7e06973 Fix range indentation (#8410) 2020-05-27 11:48:32 +03:00
Georgii Dolzhykov d420202df4 fix(js): comments after superclass (#8312)
* Fix comments after superclass

* add changelog

* refactor

* Organize tests

* Use addBlockStatementFirstComment

* Amend unstableTests list

* Avoid identical comments in tests

* Add tests for `implements`

* Handle comments in interfaces

* Remove an always-false condition

* Almost a fix

* Further fixes

* Add DeclareClass

* Add DeclareInterface, mixins

* Fix extends in DeclareClass

* Fix DeclareClass

* Fix mixins

* Refactor: remove unused parameters

* Add marked dangling comments

* Unify printing of interface for TS and Flow

* Fix unstable interfaces

* Remove comment

* Restore the original behavior for interfaces with multiple inheritance

* Refactoring, tests

* Remove unused code

* Include a file accidentally omitted from the merge commit

* Remove unused type import
2020-05-24 21:53:29 +03:00
fisker Cheung f2c1d70918 JS: pragma support files with shebang (#8376) 2020-05-23 19:28:05 +08:00
Georgii Dolzhykov ce2114533a Fix extra space after minus in CSS-in-JS (#8255)
* Fix extra space after minus in CSS-in-JS

* add changelog entry
2020-05-08 16:53:36 +03:00
Abdullah AttaandGeorgii Dolzhykov 8acc9e2a48 fix inconsistent parsing of injected expressions in styled-components' css (#8097)
* fix inconsistent parsing of styled-components' css

* fix for multiple placeholders in one line

* add test for multiple placeholders in one line

* add changelog for the pr

* fix multi part placeholders

* make placeholderMatch regex stricter

* add tests for all fixed cases

* update changelog

* fix changelog link

* do not edit the original doc.parts

* fix changelog output

* simplify logic

* remove unnecessary `tokens` array

* simplify logic even more

* changes according to review

* finalize

* update snapshots after merge

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-05-07 16:06:13 +03:00
Masashi HiranoandGeorgii Dolzhykov 3b78c021d1 JS: Keep the position of end-of-line comments in binary expressions (#7787)
* JS: block comments with LogicalExpression

* Add changelog_unreleased for #7787

* Add handleBinaryExpression in comments.js

* Refactor comments.js to use isBlockComment

* Update pr-7787.md

* Update pr-7787.md

* test: regenerate snapshot for comments/logical-expression

* test: logical-expression.js as unstable tests

* test: add comments/binary-expressions-trailing-space.js

* fix: make two functions one 'handleEndOfLineBlockComments'

* Rename handleEndOfLineBlockComments to handleBinaryExpression

* Refactor handleBinaryExpression to remove unneed condition & params

* Divide and rename test files for handleBinaryExpression()

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-05-07 16:05:27 +03:00
fisker Cheung 82676f6308 Keep object key with escape sequence as it is (#8160) 2020-04-27 10:30:00 +08:00
fisker Cheung e69e90f067 Fix object trailing commas that last property is ignored (#8111)
* Add failed tests

* Fix trailing commas when last property is ignored

* Add changelog

* Add nested tests

* changelog title
2020-04-25 17:54:10 +03:00
Masashi Hiranoandfisker Cheung 1528e45ff2 JS: Fix end-of-line comments if followed by trailing whitespace (#8069)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2020-04-25 10:38:06 +08:00
Georgii Dolzhykov f67f65055b Further improve method chain breaking heuristic (#7889) 2020-04-16 00:07:44 +03:00
Kevin Gibbons 22d149b9f6 Add --embedded-language-formatting={auto,off} option (#7875) 2020-04-11 20:22:44 +03:00
Sosuke SuzukiandGeorgii Dolzhykov 17d6e38d34 JavaScript: Fix pipeline bugs (#7979)
* Fix arrow regression

* Fix resolvePluginConflict

* Update changelog

* Fix condition

* Edit changelog: add link to Babel blog, change order (to be as in the blog)

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-04-08 23:49:46 +09:00
Sosuke SuzukiandGeorgii Dolzhykov ccaaad007d JavaScript: Support Smart and F#-style Pipeline (#6319)
* Modify to support smart-pipeline in printer

* Add tests

* add a changelog entry

* change minimal to smart

* fix parens issues

* Support fsharp-pipeline

* Fix needs-parens

* Try to fix ci problem

* Update changelog

* Add more tests

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-04-07 19:42:45 +09:00
Georgii Dolzhykov ea5f3b043f Release 2.0.3 2020-04-05 23:47:18 +03:00
Sidharth Vinod 04e4ef3758 Uniform line endings for multi line strings/comments (#7891) 2020-04-05 13:51:29 +03:00
Georgii Dolzhykov 2d1142fc30 Use scss parser for css-in-js (#7883) 2020-03-31 17:10:38 +03:00
Kevin Gibbons 18bf01e8f8 Fix bug with holes in array literals (#7911) 2020-03-31 12:43:19 +03:00
fisker Cheung b0ffc0f1df Fix prettier-ignore inside JSX (#7877) 2020-03-26 20:10:05 +02:00
Georgii Dolzhykov 607afd7b36 Release 2.0.2 2020-03-24 00:32:35 +02:00
Georgii Dolzhykov 8ec7bc229a fix formatting of pseudo-elements and pseudo-classes in styled-components (#7842) 2020-03-23 16:59:49 +02:00
Georgii Dolzhykov 8f7164fdf4 clean changelog_unreleased 2020-03-21 22:41:36 +02:00
Georgii DolzhykovandJed Fox 8334610aa2 Blog post for 2.0 (#7417)
* add a script that concatenates changelog_unreleased into a blog post draft

* syntax highlighting issues

* generate post draft

* Copy edit, remove error stacks

* Update 2020-00-00-2.0.0.md

* Update changelog source files

* edit entries, regenerate the post

* add lost file in versioned_docs

Co-authored-by: Jed Fox <git@twopointzero.us>
2020-03-21 22:24:23 +02:00
Georgii Dolzhykov 1ad13d7420 Ultimate fix for Closure-style type casts (#7791) 2020-03-19 18:26:22 +02:00
Sosuke Suzuki 78fe9cab73 JavaScript: Keep comments position for assignment/variable (#7709) 2020-03-10 11:37:42 +02:00
Georgii Dolzhykov a6563fa584 edit changelog entries 2020-02-24 23:03:55 +02:00
Kevin GibbonsandGeorgii Dolzhykov ada3d08df5 Put space after generator star, not before (#7516)
* Put space after generator star, not before

* remove pr-7516.md, edit pr-3903.md instead

Because the release blog post will be generated from these files.

* edit pr-3903.md

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-02-18 16:27:52 +02:00
fisker Cheung d2de524571 Don't add parens to undefined in ConditionalExpression with jsx (#7504)
* Add failed test

* Don't add parens to Literal and Identifier

* Update snap shot

* Move test to `jsx`

* Only undefined

* Add changelog
2020-02-17 16:34:50 +02:00
Kagami Sascha RosylightandGeorgii Dolzhykov 1cd90c9fb8 Do not add hard linebreak for html template (#7208)
* Do not add hard linebreak for html template

* Collapse whitespaces to single space char

* restore line breaking

* use `line` and rename vars

* add test

* support htmlWhitespaceSensitivity

* indent if breakable

* add htmlWhitespaceSensitivity test

* indent only when multiple top levels

* add a changelog entry

* update snapshot

* replace match with test

* split tests into multiple files for better readability of snapshots

* fix an edge case with html-in-js-in-html

Co-authored-by: Georgii Dolzhykov <thorn.mailbox@gmail.com>
2020-02-03 17:09:38 +02:00