@docusaurus/core 4.0.0-canary-6969 → 4.0.0-canary-6971
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/commands/swizzle/config.js +4 -3
- package/package.json +12 -12
|
@@ -13,16 +13,17 @@ const logger_1 = tslib_1.__importDefault(require("@docusaurus/logger"));
|
|
|
13
13
|
const utils_validation_1 = require("@docusaurus/utils-validation");
|
|
14
14
|
const common_1 = require("./common");
|
|
15
15
|
const themes_1 = require("./themes");
|
|
16
|
-
function getModuleSwizzleConfig(swizzlePlugin) {
|
|
16
|
+
function getModuleSwizzleConfig(swizzlePlugin, themeName) {
|
|
17
17
|
const getSwizzleConfig = swizzlePlugin.plugin.plugin.getSwizzleConfig ??
|
|
18
18
|
swizzlePlugin.plugin.pluginModule?.module.getSwizzleConfig;
|
|
19
19
|
if (getSwizzleConfig) {
|
|
20
20
|
return getSwizzleConfig();
|
|
21
21
|
}
|
|
22
|
-
// TODO
|
|
22
|
+
// TODO Docusaurus v5: remove the deprecated getSwizzleComponentList() API
|
|
23
23
|
const getSwizzleComponentList = swizzlePlugin.plugin.plugin.getSwizzleComponentList ??
|
|
24
24
|
swizzlePlugin.plugin.pluginModule?.module.getSwizzleComponentList;
|
|
25
25
|
if (getSwizzleComponentList) {
|
|
26
|
+
logger_1.default.warn `Theme name=${themeName} uses the deprecated code=${'getSwizzleComponentList()'} API, which will be removed in Docusaurus v5. The theme should implement code=${'getSwizzleConfig()'} instead: url=${'https://docusaurus.io/docs/api/plugin-methods/extend-infrastructure#getSwizzleConfig'}`;
|
|
26
27
|
const safeComponents = getSwizzleComponentList() ?? [];
|
|
27
28
|
const safeComponentConfig = {
|
|
28
29
|
actions: {
|
|
@@ -69,7 +70,7 @@ const FallbackSwizzleConfig = {
|
|
|
69
70
|
};
|
|
70
71
|
function getThemeSwizzleConfig(themeName, plugins) {
|
|
71
72
|
const plugin = (0, themes_1.getPluginByThemeName)(plugins, themeName);
|
|
72
|
-
const config = getModuleSwizzleConfig(plugin);
|
|
73
|
+
const config = getModuleSwizzleConfig(plugin, themeName);
|
|
73
74
|
if (config) {
|
|
74
75
|
try {
|
|
75
76
|
return normalizeSwizzleConfig(config);
|
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-
|
|
4
|
+
"version": "4.0.0-canary-6971",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
"url": "https://github.com/facebook/docusaurus/issues"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@docusaurus/babel": "4.0.0-canary-
|
|
31
|
-
"@docusaurus/bundler": "4.0.0-canary-
|
|
32
|
-
"@docusaurus/fs": "4.0.0-canary-
|
|
33
|
-
"@docusaurus/glob": "4.0.0-canary-
|
|
34
|
-
"@docusaurus/logger": "4.0.0-canary-
|
|
35
|
-
"@docusaurus/mdx-loader": "4.0.0-canary-
|
|
36
|
-
"@docusaurus/utils": "4.0.0-canary-
|
|
37
|
-
"@docusaurus/utils-common": "4.0.0-canary-
|
|
38
|
-
"@docusaurus/utils-validation": "4.0.0-canary-
|
|
30
|
+
"@docusaurus/babel": "4.0.0-canary-6971",
|
|
31
|
+
"@docusaurus/bundler": "4.0.0-canary-6971",
|
|
32
|
+
"@docusaurus/fs": "4.0.0-canary-6971",
|
|
33
|
+
"@docusaurus/glob": "4.0.0-canary-6971",
|
|
34
|
+
"@docusaurus/logger": "4.0.0-canary-6971",
|
|
35
|
+
"@docusaurus/mdx-loader": "4.0.0-canary-6971",
|
|
36
|
+
"@docusaurus/utils": "4.0.0-canary-6971",
|
|
37
|
+
"@docusaurus/utils-common": "4.0.0-canary-6971",
|
|
38
|
+
"@docusaurus/utils-validation": "4.0.0-canary-6971",
|
|
39
39
|
"@rspack/core": "^2.2.3",
|
|
40
40
|
"@rspack/dev-server": "^2.2.1",
|
|
41
41
|
"boxen": "^9.0.0",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"webpack-merge": "^6.0.1"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@docusaurus/module-type-aliases": "4.0.0-canary-
|
|
72
|
-
"@docusaurus/types": "4.0.0-canary-
|
|
71
|
+
"@docusaurus/module-type-aliases": "4.0.0-canary-6971",
|
|
72
|
+
"@docusaurus/types": "4.0.0-canary-6971",
|
|
73
73
|
"@total-typescript/shoehorn": "^0.1.2",
|
|
74
74
|
"@types/escape-html": "^1.0.4",
|
|
75
75
|
"@types/history": "^4.7.11",
|