@docusaurus/plugin-content-docs 3.10.1-canary-6655 → 3.10.2

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.
@@ -1,9 +1,3 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
1
  import type { DocFrontMatter } from '@docusaurus/plugin-content-docs';
8
2
  export declare const DocFrontMatterSchema: import("joi").ObjectSchema<DocFrontMatter>;
9
3
  export declare function validateDocFrontMatter(frontMatter: {
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DocFrontMatterSchema = void 0;
4
+ exports.validateDocFrontMatter = validateDocFrontMatter;
2
5
  /**
3
6
  * Copyright (c) Facebook, Inc. and its affiliates.
4
7
  *
5
8
  * This source code is licensed under the MIT license found in the
6
9
  * LICENSE file in the root directory of this source tree.
7
10
  */
8
- /* eslint-disable camelcase */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.DocFrontMatterSchema = void 0;
11
- exports.validateDocFrontMatter = validateDocFrontMatter;
12
11
  const utils_validation_1 = require("@docusaurus/utils-validation");
13
12
  // NOTE: we don't add any default value on purpose here
14
13
  // We don't want default values to magically appear in doc metadata and props
@@ -131,7 +131,7 @@ Available doc IDs:
131
131
  return undefined;
132
132
  }
133
133
  const id = link
134
- ? (findDocByLocalId(link.id)?.id ?? getDoc(link.id).id)
134
+ ? findDocByLocalId(link.id)?.id ?? getDoc(link.id).id
135
135
  : findConventionalCategoryDocLink()?.id;
136
136
  if (!id) {
137
137
  return undefined;
@@ -73,7 +73,7 @@ async function loadSidebarsFileUnsafe(sidebarFilePath) {
73
73
  return exports.DisabledSidebars;
74
74
  }
75
75
  // We don't want sidebars to be cached because of hot reloading.
76
- const module = await (0, utils_1.loadFreshModule)(sidebarFilePath, { default: true });
76
+ const module = await (0, utils_1.loadFreshModule)(sidebarFilePath);
77
77
  // TODO unsafe, need to refactor and improve validation
78
78
  return module;
79
79
  }
@@ -93,7 +93,7 @@ async function readVersionNames(siteDir, options) {
93
93
  if (!versionFileContent && options.disableVersioning) {
94
94
  throw new Error(`Docs: using "disableVersioning: true" option on a non-versioned site does not make sense.`);
95
95
  }
96
- const versions = options.disableVersioning ? [] : (versionFileContent ?? []);
96
+ const versions = options.disableVersioning ? [] : versionFileContent ?? [];
97
97
  // We add the current version at the beginning, unless:
98
98
  // - user don't want to; or
99
99
  // - it's already been explicitly added to versions.json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-content-docs",
3
- "version": "3.10.1-canary-6655",
3
+ "version": "3.10.2",
4
4
  "description": "Docs plugin for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "sideEffects": false,
@@ -35,24 +35,24 @@
35
35
  },
36
36
  "license": "MIT",
37
37
  "dependencies": {
38
- "@docusaurus/core": "3.10.1-canary-6655",
39
- "@docusaurus/logger": "3.10.1-canary-6655",
40
- "@docusaurus/mdx-loader": "3.10.1-canary-6655",
41
- "@docusaurus/module-type-aliases": "3.10.1-canary-6655",
42
- "@docusaurus/theme-common": "3.10.1-canary-6655",
43
- "@docusaurus/types": "3.10.1-canary-6655",
44
- "@docusaurus/utils": "3.10.1-canary-6655",
45
- "@docusaurus/utils-common": "3.10.1-canary-6655",
46
- "@docusaurus/utils-validation": "3.10.1-canary-6655",
38
+ "@docusaurus/core": "3.10.2",
39
+ "@docusaurus/logger": "3.10.2",
40
+ "@docusaurus/mdx-loader": "3.10.2",
41
+ "@docusaurus/module-type-aliases": "3.10.2",
42
+ "@docusaurus/theme-common": "3.10.2",
43
+ "@docusaurus/types": "3.10.2",
44
+ "@docusaurus/utils": "3.10.2",
45
+ "@docusaurus/utils-common": "3.10.2",
46
+ "@docusaurus/utils-validation": "3.10.2",
47
47
  "@types/react-router-config": "^5.0.7",
48
48
  "combine-promises": "^1.1.0",
49
- "fs-extra": "^11.2.0",
49
+ "fs-extra": "^11.1.1",
50
50
  "js-yaml": "^4.1.0",
51
51
  "lodash": "^4.17.21",
52
52
  "schema-dts": "^1.1.2",
53
53
  "tslib": "^2.6.0",
54
54
  "utility-types": "^3.10.0",
55
- "webpack": "^5.106.2"
55
+ "webpack": "^5.88.1"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/js-yaml": "^4.0.5",
@@ -61,11 +61,11 @@
61
61
  "picomatch": "^2.3.1"
62
62
  },
63
63
  "peerDependencies": {
64
- "react": "^19.2.5",
65
- "react-dom": "^19.2.5"
64
+ "react": "^18.0.0 || ^19.0.0",
65
+ "react-dom": "^18.0.0 || ^19.0.0"
66
66
  },
67
67
  "engines": {
68
- "node": ">=24.14"
68
+ "node": ">=20.0"
69
69
  },
70
- "gitHead": "6e93a3055178dd0af922ba627f787229dcdf948b"
70
+ "gitHead": "f37f9035584917a97a260b91fc2842cba4f8b94f"
71
71
  }
