From 3fb62eec3c73cf522c8eebb2a3be84fc2c08e61d Mon Sep 17 00:00:00 2001 From: Michael Hughes Date: Fri, 6 May 2022 17:00:51 +0100 Subject: [PATCH 1/2] Update configValidation.ts Proposed fix for #7359 --- packages/docusaurus/src/server/configValidation.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/docusaurus/src/server/configValidation.ts b/packages/docusaurus/src/server/configValidation.ts index a76b56cc2be6..f8a0985903a8 100644 --- a/packages/docusaurus/src/server/configValidation.ts +++ b/packages/docusaurus/src/server/configValidation.ts @@ -185,6 +185,7 @@ export const ConfigSchema = Joi.object({ deploymentBranch: Joi.string().optional(), customFields: Joi.object().unknown().default(DEFAULT_CONFIG.customFields), githubHost: Joi.string(), + githubPort: Joi.string(), plugins: Joi.array().items(PluginSchema).default(DEFAULT_CONFIG.plugins), themes: Joi.array().items(ThemeSchema).default(DEFAULT_CONFIG.themes), presets: Joi.array().items(PresetSchema).default(DEFAULT_CONFIG.presets), From 4b4ff4e5bb04305249ed3508639abf91c8345b1f Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Sat, 7 May 2022 13:24:53 +0800 Subject: [PATCH 2/2] add test case --- .../docusaurus/src/server/__tests__/configValidation.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/docusaurus/src/server/__tests__/configValidation.test.ts b/packages/docusaurus/src/server/__tests__/configValidation.test.ts index 008f71c71588..70eaa3900e3c 100644 --- a/packages/docusaurus/src/server/__tests__/configValidation.test.ts +++ b/packages/docusaurus/src/server/__tests__/configValidation.test.ts @@ -37,6 +37,7 @@ describe('normalizeConfig', () => { organizationName: 'facebook', projectName: 'docusaurus', githubHost: 'github.com', + githubPort: '8000', customFields: { myCustomField: '42', },