Joseph Frazier
88be12ca07
Allow `originalText` to be passed to `formatAST()` ( #4677 )
...
This allows `prettier.__debug.formatAST` to not crash when given the AST
for the below code (taken from https://astexplorer.net/ ), which is
useful when trying to use Prettier as a code generator for an AST
without corresponding source code (https://github.com/prettier/prettier/issues/4675 )
```js
let tips = [
"Click on any AST node with a '+' to expand it",
"Hovering over a node highlights the \
corresponding part in the source code",
"Shift click on an AST node expands the whole substree"
];
function printTips() {
tips.forEach((tip, i) => console.log(`Tip ${i}:` + tip));
}
```
2018-06-13 12:30:14 -04:00
Lucas Duailibe
f0907a049d
chore(rollup): Refactor native shims plugin
2018-06-13 12:49:35 -03:00
Lucas Duailibe
889b7dab79
Run tests using the standalone build in an empty context ( #4668 )
...
Validate that our build is stripping all the "native" dependencies (native modules and env vars).
2018-06-12 15:05:40 -03:00
Tony Trinh
dcc060a5a5
refactor: remove redundant call to normalizeOptions ( #4671 )
...
Removes redundant call to `normalizeOptions` (already done in preceding line)
8ec5432768/src/main/core.js (L260-L263)
2018-06-12 10:56:16 +08:00
Ika
5646573ad7
fix(javascript): preserve parens for type casting for sub-item ( #4648 )
2018-06-11 19:50:53 +08:00
Lynn Smeria
61d35dd636
fix(typescript): preserve type parameters of import-types ( #4656 ) ( #4662 )
2018-06-11 11:29:10 +10:00
Brian Ng
3e0dceda99
flow-parser@0.74.0 ( #4649 )
2018-06-09 17:03:50 -05:00
Ika
98bfd03d93
feat(typescript): support unknown type ( #4625 )
2018-06-10 00:12:30 +08:00
Ika
3666411bd5
chore(scripts): add missing `execa` import
...
See 4dde525996
2018-06-09 22:09:51 +08:00
Lucas Duailibe
d013983d8a
Always expand first argument if the second argument is also a call expression ( #4657 )
2018-06-08 15:16:12 -03:00
Lucas Duailibe
cb1c52ad08
Break JSX in arrow functions in JSX expressions ( #4601 )
2018-06-08 15:15:50 -03:00
Lucas Duailibe
4dde525996
[release script] Run Prettier on CHANGELOG.md before committing
2018-06-08 15:14:35 -03:00
Lucas Duailibe
6d42fd12e4
Bump Prettier dependency to 1.13.5
2018-06-08 15:06:04 -03:00
Lucas Duailibe
ab4ee77b3a
Release 1.13.5
2018-06-08 15:00:50 -03:00
Ika
c5bbee67d3
fix(playground): no unnecessary import ( #4653 )
2018-06-09 00:01:14 +08:00
Ika
35a42bef24
fix(markdown): better handling for trailing spaces ( #4593 )
...
- preserve trailing spaces in html, excluding html comment
- `doc-printer` is now unrelated to `options.parser`
- fix some cases that two trailing spaces are mis-considered as `break`
2018-06-08 00:20:25 +08:00
Ika
fb74dc54c3
feat(api): make `getFileInfo()` really async ( #4640 )
2018-06-07 00:34:02 +08:00
Aakansha Doshi
8ec5432768
Fix empty file error in json and graphql ( #4553 )
...
* Fix empty file error in json and graphql
* fix AST_COMPARE=1 issue
* use tests/empty
* revert
* fix lint
2018-06-06 10:41:12 -03:00
Lucas Duailibe
70604f1fd1
[Release script] Use `execa`
2018-06-05 19:10:27 -03:00
Lucas Duailibe
54b1f8562d
Introduce Release script ( #4631 )
2018-06-05 16:37:52 -03:00
Ika
f27f6c525b
fix(typescript): preserve decorator on interface ( #4632 )
2018-06-05 00:08:24 +08:00
Lucas Azzola
abef84684d
Add AppVeyor and Blazing to Badges ( #4628 )
2018-06-04 14:16:06 +10:00
Lucas Duailibe
a4da6e6c8e
Inline _ or $ in the root of a method chain ( #4621 )
2018-06-01 12:51:06 -03:00
Ika
26b13b6274
chore(scripts): update ISSUE_TEMPLATE and exclude tarball ( #4620 )
2018-06-01 10:58:16 -03:00
Ika
77c0e940f3
docs(issue_template): bump version to 1.13.4
2018-06-01 20:07:17 +08:00
Ika
ae6abe4d8c
chore: bump own prettier to 1.13.4
2018-06-01 20:02:28 +08:00
Ika
dfefe259db
chore(release): 1.13.4
2018-06-01 19:59:12 +08:00
Ika
b55997eb3d
fix(multiparser): no additional trailing newline for graphql in js ( #4616 )
...
Fixes #4615
The root cause is the output doc from graphql printer does not match the desired input from `stripTrailingHardline`.
a9b21a01e2/src/doc/doc-utils.js (L167-L180)
2018-06-01 00:38:39 +08:00
Ika
e74e6565b4
fix(markdown): respect blank line between block htmls ( #4609 )
...
Fixes #4605
The AST here is actually two `html`s and it did follow the [CommonMark spec](https://spec.commonmark.org/0.28/#html-blocks ), so I ended up with respecting the blank line between block `html`s.
2018-06-01 00:33:37 +08:00
Ika
a9b21a01e2
docs(changelog): fix a typo in the url
2018-05-31 09:58:21 +08:00
Evilebot Tnawi
9387e9d833
fix: comment type for scss ( #4598 )
2018-05-30 23:22:18 +03:00
Lucas Duailibe
16da7d3a76
Bump own Prettier to 1.13.3
2018-05-30 15:04:20 -03:00
Lucas Duailibe
3d429dbade
1.13.3
2018-05-30 14:09:33 -03:00
Ika
75e86b9e6b
fix(cli): no regression for --debug-check + --list-different ( #4600 )
2018-05-31 00:42:26 +08:00
Ika
8abbc5d4b0
fix(javascript): regression for `hasOwnProperty` ( #4603 )
2018-05-31 00:39:39 +08:00
Jimmy Jia
dc5de053c4
fix: comment around color adjusters ( #4595 )
2018-05-29 21:03:09 +03:00
Lucas Duailibe
8a67378f97
Nicer logging on build script ( #4590 )
2018-05-29 14:59:57 -03:00
Ika
71e12ef321
docs: replace NO-BREAK SPACE with the normal one ( #4592 )
2018-05-29 23:01:22 +08:00
Ika
e9b7c7ff9b
chore: fix 2 TODOs ( #4591 )
2018-05-29 22:05:25 +08:00
Lucas Duailibe
68f594414e
Bump own Prettier to 1.13.2
2018-05-29 09:49:47 -03:00
Evilebot Tnawi
3d60871458
fix: output color adjusters ( #4494 )
2018-05-29 15:24:38 +03:00
Suchipi Izumi
c7d40b0ed9
1.13.2
2018-05-29 00:23:19 -06:00
Suchipi Izumi
89c84e5ee0
Fix some build script issues
...
* Copy README to dist
* Fix strings in prepublishOnly
2018-05-29 00:22:59 -06:00
Suchipi Izumi
fea34d4e70
Bump version to 1.13.1
2018-05-29 00:11:31 -06:00
Lucas Duailibe
1350edc5a6
Revert no parser error for API ( #4587 )
...
* Revert no parser error for API
* use warn
2018-05-28 23:43:44 -06:00
Ika
11275bfa9d
docs: fix linting
2018-05-29 10:16:07 +08:00
Lucas Duailibe
b8ded70848
Handle comments in assignments before template literals ( #4580 )
...
Closes #4560
2018-05-29 00:08:18 +10:00
さくら
d0fd41a10e
docs(misc): add `prettier-chrome` project ( #4581 )
...
An extension that can be formatted using Prettier in Chrome
2018-05-28 10:01:03 -03:00
Lucas Azzola
19cdd5fde2
Get tests passing on Windows ( #4579 )
...
Closes #4564
2018-05-28 21:46:55 +10:00
Jed Fox
1669a7b38b
Redirect the broken 1.13 blog link to the correct one ( #4570 )
...
* Redirect the broken 1.13 blog link to the correct one
https://twitter.com/prettiercode/status/1000819715374272515
* Redirect the broken 1.13 blog link to the correct one
https://twitter.com/prettiercode/status/1000819715374272515
* Revert "Rename 2018-05-27-1.13.0.md to 2018-05-23-1.13.0.md"
This reverts commit bce668af05
.
* Fix redirect target
2018-05-28 07:24:09 -04:00