Ika
432c9d7d04
feat(yaml): support proseWrap ( #4742 )
...
- support `proseWrap` in `yaml`
- move `proseWrap` to `commonOptions`
- update to `yaml@1.0.0-rc.4` and `yaml-unist-parser@1.0.0-rc.1`
2018-07-04 00:28:47 +08:00
Simen Bekkhus
51b7c02e12
Upgrade jest to 22 ( #4782 )
...
* chore: upgrade Jest
* chore: update snapshots
* chore: lock down babel dependency using invalid syntax
* 2 args to test.skip
* use jest 22 for now
* Revert "2 args to test.skip"
This reverts commit 691fdc3f99e320f2303958f2b503f7b4c93fa455.
* remove snapshot name from matcher
* fix standalone tests skips
2018-07-03 03:06:29 -03:00
Ika
99c4e41fa1
feat: format yaml front matter ( #4773 )
...
* refactor: front-matter
* feat: format yaml front matter
2018-07-03 09:54:40 +08:00
Lucas Duailibe
6a6e8cada0
Fix benchmark require ( #4792 )
2018-07-02 13:17:08 -03:00
Ika
e9f489cea1
refactor(debug-repeat): use built-in int type ( #4791 )
2018-07-02 16:01:05 +08:00
Ivan Babak
b9fb113b3b
feat(benchmark): add options to measure performance ( #4776 ) ( #4789 )
...
- `--debug-benchmark` uses `benchmark` module to produce statistically significant time measurements.
- `--debug-repeat` uses a naive loop and measures just the average run time, but useful for profiling to highlight hot functions.
2018-07-01 19:49:16 -07:00
Ivan Babak
95cc2c97b5
fix(perf): shortcut getStringWidth for ASCII-only strings ( #4776 ) ( #4790 )
2018-07-01 19:47:55 -07:00
Ika
c4be0a57c3
feat(playground): add description for options ( #4785 )
...
* feat(playground): add description for options
* fix: support opposite description
* refactor
2018-07-02 08:23:21 +08:00
Alexander Kachkaev
a05fd118be
Do not require space after markdown block language name ( #4783 )
...
https://github.com/prettier/prettier/pull/4153 made it possible to detect fenced code block language when it is followed by arguments (e.g. ` ```js {something=something} `). This PR makes it also possible to detect language in cases cases like ` ```js{something=something} ` (no space).
The reason for this change is that Atom highlights code blocks regardless of a space after the language name, which makes users wonder why the correctly detected code block is not being formatted:
<img width="324" alt="screen shot 2018-06-28 at 22 08 13" src="https://user-images.githubusercontent.com/608862/42060780-db11f5b6-7b1f-11e8-9f43-fe91843f7d89.png ">
PR background: https://github.com/prettier/prettier/pull/4153#issuecomment-401174999
2018-07-02 08:22:56 +08:00
Lucas Duailibe
3f91d6427d
Correctly replace 'process.env.NODE_ENV' ( #4787 )
2018-07-01 11:22:40 -03:00
Yangshun Tay
94d928b9eb
Upgrade Docusaurus to 1.3.1 ( #4738 )
2018-07-01 10:59:20 -03:00
Ika
9bb8edf96a
feat: support .js.flow ( #4777 )
...
* feat: support .js.flow
* feat: add Flow language entry
2018-07-01 16:18:08 +08:00
Ika
b4a92c6ee5
feat(playground): use real code sample ( #4770 )
...
* feat(playground): double click to insert example
* fix: correct condition
* feat: real code sample
* fix: remove unnecessary updateValue
* feat: auto-select on focus
2018-07-01 16:17:25 +08:00
Ika
61d5eeadd3
fix(javascript): add parens for await in bind ( #4778 )
2018-06-30 23:15:45 +08:00
Simen Bekkhus
d450882289
chore: dedupe dependencies in lockfile ( #4781 )
...
I had this lying in my tree when I looked at maybe upgrading Jest. So why not open up a PR with it 🙂
This is `yarn-tools fix-duplicates` followed by `yarn`.
https://www.npmjs.com/package/yarn-tools
2018-06-30 20:13:26 +08:00
Ika
50d242d085
feat(typescript): support TSOptionalType and TSRestType ( #4757 )
...
Ref: Microsoft/TypeScript#24897
2018-06-30 09:10:56 +08:00
Ika
e10c31a333
fix(typescript): update typescript-eslint-parser ( #4762 )
2018-06-29 19:27:21 +08:00
Lucas Duailibe
e765d31f8f
Release 1.13.7
2018-06-28 16:26:15 -03:00
Lucas Duailibe
c10c0e3dae
Fix docs lint
2018-06-28 16:25:56 -03:00
Lucas Duailibe
576e570711
Fix custom require's ( #4766 )
2018-06-28 15:56:25 -03:00
Derek Kramer
0ce40b197d
Add `--stdin-filepath` to website ( #4513 )
2018-06-28 20:38:16 +02:00
Ika
0b659b898d
feat: update linguist languages ( #4741 )
...
Context: https://github.com/prettier/prettier/pull/4734#issue-196702272
Languages should be easy to maintain now.
2018-06-28 08:24:02 +08:00
Rhys Bower
2c2283ea7d
Update Jest URL to jestjs.io ( #4756 )
2018-06-26 22:05:45 -03:00
Ika
b67fa907bd
fix(markdown): preserve email autolink ( #4740 )
...
```diff
<hello@example.com>
<mailto:hello@example.com>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-<mailto:hello@example.com>
+<hello@example.com>
<mailto:hello@example.com>
```
2018-06-27 08:36:51 +08:00
Warren Seine
6c482e2e6c
Expose `isPreviousLineEmpty` to plugins ( #4747 ). ( #4748 )
2018-06-25 23:20:00 -06:00
Karl O'Keeffe
7a3ac3a693
Handle JSX whitespace separately from fbt whitespace ( #4717 )
...
* Hande JSX whitespace separately from fbt whitespace
* Extra test cases
* Further tweak to JSX handling
* Possible improvement of single character text
* More tests
* Pull out separator code
* More tests for fbt
2018-06-25 19:11:40 +01:00
Ika
9805babf94
docs(changelog): link -> diff
...
for consistency
2018-06-25 22:10:11 +08:00
Lucas Duailibe
1baddf27f2
Bump Prettier dependency to 1.13.6
2018-06-25 10:59:37 -03:00
Lucas Duailibe
114b30b196
Release 1.13.6
2018-06-25 10:58:03 -03:00
Evilebot Tnawi
aa4ea034b3
refactor: some stuff ( #4703 )
2018-06-25 12:57:41 +03:00
Ika
f51acf22fe
feat(vue): support pragma ( #4713 )
2018-06-25 10:44:00 +08:00
Michael Krauße
908fb95dc6
It should be said that filewatcher is a plugin ( #4743 )
...
File-Watcher is an extra plugin which needs to be installed.
2018-06-24 17:04:07 -06:00
Ika
c38e6af301
fix(yaml): add missing `since` field ( #4739 )
2018-06-23 17:04:47 +08:00
Ika
652628b6c9
chore: update lockfile
...
reflect changes in #4733
2018-06-23 15:26:50 +08:00
Suchipi
cb5e1db4a5
Revert "Ternary Operators in JSX Expression Containers ( #4731 )" ( #4736 )
...
This reverts commit 12046cd01b
.
2018-06-22 10:32:38 -06:00
tyrerexus
12046cd01b
Ternary Operators in JSX Expression Containers ( #4731 )
...
This pull request aims to fix the issue of excessive nesting brought up in the following comment: https://github.com/prettier/prettier/issues/737#issuecomment-392541493
This "fix" is very simple. It adds a new possible way to activate JSX mode for ternary operators. If the first non-conditional parent of the expression is a JSX expression container, then JSX mode gets activated.
This branch also contains a test case for said scenario.
2018-06-22 10:30:53 -06:00
David Gomes
9e0b1223cd
Update postcss-scss parser version to 1.0.6 (with test for it). ( #4733 )
2018-06-22 13:42:15 +03:00
Ika
f53b5b8323
fix(options): inferParser for standalone ( #4721 )
2018-06-22 12:43:44 +08:00
Ika
5cfaba6a1c
chore(ISSUE_TEMPLATE): add template for integration issue ( #4722 )
...
Ref: https://blog.github.com/2018-05-02-issue-template-improvements/
![image](https://user-images.githubusercontent.com/8341033/41692826-e7b98d06-7534-11e8-9b51-54a04c097681.png )
So that people would know what kind of info we need to know to understand issues like #4720 .
2018-06-22 12:37:52 +08:00
Rubén Norte
cbef0105e9
Upgrade flow-parser to 0.75.0 ( #4727 )
...
* Upgrade flow-parser to 0.75.0
* Added failing test for optional catch binding and flow-parser@0.74.0
2018-06-21 10:50:54 -07:00
Ika
dcf44ffbdc
feat: support YAML ( #4563 )
...
* feat: support YAML
* fix: do not indent sequence in mappingValue
* docs: add yaml to index.md
* fix: reduce `SyntaxError: Node#parse consumed no characters`
* chore: remove old-build and new-worker.js
* refactor
* refactor
* refactor
* refactor
* refactor
* refactor
* refactor
* refactor
* refactor
* refactor
* refactor
* refactor
* fix: no space after `<<`
* fix: add yaml to standalone test
* test: add tests
* fix: next empty line in flow collection
* fix: tabs are not allowed
http://yaml.org/spec/1.2/spec.html#space/indentation/
* fix: update parser
* feat: rewrite the mappingItem logic
* feat: indent sequence in mapping
* feat(doc): add ifBreak#groupId and group#id
* chore: fix node 4
* chore: add tools_yaml.svg
* chore: remove resolved TODO
* refactor: remove unnecessary workaround
* chore(worker): importScriptOnce
* chore(build): rename with babelPlugins
* make it rollup compatible
* feat: support singleQuote
* refactor
2018-06-21 10:29:42 +08:00
Lucas Duailibe
9ec1da1ad1
[internal] Cache build results ( #4693 )
2018-06-18 15:16:40 -03:00
Anthony Sottile
5d5c97a17f
Fix `prettier` installed in a directory not named prettier ( #4706 )
2018-06-18 13:29:54 -03:00
Ika
b99de9811b
feat(graphql): support pragma ( #4699 )
2018-06-17 14:04:48 +08:00
Jed Fox
02e0bdc130
A few changelog updates ( #4702 )
...
* Update CHANGELOG.md
* s/link/diff/; shorten a few SHAs; add missing diff link
2018-06-15 16:43:25 -04:00
Ika
4109abf4dd
feat(javascript): support BigIntLiteral ( #4697 )
2018-06-16 00:20:04 +08:00
Evilebot Tnawi
03a2002348
fix: newline between front-matter and comment ( #4701 )
2018-06-15 16:27:41 +03:00
Vojtěch Štěpančík
56af3d621d
Add support for parsing babylons throwExpressions ( #4695 )
2018-06-14 21:35:39 -03:00
Ika
18aa527adc
feat(api): support relative paths for plugin(SearchDir)s in config files ( #4667 )
...
* feat(api): support relative paths for plugin(SearchDir)s in config files
* fix: convince appveyor
2018-06-15 04:25:03 +08:00
Lucas Duailibe
0780adbb0d
Fix build output in CircleCi
2018-06-14 11:15:04 -03:00