@docusaurus/core 0.0.0-4433 → 0.0.0-4438

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.
@@ -23,7 +23,10 @@ const CleanWebpackPlugin_1 = (0, tslib_1.__importDefault)(require("../webpack/pl
23
23
  const i18n_1 = require("../server/i18n");
24
24
  const utils_2 = require("@docusaurus/utils");
25
25
  async function build(siteDir, cliOptions = {},
26
- // TODO what's the purpose of this arg ?
26
+ // When running build, we force terminate the process to prevent async
27
+ // operations from never returning. However, if run as part of docusaurus
28
+ // deploy, we have to let deploy finish.
29
+ // See https://github.com/facebook/docusaurus/pull/2496
27
30
  forceTerminate = true) {
28
31
  ['SIGINT', 'SIGTERM'].forEach((sig) => {
29
32
  process.on(sig, () => process.exit());
@@ -36,9 +36,7 @@ const PluginSchema = utils_validation_1.Joi.alternatives()
36
36
  .try(utils_validation_1.Joi.function(), utils_validation_1.Joi.array().ordered(utils_validation_1.Joi.function().required(), utils_validation_1.Joi.object().required()), utils_validation_1.Joi.string(), utils_validation_1.Joi.array()
37
37
  .ordered(utils_validation_1.Joi.string().required(), utils_validation_1.Joi.object().required())
38
38
  .length(2), utils_validation_1.Joi.bool().equal(false))
39
- // TODO isn't there a simpler way to customize the default Joi error message???
40
- // Not sure why Joi makes it complicated to add a custom error message...
41
- // See https://stackoverflow.com/a/54657686/82609
39
+ // @ts-expect-error: bad lib def, doesn't recognize an array of reports
42
40
  .error((errors) => {
43
41
  errors.forEach((error) => {
44
42
  error.message = ` => Bad Docusaurus plugin value as path [${error.path}].
@@ -60,6 +58,7 @@ const ThemeSchema = utils_validation_1.Joi.alternatives().try(utils_validation_1
60
58
  const PresetSchema = utils_validation_1.Joi.alternatives().try(utils_validation_1.Joi.string(), utils_validation_1.Joi.array().items(utils_validation_1.Joi.string().required(), utils_validation_1.Joi.object().required()).length(2));
61
59
  const LocaleConfigSchema = utils_validation_1.Joi.object({
62
60
  label: utils_validation_1.Joi.string(),
61
+ htmlLang: utils_validation_1.Joi.string(),
63
62
  direction: utils_validation_1.Joi.string().equal('ltr', 'rtl').default('ltr'),
64
63
  });
65
64
  const I18N_CONFIG_SCHEMA = utils_validation_1.Joi.object({
@@ -20,6 +20,7 @@ function getDefaultLocaleConfig(locale) {
20
20
  return {
21
21
  label: getDefaultLocaleLabel(locale),
22
22
  direction: (0, rtl_detect_1.getLangDir)(locale),
23
+ htmlLang: locale,
23
24
  };
24
25
  }
25
26
  exports.getDefaultLocaleConfig = getDefaultLocaleConfig;
@@ -159,7 +159,7 @@ function applyConfigureWebpack(configureWebpack, config, isServer, jsLoader, con
159
159
  exports.applyConfigureWebpack = applyConfigureWebpack;
160
160
  function applyConfigurePostCss(configurePostCss, config) {
161
161
  var _a, _b;
162
- // TODO not ideal heuristic but good enough for our usecase?
162
+ // not ideal heuristic but good enough for our usecase?
163
163
  function isPostCssLoader(loader) {
164
164
  var _a, _b;
165
165
  return !!((_b = (_a = loader) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.postcssOptions);
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-4433",
4
+ "version": "0.0.0-4438",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -41,13 +41,13 @@
41
41
  "@babel/runtime": "^7.16.3",
42
42
  "@babel/runtime-corejs3": "^7.16.3",
43
43
  "@babel/traverse": "^7.16.3",
44
- "@docusaurus/cssnano-preset": "0.0.0-4433",
45
- "@docusaurus/logger": "0.0.0-4433",
46
- "@docusaurus/mdx-loader": "0.0.0-4433",
44
+ "@docusaurus/cssnano-preset": "0.0.0-4438",
45
+ "@docusaurus/logger": "0.0.0-4438",
46
+ "@docusaurus/mdx-loader": "0.0.0-4438",
47
47
  "@docusaurus/react-loadable": "5.5.2",
48
- "@docusaurus/utils": "0.0.0-4433",
49
- "@docusaurus/utils-common": "0.0.0-4433",
50
- "@docusaurus/utils-validation": "0.0.0-4433",
48
+ "@docusaurus/utils": "0.0.0-4438",
49
+ "@docusaurus/utils-common": "0.0.0-4438",
50
+ "@docusaurus/utils-validation": "0.0.0-4438",
51
51
  "@slorber/static-site-generator-webpack-plugin": "^4.0.0",
52
52
  "@svgr/webpack": "^6.0.0",
53
53
  "autoprefixer": "^10.3.5",
@@ -108,8 +108,8 @@
108
108
  "webpackbar": "^5.0.0-3"
109
109
  },
110
110
  "devDependencies": {
111
- "@docusaurus/module-type-aliases": "0.0.0-4433",
112
- "@docusaurus/types": "0.0.0-4433",
111
+ "@docusaurus/module-type-aliases": "0.0.0-4438",
112
+ "@docusaurus/types": "0.0.0-4438",
113
113
  "@types/copy-webpack-plugin": "^8.0.1",
114
114
  "@types/detect-port": "^1.3.0",
115
115
  "@types/mini-css-extract-plugin": "^1.4.3",
@@ -128,5 +128,5 @@
128
128
  "engines": {
129
129
  "node": ">=14"
130
130
  },
131
- "gitHead": "ffbadadb02dbb89e253b79dfb6c06609cae500b5"
131
+ "gitHead": "57921f1d0dcfba6d734f8617b34e495ccb1622b0"
132
132
  }