@docusaurus/core 4.0.0-canary-6894 → 4.0.0-canary-6898

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,6 +13,6 @@ export declare const DEFAULT_FASTER_CONFIG_TRUE: FasterConfig;
13
13
  export declare const DEFAULT_FUTURE_V4_CONFIG: FutureV4Config;
14
14
  export declare const DEFAULT_FUTURE_V4_CONFIG_TRUE: FutureV4Config;
15
15
  export declare const DEFAULT_FUTURE_CONFIG: FutureConfig;
16
- export declare const DEFAULT_CONFIG: Pick<DocusaurusConfig, 'i18n' | 'storage' | 'future' | 'onBrokenLinks' | 'onBrokenAnchors' | 'onBrokenMarkdownLinks' | 'onDuplicateRoutes' | 'plugins' | 'themes' | 'presets' | 'headTags' | 'stylesheets' | 'scripts' | 'clientModules' | 'customFields' | 'themeConfig' | 'titleDelimiter' | 'noIndex' | 'tagline' | 'baseUrlIssueBanner' | 'staticDirectories' | 'markdown'>;
16
+ export declare const DEFAULT_CONFIG: Pick<DocusaurusConfig, 'i18n' | 'storage' | 'vcs' | 'future' | 'onBrokenLinks' | 'onBrokenAnchors' | 'onBrokenMarkdownLinks' | 'onDuplicateRoutes' | 'plugins' | 'themes' | 'presets' | 'headTags' | 'stylesheets' | 'scripts' | 'clientModules' | 'customFields' | 'themeConfig' | 'titleDelimiter' | 'noIndex' | 'tagline' | 'baseUrlIssueBanner' | 'staticDirectories' | 'markdown'>;
17
17
  export declare const ConfigSchema: Joi.ObjectSchema<DocusaurusConfig>;
18
18
  export declare function validateConfig(config: unknown, siteConfigPath: string): DocusaurusConfig;
