@docusaurus/core 2.4.1 → 3.0.0-beta.0
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/bin/beforeCli.mjs +35 -10
- package/bin/docusaurus.mjs +9 -1
- package/lib/babel/preset.js +6 -1
- package/lib/client/App.js +2 -0
- package/lib/client/BaseUrlIssueBanner/index.d.ts +0 -7
- package/lib/client/BaseUrlIssueBanner/index.js +7 -19
- package/lib/client/ClientLifecyclesDispatcher.js +2 -2
- package/lib/client/LinksCollector.d.ts +2 -2
- package/lib/client/PendingNavigation.d.ts +2 -2
- package/lib/client/clientEntry.js +27 -13
- package/lib/client/exports/ErrorBoundary.d.ts +1 -1
- package/lib/client/exports/Link.d.ts +1 -1
- package/lib/client/exports/Link.js +1 -1
- package/lib/client/exports/useIsomorphicLayoutEffect.d.ts +21 -0
- package/lib/client/exports/useIsomorphicLayoutEffect.js +24 -0
- package/lib/{webpack/plugins/LogPlugin.d.ts → client/hasHydratedDataAttribute.d.ts} +2 -5
- package/lib/client/hasHydratedDataAttribute.js +17 -0
- package/lib/client/serverEntry.js +26 -18
- package/lib/client/serverRenderer.d.ts +8 -0
- package/lib/client/serverRenderer.js +61 -0
- package/lib/commands/build.d.ts +2 -1
- package/lib/commands/build.js +9 -3
- package/lib/commands/deploy.d.ts +1 -1
- package/lib/commands/deploy.js +8 -0
- package/lib/commands/serve.d.ts +1 -1
- package/lib/commands/start.d.ts +1 -1
- package/lib/commands/start.js +15 -5
- package/lib/commands/swizzle/actions.d.ts +2 -2
- package/lib/commands/swizzle/common.d.ts +3 -3
- package/lib/commands/swizzle/components.d.ts +1 -1
- package/lib/commands/writeTranslations.d.ts +1 -1
- package/lib/server/configValidation.js +23 -1
- package/lib/server/getHostPort.d.ts +1 -1
- package/lib/server/index.d.ts +1 -1
- package/lib/server/index.js +4 -2
- package/lib/server/plugins/configs.d.ts +2 -2
- package/lib/server/plugins/routeConfig.js +3 -1
- package/lib/server/plugins/synthetic.js +1 -2
- package/lib/server/routes.d.ts +1 -1
- package/lib/server/routes.js +2 -18
- package/lib/server/translations/translations.d.ts +2 -2
- package/lib/server/translations/translationsExtractor.d.ts +1 -1
- package/lib/webpack/aliases/index.d.ts +1 -1
- package/lib/webpack/client.d.ts +1 -1
- package/lib/webpack/client.js +10 -4
- package/lib/webpack/plugins/CleanWebpackPlugin.d.ts +1 -1
- package/lib/webpack/plugins/CleanWebpackPlugin.js +8 -0
- package/lib/webpack/plugins/WaitPlugin.d.ts +1 -1
- package/lib/webpack/server.js +2 -2
- package/lib/webpack/templates/ssr.html.template.d.ts +1 -1
- package/lib/webpack/templates/ssr.html.template.js +2 -7
- package/lib/webpack/utils.d.ts +3 -1
- package/lib/webpack/utils.js +31 -9
- package/package.json +57 -57
- package/lib/webpack/plugins/LogPlugin.js +0 -33
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
|
+
"version": "3.0.0-beta.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -33,99 +33,99 @@
|
|
|
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.22.9",
|
|
37
|
+
"@babel/generator": "^7.22.9",
|
|
38
38
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
39
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
40
|
-
"@babel/preset-env": "^7.
|
|
41
|
-
"@babel/preset-react": "^7.
|
|
42
|
-
"@babel/preset-typescript": "^7.
|
|
43
|
-
"@babel/runtime": "^7.
|
|
44
|
-
"@babel/runtime-corejs3": "^7.
|
|
45
|
-
"@babel/traverse": "^7.
|
|
46
|
-
"@docusaurus/cssnano-preset": "
|
|
47
|
-
"@docusaurus/logger": "
|
|
48
|
-
"@docusaurus/mdx-loader": "
|
|
39
|
+
"@babel/plugin-transform-runtime": "^7.22.9",
|
|
40
|
+
"@babel/preset-env": "^7.22.9",
|
|
41
|
+
"@babel/preset-react": "^7.22.5",
|
|
42
|
+
"@babel/preset-typescript": "^7.22.5",
|
|
43
|
+
"@babel/runtime": "^7.22.6",
|
|
44
|
+
"@babel/runtime-corejs3": "^7.22.6",
|
|
45
|
+
"@babel/traverse": "^7.22.8",
|
|
46
|
+
"@docusaurus/cssnano-preset": "3.0.0-beta.0",
|
|
47
|
+
"@docusaurus/logger": "3.0.0-beta.0",
|
|
48
|
+
"@docusaurus/mdx-loader": "3.0.0-beta.0",
|
|
49
49
|
"@docusaurus/react-loadable": "5.5.2",
|
|
50
|
-
"@docusaurus/utils": "
|
|
51
|
-
"@docusaurus/utils-common": "
|
|
52
|
-
"@docusaurus/utils-validation": "
|
|
50
|
+
"@docusaurus/utils": "3.0.0-beta.0",
|
|
51
|
+
"@docusaurus/utils-common": "3.0.0-beta.0",
|
|
52
|
+
"@docusaurus/utils-validation": "3.0.0-beta.0",
|
|
53
53
|
"@slorber/static-site-generator-webpack-plugin": "^4.0.7",
|
|
54
|
-
"@svgr/webpack": "^6.
|
|
55
|
-
"autoprefixer": "^10.4.
|
|
56
|
-
"babel-loader": "^
|
|
54
|
+
"@svgr/webpack": "^6.5.1",
|
|
55
|
+
"autoprefixer": "^10.4.14",
|
|
56
|
+
"babel-loader": "^9.1.3",
|
|
57
57
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
58
58
|
"boxen": "^6.2.1",
|
|
59
59
|
"chalk": "^4.1.2",
|
|
60
60
|
"chokidar": "^3.5.3",
|
|
61
|
-
"clean-css": "^5.3.
|
|
62
|
-
"cli-table3": "^0.6.
|
|
61
|
+
"clean-css": "^5.3.2",
|
|
62
|
+
"cli-table3": "^0.6.3",
|
|
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.
|
|
67
|
-
"css-loader": "^6.
|
|
68
|
-
"css-minimizer-webpack-plugin": "^4.
|
|
69
|
-
"cssnano": "^5.1.
|
|
66
|
+
"core-js": "^3.31.1",
|
|
67
|
+
"css-loader": "^6.8.1",
|
|
68
|
+
"css-minimizer-webpack-plugin": "^4.2.2",
|
|
69
|
+
"cssnano": "^5.1.15",
|
|
70
70
|
"del": "^6.1.1",
|
|
71
|
-
"detect-port": "^1.
|
|
71
|
+
"detect-port": "^1.5.1",
|
|
72
72
|
"escape-html": "^1.0.3",
|
|
73
|
-
"eta": "^2.
|
|
73
|
+
"eta": "^2.2.0",
|
|
74
74
|
"file-loader": "^6.2.0",
|
|
75
|
-
"fs-extra": "^
|
|
76
|
-
"html-minifier-terser": "^
|
|
77
|
-
"html-tags": "^3.
|
|
78
|
-
"html-webpack-plugin": "^5.5.
|
|
75
|
+
"fs-extra": "^11.1.1",
|
|
76
|
+
"html-minifier-terser": "^7.2.0",
|
|
77
|
+
"html-tags": "^3.3.1",
|
|
78
|
+
"html-webpack-plugin": "^5.5.3",
|
|
79
79
|
"import-fresh": "^3.3.0",
|
|
80
80
|
"leven": "^3.1.0",
|
|
81
81
|
"lodash": "^4.17.21",
|
|
82
|
-
"mini-css-extract-plugin": "^2.6
|
|
83
|
-
"postcss": "^8.4.
|
|
84
|
-
"postcss-loader": "^7.
|
|
82
|
+
"mini-css-extract-plugin": "^2.7.6",
|
|
83
|
+
"postcss": "^8.4.26",
|
|
84
|
+
"postcss-loader": "^7.3.3",
|
|
85
85
|
"prompts": "^2.4.2",
|
|
86
86
|
"react-dev-utils": "^12.0.1",
|
|
87
87
|
"react-helmet-async": "^1.3.0",
|
|
88
88
|
"react-loadable": "npm:@docusaurus/react-loadable@5.5.2",
|
|
89
89
|
"react-loadable-ssr-addon-v5-slorber": "^1.0.1",
|
|
90
|
-
"react-router": "^5.3.
|
|
90
|
+
"react-router": "^5.3.4",
|
|
91
91
|
"react-router-config": "^5.1.1",
|
|
92
|
-
"react-router-dom": "^5.3.
|
|
92
|
+
"react-router-dom": "^5.3.4",
|
|
93
93
|
"rtl-detect": "^1.0.4",
|
|
94
|
-
"semver": "^7.
|
|
95
|
-
"serve-handler": "^6.1.
|
|
94
|
+
"semver": "^7.5.4",
|
|
95
|
+
"serve-handler": "^6.1.5",
|
|
96
96
|
"shelljs": "^0.8.5",
|
|
97
|
-
"terser-webpack-plugin": "^5.3.
|
|
98
|
-
"tslib": "^2.
|
|
99
|
-
"update-notifier": "^
|
|
97
|
+
"terser-webpack-plugin": "^5.3.9",
|
|
98
|
+
"tslib": "^2.6.0",
|
|
99
|
+
"update-notifier": "^6.0.2",
|
|
100
100
|
"url-loader": "^4.1.1",
|
|
101
|
-
"wait-on": "^
|
|
102
|
-
"webpack": "^5.
|
|
103
|
-
"webpack-bundle-analyzer": "^4.
|
|
104
|
-
"webpack-dev-server": "^4.
|
|
105
|
-
"webpack-merge": "^5.
|
|
101
|
+
"wait-on": "^7.0.1",
|
|
102
|
+
"webpack": "^5.88.1",
|
|
103
|
+
"webpack-bundle-analyzer": "^4.9.0",
|
|
104
|
+
"webpack-dev-server": "^4.15.1",
|
|
105
|
+
"webpack-merge": "^5.9.0",
|
|
106
106
|
"webpackbar": "^5.0.2"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
|
-
"@docusaurus/module-type-aliases": "
|
|
110
|
-
"@docusaurus/types": "
|
|
111
|
-
"@types/detect-port": "^1.3.
|
|
112
|
-
"@types/react-dom": "^18.
|
|
113
|
-
"@types/react-router-config": "^5.0.
|
|
109
|
+
"@docusaurus/module-type-aliases": "3.0.0-beta.0",
|
|
110
|
+
"@docusaurus/types": "3.0.0-beta.0",
|
|
111
|
+
"@types/detect-port": "^1.3.3",
|
|
112
|
+
"@types/react-dom": "^18.2.7",
|
|
113
|
+
"@types/react-router-config": "^5.0.7",
|
|
114
114
|
"@types/rtl-detect": "^1.0.0",
|
|
115
115
|
"@types/serve-handler": "^6.1.1",
|
|
116
|
-
"@types/update-notifier": "^
|
|
116
|
+
"@types/update-notifier": "^6.0.4",
|
|
117
117
|
"@types/wait-on": "^5.3.1",
|
|
118
|
-
"@types/webpack-bundle-analyzer": "^4.
|
|
119
|
-
"react-test-renderer": "^
|
|
118
|
+
"@types/webpack-bundle-analyzer": "^4.6.0",
|
|
119
|
+
"react-test-renderer": "^18.0.0",
|
|
120
120
|
"tmp-promise": "^3.0.3",
|
|
121
121
|
"tree-node-cli": "^1.6.0"
|
|
122
122
|
},
|
|
123
123
|
"peerDependencies": {
|
|
124
|
-
"react": "^
|
|
125
|
-
"react-dom": "^
|
|
124
|
+
"react": "^18.0.0",
|
|
125
|
+
"react-dom": "^18.0.0"
|
|
126
126
|
},
|
|
127
127
|
"engines": {
|
|
128
128
|
"node": ">=16.14"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "27a1e90d9fff88af90ecad35bea16d4d7230482a"
|
|
131
131
|
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the MIT license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const tslib_1 = require("tslib");
|
|
10
|
-
const webpackbar_1 = tslib_1.__importDefault(require("webpackbar"));
|
|
11
|
-
const formatWebpackMessages_1 = tslib_1.__importDefault(require("react-dev-utils/formatWebpackMessages"));
|
|
12
|
-
function showError(arr) {
|
|
13
|
-
console.log(`\n\n${arr.join('\n')}`);
|
|
14
|
-
}
|
|
15
|
-
class LogPlugin extends webpackbar_1.default {
|
|
16
|
-
apply(compiler) {
|
|
17
|
-
super.apply(compiler);
|
|
18
|
-
// TODO can't this be done in compile(configs) alongside the warnings???
|
|
19
|
-
compiler.hooks.done.tap('DocusaurusLogPlugin', (stats) => {
|
|
20
|
-
if (stats.hasErrors()) {
|
|
21
|
-
const errorsWarnings = stats.toJson('errors-warnings');
|
|
22
|
-
// TODO do we really want to keep this legacy logic?
|
|
23
|
-
// let's wait and see how the react-dev-utils support Webpack5
|
|
24
|
-
// we probably want to print the error stacktraces here
|
|
25
|
-
const messages = (0, formatWebpackMessages_1.default)(errorsWarnings);
|
|
26
|
-
if (messages.errors.length) {
|
|
27
|
-
showError(messages.errors);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.default = LogPlugin;
|