mirror of
https://github.com/facebook/docusaurus.git
synced 2025-12-26 01:33:02 +00:00
Move VCS code in dedicated subfolder
This commit is contained in:
parent
9443d5f6c0
commit
7e6a4e062b
|
|
@ -562,8 +562,9 @@ describe('blog plugin', () => {
|
|||
const noDateSource = path.posix.join('@site', PluginPath, 'no date.md');
|
||||
const noDateSourceFile = path.posix.join(siteDir, PluginPath, 'no date.md');
|
||||
// We know the file exists and we know we have git
|
||||
const result = await getFileCommitDate(noDateSourceFile, {age: 'oldest'});
|
||||
const noDateSourceTime = result.date;
|
||||
const noDateSourceTime = (
|
||||
await getFileCommitDate(noDateSourceFile, {age: 'oldest'})
|
||||
).date;
|
||||
|
||||
expect({
|
||||
...getByTitle(blogPosts, 'no date').metadata,
|
||||
|
|
|
|||
|
|
@ -25,10 +25,12 @@ export {
|
|||
} from './constants';
|
||||
export {generate, readOutputHTMLFile} from './emitUtils';
|
||||
export {
|
||||
// TODO Docusaurus v4: remove these legacy exports,
|
||||
// they are only kept for retro-compatibility
|
||||
getFileCommitDate,
|
||||
FileNotTrackedError,
|
||||
GitNotFoundError,
|
||||
} from './gitUtils';
|
||||
} from './vcs/gitUtils';
|
||||
export {
|
||||
mergeTranslations,
|
||||
updateTranslationFileMessages,
|
||||
|
|
@ -129,6 +131,6 @@ export {
|
|||
type FrontMatterLastUpdate,
|
||||
} from './lastUpdateUtils';
|
||||
|
||||
export {DEFAULT_VCS_CONFIG} from './vcsUtils';
|
||||
export {DEFAULT_VCS_CONFIG} from './vcs/vcsUtils';
|
||||
|
||||
export {normalizeTags, reportInlineTags} from './tags';
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import {
|
|||
FileNotTrackedError,
|
||||
GitNotFoundError,
|
||||
getFileCommitDate,
|
||||
} from './gitUtils';
|
||||
import {DEFAULT_VCS_CONFIG} from './vcsUtils';
|
||||
} from './vcs/gitUtils';
|
||||
import {DEFAULT_VCS_CONFIG} from './vcs/vcsUtils';
|
||||
import type {PluginOptions, VcsConfig} from '@docusaurus/types';
|
||||
|
||||
export type LastUpdateData = {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import fs from 'fs-extra';
|
|||
import path from 'path';
|
||||
import {createTempRepo} from '@testing-utils/git';
|
||||
import {FileNotTrackedError, getFileCommitDate} from '../gitUtils';
|
||||
import {getGitLastUpdate} from '../lastUpdateUtils';
|
||||
import {getGitLastUpdate} from '../../lastUpdateUtils';
|
||||
|
||||
/* eslint-disable no-restricted-properties */
|
||||
function initializeTempRepo() {
|
||||
|
|
@ -10,7 +10,7 @@ import {
|
|||
getFileCommitDate,
|
||||
GitNotFoundError,
|
||||
} from './gitUtils';
|
||||
import {getLastUpdate} from './lastUpdateUtils';
|
||||
import {getLastUpdate} from '../lastUpdateUtils';
|
||||
import type {VcsConfig} from '@docusaurus/types';
|
||||
|
||||
export const DEFAULT_VCS_CONFIG: VcsConfig = {
|
||||
Loading…
Reference in New Issue