From 7db88e5734689fcca3439600efc83a8fec498ac2 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 6 Sep 2024 09:24:55 +0200 Subject: [PATCH 1/5] move PerfLogger --- packages/docusaurus-logger/src/index.ts | 195 +---------------- packages/docusaurus-logger/src/logger.ts | 198 ++++++++++++++++++ .../src/perfLogger.ts} | 5 +- packages/docusaurus/src/commands/build.ts | 4 +- .../docusaurus/src/commands/start/utils.ts | 3 +- .../docusaurus/src/server/plugins/plugins.ts | 2 +- packages/docusaurus/src/server/site.ts | 2 +- packages/docusaurus/src/ssg.ts | 3 +- 8 files changed, 207 insertions(+), 205 deletions(-) create mode 100644 packages/docusaurus-logger/src/logger.ts rename packages/{docusaurus/src/utils.ts => docusaurus-logger/src/perfLogger.ts} (95%) diff --git a/packages/docusaurus-logger/src/index.ts b/packages/docusaurus-logger/src/index.ts index 23a6220e3877..a09cec08b985 100644 --- a/packages/docusaurus-logger/src/index.ts +++ b/packages/docusaurus-logger/src/index.ts @@ -5,196 +5,5 @@ * LICENSE file in the root directory of this source tree. */ -import chalk from 'chalk'; -import type {ReportingSeverity} from '@docusaurus/types'; - -type InterpolatableValue = string | number | (string | number)[]; - -const path = (msg: unknown): string => chalk.cyan.underline(`"${String(msg)}"`); -const url = (msg: unknown): string => chalk.cyan.underline(msg); -const name = (msg: unknown): string => chalk.blue.bold(msg); -const code = (msg: unknown): string => chalk.cyan(`\`${String(msg)}\``); -const subdue = (msg: unknown): string => chalk.gray(msg); -const num = (msg: unknown): string => chalk.yellow(msg); - -function interpolate( - msgs: TemplateStringsArray, - ...values: InterpolatableValue[] -): string { - let res = ''; - values.forEach((value, idx) => { - const flag = msgs[idx]!.match(/[a-z]+=$/); - res += msgs[idx]!.replace(/[a-z]+=$/, ''); - const format = (() => { - if (!flag) { - return (a: string | number) => a; - } - switch (flag[0]) { - case 'path=': - return path; - case 'url=': - return url; - case 'number=': - return num; - case 'name=': - return name; - case 'subdue=': - return subdue; - case 'code=': - return code; - default: - throw new Error( - 'Bad Docusaurus logging message. This is likely an internal bug, please report it.', - ); - } - })(); - res += Array.isArray(value) - ? `\n- ${value.map((v) => format(v)).join('\n- ')}` - : format(value); - }); - res += msgs.slice(-1)[0]; - return res; -} - -function stringify(msg: unknown): string { - if (String(msg) === '[object Object]') { - return JSON.stringify(msg); - } - if (msg instanceof Date) { - return msg.toUTCString(); - } - return String(msg); -} - -function info(msg: unknown): void; -function info( - msg: TemplateStringsArray, - ...values: [InterpolatableValue, ...InterpolatableValue[]] -): void; -function info(msg: unknown, ...values: InterpolatableValue[]): void { - console.info( - `${chalk.cyan.bold('[INFO]')} ${ - values.length === 0 - ? stringify(msg) - : interpolate(msg as TemplateStringsArray, ...values) - }`, - ); -} -function warn(msg: unknown): void; -function warn( - msg: TemplateStringsArray, - ...values: [InterpolatableValue, ...InterpolatableValue[]] -): void; -function warn(msg: unknown, ...values: InterpolatableValue[]): void { - console.warn( - chalk.yellow( - `${chalk.bold('[WARNING]')} ${ - values.length === 0 - ? stringify(msg) - : interpolate(msg as TemplateStringsArray, ...values) - }`, - ), - ); -} -function error(msg: unknown): void; -function error( - msg: TemplateStringsArray, - ...values: [InterpolatableValue, ...InterpolatableValue[]] -): void; -function error(msg: unknown, ...values: InterpolatableValue[]): void { - console.error( - chalk.red( - `${chalk.bold('[ERROR]')} ${ - values.length === 0 - ? stringify(msg) - : interpolate(msg as TemplateStringsArray, ...values) - }`, - ), - ); -} -function success(msg: unknown): void; -function success( - msg: TemplateStringsArray, - ...values: [InterpolatableValue, ...InterpolatableValue[]] -): void; -function success(msg: unknown, ...values: InterpolatableValue[]): void { - console.log( - `${chalk.green.bold('[SUCCESS]')} ${ - values.length === 0 - ? stringify(msg) - : interpolate(msg as TemplateStringsArray, ...values) - }`, - ); -} -function throwError(msg: unknown): void; -function throwError( - msg: TemplateStringsArray, - ...values: [InterpolatableValue, ...InterpolatableValue[]] -): void; -function throwError(msg: unknown, ...values: InterpolatableValue[]): void { - throw new Error( - values.length === 0 - ? stringify(msg) - : interpolate(msg as TemplateStringsArray, ...values), - ); -} - -function newLine(): void { - console.log(); -} - -/** - * Takes a message and reports it according to the severity that the user wants. - * - * - `ignore`: completely no-op - * - `log`: uses the `INFO` log level - * - `warn`: uses the `WARN` log level - * - `throw`: aborts the process, throws the error. - * - * Since the logger doesn't have logging level filters yet, these severities - * mostly just differ by their colors. - * - * @throws In addition to throwing when `reportingSeverity === "throw"`, this - * function also throws if `reportingSeverity` is not one of the above. - */ -function report(reportingSeverity: ReportingSeverity): typeof success { - const reportingMethods = { - ignore: () => {}, - log: info, - warn, - throw: throwError, - }; - if ( - !Object.prototype.hasOwnProperty.call(reportingMethods, reportingSeverity) - ) { - throw new Error( - `Unexpected "reportingSeverity" value: ${reportingSeverity}.`, - ); - } - return reportingMethods[reportingSeverity]; -} - -const logger = { - red: (msg: string | number): string => chalk.red(msg), - yellow: (msg: string | number): string => chalk.yellow(msg), - green: (msg: string | number): string => chalk.green(msg), - bold: (msg: string | number): string => chalk.bold(msg), - dim: (msg: string | number): string => chalk.dim(msg), - path, - url, - name, - code, - subdue, - num, - interpolate, - info, - warn, - error, - success, - report, - newLine, -}; - -// TODO remove when migrating to ESM -// logger can only be default-imported in ESM with this -export = logger; +export {default} from './logger'; +export {PerfLogger} from './perfLogger'; diff --git a/packages/docusaurus-logger/src/logger.ts b/packages/docusaurus-logger/src/logger.ts new file mode 100644 index 000000000000..e05f206168ae --- /dev/null +++ b/packages/docusaurus-logger/src/logger.ts @@ -0,0 +1,198 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import chalk from 'chalk'; +import type {ReportingSeverity} from '@docusaurus/types'; + +type InterpolatableValue = string | number | (string | number)[]; + +const path = (msg: unknown): string => chalk.cyan.underline(`"${String(msg)}"`); +const url = (msg: unknown): string => chalk.cyan.underline(msg); +const name = (msg: unknown): string => chalk.blue.bold(msg); +const code = (msg: unknown): string => chalk.cyan(`\`${String(msg)}\``); +const subdue = (msg: unknown): string => chalk.gray(msg); +const num = (msg: unknown): string => chalk.yellow(msg); + +function interpolate( + msgs: TemplateStringsArray, + ...values: InterpolatableValue[] +): string { + let res = ''; + values.forEach((value, idx) => { + const flag = msgs[idx]!.match(/[a-z]+=$/); + res += msgs[idx]!.replace(/[a-z]+=$/, ''); + const format = (() => { + if (!flag) { + return (a: string | number) => a; + } + switch (flag[0]) { + case 'path=': + return path; + case 'url=': + return url; + case 'number=': + return num; + case 'name=': + return name; + case 'subdue=': + return subdue; + case 'code=': + return code; + default: + throw new Error( + 'Bad Docusaurus logging message. This is likely an internal bug, please report it.', + ); + } + })(); + res += Array.isArray(value) + ? `\n- ${value.map((v) => format(v)).join('\n- ')}` + : format(value); + }); + res += msgs.slice(-1)[0]; + return res; +} + +function stringify(msg: unknown): string { + if (String(msg) === '[object Object]') { + return JSON.stringify(msg); + } + if (msg instanceof Date) { + return msg.toUTCString(); + } + return String(msg); +} + +function info(msg: unknown): void; +function info( + msg: TemplateStringsArray, + ...values: [InterpolatableValue, ...InterpolatableValue[]] +): void; +function info(msg: unknown, ...values: InterpolatableValue[]): void { + console.info( + `${chalk.cyan.bold('[INFO]')} ${ + values.length === 0 + ? stringify(msg) + : interpolate(msg as TemplateStringsArray, ...values) + }`, + ); +} +function warn(msg: unknown): void; +function warn( + msg: TemplateStringsArray, + ...values: [InterpolatableValue, ...InterpolatableValue[]] +): void; +function warn(msg: unknown, ...values: InterpolatableValue[]): void { + console.warn( + chalk.yellow( + `${chalk.bold('[WARNING]')} ${ + values.length === 0 + ? stringify(msg) + : interpolate(msg as TemplateStringsArray, ...values) + }`, + ), + ); +} +function error(msg: unknown): void; +function error( + msg: TemplateStringsArray, + ...values: [InterpolatableValue, ...InterpolatableValue[]] +): void; +function error(msg: unknown, ...values: InterpolatableValue[]): void { + console.error( + chalk.red( + `${chalk.bold('[ERROR]')} ${ + values.length === 0 + ? stringify(msg) + : interpolate(msg as TemplateStringsArray, ...values) + }`, + ), + ); +} +function success(msg: unknown): void; +function success( + msg: TemplateStringsArray, + ...values: [InterpolatableValue, ...InterpolatableValue[]] +): void; +function success(msg: unknown, ...values: InterpolatableValue[]): void { + console.log( + `${chalk.green.bold('[SUCCESS]')} ${ + values.length === 0 + ? stringify(msg) + : interpolate(msg as TemplateStringsArray, ...values) + }`, + ); +} +function throwError(msg: unknown): void; +function throwError( + msg: TemplateStringsArray, + ...values: [InterpolatableValue, ...InterpolatableValue[]] +): void; +function throwError(msg: unknown, ...values: InterpolatableValue[]): void { + throw new Error( + values.length === 0 + ? stringify(msg) + : interpolate(msg as TemplateStringsArray, ...values), + ); +} + +function newLine(): void { + console.log(); +} + +/** + * Takes a message and reports it according to the severity that the user wants. + * + * - `ignore`: completely no-op + * - `log`: uses the `INFO` log level + * - `warn`: uses the `WARN` log level + * - `throw`: aborts the process, throws the error. + * + * Since the logger doesn't have logging level filters yet, these severities + * mostly just differ by their colors. + * + * @throws In addition to throwing when `reportingSeverity === "throw"`, this + * function also throws if `reportingSeverity` is not one of the above. + */ +function report(reportingSeverity: ReportingSeverity): typeof success { + const reportingMethods = { + ignore: () => {}, + log: info, + warn, + throw: throwError, + }; + if ( + !Object.prototype.hasOwnProperty.call(reportingMethods, reportingSeverity) + ) { + throw new Error( + `Unexpected "reportingSeverity" value: ${reportingSeverity}.`, + ); + } + return reportingMethods[reportingSeverity]; +} + +const logger = { + red: (msg: string | number): string => chalk.red(msg), + yellow: (msg: string | number): string => chalk.yellow(msg), + green: (msg: string | number): string => chalk.green(msg), + bold: (msg: string | number): string => chalk.bold(msg), + dim: (msg: string | number): string => chalk.dim(msg), + path, + url, + name, + code, + subdue, + num, + interpolate, + info, + warn, + error, + success, + report, + newLine, +}; + +export default logger; diff --git a/packages/docusaurus/src/utils.ts b/packages/docusaurus-logger/src/perfLogger.ts similarity index 95% rename from packages/docusaurus/src/utils.ts rename to packages/docusaurus-logger/src/perfLogger.ts index 59bab6325a6e..b92319504a91 100644 --- a/packages/docusaurus/src/utils.ts +++ b/packages/docusaurus-logger/src/perfLogger.ts @@ -5,12 +5,11 @@ * LICENSE file in the root directory of this source tree. */ import {AsyncLocalStorage} from 'async_hooks'; -import logger from '@docusaurus/logger'; +import logger from './logger'; // For now this is a private env variable we use internally // But we'll want to expose this feature officially some day -export const PerfDebuggingEnabled: boolean = - !!process.env.DOCUSAURUS_PERF_LOGGER; +const PerfDebuggingEnabled: boolean = !!process.env.DOCUSAURUS_PERF_LOGGER; const Thresholds = { min: 5, diff --git a/packages/docusaurus/src/commands/build.ts b/packages/docusaurus/src/commands/build.ts index 17952898f6af..cf8699a7042f 100644 --- a/packages/docusaurus/src/commands/build.ts +++ b/packages/docusaurus/src/commands/build.ts @@ -8,11 +8,10 @@ import fs from 'fs-extra'; import path from 'path'; import _ from 'lodash'; -import logger from '@docusaurus/logger'; +import logger, {PerfLogger} from '@docusaurus/logger'; import {DOCUSAURUS_VERSION, mapAsyncSequential} from '@docusaurus/utils'; import {loadSite, loadContext, type LoadContextParams} from '../server/site'; import {handleBrokenLinks} from '../server/brokenLinks'; - import {createBuildClientConfig} from '../webpack/client'; import createServerConfig from '../webpack/server'; import { @@ -20,7 +19,6 @@ import { executePluginsConfigureWebpack, } from '../webpack/configure'; import {compile} from '../webpack/utils'; -import {PerfLogger} from '../utils'; import {loadI18n} from '../server/i18n'; import { diff --git a/packages/docusaurus/src/commands/start/utils.ts b/packages/docusaurus/src/commands/start/utils.ts index 223733286d1a..7c6701ac9890 100644 --- a/packages/docusaurus/src/commands/start/utils.ts +++ b/packages/docusaurus/src/commands/start/utils.ts @@ -9,9 +9,8 @@ import fs from 'fs-extra'; import _ from 'lodash'; import {prepareUrls} from 'react-dev-utils/WebpackDevServerUtils'; import {normalizeUrl} from '@docusaurus/utils'; -import logger from '@docusaurus/logger'; +import logger, {PerfLogger} from '@docusaurus/logger'; import {getHostPort} from '../../server/getHostPort'; -import {PerfLogger} from '../../utils'; import { loadSite, type LoadSiteParams, diff --git a/packages/docusaurus/src/server/plugins/plugins.ts b/packages/docusaurus/src/server/plugins/plugins.ts index 59aed351acc5..f16007a5ecf6 100644 --- a/packages/docusaurus/src/server/plugins/plugins.ts +++ b/packages/docusaurus/src/server/plugins/plugins.ts @@ -5,11 +5,11 @@ * LICENSE file in the root directory of this source tree. */ +import {PerfLogger} from '@docusaurus/logger'; import {initPlugins} from './init'; import {createBootstrapPlugin, createMDXFallbackPlugin} from './synthetic'; import {localizePluginTranslationFile} from '../translations/translations'; import {sortRoutes} from './routeConfig'; -import {PerfLogger} from '../../utils'; import {createPluginActionsUtils} from './actions'; import { aggregateAllContent, diff --git a/packages/docusaurus/src/server/site.ts b/packages/docusaurus/src/server/site.ts index 2b9f51512046..5e6cb99856d2 100644 --- a/packages/docusaurus/src/server/site.ts +++ b/packages/docusaurus/src/server/site.ts @@ -11,6 +11,7 @@ import { DEFAULT_BUILD_DIR_NAME, GENERATED_FILES_DIR_NAME, } from '@docusaurus/utils'; +import {PerfLogger} from '@docusaurus/logger'; import combinePromises from 'combine-promises'; import {loadSiteConfig} from './config'; import {getAllClientModules} from './clientModules'; @@ -22,7 +23,6 @@ import { loadSiteCodeTranslations, getPluginsDefaultCodeTranslations, } from './translations/translations'; -import {PerfLogger} from '../utils'; import {generateSiteFiles} from './codegen/codegen'; import {getRoutesPaths, handleDuplicateRoutes} from './routes'; import {createSiteStorage} from './storage'; diff --git a/packages/docusaurus/src/ssg.ts b/packages/docusaurus/src/ssg.ts index c1253ca23851..a444905165c2 100644 --- a/packages/docusaurus/src/ssg.ts +++ b/packages/docusaurus/src/ssg.ts @@ -12,8 +12,7 @@ import _ from 'lodash'; import evaluate from 'eval'; import pMap from 'p-map'; import {minify} from 'html-minifier-terser'; -import logger from '@docusaurus/logger'; -import {PerfLogger} from './utils'; +import logger, {PerfLogger} from '@docusaurus/logger'; import {renderSSRTemplate} from './templates/templates'; import type {AppRenderer, AppRenderResult, SiteCollectedData} from './common'; From cf9bd7b0f9db71eaa18932d62d7b638d75226710 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 6 Sep 2024 09:57:55 +0200 Subject: [PATCH 2/5] fix create-docusaurus logger usage --- packages/create-docusaurus/bin/index.js | 2 +- packages/create-docusaurus/src/index.ts | 2 +- packages/docusaurus-logger/src/index.ts | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/create-docusaurus/bin/index.js b/packages/create-docusaurus/bin/index.js index 84d0c9e4f1d9..f6b66f531d26 100755 --- a/packages/create-docusaurus/bin/index.js +++ b/packages/create-docusaurus/bin/index.js @@ -10,7 +10,7 @@ import path from 'path'; import {createRequire} from 'module'; -import logger from '@docusaurus/logger'; +import {logger} from '@docusaurus/logger'; import semver from 'semver'; import {program} from 'commander'; diff --git a/packages/create-docusaurus/src/index.ts b/packages/create-docusaurus/src/index.ts index 769fb4885213..2ed081536743 100755 --- a/packages/create-docusaurus/src/index.ts +++ b/packages/create-docusaurus/src/index.ts @@ -9,7 +9,7 @@ import fs from 'fs-extra'; import {fileURLToPath} from 'url'; import path from 'path'; import _ from 'lodash'; -import logger from '@docusaurus/logger'; +import {logger} from '@docusaurus/logger'; import shell from 'shelljs'; import prompts, {type Choice} from 'prompts'; import supportsColor from 'supports-color'; diff --git a/packages/docusaurus-logger/src/index.ts b/packages/docusaurus-logger/src/index.ts index a09cec08b985..026e03a6cd58 100644 --- a/packages/docusaurus-logger/src/index.ts +++ b/packages/docusaurus-logger/src/index.ts @@ -5,5 +5,12 @@ * LICENSE file in the root directory of this source tree. */ -export {default} from './logger'; +export { + default, + // Extra named export to avoid problems in ESM modules (create-docusaurus) + // See https://github.com/facebook/docusaurus/pull/6661 + // See https://github.com/facebook/docusaurus/pull/7295 + default as logger, +} from './logger'; + export {PerfLogger} from './perfLogger'; From 2b22131619fcf02e505dc3194ec6fc02de9440b6 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 6 Sep 2024 10:09:12 +0200 Subject: [PATCH 3/5] fix create-docusaurus logger usage --- packages/docusaurus-logger/src/index.ts | 3 ++- packages/docusaurus/bin/beforeCli.mjs | 2 +- packages/docusaurus/bin/docusaurus.mjs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/docusaurus-logger/src/index.ts b/packages/docusaurus-logger/src/index.ts index 026e03a6cd58..fad7705bb2f0 100644 --- a/packages/docusaurus-logger/src/index.ts +++ b/packages/docusaurus-logger/src/index.ts @@ -7,7 +7,8 @@ export { default, - // Extra named export to avoid problems in ESM modules (create-docusaurus) + // Extra named export to avoid problems in ESM modules + // Notably: core .mjs CLI + create-docusaurus // See https://github.com/facebook/docusaurus/pull/6661 // See https://github.com/facebook/docusaurus/pull/7295 default as logger, diff --git a/packages/docusaurus/bin/beforeCli.mjs b/packages/docusaurus/bin/beforeCli.mjs index ebf2d975ad14..ca81a6ab45ef 100644 --- a/packages/docusaurus/bin/beforeCli.mjs +++ b/packages/docusaurus/bin/beforeCli.mjs @@ -11,7 +11,7 @@ import fs from 'fs-extra'; import path from 'path'; import {createRequire} from 'module'; import shell from 'shelljs'; -import logger from '@docusaurus/logger'; +import {logger} from '@docusaurus/logger'; import semver from 'semver'; import updateNotifier from 'update-notifier'; import boxen from 'boxen'; diff --git a/packages/docusaurus/bin/docusaurus.mjs b/packages/docusaurus/bin/docusaurus.mjs index 11ac62cadbfb..7c92dee44e92 100755 --- a/packages/docusaurus/bin/docusaurus.mjs +++ b/packages/docusaurus/bin/docusaurus.mjs @@ -9,7 +9,7 @@ // @ts-check import {inspect} from 'node:util'; -import logger from '@docusaurus/logger'; +import {logger} from '@docusaurus/logger'; import cli from 'commander'; import {DOCUSAURUS_VERSION} from '@docusaurus/utils'; import { From 7fa519cd7065801346d5686c31833fb93391b971 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 6 Sep 2024 10:11:33 +0200 Subject: [PATCH 4/5] fix create-docusaurus logger usage --- packages/docusaurus-theme-translations/update.mjs | 2 +- website/_dogfooding/testSwizzleThemeClassic.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docusaurus-theme-translations/update.mjs b/packages/docusaurus-theme-translations/update.mjs index 73fa9c6c5fe1..0c91fafd939f 100644 --- a/packages/docusaurus-theme-translations/update.mjs +++ b/packages/docusaurus-theme-translations/update.mjs @@ -11,7 +11,7 @@ import path from 'path'; import {fileURLToPath} from 'url'; import fs from 'fs-extra'; import _ from 'lodash'; -import logger from '@docusaurus/logger'; +import {logger} from '@docusaurus/logger'; import {getThemes, extractThemeCodeMessages} from './lib/utils.js'; const LocalesDirPath = fileURLToPath(new URL('locales', import.meta.url)); diff --git a/website/_dogfooding/testSwizzleThemeClassic.mjs b/website/_dogfooding/testSwizzleThemeClassic.mjs index 0bb8f2eb72fd..364958b4ec74 100644 --- a/website/_dogfooding/testSwizzleThemeClassic.mjs +++ b/website/_dogfooding/testSwizzleThemeClassic.mjs @@ -8,7 +8,7 @@ import path from 'path'; import fs from 'fs-extra'; import {fileURLToPath} from 'url'; -import logger from '@docusaurus/logger'; +import {logger} from '@docusaurus/logger'; import classicTheme from '@docusaurus/theme-classic'; From 558e486ea8fc554dd6affcd3f79a8de371760497 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 6 Sep 2024 10:45:54 +0200 Subject: [PATCH 5/5] fix ESM usage? --- packages/docusaurus-logger/src/index.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/docusaurus-logger/src/index.ts b/packages/docusaurus-logger/src/index.ts index fad7705bb2f0..5ebcaa06697c 100644 --- a/packages/docusaurus-logger/src/index.ts +++ b/packages/docusaurus-logger/src/index.ts @@ -5,13 +5,14 @@ * LICENSE file in the root directory of this source tree. */ -export { - default, - // Extra named export to avoid problems in ESM modules - // Notably: core .mjs CLI + create-docusaurus - // See https://github.com/facebook/docusaurus/pull/6661 - // See https://github.com/facebook/docusaurus/pull/7295 - default as logger, -} from './logger'; +import OriginalLogger from './logger'; + +export default OriginalLogger; + +// Extra named export to avoid problems in ESM modules +// Notably: core .mjs CLI + create-docusaurus +// See https://github.com/facebook/docusaurus/pull/6661 +// See https://github.com/facebook/docusaurus/pull/7295 +export const logger = OriginalLogger; export {PerfLogger} from './perfLogger';