@@ -5,7 +5,6 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import {describe, expect, it} from 'vitest';
9
8
  import {getDocsVersionSearchTag} from './docsSearch';
10
9
 
11
10
  describe('getDocsVersionSearchTag', () => {
@@ -138,7 +138,7 @@ export const useDocsData = (pluginId: string | undefined): GlobalPluginData => {
138
138
  `You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled${
139
139
  pluginId === 'Default' ? '' : ` (pluginId=${pluginId}`
140
140
  }`,
141
- {cause: error},
141
+ {cause: error as Error},
142
142
  );
143
143
  }
144
144
  };
package/src/docs.ts CHANGED
@@ -258,7 +258,7 @@ export async function processDocMetadata(args: {
258
258
  } catch (err) {
259
259
  throw new Error(
260
260
  `Can't process doc metadata for doc at path path=${args.docFile.filePath} in version name=${args.versionMetadata.versionName}`,
261
- {cause: err},
261
+ {cause: err as Error},
262
262
  );
263
263
  }
264
264
  }
@@ -4,8 +4,6 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- /* eslint-disable camelcase */
8
-
9
7
  import {
10
8
  JoiFrontMatter as Joi, // Custom instance for front matter
11
9
  URISchema,
@@ -206,7 +206,7 @@ Available doc IDs:
206
206
  return undefined;
207
207
  }
208
208
  const id = link
209
- ? (findDocByLocalId(link.id)?.id ?? getDoc(link.id).id)
209
+ ? findDocByLocalId(link.id)?.id ?? getDoc(link.id).id
210
210
  : findConventionalCategoryDocLink()?.id;
211
211
  if (!id) {
212
212
  return undefined;
@@ -88,7 +88,7 @@ async function loadSidebarsFileUnsafe(
88
88
  }
89
89
 
90
90
  // We don't want sidebars to be cached because of hot reloading.
91
- const module = await loadFreshModule(sidebarFilePath, {default: true});
91
+ const module = await loadFreshModule(sidebarFilePath);
92
92
 
93
93
  // TODO unsafe, need to refactor and improve validation
94
94
  return module as SidebarsConfig;
@@ -145,7 +145,7 @@ export async function readVersionNames(
145
145
  );
146
146
  }
147
147
 
148
- const versions = options.disableVersioning ? [] : (versionFileContent ?? []);
148
+ const versions = options.disableVersioning ? [] : versionFileContent ?? [];
149
149
 
150
150
  // We add the current version at the beginning, unless:
151
151
  // - user don't want to; or