aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2021-12-31 02:26:51 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2021-12-31 02:26:51 +0100
commit91b0ebbed2c20b8659dbae6f3ff4924940983a09 (patch)
treea6136d87619c7fb84f3850c97433d1602c625981 /packages
parenttest: Add tests for main package (diff)
downloadsophie-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')
-rw-r--r--packages/main/package.json2
-rw-r--r--packages/main/src/utils/logging.ts6
2 files changed, 4 insertions, 4 deletions
diff --git a/packages/main/package.json b/packages/main/package.json
index eb2ecf6..f4cf18b 100644
--- a/packages/main/package.json
+++ b/packages/main/package.json
@@ -10,7 +10,7 @@
10 "dependencies": { 10 "dependencies": {
11 "@sophie/service-shared": "workspace:*", 11 "@sophie/service-shared": "workspace:*",
12 "@sophie/shared": "workspace:*", 12 "@sophie/shared": "workspace:*",
13 "chalk": "^4.1.2", 13 "chalk": "^5.0.0",
14 "electron": "16.0.5", 14 "electron": "16.0.5",
15 "json5": "^2.2.0", 15 "json5": "^2.2.0",
16 "lodash-es": "^4.17.21", 16 "lodash-es": "^4.17.21",
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
21import chalk, { Chalk } from 'chalk'; 21import chalk, { ChalkInstance } from 'chalk';
22import loglevel, { Logger } from 'loglevel'; 22import loglevel, { Logger } from 'loglevel';
23import prefix from 'loglevel-plugin-prefix'; 23import 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
31const COLORS: Partial<Record<string, Chalk>> = { 31const 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
40function getColor(level: string): Chalk { 40function getColor(level: string): ChalkInstance {
41 return COLORS[level] ?? chalk.gray; 41 return COLORS[level] ?? chalk.gray;
42} 42}
43 43