@docusaurus/core 0.0.0-4620 → 0.0.0-4623
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/server/configValidation.js +0 -7
- package/lib/webpack/utils.js +0 -19
- package/package.json +10 -10
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.validateConfig = exports.ConfigSchema = exports.DEFAULT_CONFIG = exports.DEFAULT_I18N_CONFIG = void 0;
|
|
10
|
-
const tslib_1 = require("tslib");
|
|
11
|
-
const logger_1 = (0, tslib_1.__importDefault)(require("@docusaurus/logger"));
|
|
12
10
|
const utils_1 = require("@docusaurus/utils");
|
|
13
11
|
const utils_validation_1 = require("@docusaurus/utils-validation");
|
|
14
12
|
const DEFAULT_I18N_LOCALE = 'en';
|
|
@@ -162,11 +160,6 @@ function validateConfig(config) {
|
|
|
162
160
|
});
|
|
163
161
|
(0, utils_validation_1.printWarning)(warning);
|
|
164
162
|
if (error) {
|
|
165
|
-
(0, utils_validation_1.logValidationBugReportHint)();
|
|
166
|
-
if (utils_validation_1.isValidationDisabledEscapeHatch) {
|
|
167
|
-
logger_1.default.error(error.message);
|
|
168
|
-
return config;
|
|
169
|
-
}
|
|
170
163
|
const unknownFields = error.details.reduce((formattedError, err) => {
|
|
171
164
|
if (err.type === 'object.unknown') {
|
|
172
165
|
return `${formattedError}"${err.path}",`;
|
package/lib/webpack/utils.js
CHANGED
|
@@ -18,7 +18,6 @@ const path_1 = (0, tslib_1.__importDefault)(require("path"));
|
|
|
18
18
|
const crypto_1 = (0, tslib_1.__importDefault)(require("crypto"));
|
|
19
19
|
const logger_1 = (0, tslib_1.__importDefault)(require("@docusaurus/logger"));
|
|
20
20
|
const utils_1 = require("@docusaurus/utils");
|
|
21
|
-
const lodash_1 = (0, tslib_1.__importDefault)(require("lodash"));
|
|
22
21
|
// Utility method to get style loaders
|
|
23
22
|
function getStyleLoaders(isServer, cssOptionsArg = {}) {
|
|
24
23
|
const cssOptions = {
|
|
@@ -115,22 +114,6 @@ const getCustomizableJSLoader = (jsLoader = 'babel') => ({ isServer, babelOption
|
|
|
115
114
|
? getDefaultBabelLoader({ isServer, babelOptions })
|
|
116
115
|
: jsLoader(isServer);
|
|
117
116
|
exports.getCustomizableJSLoader = getCustomizableJSLoader;
|
|
118
|
-
// TODO remove this before end of 2021?
|
|
119
|
-
const warnBabelLoaderOnce = lodash_1.default.memoize(() => {
|
|
120
|
-
logger_1.default.warn `Docusaurus plans to support multiple JS loader strategies (Babel, esbuild...): code=${'getBabelLoader(isServer)'} is now deprecated in favor of code=${'getJSLoader(isServer)'}.`;
|
|
121
|
-
});
|
|
122
|
-
const getBabelLoaderDeprecated = function getBabelLoaderDeprecated(isServer, babelOptions) {
|
|
123
|
-
warnBabelLoaderOnce();
|
|
124
|
-
return getDefaultBabelLoader({ isServer, babelOptions });
|
|
125
|
-
};
|
|
126
|
-
// TODO remove this before end of 2021 ?
|
|
127
|
-
const warnCacheLoaderOnce = lodash_1.default.memoize(() => {
|
|
128
|
-
logger_1.default.warn `Docusaurus uses Webpack 5 and code=${'getCacheLoader()'} usage is now deprecated.`;
|
|
129
|
-
});
|
|
130
|
-
function getCacheLoaderDeprecated() {
|
|
131
|
-
warnCacheLoaderOnce();
|
|
132
|
-
return null;
|
|
133
|
-
}
|
|
134
117
|
/**
|
|
135
118
|
* Helper function to modify webpack config
|
|
136
119
|
* @param configureWebpack a webpack config or a function to modify config
|
|
@@ -145,8 +128,6 @@ function applyConfigureWebpack(configureWebpack, config, isServer, jsLoader, con
|
|
|
145
128
|
const utils = {
|
|
146
129
|
getStyleLoaders,
|
|
147
130
|
getJSLoader: (0, exports.getCustomizableJSLoader)(jsLoader),
|
|
148
|
-
getBabelLoader: getBabelLoaderDeprecated,
|
|
149
|
-
getCacheLoader: getCacheLoaderDeprecated,
|
|
150
131
|
};
|
|
151
132
|
if (typeof configureWebpack === 'function') {
|
|
152
133
|
const { mergeStrategy, ...res } = configureWebpack(config, isServer, utils, content);
|
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-4623",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"@babel/runtime": "^7.17.2",
|
|
42
42
|
"@babel/runtime-corejs3": "^7.17.2",
|
|
43
43
|
"@babel/traverse": "^7.17.3",
|
|
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-4623",
|
|
45
|
+
"@docusaurus/logger": "0.0.0-4623",
|
|
46
|
+
"@docusaurus/mdx-loader": "0.0.0-4623",
|
|
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-4623",
|
|
49
|
+
"@docusaurus/utils-common": "0.0.0-4623",
|
|
50
|
+
"@docusaurus/utils-validation": "0.0.0-4623",
|
|
51
51
|
"@slorber/static-site-generator-webpack-plugin": "^4.0.1",
|
|
52
52
|
"@svgr/webpack": "^6.2.1",
|
|
53
53
|
"autoprefixer": "^10.4.2",
|
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
"webpackbar": "^5.0.2"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
109
|
-
"@docusaurus/types": "0.0.0-
|
|
108
|
+
"@docusaurus/module-type-aliases": "0.0.0-4623",
|
|
109
|
+
"@docusaurus/types": "0.0.0-4623",
|
|
110
110
|
"@types/detect-port": "^1.3.2",
|
|
111
111
|
"@types/nprogress": "^0.2.0",
|
|
112
112
|
"@types/react-dom": "^17.0.11",
|
|
@@ -126,5 +126,5 @@
|
|
|
126
126
|
"engines": {
|
|
127
127
|
"node": ">=14"
|
|
128
128
|
},
|
|
129
|
-
"gitHead": "
|
|
129
|
+
"gitHead": "97710505efdb9fceea33bd2dbb8eaa2860e391a1"
|
|
130
130
|
}
|