diff options
author | 2021-12-31 02:26:51 +0100 | |
---|---|---|
committer | 2021-12-31 02:26:51 +0100 | |
commit | 91b0ebbed2c20b8659dbae6f3ff4924940983a09 (patch) | |
tree | a6136d87619c7fb84f3850c97433d1602c625981 /packages/main/src/utils/logging.ts | |
parent | test: Add tests for main package (diff) | |
download | sophie-91b0ebbed2c20b8659dbae6f3ff4924940983a09.tar.gz sophie-91b0ebbed2c20b8659dbae6f3ff4924940983a09.tar.zst sophie-91b0ebbed2c20b8659dbae6f3ff4924940983a09.zip |
build: Upgrade to chalk 5.0.0 anyways
Requires some workarounds for ts-jest to find the vendored dependencies.
Diffstat (limited to 'packages/main/src/utils/logging.ts')
-rw-r--r-- | packages/main/src/utils/logging.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/main/src/utils/logging.ts b/packages/main/src/utils/logging.ts index ed40365..f703749 100644 --- a/packages/main/src/utils/logging.ts +++ b/packages/main/src/utils/logging.ts | |||
@@ -18,7 +18,7 @@ | |||
18 | * SPDX-License-Identifier: AGPL-3.0-only | 18 | * SPDX-License-Identifier: AGPL-3.0-only |
19 | */ | 19 | */ |
20 | 20 | ||
21 | import chalk, { Chalk } from 'chalk'; | 21 | import chalk, { ChalkInstance } from 'chalk'; |
22 | import loglevel, { Logger } from 'loglevel'; | 22 | import loglevel, { Logger } from 'loglevel'; |
23 | import prefix from 'loglevel-plugin-prefix'; | 23 | import prefix from 'loglevel-plugin-prefix'; |
24 | 24 | ||
@@ -28,7 +28,7 @@ if (import.meta.env?.DEV) { | |||
28 | loglevel.setLevel('info'); | 28 | loglevel.setLevel('info'); |
29 | } | 29 | } |
30 | 30 | ||
31 | const COLORS: Partial<Record<string, Chalk>> = { | 31 | const COLORS: Partial<Record<string, ChalkInstance>> = { |
32 | TRACE: chalk.magenta, | 32 | TRACE: chalk.magenta, |
33 | DEBUG: chalk.cyan, | 33 | DEBUG: chalk.cyan, |
34 | INFO: chalk.blue, | 34 | INFO: chalk.blue, |
@@ -37,7 +37,7 @@ const COLORS: Partial<Record<string, Chalk>> = { | |||
37 | CRITICAL: chalk.red, | 37 | CRITICAL: chalk.red, |
38 | }; | 38 | }; |
39 | 39 | ||
40 | function getColor(level: string): Chalk { | 40 | function getColor(level: string): ChalkInstance { |
41 | return COLORS[level] ?? chalk.gray; | 41 | return COLORS[level] ?? chalk.gray; |
42 | } | 42 | } |
43 | 43 | ||