@docusaurus/core 0.0.0-4989 → 0.0.0-4993
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.
|
@@ -22,14 +22,10 @@ export default class ErrorBoundary extends React.Component {
|
|
|
22
22
|
const { children } = this.props;
|
|
23
23
|
const { error } = this.state;
|
|
24
24
|
if (error) {
|
|
25
|
-
const
|
|
26
|
-
return
|
|
27
|
-
error,
|
|
28
|
-
tryAgain: () => this.setState({ error: null }),
|
|
29
|
-
});
|
|
25
|
+
const Fallback = this.props.fallback ?? DefaultFallback;
|
|
26
|
+
return (<Fallback error={error} tryAgain={() => this.setState({ error: null })}/>);
|
|
30
27
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
null);
|
|
28
|
+
// See https://github.com/facebook/docusaurus/issues/6337#issuecomment-1012913647
|
|
29
|
+
return children ?? null;
|
|
34
30
|
}
|
|
35
31
|
}
|
|
@@ -43,19 +43,17 @@ async function eject({ siteDir, themePath, componentName, }) {
|
|
|
43
43
|
// This should never happen
|
|
44
44
|
throw new Error(logger_1.default.interpolate `No files to copy from path=${fromPath} with glob code=${globPatternPosix}`);
|
|
45
45
|
}
|
|
46
|
-
const toPath =
|
|
47
|
-
? path_1.default.join(siteDir, utils_1.THEME_PATH, componentName)
|
|
48
|
-
: path_1.default.join(siteDir, utils_1.THEME_PATH);
|
|
46
|
+
const toPath = path_1.default.join(siteDir, utils_1.THEME_PATH);
|
|
49
47
|
await fs_extra_1.default.ensureDir(toPath);
|
|
50
48
|
const createdFiles = await Promise.all(filesToCopy.map(async (sourceFile) => {
|
|
51
|
-
const
|
|
52
|
-
const targetFile = path_1.default.join(toPath, fileName);
|
|
49
|
+
const targetFile = path_1.default.join(toPath, path_1.default.relative(themePath, sourceFile));
|
|
53
50
|
try {
|
|
54
51
|
const fileContents = await fs_extra_1.default.readFile(sourceFile, 'utf-8');
|
|
55
52
|
await fs_extra_1.default.outputFile(targetFile, fileContents.trimStart().replace(/^\/\*.+?\*\/\s*/ms, ''));
|
|
56
53
|
}
|
|
57
54
|
catch (err) {
|
|
58
|
-
|
|
55
|
+
logger_1.default.error `Could not copy file from path=${sourceFile} to path=${targetFile}`;
|
|
56
|
+
throw err;
|
|
59
57
|
}
|
|
60
58
|
return targetFile;
|
|
61
59
|
}));
|
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-4993",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
"@babel/runtime": "^7.17.9",
|
|
42
42
|
"@babel/runtime-corejs3": "^7.17.9",
|
|
43
43
|
"@babel/traverse": "^7.17.10",
|
|
44
|
-
"@docusaurus/cssnano-preset": "0.0.0-
|
|
45
|
-
"@docusaurus/logger": "0.0.0-
|
|
46
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
44
|
+
"@docusaurus/cssnano-preset": "0.0.0-4993",
|
|
45
|
+
"@docusaurus/logger": "0.0.0-4993",
|
|
46
|
+
"@docusaurus/mdx-loader": "0.0.0-4993",
|
|
47
47
|
"@docusaurus/react-loadable": "5.5.2",
|
|
48
|
-
"@docusaurus/utils": "0.0.0-
|
|
49
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
50
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
48
|
+
"@docusaurus/utils": "0.0.0-4993",
|
|
49
|
+
"@docusaurus/utils-common": "0.0.0-4993",
|
|
50
|
+
"@docusaurus/utils-validation": "0.0.0-4993",
|
|
51
51
|
"@slorber/static-site-generator-webpack-plugin": "^4.0.4",
|
|
52
52
|
"@svgr/webpack": "^6.2.1",
|
|
53
|
-
"autoprefixer": "^10.4.
|
|
53
|
+
"autoprefixer": "^10.4.7",
|
|
54
54
|
"babel-loader": "^8.2.5",
|
|
55
55
|
"babel-plugin-dynamic-import-node": "2.3.0",
|
|
56
56
|
"boxen": "^6.2.1",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"combine-promises": "^1.1.0",
|
|
61
61
|
"commander": "^5.1.0",
|
|
62
62
|
"copy-webpack-plugin": "^10.2.4",
|
|
63
|
-
"core-js": "^3.22.
|
|
63
|
+
"core-js": "^3.22.4",
|
|
64
64
|
"css-loader": "^6.7.1",
|
|
65
65
|
"css-minimizer-webpack-plugin": "^3.4.1",
|
|
66
66
|
"cssnano": "^5.1.7",
|
|
@@ -99,13 +99,13 @@
|
|
|
99
99
|
"wait-on": "^6.0.1",
|
|
100
100
|
"webpack": "^5.72.0",
|
|
101
101
|
"webpack-bundle-analyzer": "^4.5.0",
|
|
102
|
-
"webpack-dev-server": "^4.
|
|
102
|
+
"webpack-dev-server": "^4.9.0",
|
|
103
103
|
"webpack-merge": "^5.8.0",
|
|
104
104
|
"webpackbar": "^5.0.2"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
108
|
-
"@docusaurus/types": "0.0.0-
|
|
107
|
+
"@docusaurus/module-type-aliases": "0.0.0-4993",
|
|
108
|
+
"@docusaurus/types": "0.0.0-4993",
|
|
109
109
|
"@types/detect-port": "^1.3.2",
|
|
110
110
|
"@types/react-dom": "^18.0.3",
|
|
111
111
|
"@types/react-router-config": "^5.0.6",
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"engines": {
|
|
126
126
|
"node": ">=14"
|
|
127
127
|
},
|
|
128
|
-
"gitHead": "
|
|
128
|
+
"gitHead": "f08d27902e366eda1e1b19b5e405d8811123c4e9"
|
|
129
129
|
}
|