feat: remove log-symbols dependency#5469
Conversation
Err, that seems like it might be a blocker. Can you elaborate on that please? |
|
|
IMO we'll need to answer that "maybe" before being able to fully review this PR. Shell/terminal symbols and OSes are notoriously difficult to get right. It's possible that some important supported variants of Powershell and/or Windows would be very broken by this change. I'm not saying "unconditionally no" - rather, "please answer the open questions on this PR". |
|
OK, I've investigated a bit further. In In pre-Windows 11 consoles with the correct code page, the symbols show up as boxes, meaning the terminal font doesn't support them. In Windows 11, everything shows up correctly. This means that the One course of action would be to depend on |
log-symbols dependencylog-symbols dependency
That seems reasonable to me as a first step. I'm very wary of completely dropping detection for any of terminal color/TTY/unicode support/type. Mocha has a lot of legacy users who tend to pop up with reported breakages when these nuanced edge cases get changed. Fun fact: Windows 10 is still in support through October 14, 2025! |
|
Hi @valadaptive, are you able to continue on this one? |
5bbd2d6 to
6ee570a
Compare
|
I've rebased the PR and re-added the |
6d604f2 to
bd30b79
Compare
|
@valadaptive Mocha v12 (including current main branch) now targets Node 20.19.0, so we can include ESM-only versions of packages :) |
|
Nice! I've bumped is-unicode-supported. |
|
@valadaptive welcome to 2026! I think this one is still giving some weird CI failures, are you able to check it out? |
3c52f9d to
62116bf
Compare
62116bf to
9324a09
Compare
|
Rebased and fixed the import + merge conflicts. |
|
another day, another weird CI issue :/ I don't have any advice for you, but I appreciate you continuing to work on this :) |
|
I merged from This hasn't happened on the last few commits to I wonder if it's some oddity with |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5469 +/- ##
==========================================
- Coverage 88.44% 88.41% -0.04%
==========================================
Files 66 66
Lines 4794 4798 +4
Branches 978 982 +4
==========================================
+ Hits 4240 4242 +2
- Misses 554 556 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
PR Checklist
log-symbolswith something smaller (maybe just inline it?) #5468status: accepting prsOverview
This PR removes the
log-symbolsdependency, inlining its functionality. This removeschalkand its many subdependencies from the dependency tree.We no longer check for explicit Unicode support. In case anyone is running Mocha from the Windows legacy command prompt (and possibly PowerShell?), the characters may not show up properly.
I also noticed that the symbols do not respect
Base.useColors, and never seem to have done so. This might be something to look into in the future.