diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2023-04-30 11:11:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-30 09:11:37 +0000 |
commit | 59825a95b4d3952c955b8b43e174189999e35d15 (patch) | |
tree | b3ff4c24f5596cc70daac40b578805a61d565c2a /runtime/js/99_main.js | |
parent | bb1f5e4262940a966e6314f57a4267514911d262 (diff) |
refactor: remove ext/console/01_colors.js (#18927)
Diffstat (limited to 'runtime/js/99_main.js')
-rw-r--r-- | runtime/js/99_main.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index b6dab121c..0ed692f3c 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -44,13 +44,14 @@ import * as location from "ext:deno_web/12_location.js"; import * as version from "ext:runtime/01_version.ts"; import * as os from "ext:runtime/30_os.js"; import * as timers from "ext:deno_web/02_timers.js"; -import * as colors from "ext:deno_console/01_colors.js"; import { getDefaultInspectOptions, + getNoColor, inspectArgs, quoteString, + setNoColor, wrapConsole, -} from "ext:deno_console/02_console.js"; +} from "ext:deno_console/01_console.js"; import * as performance from "ext:deno_web/15_performance.js"; import * as url from "ext:deno_url/00_url.js"; import * as fetch from "ext:deno_fetch/26_fetch.js"; @@ -220,11 +221,11 @@ function formatException(error) { } else if (typeof error == "string") { return `Uncaught ${ inspectArgs([quoteString(error, getDefaultInspectOptions())], { - colors: !colors.getNoColor(), + colors: !getNoColor(), }) }`; } else { - return `Uncaught ${inspectArgs([error], { colors: !colors.getNoColor() })}`; + return `Uncaught ${inspectArgs([error], { colors: !getNoColor() })}`; } } @@ -313,7 +314,7 @@ function runtimeStart( ); core.setBuildInfo(target); util.setLogDebug(debugFlag, source); - colors.setNoColor(noColor || !isTty); + setNoColor(noColor || !isTty); // deno-lint-ignore prefer-primordials Error.prepareStackTrace = core.prepareStackTrace; } |