@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.
- package/lib/frontMatter.d.ts +0 -6
- package/lib/frontMatter.js +3 -4
- package/lib/sidebars/generator.js +1 -1
- package/lib/sidebars/index.js +1 -1
- package/lib/versions/files.js +1 -1
- package/package.json +16 -16
- package/src/client/docsSearch.test.ts +0 -1
- package/src/client/index.ts +1 -1
- package/src/docs.ts +1 -1
- package/src/frontMatter.ts +0 -2
- package/src/sidebars/generator.ts +1 -1
- package/src/sidebars/index.ts +1 -1
- package/src/versions/files.ts +1 -1
package/lib/frontMatter.d.ts
CHANGED
|
@@ -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: {
|
package/lib/frontMatter.js
CHANGED
|
@@ -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
|
-
?
|
|
134
|
+
? findDocByLocalId(link.id)?.id ?? getDoc(link.id).id
|
|
135
135
|
: findConventionalCategoryDocLink()?.id;
|
|
136
136
|
if (!id) {
|
|
137
137
|
return undefined;
|
package/lib/sidebars/index.js
CHANGED
|
@@ -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
|
|
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
|
}
|
package/lib/versions/files.js
CHANGED
|
@@ -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 ? [] :
|
|
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.
|
|
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.
|
|
39
|
-
"@docusaurus/logger": "3.10.
|
|
40
|
-
"@docusaurus/mdx-loader": "3.10.
|
|
41
|
-
"@docusaurus/module-type-aliases": "3.10.
|
|
42
|
-
"@docusaurus/theme-common": "3.10.
|
|
43
|
-
"@docusaurus/types": "3.10.
|
|
44
|
-
"@docusaurus/utils": "3.10.
|
|
45
|
-
"@docusaurus/utils-common": "3.10.
|
|
46
|
-
"@docusaurus/utils-validation": "3.10.
|
|
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.
|
|
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.
|
|
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.
|
|
65
|
-
"react-dom": "^19.
|
|
64
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
65
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
66
66
|
},
|
|
67
67
|
"engines": {
|
|
68
|
-
"node": ">=
|
|
68
|
+
"node": ">=20.0"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "f37f9035584917a97a260b91fc2842cba4f8b94f"
|
|
71
71
|
}
|
package/src/client/index.ts
CHANGED
|
@@ -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
|
}
|
package/src/frontMatter.ts
CHANGED
|
@@ -206,7 +206,7 @@ Available doc IDs:
|
|
|
206
206
|
return undefined;
|
|
207
207
|
}
|
|
208
208
|
const id = link
|
|
209
|
-
?
|
|
209
|
+
? findDocByLocalId(link.id)?.id ?? getDoc(link.id).id
|
|
210
210
|
: findConventionalCategoryDocLink()?.id;
|
|
211
211
|
if (!id) {
|
|
212
212
|
return undefined;
|
package/src/sidebars/index.ts
CHANGED
|
@@ -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
|
|
91
|
+
const module = await loadFreshModule(sidebarFilePath);
|
|
92
92
|
|
|
93
93
|
// TODO unsafe, need to refactor and improve validation
|
|
94
94
|
return module as SidebarsConfig;
|
package/src/versions/files.ts
CHANGED
|
@@ -145,7 +145,7 @@ export async function readVersionNames(
|
|
|
145
145
|
);
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
const versions = options.disableVersioning ? [] :
|
|
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
|