-
-
Notifications
You must be signed in to change notification settings - Fork 934
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
string
formatter handling of log symbols for non-Unicode termin…
…als (#7981)
- Loading branch information
Showing
6 changed files
with
109 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"stylelint": patch | ||
--- | ||
|
||
Fixed: `string` formatter handling of log symbols for non-Unicode terminals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// NOTICE: This file is generated by Rollup. To modify it, | ||
// please instead edit the ESM counterpart and rebuild with Rollup (npm run build). | ||
'use strict'; | ||
|
||
const process = require('node:process'); | ||
|
||
/** | ||
* Originally copied from https://github.com/sindresorhus/is-unicode-supported/blob/506f27260df3636555714bf10ed40ab9e6a6c96e/index.js | ||
* @version 2.0.0 | ||
* @summary Detect whether the terminal supports Unicode | ||
* @see https://github.com/sindresorhus/is-unicode-supported/pull/1#issuecomment-827321546 | ||
* @see microsoft/terminal#13680 | ||
*/ | ||
function isUnicodeSupported() { | ||
if (process.platform !== 'win32') { | ||
return process.env.TERM !== 'linux'; // Linux console (kernel) | ||
} | ||
|
||
return ( | ||
Boolean(process.env.WT_SESSION) || // Windows Terminal | ||
Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27) | ||
process.env.ConEmuTask === '{cmd::Cmder}' || // ConEmu and cmder | ||
process.env.TERM_PROGRAM === 'Terminus-Sublime' || | ||
process.env.TERM_PROGRAM === 'vscode' || | ||
process.env.TERM === 'xterm-256color' || | ||
process.env.TERM === 'alacritty' || | ||
process.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm' || | ||
process.env.TERM?.startsWith('rxvt-unicode') // fork of rxvt | ||
); | ||
} | ||
|
||
module.exports = isUnicodeSupported; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import process from 'node:process'; | ||
|
||
/** | ||
* Originally copied from https://github.com/sindresorhus/is-unicode-supported/blob/506f27260df3636555714bf10ed40ab9e6a6c96e/index.js | ||
* @version 2.0.0 | ||
* @summary Detect whether the terminal supports Unicode | ||
* @see https://github.com/sindresorhus/is-unicode-supported/pull/1#issuecomment-827321546 | ||
* @see microsoft/terminal#13680 | ||
*/ | ||
export default function isUnicodeSupported() { | ||
if (process.platform !== 'win32') { | ||
return process.env.TERM !== 'linux'; // Linux console (kernel) | ||
} | ||
|
||
return ( | ||
Boolean(process.env.WT_SESSION) || // Windows Terminal | ||
Boolean(process.env.TERMINUS_SUBLIME) || // Terminus (<0.2.27) | ||
process.env.ConEmuTask === '{cmd::Cmder}' || // ConEmu and cmder | ||
process.env.TERM_PROGRAM === 'Terminus-Sublime' || | ||
process.env.TERM_PROGRAM === 'vscode' || | ||
process.env.TERM === 'xterm-256color' || | ||
process.env.TERM === 'alacritty' || | ||
process.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm' || | ||
process.env.TERM?.startsWith('rxvt-unicode') // fork of rxvt | ||
); | ||
} |