You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I accept it the reasoning to force a different default value for windows instead of dots as usually normal unconfigured CMD or PowerShell are not configured to handle most special characters.
Simply blocking the option to select another spinner is a bit excessive in my opinion, and blocks functionality.
As an example here's VSCode Integrated Terminal with Powershell running the Dots spinner (modified the local Ora code directly):
On the other hand if we changed the code above to something like:
Happy to add better detection for when Unicode is fully supported unconfigured, but the current behavior is intentional so consumers of this module doesn't need to care about having platform conditional code just to specify a spinner.
Fair enough.
But in practice this behaviour also forces the consumers of the module that actually want to display the other spinners in all platforms (say to build an Atom or VSCode plugin or extension for example) to having to re-define the spinners themselves.
The following line 22 on the Ora constructor always forces the Line spinner on Windows, even if we choose another spinner:
this.spinner = typeof sp === 'object' ? sp : (process.platform === 'win32' ? cliSpinners.line : (cliSpinners[sp] || cliSpinners.dots)); // eslint-disable-line no-nested-ternary
I accept it the reasoning to force a different default value for windows instead of
dots
as usually normal unconfigured CMD or PowerShell are not configured to handle most special characters.Simply blocking the option to select another spinner is a bit excessive in my opinion, and blocks functionality.
As an example here's VSCode Integrated Terminal with Powershell running the Dots spinner (modified the local Ora code directly):
On the other hand if we changed the code above to something like:
this.spinner = typeof sp === 'object' ? sp : (cliSpinners[sp] || (process.platform === 'win32' ? cliSpinners.line : cliSpinners.dots)); // eslint-disable-line no-nested-ternary
Then by default Windows gets the
line
spinner, everybody else getsdots
, but we can still choose another spinner in the options if desired.The text was updated successfully, but these errors were encountered: