Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add types to prettier #591

Merged
merged 2 commits into from Sep 10, 2019

Conversation

@bartlomieju
Copy link
Contributor

commented Sep 10, 2019

This PR adds types to prettier.

WARNING: types are for 1.18 version, while prettier/ uses 1.17.1 version. I couldn't find types 1.18, so it's a good idea to update prettier anyway.

This was suggested by @MarkTiedemann in denoland/deno#2490 and providing types significantly shortens time to compile prettier`

Before:
$ time deno --reload --no-prompt ../deno_std/prettier/main.ts
real	0m36.094s
user	0m43.474s
sys	0m1.148s

After:
$ time deno_dev --reload --no-prompt ../deno_std/prettier/main.ts
real	0m6.710s
user	0m10.205s
sys	0m0.232s

(Note that after is debug build, while before is v0.17.0 release)

To get this to work we need to land denoland/deno#2910 first

@bartlomieju

This comment has been minimized.

Copy link
Contributor Author

commented Sep 10, 2019

@axetroy can you upgrade prettier to 1.18?

prettier/prettier.ts Show resolved Hide resolved
@ry

This comment has been minimized.

Copy link
Contributor

commented Sep 10, 2019

Nice! Good suggestion @MarkTiedemann !

@bartlomieju

This comment has been minimized.

Copy link
Contributor Author

commented Sep 10, 2019

It works fine for me with denoland/deno#2910 and it's just ignored without it.

I can update prettier tomorrow to match version of types.

@ry
ry approved these changes Sep 10, 2019
Copy link
Contributor

left a comment

LGTM

@ry ry merged commit 73fe36f into denoland:master Sep 10, 2019
5 checks passed
5 checks passed
denoland.deno_std Build #20190910.2 succeeded
Details
denoland.deno_std (Linux) Linux succeeded
Details
denoland.deno_std (Mac) Mac succeeded
Details
denoland.deno_std (Windows) Windows succeeded
Details
license/cla Contributor License Agreement is signed.
Details
@bartlomieju bartlomieju deleted the bartlomieju:feat-prettier_types branch Sep 10, 2019
@axetroy axetroy referenced this pull request Sep 11, 2019
ry added a commit to ry/deno that referenced this pull request Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.