Closed mxmason closed 2 years ago
I'd go with picocolors :)
On Mon, Oct 25, 2021, 08:03 EJ Mason @.***> wrote:
👋🏻 I saw that @XhmikosR https://github.com/XhmikosR has been doing some cleanup work on my v5 release (thanks!) and I wanted to contribute my own housecleaning.
- colorette https://github.com/jorgebucaran/colorette is much smaller than chalk (and supports node >= 10).
- since transfob is very small, and makes transforms by modifying the transform object instead of passing a function in the opts when it's created, I thought we could just remake it ourselves
You can view, comment on, or merge this pull request online at:
https://github.com/dlmanning/gulp-sass/pull/828 Commit Summary
- Replace chalk & transfob dependencies https://github.com/dlmanning/gulp-sass/pull/828/commits/26f964385257278a5f3bc3db51a06710b0cbe07b
File Changes
- M index.js https://github.com/dlmanning/gulp-sass/pull/828/files#diff-e727e4bdf3657fd1d798edcd6b099d6e092f8573cba266154583a746bba0f346 (10)
- M package-lock.json https://github.com/dlmanning/gulp-sass/pull/828/files#diff-053150b640a7ce75eff69d1a22cae7f0f94ad64ce9a855db544dda0929316519 (553)
- M package.json https://github.com/dlmanning/gulp-sass/pull/828/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519 (3)
Patch Links:
- https://github.com/dlmanning/gulp-sass/pull/828.patch
- https://github.com/dlmanning/gulp-sass/pull/828.diff
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dlmanning/gulp-sass/pull/828, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACVLNMTDJ7FF6NWCSFTETDUITQJNANCNFSM5GUK2DYQ .
Regarding transfob, I did the same at some point but decided to drop the patch in favor of not risking something to break (although the patch looks OK from a quick look).
On Mon, Oct 25, 2021, 08:03 EJ Mason @.***> wrote:
👋🏻 I saw that @XhmikosR https://github.com/XhmikosR has been doing some cleanup work on my v5 release (thanks!) and I wanted to contribute my own housecleaning.
- colorette https://github.com/jorgebucaran/colorette is much smaller than chalk (and supports node >= 10).
- since transfob is very small, and makes transforms by modifying the transform object instead of passing a function in the opts when it's created, I thought we could just remake it ourselves
You can view, comment on, or merge this pull request online at:
https://github.com/dlmanning/gulp-sass/pull/828 Commit Summary
- Replace chalk & transfob dependencies https://github.com/dlmanning/gulp-sass/pull/828/commits/26f964385257278a5f3bc3db51a06710b0cbe07b
File Changes
- M index.js https://github.com/dlmanning/gulp-sass/pull/828/files#diff-e727e4bdf3657fd1d798edcd6b099d6e092f8573cba266154583a746bba0f346 (10)
- M package-lock.json https://github.com/dlmanning/gulp-sass/pull/828/files#diff-053150b640a7ce75eff69d1a22cae7f0f94ad64ce9a855db544dda0929316519 (553)
- M package.json https://github.com/dlmanning/gulp-sass/pull/828/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519 (3)
Patch Links:
- https://github.com/dlmanning/gulp-sass/pull/828.patch
- https://github.com/dlmanning/gulp-sass/pull/828.diff
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dlmanning/gulp-sass/pull/828, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACVLNMTDJ7FF6NWCSFTETDUITQJNANCNFSM5GUK2DYQ .
So, my suggestion would be to break these into two patches and perhaps switch to ${colors.underline(relativePath)}\n${error.formatted}
while at it. No need to use an Array and then switch it to a string when we can use a String in the first case :)
For reference: https://github.com/XhmikosR/gulp-sass/commit/d955da1ad46d93e7f8464f8ea3127e06e59129a8
@xzyfer WDYT about the above? picocolors is new, but widely used too and it's much smaller/faster than chalk. colorette
is also a viable solution. The reason I went with picocolors is because it's used by postcss, autoprefixer etc so chances are it'll be already in the deps and it's smaller.
Thanks for your work but this project is in maintenance mode and has been materially unchanged for a couple years.
As stated on @XhmikosR's PRs aside from security and compatibility fixes we have no intention to make unnecessary changes at this time.
I still believe we could land these patches, maybe not the transfob one since it's a small package anyway. Could we at least land the Array change and the default param change from here? https://github.com/dlmanning/gulp-sass/compare/master...XhmikosR:dev
Note that the ESLint consistent return seems to be valid too; it's just that gulp handles return foo()
as foo(); return;
.
@xzyfer can you please check out https://github.com/dlmanning/gulp-sass/compare/master...XhmikosR:dev and let me know how to proceed?
I still think it's totally worth switching to picocolors since postcss is using it, klona it's less important, and the rest of the patches should be safe except for the return statements patch (which should be OK too, but I don't want to risk it).
👋🏻 I saw that @XhmikosR has been doing some cleanup work on my v5 release (thanks!) and I wanted to contribute my own housecleaning.
colorette
is much smaller than chalk (and supports node >= 10).transfob
is very small, and makes transforms by modifying thetransform
object instead of passing a function in the opts when it's created, I thought we could just remake it ourselves