From 24acab0413a3f7d9af776a85dcff4972ec9c5ebd Mon Sep 17 00:00:00 2001 From: LekoArts Date: Fri, 1 Dec 2023 11:15:37 +0100 Subject: [PATCH 1/4] chore(repo): Use other playwright reporters --- integration/playwright.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/playwright.config.ts b/integration/playwright.config.ts index 2ff91c4ac6d..389ed83d554 100644 --- a/integration/playwright.config.ts +++ b/integration/playwright.config.ts @@ -19,7 +19,7 @@ export const common: PlaywrightTestConfig = { timeout: process.env.CI ? 90000 : 30000, maxFailures: process.env.CI ? 1 : undefined, workers: process.env.CI ? numAvailableWorkers : '70%', - reporter: [[process.env.CI ? 'html' : 'line', { open: 'never' }]] as any, + reporter: process.env.CI ? 'line' : 'list', use: { trace: 'on-first-retry', bypassCSP: true, // We probably need to limit this to specific tests From 46f5f38d7dd99b620fbe292c53b9815df20ce62a Mon Sep 17 00:00:00 2001 From: LekoArts Date: Fri, 1 Dec 2023 11:15:58 +0100 Subject: [PATCH 2/4] chore(repo): Use colored text & not bg --- integration/models/applicationConfig.ts | 2 +- integration/scripts/logger.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/integration/models/applicationConfig.ts b/integration/models/applicationConfig.ts index c315369dc81..1691e520cf9 100644 --- a/integration/models/applicationConfig.ts +++ b/integration/models/applicationConfig.ts @@ -16,7 +16,7 @@ export const applicationConfig = () => { const files = new Map(); const scripts: Scripts = { dev: 'npm run dev', serve: 'npm run serve', build: 'npm run build', setup: 'npm i' }; const envFormatters = { public: (key: string) => key, private: (key: string) => key }; - const logger = createLogger({ prefix: 'appConfig', color: 'bgYellow' }); + const logger = createLogger({ prefix: 'appConfig', color: 'yellow' }); const dependencies = new Map(); const self = { diff --git a/integration/scripts/logger.ts b/integration/scripts/logger.ts index bdcba2c0e5f..16fda22d3fd 100644 --- a/integration/scripts/logger.ts +++ b/integration/scripts/logger.ts @@ -1,23 +1,23 @@ /* eslint-disable turbo/no-undeclared-env-vars */ import { default as chalk } from 'chalk'; -const getRandomChalkBgColor = () => { - const colors = ['bgRed', 'bgGreen', 'bgYellow', 'bgBlue', 'bgMagenta', 'bgCyan', 'bgWhite']; +const getRandomChalkColor = () => { + const colors = ['red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white']; return colors[Math.floor(Math.random() * colors.length)]; }; type CreateLoggerOptions = { prefix: string; color?: string }; export const createLogger = (opts: CreateLoggerOptions) => { const { color, prefix } = opts; - const prefixBgColor = color || getRandomChalkBgColor(); + const prefixColor = color || getRandomChalkColor(); return { info: (msg: string) => { if (process.env.DEBUG) { - console.info(`${chalk[prefixBgColor](`[${prefix}]`)} ${msg}`); + console.info(`${chalk[prefixColor](`[${prefix}]`)} ${msg}`); } }, child: (childOpts: CreateLoggerOptions) => { - return createLogger({ prefix: `${prefix} :: ${childOpts.prefix}`, color: prefixBgColor }); + return createLogger({ prefix: `${prefix} :: ${childOpts.prefix}`, color: prefixColor }); }, }; }; From 821c780c17de64e19e2d119ab05bc117884d683e Mon Sep 17 00:00:00 2001 From: LekoArts Date: Fri, 1 Dec 2023 11:21:44 +0100 Subject: [PATCH 3/4] chore(repo): Remove white from choices --- integration/scripts/logger.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/scripts/logger.ts b/integration/scripts/logger.ts index 16fda22d3fd..eba66b3ff94 100644 --- a/integration/scripts/logger.ts +++ b/integration/scripts/logger.ts @@ -2,7 +2,7 @@ import { default as chalk } from 'chalk'; const getRandomChalkColor = () => { - const colors = ['red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white']; + const colors = ['red', 'green', 'yellow', 'blue', 'magenta', 'cyan']; return colors[Math.floor(Math.random() * colors.length)]; }; From b71d0cd5efb4017bdc6c7839d7a45f76a7141d40 Mon Sep 17 00:00:00 2001 From: LekoArts Date: Fri, 1 Dec 2023 11:25:36 +0100 Subject: [PATCH 4/4] chore(repo): Add bright colors --- integration/scripts/logger.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/integration/scripts/logger.ts b/integration/scripts/logger.ts index eba66b3ff94..ca9522a0ba3 100644 --- a/integration/scripts/logger.ts +++ b/integration/scripts/logger.ts @@ -2,7 +2,20 @@ import { default as chalk } from 'chalk'; const getRandomChalkColor = () => { - const colors = ['red', 'green', 'yellow', 'blue', 'magenta', 'cyan']; + const colors = [ + 'red', + 'green', + 'yellow', + 'blue', + 'magenta', + 'cyan', + 'redBright', + 'greenBright', + 'yellowBright', + 'blueBright', + 'magentaBright', + 'cyanBright', + ]; return colors[Math.floor(Math.random() * colors.length)]; };