@docusaurus/core 3.10.1-canary-6641 → 3.10.1-canary-6643

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.
@@ -109,21 +109,9 @@ async function createCLIProgram({ cli, cliArgs, siteDir, config, }) {
109
109
  .option('--no-open', 'do not open page in the browser (default: false)')
110
110
  .option('--poll [interval]', 'use polling rather than watching for reload (default: false). Can specify a poll interval in milliseconds', normalizePollValue)
111
111
  .option('--no-minify', 'build website without minimizing JS bundles (default: false)')
112
- /*
113
- TODO
114
- .option(
115
- '--https',
116
- 'serve the dev site over HTTPS using a self-signed cert (default: false). Preferred over the HTTPS=true env var. Implied when both --ssl-cert and --ssl-key are provided.',
117
- )
118
- .option(
119
- '--ssl-cert <path>',
120
- 'path to a TLS certificate file (implies HTTPS). Preferred over the SSL_CRT_FILE env var; CLI takes precedence if both are set.',
121
- )
122
- .option(
123
- '--ssl-key <path>',
124
- 'path to a TLS private key file (implies HTTPS). Preferred over the SSL_KEY_FILE env var; CLI takes precedence if both are set.',
125
- )
126
- */
112
+ .option('--https', 'serve the dev site over HTTPS using a self-signed cert (default: false). Preferred over the HTTPS=true env var. Implied when both --ssl-cert and --ssl-key are provided.')
113
+ .option('--ssl-cert <path>', 'path to a TLS certificate file (implies HTTPS). Preferred over the SSL_CRT_FILE env var; CLI takes precedence if both are set.')
114
+ .option('--ssl-key <path>', 'path to a TLS private key file (implies HTTPS). Preferred over the SSL_KEY_FILE env var; CLI takes precedence if both are set.')
127
115
  .action(start_1.start);
128
116
  cli
129
117
  .command('serve [siteDir]')
@@ -11,5 +11,8 @@ export type StartCLIOptions = HostPortOptions & Pick<LoadContextParams, 'locale'
11
11
  open?: boolean;
12
12
  poll?: boolean | number;
13
13
  minify?: boolean;
14
+ https?: true;
15
+ sslCert?: string;
16
+ sslKey?: string;
14
17
  };
15
18
  export declare function start(siteDirParam?: string, cliOptions?: Partial<StartCLIOptions>): Promise<void>;
@@ -43,13 +43,9 @@ async function createDevServerConfig({ cliOptions, props, host, port, }) {
43
43
  const { baseUrl, siteDir, siteConfig } = props;
44
44
  const pollingOptions = (0, watcher_1.createPollingOptions)(cliOptions);
45
45
  const httpsConfig = await (0, getHttpsConfig_1.default)({
46
- /*
47
- TODO Docusaurus v4: wire new CLI parameters
48
- https: cliOptions.https,
49
- sslCert: cliOptions.sslCert,
50
- sslKey: cliOptions.sslKey,
51
-
52
- */
46
+ https: cliOptions.https,
47
+ sslCert: cliOptions.sslCert,
48
+ sslKey: cliOptions.sslKey,
53
49
  });
54
50
  // https://webpack.js.org/configuration/dev-server
55
51
  return {
@@ -169,15 +169,7 @@ async function reloadPlugin({ pluginIdentifier, plugins: previousPlugins, contex
169
169
  plugin: previousPlugin,
170
170
  context,
171
171
  });
172
- /*
173
- // TODO Docusaurus v4 - upgrade to Node 20, use array.with()
174
- const plugins = previousPlugins.with(
175
- previousPlugins.indexOf(previousPlugin),
176
- plugin,
177
- );
178
- */
179
- const plugins = [...previousPlugins];
180
- plugins[previousPlugins.indexOf(previousPlugin)] = plugin;
172
+ const plugins = previousPlugins.with(previousPlugins.indexOf(previousPlugin), plugin);
181
173
  const allContentLoadedResult = await executeAllPluginsAllContentLoaded({
182
174
  plugins,
183
175
  context,
@@ -51,11 +51,7 @@ function getNumberOfThreads(pathnames) {
51
51
  return ssgEnv_1.SSGWorkerThreadCount;
52
52
  }
53
53
  // See also https://github.com/tinylibs/tinypool/pull/108
54
- const cpuCount =
55
- // TODO Docusaurus v4: bump node, availableParallelism() now always exists
56
- typeof os_1.default.availableParallelism === 'function'
57
- ? os_1.default.availableParallelism()
58
- : os_1.default.cpus().length;
54
+ const cpuCount = os_1.default.availableParallelism();
59
55
  return inferNumberOfThreads({
60
56
  pageCount: pathnames.length,
61
57
  cpuCount,
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": "3.10.1-canary-6641",
4
+ "version": "3.10.1-canary-6643",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -33,13 +33,13 @@
33
33
  "url": "https://github.com/facebook/docusaurus/issues"
34
34
  },
35
35
  "dependencies": {
36
- "@docusaurus/babel": "3.10.1-canary-6641",
37
- "@docusaurus/bundler": "3.10.1-canary-6641",
38
- "@docusaurus/logger": "3.10.1-canary-6641",
39
- "@docusaurus/mdx-loader": "3.10.1-canary-6641",
40
- "@docusaurus/utils": "3.10.1-canary-6641",
41
- "@docusaurus/utils-common": "3.10.1-canary-6641",
42
- "@docusaurus/utils-validation": "3.10.1-canary-6641",
36
+ "@docusaurus/babel": "3.10.1-canary-6643",
37
+ "@docusaurus/bundler": "3.10.1-canary-6643",
38
+ "@docusaurus/logger": "3.10.1-canary-6643",
39
+ "@docusaurus/mdx-loader": "3.10.1-canary-6643",
40
+ "@docusaurus/utils": "3.10.1-canary-6643",
41
+ "@docusaurus/utils-common": "3.10.1-canary-6643",
42
+ "@docusaurus/utils-validation": "3.10.1-canary-6643",
43
43
  "boxen": "^6.2.1",
44
44
  "chalk": "^4.1.2",
45
45
  "chokidar": "^3.5.3",
@@ -77,8 +77,8 @@
77
77
  "webpack-merge": "^6.0.1"
78
78
  },
79
79
  "devDependencies": {
80
- "@docusaurus/module-type-aliases": "3.10.1-canary-6641",
81
- "@docusaurus/types": "3.10.1-canary-6641",
80
+ "@docusaurus/module-type-aliases": "3.10.1-canary-6643",
81
+ "@docusaurus/types": "3.10.1-canary-6643",
82
82
  "@total-typescript/shoehorn": "^0.1.2",
83
83
  "@types/detect-port": "^1.3.3",
84
84
  "@types/react-dom": "^19.2.3",
@@ -104,5 +104,5 @@
104
104
  "engines": {
105
105
  "node": ">=24.14"
106
106
  },
107
- "gitHead": "0dfa1b9d632948a6dfc2c216e631e60f63a6682c"
107
+ "gitHead": "312e134c9cda62b50e9d36e5261e949c08b05028"
108
108
  }