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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade: swap chalk鈫抰urbocolor; remove extraneous devDep #1878

Merged
merged 1 commit into from Jul 18, 2018
Merged

upgrade: swap chalk鈫抰urbocolor; remove extraneous devDep #1878

merged 1 commit into from Jul 18, 2018

Conversation

@jorgebucaran
Copy link
Contributor

@jorgebucaran jorgebucaran commented Jul 18, 2018

Hi! @ricardograca! 馃憢

Summary

This PR replaces chalk for turbocolor. Turbocolor is a ligther/faster drop-in replacement for chalk (10x~20x faster load time & runtime) with no dependencies. This is not a breaking change.

Motivation

Improve one dependency for a more performant one and remove an extraneous dependency.

Proposed solution

Turbocolor has essentially the same API as chalk; it's just lighter (no deps) and faster. See full benchmarks.

turbocolor/chalk
# Load Time
chalk: 15.190ms
turbocolor: 0.777ms

# All Colors
chalk 脳 8,729 ops/sec
turbocolor 脳 158,383 ops/sec

# Chained Colors
chalk 脳 1,838 ops/sec
turbocolor 脳 39,830 ops/sec

# Nested Colors
chalk 脳 4,049 ops/sec
turbocolor 脳 59,833 ops/sec

Current PR Issues

None.


Let me know if this looks good to you and if you'd like to accept my contribution :)

@ricardograca
Copy link
Member

@ricardograca ricardograca commented Jul 18, 2018

Hey @jorgebucaran thanks for the contribution. It looks good to me. I was actually thinking of removing chalk altogether since it's only used to output a single color in a single place, so not sure how useful it is, but I'll accept this for now, especially because it has no dependencies.

@ricardograca ricardograca added this to To Do in Version 0.14.0 via automation Jul 18, 2018
@ricardograca ricardograca merged commit 2afb78e into bookshelf:master Jul 18, 2018
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Version 0.14.0 automation moved this from To Do to Done Jul 18, 2018
@jorgebucaran
Copy link
Contributor Author

@jorgebucaran jorgebucaran commented Jul 18, 2018

Thanks, @ricardogama! If you need help with that or if you want to use it in more places I'd love to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants