Commit Graph

80 Commits (bfd5fa4515bdb867c59bbf9a837d8043422bf7bf)

Author SHA1 Message Date
Christopher Chedeau 1578e180f4 Add support for flow type spread in .43 and babylon beta8 (#1064)
Fixes https://twitter.com/ryyppy/status/844116626467438592
2017-04-04 14:52:16 -07:00
Brian Ng d9a4efcc35 Bump babylon to 7.0.0-beta.8 (#1118)
* Bump babylon version

* Enable flow predicate tests in babylon
2017-04-04 14:21:56 -07:00
Christopher Chedeau 569791a57a Update babylon to 7.0.0-beta.4 (#1047)
Fixes #700
2017-03-20 12:46:31 -04:00
Christopher Chedeau b012f7531e Fix comments inside of ObjectPattern (#1045)
ast-types was missing a type, I sent a PR on ast-type ( https://github.com/benjamn/ast-types/pull/211 ) which was merged and released (thanks @benjamn for being super quick!). So I'm upgrading ast-types and add the test in this PR.

Fixes #1007
2017-03-20 12:42:07 -04:00
Rasmus Eneman e41ed4955d [WIP] Add some typescript tests (#1033)
* Add some typescript tests

* fix: Remove extraneous colon in type parameter constraint

* style: Add missing newline at EOF in TS tests

* feat: Pretty print typescript object type annotations

* feat: Pretty print TSFunctionType

* fix: Type annotations was missing on class properties

* Add a new batch of tests

* Bump typescript-eslint-parser

* Add a new batch of tests and fix a syntax error in previous

* Bump typescript-eslint-parser
2017-03-19 08:06:52 -07:00
Simen Bekkhus 0fc8584827 Update repo links (#993) 2017-03-13 14:39:54 -07:00
Christopher Chedeau 344401c038 0.22.0 2017-03-09 09:15:40 -08:00
James Henry 72456bf06f [WIP] TypeScript Parser (#915)
* WIP immediate feedback

* typescript parser is drop-in replacement for flow parser

* Add new TypeScript Parser snapshots where drop-in replacement possible

* Snapshot updates after rebasing

* Remove unnecessary stripping of properties on TypeScript parser AST

* Remove annotated issues

* Move TS dependencies to dev for now
2017-03-08 13:18:13 -08:00
Christopher Chedeau b570154dd5 0.21.0 2017-03-03 14:03:36 -08:00
Christopher Chedeau e09bdd4447 0.20.0 2017-02-28 10:49:30 -08:00
Christopher Chedeau edf2bde590 Fix trailing commas in docs (#825)
I also added support for parser dropdown and stop minifying the bundle so that the flow parser actually works.

Fixes #816
2017-02-27 17:02:41 -05:00
Christopher Chedeau 1b9234a8c4 Update flow to 0.40 (#808)
This fixes the bug with comments swapped between `/*` and `//`

Fixes #755
2017-02-24 15:46:20 -08:00
Christopher Chedeau e0cac2049d 0.19.0 2017-02-23 09:52:55 -08:00
Brian Ng 543e62cd31 Revert babylon bump (#792) 2017-02-23 09:00:57 -08:00
Brian Ng 211deb527e Bump babylon & add test for async func decl (#790)
* Add test for async function declaration

* Bump babylon version
2017-02-23 09:32:20 -05:00
Rogelio Guzman e039ca888a Upgrade to Jest 19.0.1 (#779) 2017-02-22 10:28:17 -08:00
Rogelio Guzman d45e157563 Upgrade to Jest 19 (#762)
* Upgrade to Jest 19

* Use exact versions for Jest
2017-02-21 13:59:19 -08:00
Christopher Chedeau 848dfa3505 0.18.0 2017-02-16 09:28:26 -08:00
Christopher Chedeau 74fb4a43b1 0.17.1 2017-02-14 13:47:46 -08:00
Christopher Chedeau fbba7db6e2 0.17.0 2017-02-13 19:11:05 -08:00
Umidbek Karimov 97fd8a8d81 Log filename with [update] or [ignore] flags during `--write` process. (#584)
* Make `--write` logs more informative.

* Add format duration to logs.

* Use colors instead of [ignore] and [update] labels.

* Remove `colors` dependency.

* Use `chalk` to colorize logs.

* Print filename before `format` and add duration info later.

* Print filename before read error.
2017-02-07 14:03:48 -05:00
Christopher Chedeau 4df5250f74 Add --debug-check cli option (#627)
This let's you run `pp(x) === pp(pp(x))` across an entire codebase quickly. I think it's small enough that we can merge it in to master while we are nailing down all the issues.

You can see the output in #610
2017-02-07 10:04:44 -05:00
Christopher Chedeau 98d04d8c70 0.16.0 2017-02-05 18:28:20 -08:00
Christopher Chedeau b040be2206 0.15.0 2017-02-01 16:31:11 -08:00
Christopher Chedeau efc3ee0488 0.14.1 2017-01-30 09:56:01 -08:00
Christopher Chedeau f88c95031e 0.14.0 2017-01-30 09:41:09 -08:00
Christopher Chedeau 3f776bed3d 0.13.1 hotfix 2017-01-28 08:19:00 -08:00
Simon Lydell d548ef0790 Add missing jest-validate to dependencies (#500) 2017-01-28 07:49:57 -08:00
Christopher Chedeau 94b137ac47 0.13.0 2017-01-27 14:41:30 -08:00
Christopher Chedeau caf7f2a6f2 0.12.0 2017-01-26 20:24:17 -08:00
daleroy 69b5d098e9 Update package.json, use ast-types 0.9.4 (#453)
Add Flow's DeclareExportAllDeclaration type has been merged into benjamn/ast-types so the forks are now in sync.
2017-01-24 18:08:35 -05:00
Michał Pierzchała 66fe2f78fa Validate user-provided config with jest-validate (#301)
* Validate user-provided config with jest-validate

* Don't use object shorthand

* Update jest-validate to 18.2

* Fix Node4 destructuring from require

* Make use of jest-validate for deprecation message

* Remove chalk reference
2017-01-23 16:33:58 -05:00
Christopher Chedeau ef531274f7 0.11.0 2017-01-23 09:40:01 -08:00
Simon Lydell bb1884320b Use babel-code-frame for syntax errors (#367)
* Use babel-code-frame for syntax errors

* Support the `--color` option more explicitly

* Update rollup config to handle babel-code-frame

* Use exact dependencies
2017-01-23 09:10:51 -08:00
Simon Lydell 6b3d3bc066 Add glob support to the CLI (#363)
* Add glob support to the CLI

Fixes #145. Fixes #362.

* Update README.md regarding globs

* Use exact dependency for glob
2017-01-23 10:37:57 -05:00
Henry Zhu 237e6f44bc Use a Symbol instead of the private dep (#359) 2017-01-20 15:55:24 -08:00
Christopher Chedeau 21729d8207 Drop jsesc (#357)
Even though JSON.stringify is not 100% correct, this is only used for debugging and doesn't warrant adding a dependency for it.
2017-01-20 14:55:41 -08:00
Christopher Chedeau 92f14d79df v0.0.10 (#353) 2017-01-20 10:00:01 -08:00
Christopher Chedeau a7793a66ee Add description to package.json (#320)
Fixes #319
2017-01-19 10:00:45 -05:00
Christopher Chedeau e4b5aaade2 Fix docs (#307)
It doesn't compile cleanly anymore:
- esutils checks for Buffer.isBuffer without ensuring that Buffer exists.
- for version, we require a json file, need a rollup extension for that.

I no longer hardcode the version number.

Note: we need to merge this pull request after we have done the release so that the version number is correct and need to rebuild the minified version in a subsequent commit.
2017-01-18 14:24:42 -08:00
Christopher Chedeau 10ff6ead26 v0.0.9 (#308) 2017-01-18 14:23:39 -08:00
Christopher Chedeau fadbbeb4ea Use exact versions in package.json (#291) 2017-01-18 12:48:04 -05:00
Christopher Chedeau 60af75b37b Update flow-parser to 0.38 (#290) 2017-01-18 12:35:42 -05:00
James Long bc5392c2a6 v0.0.8 2017-01-17 10:31:47 -05:00
Christopher Chedeau c9af5a6c3b Escape strings using jsesc (#229)
The current implementation with `JSON.stringify()` is clever but unfortunately generates incorrect JavaScript. Using `jsesc` seems like a better and safer option. https://github.com/mathiasbynens/jsesc It doesn't have any dependencies and is pretty small.

I opted for escaping all the non ascii characters, so we don't display emojis anymore. I don't think that the world is ready yet for having random unicode characters inside of source files, there still are so many parts of the toolchain that breaks with them. If we want to revert back on this decision, there's a `minimal` option on jsesc which only escapes values that need to in order to generate valid JavaScript file (assuming the encoding of the file is set to utf8).

Also, while working on React Native, we've seen that there is an optimization inside of jsc for js files that are all ascii: it doesn't do a copy for the conversion to ucs16.

Fixes #163
2017-01-16 11:03:59 -05:00
Benjamin Tan 3f31a87da1 Remove legacy Recast code and simplify API. (#191) 2017-01-14 23:25:30 -05:00
James Long e447971612 v0.0.7 2017-01-13 23:27:49 -05:00
Kent C. Dodds f49111c87c add license to package.json (#178)
Because right now it doesn't show any license on
[the npm page](https://www.npmjs.com/package/prettier).

Also, it's causing my [DependencyCI](https://dependencyci.com/github/kentcdodds/prettier-eslint/builds/5)
build to fail 😅
2017-01-13 23:11:03 -05:00
James Long 7e3161096b v0.0.6 2017-01-13 15:09:37 -05:00
Vu Tran b429b2443c include index.js in format:all script (#132) 2017-01-13 14:23:07 -05:00