Skip to content

Commit 48f2ce5

Browse files
authored
Merge branch 'facebook:main' into main
2 parents 507d4fd + 542228e commit 48f2ce5

File tree

4 files changed

+31
-45
lines changed

4 files changed

+31
-45
lines changed

packages/docusaurus-migrate/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"fs-extra": "^10.1.0",
3333
"hast-util-to-string": "^1.0.4",
3434
"html-tags": "^3.2.0",
35-
"import-fresh": "^3.3.0",
3635
"jscodeshift": "^0.13.1",
3736
"rehype-parse": "^7.0.1",
3837
"remark-parse": "^8.0.2",

packages/docusaurus-migrate/src/index.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import path from 'path';
99
import fs from 'fs-extra';
1010
import logger from '@docusaurus/logger';
1111
import {Globby, DOCUSAURUS_VERSION} from '@docusaurus/utils';
12-
import importFresh from 'import-fresh';
1312
import Color from 'color';
1413

1514
import extractMetadata, {shouldQuotifyFrontMatter} from './frontMatter';
@@ -79,7 +78,7 @@ export async function migrateDocusaurusProject(
7978
shouldMigratePages: boolean = false,
8079
): Promise<void> {
8180
async function createMigrationContext(): Promise<MigrationContext> {
82-
const v1Config = (await import(`${siteDir}/siteConfig`))
81+
const v1Config = (await import(`${siteDir}/siteConfig.js`))
8382
.default as VersionOneConfig;
8483
logger.info('Starting migration from v1 to v2...');
8584
const deps = {
@@ -709,12 +708,13 @@ async function migrateLatestDocs(context: MigrationContext) {
709708

710709
async function migratePackageFile(context: MigrationContext): Promise<void> {
711710
const {deps, siteDir, newDir} = context;
712-
const packageFile = importFresh<{
711+
// eslint-disable-next-line global-require, import/no-dynamic-require
712+
const packageFile = (await require(`${siteDir}/package.json`)) as {
713713
scripts?: {[key: string]: string};
714714
dependencies?: {[key: string]: string};
715715
devDependencies?: {[key: string]: string};
716716
[otherKey: string]: unknown;
717-
}>(`${siteDir}/package.json`);
717+
};
718718
packageFile.scripts = {
719719
...packageFile.scripts,
720720
start: 'docusaurus start',
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
{
22
"theme.SearchBar.label": "검색",
33
"theme.SearchBar.seeAll": "{count}개의 결과 확인하기",
4-
"theme.SearchModal.errorScreen.helpText": "You might want to check your network connection.",
5-
"theme.SearchModal.errorScreen.titleText": "Unable to fetch results",
6-
"theme.SearchModal.footer.closeKeyAriaLabel": "Escape key",
7-
"theme.SearchModal.footer.closeText": "to close",
8-
"theme.SearchModal.footer.navigateDownKeyAriaLabel": "Arrow down",
9-
"theme.SearchModal.footer.navigateText": "to navigate",
10-
"theme.SearchModal.footer.navigateUpKeyAriaLabel": "Arrow up",
11-
"theme.SearchModal.footer.searchByText": "Search by",
12-
"theme.SearchModal.footer.selectKeyAriaLabel": "Enter key",
13-
"theme.SearchModal.footer.selectText": "to select",
14-
"theme.SearchModal.noResultsScreen.noResultsText": "No results for",
15-
"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": "Let us know.",
16-
"theme.SearchModal.noResultsScreen.reportMissingResultsText": "Believe this query should return results?",
17-
"theme.SearchModal.noResultsScreen.suggestedQueryText": "Try searching for",
18-
"theme.SearchModal.placeholder": "Search docs",
19-
"theme.SearchModal.searchBox.cancelButtonText": "Cancel",
20-
"theme.SearchModal.searchBox.resetButtonTitle": "Clear the query",
21-
"theme.SearchModal.startScreen.favoriteSearchesTitle": "Favorite",
22-
"theme.SearchModal.startScreen.noRecentSearchesText": "No recent searches",
23-
"theme.SearchModal.startScreen.recentSearchesTitle": "Recent",
24-
"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": "Remove this search from favorites",
25-
"theme.SearchModal.startScreen.removeRecentSearchButtonTitle": "Remove this search from history",
26-
"theme.SearchModal.startScreen.saveRecentSearchButtonTitle": "Save this search",
4+
"theme.SearchModal.errorScreen.helpText": "인터넷 연결을 다시 확인하시기 바랍니다.",
5+
"theme.SearchModal.errorScreen.titleText": "결과를 불러올 수 없음",
6+
"theme.SearchModal.footer.closeKeyAriaLabel": "Esc 키",
7+
"theme.SearchModal.footer.closeText": "로 종료",
8+
"theme.SearchModal.footer.navigateDownKeyAriaLabel": "화살표 아래 키",
9+
"theme.SearchModal.footer.navigateText": "로 이동",
10+
"theme.SearchModal.footer.navigateUpKeyAriaLabel": "화살표 위 키",
11+
"theme.SearchModal.footer.searchByText": "검색 제공",
12+
"theme.SearchModal.footer.selectKeyAriaLabel": "엔터 키",
13+
"theme.SearchModal.footer.selectText": "로 선택",
14+
"theme.SearchModal.noResultsScreen.noResultsText": "검색 결과 없음",
15+
"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": "알려주시기 바랍니다.",
16+
"theme.SearchModal.noResultsScreen.reportMissingResultsText": "검색 결과가 없는 것이 오류라고 생각되십니까?",
17+
"theme.SearchModal.noResultsScreen.suggestedQueryText": "다른 추천 검색어",
18+
"theme.SearchModal.placeholder": "문서 검색",
19+
"theme.SearchModal.searchBox.cancelButtonText": "취소",
20+
"theme.SearchModal.searchBox.resetButtonTitle": "검색어 초기화",
21+
"theme.SearchModal.startScreen.favoriteSearchesTitle": "즐겨찾기",
22+
"theme.SearchModal.startScreen.noRecentSearchesText": "최근 검색어 없음",
23+
"theme.SearchModal.startScreen.recentSearchesTitle": "최근",
24+
"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": "이 검색어를 즐겨찾기에서 삭제",
25+
"theme.SearchModal.startScreen.removeRecentSearchButtonTitle": "이 검색어를 최근 검색어에서 삭제",
26+
"theme.SearchModal.startScreen.saveRecentSearchButtonTitle": "이 검색어를 저장",
2727
"theme.SearchPage.algoliaLabel": "Algolia로 검색",
28-
"theme.SearchPage.documentsFound.plurals": "{count} 문서를 찾았습니다.",
28+
"theme.SearchPage.documentsFound.plurals": "{count}개의 문서를 찾았습니다.",
2929
"theme.SearchPage.emptyResultsTitle": "문서를 검색합니다.",
30-
"theme.SearchPage.existingResultsTitle": "\"{query}\" 검색 결과가 있습니다.",
31-
"theme.SearchPage.fetchingNewResults": "새로운 검색 결과를 불러오는 중 입니다...",
30+
"theme.SearchPage.existingResultsTitle": "\"{query}\" 검색 결과",
31+
"theme.SearchPage.fetchingNewResults": "새로운 검색 결과를 불러오는 중입니다.",
3232
"theme.SearchPage.inputLabel": "검색",
33-
"theme.SearchPage.inputPlaceholder": "여기에 검색할 키워드를 입력하세요.",
33+
"theme.SearchPage.inputPlaceholder": "검색어를 입력하세요.",
3434
"theme.SearchPage.noResultsText": "검색 결과가 없습니다."
3535
}

packages/docusaurus/src/commands/deploy.ts

-13
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,6 @@ You can also set the deploymentBranch property in docusaurus.config.js .`);
183183
// Save the commit hash that triggers publish-gh-pages before checking
184184
// out to deployment branch.
185185
const currentCommit = shellExecLog('git rev-parse HEAD').stdout.trim();
186-
const currentGitRootDir = shellExecLog(
187-
'git rev-parse --show-toplevel',
188-
).stdout.trim();
189186

190187
const runDeploy = async (outputDirectory: string) => {
191188
const fromPath = outputDirectory;
@@ -216,16 +213,6 @@ You can also set the deploymentBranch property in docusaurus.config.js .`);
216213
logger.error`Copying build assets from path=${fromPath} to path=${toPath} failed.`;
217214
throw err;
218215
}
219-
220-
const gitConfigFromPath = path.join(currentGitRootDir, `.git`, `config`);
221-
const gitConfigToPath = path.join(toPath, `.git`, `config`);
222-
try {
223-
await fs.copy(gitConfigFromPath, gitConfigToPath);
224-
} catch (err) {
225-
logger.error`Copying git config from path=${gitConfigFromPath} to path=${gitConfigToPath} failed.`;
226-
throw err;
227-
}
228-
229216
shellExecLog('git add --all');
230217

231218
const commitMessage =

0 commit comments

Comments
 (0)