@docusaurus/core 0.0.0-5289 → 0.0.0-5298
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.
|
@@ -15,6 +15,15 @@ export declare type ThemeComponents = {
|
|
|
15
15
|
hasAnySafeAction: (component: string) => boolean;
|
|
16
16
|
hasAllSafeAction: (component: string) => boolean;
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Expand a list of components to include and return parent folders.
|
|
20
|
+
* If a folder is not directly a component (no Folder/index.tsx file),
|
|
21
|
+
* we still want to be able to swizzle --eject that folder.
|
|
22
|
+
* See https://github.com/facebook/docusaurus/pull/7175#issuecomment-1103757218
|
|
23
|
+
*
|
|
24
|
+
* @param componentNames the original list of component names
|
|
25
|
+
*/
|
|
26
|
+
export declare function getMissingIntermediateComponentFolderNames(componentNames: string[]): string[];
|
|
18
27
|
export declare function readComponentNames(themePath: string): Promise<string[]>;
|
|
19
28
|
export declare function listComponentNames(themeComponents: ThemeComponents): string;
|
|
20
29
|
export declare function getThemeComponents({ themeName, themePath, swizzleConfig, }: {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.getComponentName = exports.getThemeComponents = exports.listComponentNames = exports.readComponentNames = void 0;
|
|
9
|
+
exports.getComponentName = exports.getThemeComponents = exports.listComponentNames = exports.readComponentNames = exports.getMissingIntermediateComponentFolderNames = void 0;
|
|
10
10
|
const tslib_1 = require("tslib");
|
|
11
11
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
12
12
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
@@ -37,6 +37,7 @@ function getMissingIntermediateComponentFolderNames(componentNames) {
|
|
|
37
37
|
const expandedComponentNames = lodash_1.default.uniq(componentNames.flatMap((componentName) => getAllIntermediatePaths(componentName)));
|
|
38
38
|
return lodash_1.default.difference(expandedComponentNames, componentNames);
|
|
39
39
|
}
|
|
40
|
+
exports.getMissingIntermediateComponentFolderNames = getMissingIntermediateComponentFolderNames;
|
|
40
41
|
const skipReadDirNames = ['__test__', '__tests__', '__mocks__', '__fixtures__'];
|
|
41
42
|
async function readComponentNames(themePath) {
|
|
42
43
|
if (!(await fs_extra_1.default.pathExists(themePath))) {
|
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": "0.0.0-
|
|
4
|
+
"version": "0.0.0-5298",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -33,23 +33,23 @@
|
|
|
33
33
|
"url": "https://github.com/facebook/docusaurus/issues"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@babel/core": "^7.
|
|
37
|
-
"@babel/generator": "^7.
|
|
36
|
+
"@babel/core": "^7.19.0",
|
|
37
|
+
"@babel/generator": "^7.19.0",
|
|
38
38
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
39
39
|
"@babel/plugin-transform-runtime": "^7.18.10",
|
|
40
|
-
"@babel/preset-env": "^7.
|
|
40
|
+
"@babel/preset-env": "^7.19.0",
|
|
41
41
|
"@babel/preset-react": "^7.18.6",
|
|
42
42
|
"@babel/preset-typescript": "^7.18.6",
|
|
43
|
-
"@babel/runtime": "^7.
|
|
44
|
-
"@babel/runtime-corejs3": "^7.
|
|
45
|
-
"@babel/traverse": "^7.
|
|
46
|
-
"@docusaurus/cssnano-preset": "0.0.0-
|
|
47
|
-
"@docusaurus/logger": "0.0.0-
|
|
48
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
43
|
+
"@babel/runtime": "^7.19.0",
|
|
44
|
+
"@babel/runtime-corejs3": "^7.19.0",
|
|
45
|
+
"@babel/traverse": "^7.19.0",
|
|
46
|
+
"@docusaurus/cssnano-preset": "0.0.0-5298",
|
|
47
|
+
"@docusaurus/logger": "0.0.0-5298",
|
|
48
|
+
"@docusaurus/mdx-loader": "0.0.0-5298",
|
|
49
49
|
"@docusaurus/react-loadable": "5.5.2",
|
|
50
|
-
"@docusaurus/utils": "0.0.0-
|
|
51
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
52
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
50
|
+
"@docusaurus/utils": "0.0.0-5298",
|
|
51
|
+
"@docusaurus/utils-common": "0.0.0-5298",
|
|
52
|
+
"@docusaurus/utils-validation": "0.0.0-5298",
|
|
53
53
|
"@slorber/static-site-generator-webpack-plugin": "^4.0.7",
|
|
54
54
|
"@svgr/webpack": "^6.3.1",
|
|
55
55
|
"autoprefixer": "^10.4.8",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"combine-promises": "^1.1.0",
|
|
64
64
|
"commander": "^5.1.0",
|
|
65
65
|
"copy-webpack-plugin": "^11.0.0",
|
|
66
|
-
"core-js": "^3.
|
|
66
|
+
"core-js": "^3.25.1",
|
|
67
67
|
"css-loader": "^6.7.1",
|
|
68
68
|
"css-minimizer-webpack-plugin": "^4.0.0",
|
|
69
|
-
"cssnano": "^5.1.
|
|
69
|
+
"cssnano": "^5.1.13",
|
|
70
70
|
"del": "^6.1.1",
|
|
71
71
|
"detect-port": "^1.3.0",
|
|
72
72
|
"escape-html": "^1.0.3",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"leven": "^3.1.0",
|
|
81
81
|
"lodash": "^4.17.21",
|
|
82
82
|
"mini-css-extract-plugin": "^2.6.1",
|
|
83
|
-
"postcss": "^8.4.
|
|
83
|
+
"postcss": "^8.4.16",
|
|
84
84
|
"postcss-loader": "^7.0.1",
|
|
85
85
|
"prompts": "^2.4.2",
|
|
86
86
|
"react-dev-utils": "^12.0.1",
|
|
@@ -94,20 +94,20 @@
|
|
|
94
94
|
"semver": "^7.3.7",
|
|
95
95
|
"serve-handler": "^6.1.3",
|
|
96
96
|
"shelljs": "^0.8.5",
|
|
97
|
-
"terser-webpack-plugin": "^5.3.
|
|
97
|
+
"terser-webpack-plugin": "^5.3.6",
|
|
98
98
|
"tslib": "^2.4.0",
|
|
99
99
|
"update-notifier": "^5.1.0",
|
|
100
100
|
"url-loader": "^4.1.1",
|
|
101
101
|
"wait-on": "^6.0.1",
|
|
102
102
|
"webpack": "^5.74.0",
|
|
103
|
-
"webpack-bundle-analyzer": "^4.
|
|
104
|
-
"webpack-dev-server": "^4.
|
|
103
|
+
"webpack-bundle-analyzer": "^4.6.1",
|
|
104
|
+
"webpack-dev-server": "^4.11.0",
|
|
105
105
|
"webpack-merge": "^5.8.0",
|
|
106
106
|
"webpackbar": "^5.0.2"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
110
|
-
"@docusaurus/types": "0.0.0-
|
|
109
|
+
"@docusaurus/module-type-aliases": "0.0.0-5298",
|
|
110
|
+
"@docusaurus/types": "0.0.0-5298",
|
|
111
111
|
"@types/detect-port": "^1.3.2",
|
|
112
112
|
"@types/react-dom": "^18.0.6",
|
|
113
113
|
"@types/react-router-config": "^5.0.6",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"@types/serve-handler": "^6.1.1",
|
|
116
116
|
"@types/update-notifier": "^5.1.0",
|
|
117
117
|
"@types/wait-on": "^5.3.1",
|
|
118
|
-
"@types/webpack-bundle-analyzer": "^4.4.
|
|
118
|
+
"@types/webpack-bundle-analyzer": "^4.4.2",
|
|
119
119
|
"react-test-renderer": "^17.0.2",
|
|
120
120
|
"tmp-promise": "^3.0.3",
|
|
121
121
|
"tree-node-cli": "^1.5.2"
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"engines": {
|
|
128
128
|
"node": ">=16.14"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "3496489be2f0a15c03dfb2f6a638d844c4ecc653"
|
|
131
131
|
}
|