@@ -48,19 +48,15 @@ exports.DEFAULT_STORAGE_CONFIG = {
48
48
  exports.DEFAULT_FASTER_CONFIG = {
49
49
  swcJsMinimizer: false,
50
50
  swcHtmlMinimizer: false,
51
- lightningCssMinimizer: false,
52
51
  rspackBundler: false,
53
52
  rspackPersistentCache: false,
54
- gitEagerVcs: false,
55
53
  };
56
54
  // When using the "faster: true" shortcut
57
55
  exports.DEFAULT_FASTER_CONFIG_TRUE = {
58
56
  swcJsMinimizer: true,
59
57
  swcHtmlMinimizer: true,
60
- lightningCssMinimizer: true,
61
58
  rspackBundler: true,
62
59
  rspackPersistentCache: true,
63
- gitEagerVcs: true,
64
60
  };
65
61
  exports.DEFAULT_FUTURE_V4_CONFIG = {
66
62
  useCssCascadeLayers: false,
@@ -78,7 +74,6 @@ exports.DEFAULT_FUTURE_V4_CONFIG_TRUE = {
78
74
  exports.DEFAULT_FUTURE_CONFIG = {
79
75
  v4: exports.DEFAULT_FUTURE_V4_CONFIG,
80
76
  faster: exports.DEFAULT_FASTER_CONFIG,
81
- experimental_vcs: (0, utils_1.getVcsPreset)('default-v1'),
82
77
  experimental_router: 'browser',
83
78
  };
84
79
  const DEFAULT_MARKDOWN_HOOKS = {
@@ -110,6 +105,7 @@ const DEFAULT_MARKDOWN_CONFIG = {
110
105
  exports.DEFAULT_CONFIG = {
111
106
  i18n: exports.DEFAULT_I18N_CONFIG,
112
107
  storage: exports.DEFAULT_STORAGE_CONFIG,
108
+ vcs: (0, utils_1.getVcsPreset)('default'),
113
109
  future: exports.DEFAULT_FUTURE_CONFIG,
114
110
  onBrokenLinks: 'throw',
115
111
  onBrokenAnchors: 'warn', // TODO Docusaurus v4: change to throw
@@ -206,10 +202,8 @@ const FASTER_CONFIG_SCHEMA = utils_validation_1.Joi.alternatives()
206
202
  .try(utils_validation_1.Joi.object({
207
203
  swcJsMinimizer: utils_validation_1.Joi.boolean(),
208
204
  swcHtmlMinimizer: utils_validation_1.Joi.boolean(),
209
- lightningCssMinimizer: utils_validation_1.Joi.boolean(),
210
205
  rspackBundler: utils_validation_1.Joi.boolean(),
211
206
  rspackPersistentCache: utils_validation_1.Joi.boolean(),
212
- gitEagerVcs: utils_validation_1.Joi.boolean(),
213
207
  swcJsLoader: utils_validation_1.Joi.any()
214
208
  .forbidden()
215
209
  .messages({
@@ -257,22 +251,17 @@ const VCS_CONFIG_SCHEMA = utils_validation_1.Joi.custom((input) => {
257
251
  return (0, utils_1.getVcsPreset)(presetName);
258
252
  }
259
253
  if (typeof input === 'boolean') {
260
- // We return the boolean on purpose
261
- // We'll normalize it to a real VcsConfig later
262
- // This is annoying, but we have to read the future flag to switch to the
263
- // new "default-v2" config (not easy to do it here)
264
- return input;
254
+ return input ? (0, utils_1.getVcsPreset)('default') : (0, utils_1.getVcsPreset)('disabled');
265
255
  }
266
256
  const { error, value } = VCS_CONFIG_OBJECT_SCHEMA.validate(input);
267
257
  if (error) {
268
258
  throw error;
269
259
  }
270
260
  return value;
271
- }).default(true);
261
+ }).default(() => exports.DEFAULT_CONFIG.vcs);
272
262
  const FUTURE_CONFIG_SCHEMA = utils_validation_1.Joi.object({
273
263
  v4: FUTURE_V4_SCHEMA,
274
264
  faster: FASTER_CONFIG_SCHEMA,
275
- experimental_vcs: VCS_CONFIG_SCHEMA,
276
265
  experimental_router: utils_validation_1.Joi.string()
277
266
  .equal('browser', 'hash')
278
267
  .default(exports.DEFAULT_FUTURE_CONFIG.experimental_router),
@@ -299,6 +288,7 @@ exports.ConfigSchema = utils_validation_1.Joi.object({
299
288
  trailingSlash: utils_validation_1.Joi.boolean(), // No default value! undefined = retrocompatible legacy behavior!
300
289
  i18n: I18N_CONFIG_SCHEMA,
301
290
  storage: STORAGE_CONFIG_SCHEMA,
291
+ vcs: VCS_CONFIG_SCHEMA,
302
292
  future: FUTURE_CONFIG_SCHEMA,
303
293
  onBrokenLinks: utils_validation_1.Joi.string()
304
294
  .equal('ignore', 'log', 'warn', 'throw')
@@ -457,15 +447,6 @@ Please migrate and move this option to code=${'siteConfig.markdown.hooks.onBroke
457
447
  // We erase the former one to ensure we don't use it anywhere
458
448
  config.onBrokenMarkdownLinks = undefined;
459
449
  }
460
- // We normalize the VCS config when using a boolean value
461
- if (typeof config.future.experimental_vcs === 'boolean') {
462
- const vcsConfig = config.future.experimental_vcs
463
- ? config.future.faster.gitEagerVcs
464
- ? (0, utils_1.getVcsPreset)('default-v2')
465
- : (0, utils_1.getVcsPreset)('default-v1')
466
- : (0, utils_1.getVcsPreset)('disabled');
467
- config.future.experimental_vcs = vcsConfig;
468
- }
469
450
  if (config.future.faster.rspackPersistentCache &&
470
451
  !config.future.faster.rspackBundler) {
471
452
  throw new Error(`Docusaurus config flag ${logger_1.default.code('future.faster.rspackPersistentCache')} requires the flag ${logger_1.default.code('future.faster.rspackBundler')} to be turned on.`);
@@ -49,7 +49,7 @@ async function loadContext(params) {
49
49
  // VCS initialization can be slow for large repos, and we don't want to block
50
50
  // VCS integrations should be carefully designed to avoid blocking
51
51
  logger_1.PerfLogger.async('VCS init', () => {
52
- return initialSiteConfig.future.experimental_vcs.initialize({ siteDir });
52
+ return initialSiteConfig.vcs.initialize({ siteDir });
53
53
  });
54
54
  const currentBundler = await (0, bundler_1.getCurrentBundler)({
55
55
  siteConfig: initialSiteConfig,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@docusaurus/core",
3
3
  "description": "Easy to Maintain Open Source Documentation Websites",
4
- "version": "4.0.0-canary-6894",
4
+ "version": "4.0.0-canary-6898",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -33,15 +33,15 @@
33
33
  "url": "https://github.com/facebook/docusaurus/issues"
34
34
  },
35
35
  "dependencies": {
36
- "@docusaurus/babel": "4.0.0-canary-6894",
37
- "@docusaurus/bundler": "4.0.0-canary-6894",
38
- "@docusaurus/fs": "4.0.0-canary-6894",
39
- "@docusaurus/glob": "4.0.0-canary-6894",
40
- "@docusaurus/logger": "4.0.0-canary-6894",
41
- "@docusaurus/mdx-loader": "4.0.0-canary-6894",
42
- "@docusaurus/utils": "4.0.0-canary-6894",
43
- "@docusaurus/utils-common": "4.0.0-canary-6894",
44
- "@docusaurus/utils-validation": "4.0.0-canary-6894",
36
+ "@docusaurus/babel": "4.0.0-canary-6898",
37
+ "@docusaurus/bundler": "4.0.0-canary-6898",
38
+ "@docusaurus/fs": "4.0.0-canary-6898",
39
+ "@docusaurus/glob": "4.0.0-canary-6898",
40
+ "@docusaurus/logger": "4.0.0-canary-6898",
41
+ "@docusaurus/mdx-loader": "4.0.0-canary-6898",
42
+ "@docusaurus/utils": "4.0.0-canary-6898",
43
+ "@docusaurus/utils-common": "4.0.0-canary-6898",
44
+ "@docusaurus/utils-validation": "4.0.0-canary-6898",
45
45
  "boxen": "^9.0.0",
46
46
  "cli-table3": "^0.6.5",
47
47
  "combine-promises": "^1.2.0",
@@ -72,8 +72,8 @@
72
72
  "webpack-merge": "^6.0.1"
73
73
  },
74
74
  "devDependencies": {
75
- "@docusaurus/module-type-aliases": "4.0.0-canary-6894",
76
- "@docusaurus/types": "4.0.0-canary-6894",
75
+ "@docusaurus/module-type-aliases": "4.0.0-canary-6898",
76
+ "@docusaurus/types": "4.0.0-canary-6898",
77
77
  "@total-typescript/shoehorn": "^0.1.2",
78
78
  "@types/escape-html": "^1.0.4",
79
79
  "@types/history": "^4.7.11",
@@ -87,7 +87,7 @@
87
87
  "utility-types": "^3.11.0"
88
88
  },
89
89
  "peerDependencies": {
90
- "@docusaurus/faster": "4.0.0-canary-6894",
90
+ "@docusaurus/faster": "4.0.0-canary-6898",
91
91
  "@mdx-js/react": "^3.1.1",
92
92
  "react": "^19.3.0",
93
93
  "react-dom": "^19.3.0"
@@ -100,5 +100,5 @@
100
100
  "engines": {
101
101
  "node": ">=24.21"
102
102
  },
103
- "gitHead": "fd790ec4701679f498019f9ba8ae1b32fe1b86d2"
103
+ "gitHead": "9cb6d6b09eacaefa738949b06bffe912fe759eaf"
104
104
  }