@docusaurus/utils-validation 0.0.0-4717 → 0.0.0-4722
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/validationUtils.js +1 -1
- package/package.json +4 -4
- package/src/validationUtils.ts +1 -1
package/lib/validationUtils.js
CHANGED
|
@@ -36,7 +36,7 @@ function normalizePluginOptions(schema, options) {
|
|
|
36
36
|
}
|
|
37
37
|
exports.normalizePluginOptions = normalizePluginOptions;
|
|
38
38
|
function normalizeThemeConfig(schema, themeConfig) {
|
|
39
|
-
// A theme should only validate
|
|
39
|
+
// A theme should only validate its "slice" of the full themeConfig,
|
|
40
40
|
// not the whole object, so we allow unknown attributes
|
|
41
41
|
// otherwise one theme would fail validating the data of another theme
|
|
42
42
|
const finalSchema = schema.unknown();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/utils-validation",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4722",
|
|
4
4
|
"description": "Node validation utility functions for Docusaurus packages.",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@docusaurus/logger": "0.0.0-
|
|
22
|
-
"@docusaurus/utils": "0.0.0-
|
|
21
|
+
"@docusaurus/logger": "0.0.0-4722",
|
|
22
|
+
"@docusaurus/utils": "0.0.0-4722",
|
|
23
23
|
"joi": "^17.6.0",
|
|
24
24
|
"tslib": "^2.3.1"
|
|
25
25
|
},
|
|
26
26
|
"engines": {
|
|
27
27
|
"node": ">=14"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "219b4a11069e0b5dc4c7dec07f916031001fc33b"
|
|
30
30
|
}
|
package/src/validationUtils.ts
CHANGED
|
@@ -44,7 +44,7 @@ export function normalizeThemeConfig<T>(
|
|
|
44
44
|
schema: Joi.ObjectSchema<T>,
|
|
45
45
|
themeConfig: Partial<T>,
|
|
46
46
|
): T {
|
|
47
|
-
// A theme should only validate
|
|
47
|
+
// A theme should only validate its "slice" of the full themeConfig,
|
|
48
48
|
// not the whole object, so we allow unknown attributes
|
|
49
49
|
// otherwise one theme would fail validating the data of another theme
|
|
50
50
|
const finalSchema = schema.unknown();
|