From 63f45fecf19efdbd8744d51c80aa620b02b9e0ae Mon Sep 17 00:00:00 2001 From: Sahitya Chandra Date: Sat, 28 Dec 2024 15:18:19 +0530 Subject: [PATCH 1/4] simplified error handling in build-dashboard.js --- scripts/dashboard/build-dashboard.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/dashboard/build-dashboard.js b/scripts/dashboard/build-dashboard.js index c20be204e87b..850fd00da6fd 100644 --- a/scripts/dashboard/build-dashboard.js +++ b/scripts/dashboard/build-dashboard.js @@ -44,7 +44,7 @@ async function getDiscussions(query, pageSize, endCursor = null) { return result.search.nodes.concat(await getDiscussions(query, pageSize, result.search.pageInfo.endCursor)); } catch (e) { console.error(e); - return Promise.reject(e); + throw e; } } @@ -60,7 +60,7 @@ async function getDiscussionByID(isPR, id) { return result; } catch (e) { console.error(e); - return Promise.reject(e); + throw e; } } @@ -173,6 +173,7 @@ async function start(writePath) { } catch (e) { console.log('There were some issues parsing data from github.'); console.log(e); + throw e; } } From ee5b5cc7ab7e6966ce9d33b2bd05ae8f262a4548 Mon Sep 17 00:00:00 2001 From: Sahitya Chandra Date: Sat, 28 Dec 2024 15:58:46 +0530 Subject: [PATCH 2/4] some refactor --- scripts/dashboard/build-dashboard.js | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/dashboard/build-dashboard.js b/scripts/dashboard/build-dashboard.js index 850fd00da6fd..2e47341a55c8 100644 --- a/scripts/dashboard/build-dashboard.js +++ b/scripts/dashboard/build-dashboard.js @@ -173,7 +173,6 @@ async function start(writePath) { } catch (e) { console.log('There were some issues parsing data from github.'); console.log(e); - throw e; } } From 5b1388e1258bc1591b456bea8bac17d1dd8eff73 Mon Sep 17 00:00:00 2001 From: Sahitya Chandra Date: Tue, 31 Dec 2024 19:04:10 +0530 Subject: [PATCH 3/4] added custom logservice using winston for error logging --- package-lock.json | 220 +++++++++++++++++++++++++++++++++- package.json | 1 + scripts/tools/logger.js | 19 +++ scripts/tools/tools-object.js | 7 ++ tests/build-pages.test.js | 20 +++- 5 files changed, 262 insertions(+), 5 deletions(-) create mode 100644 scripts/tools/logger.js diff --git a/package-lock.json b/package-lock.json index dc51c2298d22..d29d13a6aee5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -79,6 +79,7 @@ "tailwind-merge": "^2.2.1", "tailwindcss": "^3.4.3", "typescript": "^5.3.3", + "winston": "^3.17.0", "yaml": "^2.3.4" }, "devDependencies": { @@ -2413,6 +2414,26 @@ "yarn": ">=1.22.18" } }, + "node_modules/@colors/colors": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", + "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", + "license": "MIT", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@dabh/diagnostics": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", + "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", + "license": "MIT", + "dependencies": { + "colorspace": "1.1.x", + "enabled": "2.0.x", + "kuler": "^2.0.0" + } + }, "node_modules/@dagrejs/dagre": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/@dagrejs/dagre/-/dagre-1.1.4.tgz", @@ -7778,6 +7799,12 @@ "integrity": "sha512-hcZhlNvMkQG/k1vcZ6yHOl6WAYftQ2MLfTHcYRZ2xYZFD8tGVnE3qFV0lj1smQeDSR7/yY0PyuUalauf33bJeA==", "dev": true }, + "node_modules/@types/triple-beam": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", + "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==", + "license": "MIT" + }, "node_modules/@types/unist": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", @@ -8796,6 +8823,12 @@ "astring": "bin/astring" } }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "license": "MIT" + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -10339,7 +10372,6 @@ "version": "1.9.1", "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "dev": true, "dependencies": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" @@ -10356,6 +10388,41 @@ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "dev": true }, + "node_modules/colorspace": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", + "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", + "license": "MIT", + "dependencies": { + "color": "^3.1.3", + "text-hex": "1.0.x" + } + }, + "node_modules/colorspace/node_modules/color": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", + "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.3", + "color-string": "^1.6.0" + } + }, + "node_modules/colorspace/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/colorspace/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "license": "MIT" + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -11968,6 +12035,12 @@ "node": ">= 4" } }, + "node_modules/enabled": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==", + "license": "MIT" + }, "node_modules/encodeurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", @@ -13844,6 +13917,12 @@ "walk-up-path": "^3.0.1" } }, + "node_modules/fecha": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", + "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==", + "license": "MIT" + }, "node_modules/fetch-blob": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", @@ -13997,6 +14076,12 @@ "node": ">=0.4.0" } }, + "node_modules/fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==", + "license": "MIT" + }, "node_modules/follow-redirects": { "version": "1.15.6", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", @@ -17712,6 +17797,12 @@ "node": ">= 8" } }, + "node_modules/kuler": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", + "license": "MIT" + }, "node_modules/language-subtag-registry": { "version": "0.3.23", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", @@ -18060,6 +18151,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/logform": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.7.0.tgz", + "integrity": "sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==", + "license": "MIT", + "dependencies": { + "@colors/colors": "1.6.0", + "@types/triple-beam": "^1.3.2", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "safe-stable-stringify": "^2.3.1", + "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, "node_modules/long": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", @@ -22915,6 +23023,15 @@ "wrappy": "1" } }, + "node_modules/one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "license": "MIT", + "dependencies": { + "fn.name": "1.x.x" + } + }, "node_modules/onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", @@ -26367,6 +26484,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/safe-stable-stringify": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -26950,7 +27076,6 @@ "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", - "dev": true, "dependencies": { "is-arrayish": "^0.3.1" } @@ -26958,8 +27083,7 @@ "node_modules/simple-swizzle/node_modules/is-arrayish": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", - "dev": true + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" }, "node_modules/sisteransi": { "version": "1.0.5", @@ -27024,6 +27148,15 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, + "node_modules/stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", @@ -28466,6 +28599,12 @@ "b4a": "^1.6.4" } }, + "node_modules/text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", + "license": "MIT" + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -28630,6 +28769,15 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/triple-beam": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", + "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==", + "license": "MIT", + "engines": { + "node": ">= 14.0.0" + } + }, "node_modules/trough": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/trough/-/trough-2.2.0.tgz", @@ -30331,6 +30479,70 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/winston": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.17.0.tgz", + "integrity": "sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==", + "license": "MIT", + "dependencies": { + "@colors/colors": "^1.6.0", + "@dabh/diagnostics": "^2.0.2", + "async": "^3.2.3", + "is-stream": "^2.0.0", + "logform": "^2.7.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "safe-stable-stringify": "^2.3.1", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.9.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/winston-transport": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.9.0.tgz", + "integrity": "sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==", + "license": "MIT", + "dependencies": { + "logform": "^2.7.0", + "readable-stream": "^3.6.2", + "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/winston-transport/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/winston/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", diff --git a/package.json b/package.json index f9cc8e225374..a3b53bb2df17 100644 --- a/package.json +++ b/package.json @@ -115,6 +115,7 @@ "tailwind-merge": "^2.2.1", "tailwindcss": "^3.4.3", "typescript": "^5.3.3", + "winston": "^3.17.0", "yaml": "^2.3.4" }, "devDependencies": { diff --git a/scripts/tools/logger.js b/scripts/tools/logger.js new file mode 100644 index 000000000000..84e040d7f724 --- /dev/null +++ b/scripts/tools/logger.js @@ -0,0 +1,19 @@ +const { createLogger, format, transports } = require('winston'); + +const logger = createLogger({ + level: 'error', // minimum level of messages logger will handle + format: format.combine( + format.timestamp(), + format.json() + ), + transports: [ + new transports.Console({ + format: format.combine( + format.colorize(), + format.simple() + ) + }) + ], +}); + +module.exports = logger; \ No newline at end of file diff --git a/scripts/tools/tools-object.js b/scripts/tools/tools-object.js index 1d8c73f8074b..329cd8af3616 100644 --- a/scripts/tools/tools-object.js +++ b/scripts/tools/tools-object.js @@ -8,6 +8,7 @@ const ajv = new Ajv() addFormats(ajv, ["uri"]) const validate = ajv.compile(schema) const { convertToJson } = require('../utils'); +const logger = require("./logger.js"); // Config options set for the Fuse object const options = { @@ -107,8 +108,14 @@ async function convertTools(data) { throw err; } })) + return finalToolsObject; } catch (err) { + logger.error('Error processing tool', { + message: err.message, + stack: err.stack, + phase: 'tool_processing', + }); throw new Error(`Error processing tool: ${err.message}`) } } diff --git a/tests/build-pages.test.js b/tests/build-pages.test.js index f811b1480158..d6117df0444f 100644 --- a/tests/build-pages.test.js +++ b/tests/build-pages.test.js @@ -20,8 +20,16 @@ describe('copyAndRenameFiles', () => { const TEST_DIR = 'test'; const SRC_DIR = path.join(TEST_DIR, 'src'); const TARGET_DIR = path.join(TEST_DIR, 'target'); + const NEW_TEST_DIR = 'testDir'; beforeAll(() => { + + [TEST_DIR, NEW_TEST_DIR].forEach(dir => { + if (fs.existsSync(dir)) { + fs.rmSync(dir, { recursive: true, force: true }); + } + }); + fs.mkdirSync(TEST_DIR, { recursive: true }); fs.mkdirSync(SRC_DIR, { recursive: true }); fs.mkdirSync(TARGET_DIR, { recursive: true }); @@ -33,6 +41,13 @@ describe('copyAndRenameFiles', () => { }); afterAll(() => { + + [TEST_DIR, NEW_TEST_DIR].forEach(dir => { + if (fs.existsSync(dir)) { + fs.rmSync(dir, { recursive: true, force: true }); + } + }); + fs.rmSync(TEST_DIR, { recursive: true, force: true }); }); @@ -47,7 +62,10 @@ describe('copyAndRenameFiles', () => { }); test('should create a directory if it does not exist', () => { - const NEW_TEST_DIR = 'testDir'; + + if (fs.existsSync(NEW_TEST_DIR)) { + fs.rmSync(NEW_TEST_DIR, { recursive: true, force: true }); + } expect(fs.existsSync(NEW_TEST_DIR)).toBe(false); ensureDirectoryExists(NEW_TEST_DIR); From 562be7a5a1114474c97ee55628c104fc34a7254f Mon Sep 17 00:00:00 2001 From: Sahitya Chandra Date: Tue, 31 Dec 2024 20:59:38 +0530 Subject: [PATCH 4/4] linting done --- scripts/tools/logger.js | 12 +++--------- scripts/tools/tools-object.js | 2 +- tests/build-pages.test.js | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/scripts/tools/logger.js b/scripts/tools/logger.js index 84e040d7f724..f5d429239a9c 100644 --- a/scripts/tools/logger.js +++ b/scripts/tools/logger.js @@ -2,18 +2,12 @@ const { createLogger, format, transports } = require('winston'); const logger = createLogger({ level: 'error', // minimum level of messages logger will handle - format: format.combine( - format.timestamp(), - format.json() - ), + format: format.combine(format.timestamp(), format.json()), transports: [ new transports.Console({ - format: format.combine( - format.colorize(), - format.simple() - ) + format: format.combine(format.colorize(), format.simple()) }) - ], + ] }); module.exports = logger; \ No newline at end of file diff --git a/scripts/tools/tools-object.js b/scripts/tools/tools-object.js index 329cd8af3616..ebf118d810b3 100644 --- a/scripts/tools/tools-object.js +++ b/scripts/tools/tools-object.js @@ -8,7 +8,7 @@ const ajv = new Ajv() addFormats(ajv, ["uri"]) const validate = ajv.compile(schema) const { convertToJson } = require('../utils'); -const logger = require("./logger.js"); +const logger = require("./logger"); // Config options set for the Fuse object const options = { diff --git a/tests/build-pages.test.js b/tests/build-pages.test.js index d6117df0444f..d5fdbf7e1edc 100644 --- a/tests/build-pages.test.js +++ b/tests/build-pages.test.js @@ -24,7 +24,7 @@ describe('copyAndRenameFiles', () => { beforeAll(() => { - [TEST_DIR, NEW_TEST_DIR].forEach(dir => { + [TEST_DIR, NEW_TEST_DIR].forEach((dir) => { if (fs.existsSync(dir)) { fs.rmSync(dir, { recursive: true, force: true }); }