mirror of
https://github.com/facebook/docusaurus.git
synced 2025-12-26 01:33:02 +00:00
minor refactor
This commit is contained in:
parent
927b0c7b39
commit
b80ee31401
|
|
@ -116,14 +116,14 @@ export async function readLastUpdateData(
|
|||
filePath: string,
|
||||
options: LastUpdateOptions,
|
||||
lastUpdateFrontMatter: FrontMatterLastUpdate | undefined,
|
||||
vcs: Pick<VcsConfig, 'getFileLastUpdateInfo'>,
|
||||
vcsParam: Pick<VcsConfig, 'getFileLastUpdateInfo'>,
|
||||
): Promise<LastUpdateData> {
|
||||
// We fallback to the default VSC config at runtime on purpose
|
||||
// It preserves retro-compatibility if a third-party plugin imports it
|
||||
// This also ensures unit tests keep working without extra setup
|
||||
// We still want to ensure type safety by requiring the VCS param
|
||||
// TODO Docusaurus v4: refactor all these Git read APIs
|
||||
vcs = vcs ?? DEFAULT_VCS_CONFIG;
|
||||
const vcs = vcsParam ?? DEFAULT_VCS_CONFIG;
|
||||
|
||||
const {showLastUpdateAuthor, showLastUpdateTime} = options;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue