Export styles from ansi-styles#567
Conversation
|
I would go with option 2. Option 3 is not entirely clear to me. |
I mean change the code directly in https://github.com/chalk/chalk/blob/main/source/vendor/ansi-styles/index.js. But I don't think it's a good solution. |
No, we shouldn't do that. The vendor stuff is meant to be kept in sync with the source. |
|
Of course. I marked the chalk/ansi-styles#82 as ready, please review. I will sync those changes to this project. |
bc60dcf to
629d4e4
Compare
Codecov Report
@@ Coverage Diff @@
## main #567 +/- ##
=======================================
Coverage 99.60% 99.61%
=======================================
Files 8 8
Lines 509 517 +8
=======================================
+ Hits 507 515 +8
Misses 2 2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
ansi-styles
|
Can you change the exports to use the |
|
@sindresorhus Done. This failing CI doesn't seem to be related to the code. |
|
https://github.com/chalk/chalk/blob/main/.github/workflows/main.yml#L25 Not sure the goal here with this check but seems like codecov is completely broken regardless of version, it's just that it's only enabled on 16. |
202e797 to
8011f5f
Compare
|
Passing now. |
|
Curious, what was the issue? The error message led me to believe it was a transient issue... |
|
No idea. I just |
ansi-stylesadds some extra keys tostyles:chalk/source/vendor/ansi-styles/index.js
Lines 98 to 103 in 92c55db
We should filter them out.
Or we could process those style names in
ansi-sytle, see chalk/ansi-styles#82. I marked that PR as a draft to discuss how we can improve on this.My thoughts are:
Option 1:Filter style names in ChalkOption 2:
Apply chalk/ansi-styles#82, then export style names from
ansi-stylesin ChalkOption 3:Apply chalk/ansi-styles#82 change but in favor of modify thevendor/ansi-stylesdirectly, then export styles namesWhat do you think?
For the exposed style names, we'd better add some tests to ensure its outputs are correct.