remove interval + dup call

This commit is contained in:
sebastien 2025-05-30 16:03:31 +02:00
parent 9eb255a527
commit 24ba96a60d
2 changed files with 4 additions and 27 deletions

View File

@ -10,7 +10,7 @@
import {inspect} from 'node:util';
import {logger} from '@docusaurus/logger';
import {DOCUSAURUS_VERSION, getFileCommitDate} from '@docusaurus/utils';
import {DOCUSAURUS_VERSION} from '@docusaurus/utils';
import {runCLI} from '../lib/index.js';
import beforeCli from './beforeCli.mjs';
@ -20,25 +20,6 @@ import beforeCli from './beforeCli.mjs';
process.env.BABEL_ENV ??= 'development';
process.env.NODE_ENV ??= 'development';
console.log('TEST');
setInterval(() => {
console.log('\n\nTEST');
getFileCommitDate('docs/advanced/architecture.mdx', {
age: 'newest',
includeAuthor: true,
});
getFileCommitDate(
'i18n/zh-CN/docusaurus-plugin-content-docs/current/advanced/architecture.mdx',
{
age: 'newest',
includeAuthor: true,
},
);
console.log('TEST\n\n');
}, 500);
/**
* @param {unknown} error
*/

View File

@ -77,13 +77,9 @@ async function executePluginContentLoading({
context: LoadContext;
}): Promise<LoadedPlugin> {
return PerfLogger.async(`Load ${formatPluginName(plugin)}`, async () => {
let content = await PerfLogger.async('loadContent()', async () => {
await plugin.loadContent?.();
await plugin.loadContent?.();
await plugin.loadContent?.();
await plugin.loadContent?.();
return plugin.loadContent?.();
});
let content = await PerfLogger.async('loadContent()', () =>
plugin.loadContent?.(),
);
content = await PerfLogger.async('translatePluginContent()', () =>
translatePluginContent({