mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-29 16:57:00 +08:00
Updates node_modules and update script
Change-Id: I3fcf49bc416301a030d298cfc48c448bfeba4335 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1878808 Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Paul Lewis <aerotwist@chromium.org>
This commit is contained in:
+12
-2
@@ -62,7 +62,16 @@ var stylize = colors.stylize = function stylize(str, style) {
|
||||
return str+'';
|
||||
}
|
||||
|
||||
return ansiStyles[style].open + str + ansiStyles[style].close;
|
||||
var styleMap = ansiStyles[style];
|
||||
|
||||
// Stylize should work for non-ANSI styles, too
|
||||
if(!styleMap && style in colors){
|
||||
// Style maps like trap operate as functions on strings;
|
||||
// they don't have properties like open or close.
|
||||
return colors[style](str);
|
||||
}
|
||||
|
||||
return styleMap.open + str + styleMap.close;
|
||||
};
|
||||
|
||||
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
|
||||
@@ -105,7 +114,8 @@ function applyStyle() {
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
|
||||
var str = args.map(function(arg) {
|
||||
if (arg !== undefined && arg.constructor === String) {
|
||||
// Use weak equality check so we can colorize null/undefined in safe mode
|
||||
if (arg != null && arg.constructor === String) {
|
||||
return arg;
|
||||
} else {
|
||||
return util.inspect(arg);
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
module['exports'] = function(colors) {
|
||||
var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green',
|
||||
'blue', 'white', 'cyan', 'magenta'];
|
||||
'blue', 'white', 'cyan', 'magenta', 'brightYellow', 'brightRed',
|
||||
'brightGreen', 'brightBlue', 'brightWhite', 'brightCyan', 'brightMagenta'];
|
||||
return function(letter, i, exploded) {
|
||||
return letter === ' ' ? letter :
|
||||
colors[
|
||||
|
||||
+18
@@ -48,6 +48,14 @@ var codes = {
|
||||
gray: [90, 39],
|
||||
grey: [90, 39],
|
||||
|
||||
brightRed: [91, 39],
|
||||
brightGreen: [92, 39],
|
||||
brightYellow: [93, 39],
|
||||
brightBlue: [94, 39],
|
||||
brightMagenta: [95, 39],
|
||||
brightCyan: [96, 39],
|
||||
brightWhite: [97, 39],
|
||||
|
||||
bgBlack: [40, 49],
|
||||
bgRed: [41, 49],
|
||||
bgGreen: [42, 49],
|
||||
@@ -56,6 +64,16 @@ var codes = {
|
||||
bgMagenta: [45, 49],
|
||||
bgCyan: [46, 49],
|
||||
bgWhite: [47, 49],
|
||||
bgGray: [100, 49],
|
||||
bgGrey: [100, 49],
|
||||
|
||||
bgBrightRed: [101, 49],
|
||||
bgBrightGreen: [102, 49],
|
||||
bgBrightYellow: [103, 49],
|
||||
bgBrightBlue: [104, 49],
|
||||
bgBrightMagenta: [105, 49],
|
||||
bgBrightCyan: [106, 49],
|
||||
bgBrightWhite: [107, 49],
|
||||
|
||||
// legacy styles for colors pre v1.0.0
|
||||
blackBG: [40, 49],
|
||||
|
||||
Reference in New Issue
Block a user