@docusaurus/core 3.10.1-canary-6610 → 3.10.1-canary-6611
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/client/exports/ComponentCreator.js +0 -2
- package/lib/client/exports/isInternalUrl.js +1 -1
- package/lib/commands/build/buildLocale.d.ts +1 -1
- package/lib/commands/build/buildUtils.d.ts +1 -1
- package/lib/commands/deploy.js +3 -8
- package/lib/commands/serve.js +1 -1
- package/lib/commands/start/webpack.js +1 -0
- package/lib/server/codegen/codegenRoutes.js +0 -1
- package/lib/server/i18n.js +1 -1
- package/lib/server/siteMetadata.js +2 -2
- package/lib/ssg/ssgWorkerThread.js +0 -1
- package/package.json +11 -11
|
@@ -94,14 +94,12 @@ export default function ComponentCreator(path, hash) {
|
|
|
94
94
|
});
|
|
95
95
|
val[keyPaths[keyPaths.length - 1]] = chunk;
|
|
96
96
|
});
|
|
97
|
-
/* eslint-disable no-underscore-dangle */
|
|
98
97
|
const Component = loadedModules.__comp;
|
|
99
98
|
delete loadedModules.__comp;
|
|
100
99
|
const routeContext = loadedModules.__context;
|
|
101
100
|
delete loadedModules.__context;
|
|
102
101
|
const routeProps = loadedModules.__props;
|
|
103
102
|
delete loadedModules.__props;
|
|
104
|
-
/* eslint-enable no-underscore-dangle */
|
|
105
103
|
// Is there any way to put this RouteContextProvider upper in the tree?
|
|
106
104
|
return (<RouteContextProvider value={routeContext}>
|
|
107
105
|
<Component {...loadedModules} {...routeProps} {...props}/>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// Spec: https://datatracker.ietf.org/doc/html/rfc3986#section-3.1
|
|
9
9
|
// In particular: scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
|
|
10
10
|
export function hasProtocol(url) {
|
|
11
|
-
return /^(?:[A-
|
|
11
|
+
return /^(?:[A-Z][A-Z\d+.-]*:|\/\/)/i.test(url);
|
|
12
12
|
}
|
|
13
13
|
export default function isInternalUrl(url) {
|
|
14
14
|
return typeof url !== 'undefined' && !hasProtocol(url);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import { BuildCLIOptions } from './build';
|
|
7
|
+
import type { BuildCLIOptions } from './build';
|
|
8
8
|
export type BuildLocaleParams = {
|
|
9
9
|
siteDir: string;
|
|
10
10
|
locale: string;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import { BuildCLIOptions } from './build';
|
|
7
|
+
import type { BuildCLIOptions } from './build';
|
|
8
8
|
/**
|
|
9
9
|
* We disable locale path localization if CLI has a single "--locale" option
|
|
10
10
|
* yarn build --locale fr => baseUrl=/ instead of baseUrl=/fr/
|
package/lib/commands/deploy.js
CHANGED
|
@@ -203,7 +203,7 @@ You can also set the deploymentBranch property in docusaurus.config.js .`);
|
|
|
203
203
|
}
|
|
204
204
|
else if (commitResults.exitCode === 0) {
|
|
205
205
|
// The commit might return a non-zero value when site is up to date.
|
|
206
|
-
let websiteURL
|
|
206
|
+
let websiteURL;
|
|
207
207
|
if (githubHost === 'github.com') {
|
|
208
208
|
websiteURL = projectName.includes('.github.io')
|
|
209
209
|
? `https://${organizationName}.github.io/`
|
|
@@ -213,13 +213,8 @@ You can also set the deploymentBranch property in docusaurus.config.js .`);
|
|
|
213
213
|
// GitHub enterprise hosting.
|
|
214
214
|
websiteURL = `https://${githubHost}/pages/${organizationName}/${projectName}/`;
|
|
215
215
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
process.exit(0);
|
|
219
|
-
}
|
|
220
|
-
catch (err) {
|
|
221
|
-
throw new Error(`Failed to execute command: ${err}`);
|
|
222
|
-
}
|
|
216
|
+
exec(`echo "Website is live at ${websiteURL}."`, { failfast: true });
|
|
217
|
+
process.exit(0);
|
|
223
218
|
}
|
|
224
219
|
};
|
|
225
220
|
if (!cliOptions.skipBuild) {
|
package/lib/commands/serve.js
CHANGED
|
@@ -56,7 +56,7 @@ async function serve(siteDirParam = '.', cliOptions = {}) {
|
|
|
56
56
|
if (baseUrl !== '/') {
|
|
57
57
|
// Not super robust, but should be good enough for our use case
|
|
58
58
|
// See https://github.com/facebook/docusaurus/pull/10090
|
|
59
|
-
const looksLikeAsset = !!req.url.match(/\.[a-
|
|
59
|
+
const looksLikeAsset = !!req.url.match(/\.[a-z\d]{1,4}$/i);
|
|
60
60
|
if (!looksLikeAsset) {
|
|
61
61
|
const normalizedUrl = (0, utils_common_1.applyTrailingSlash)(req.url, {
|
|
62
62
|
trailingSlash,
|
|
@@ -12,6 +12,7 @@ const path_1 = tslib_1.__importDefault(require("path"));
|
|
|
12
12
|
const webpack_merge_1 = tslib_1.__importDefault(require("webpack-merge"));
|
|
13
13
|
const bundler_1 = require("@docusaurus/bundler");
|
|
14
14
|
const logger_1 = tslib_1.__importDefault(require("@docusaurus/logger"));
|
|
15
|
+
// eslint-disable-next-line import/default
|
|
15
16
|
const webpack_dev_server_1 = tslib_1.__importDefault(require("webpack-dev-server"));
|
|
16
17
|
const evalSourceMapMiddleware_1 = tslib_1.__importDefault(require("../utils/legacy/evalSourceMapMiddleware"));
|
|
17
18
|
const watcher_1 = require("./watcher");
|
|
@@ -85,7 +85,6 @@ ${indent(parts.join(',\n'))}
|
|
|
85
85
|
}
|
|
86
86
|
const isModule = (value) => typeof value === 'string' ||
|
|
87
87
|
(typeof value === 'object' &&
|
|
88
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
89
88
|
!!value?.__import);
|
|
90
89
|
/**
|
|
91
90
|
* Takes a {@link Module} (which is nothing more than a path plus some metadata
|
package/lib/server/i18n.js
CHANGED
|
@@ -23,7 +23,7 @@ function inferLanguageDisplayName(locale) {
|
|
|
23
23
|
fallback: 'code',
|
|
24
24
|
}).of(l);
|
|
25
25
|
}
|
|
26
|
-
catch
|
|
26
|
+
catch {
|
|
27
27
|
// This is to compensate "of()" that is a bit strict
|
|
28
28
|
// Looks like starting Node 22, this locale throws: "en-US-u-ca-buddhist"
|
|
29
29
|
// RangeError: invalid_argument
|
|
@@ -15,13 +15,13 @@ const path_1 = tslib_1.__importDefault(require("path"));
|
|
|
15
15
|
const utils_1 = require("@docusaurus/utils");
|
|
16
16
|
async function loadPackageJsonVersion(packageJsonPath) {
|
|
17
17
|
if (await fs_extra_1.default.pathExists(packageJsonPath)) {
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/no-
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
19
19
|
return require(packageJsonPath).version;
|
|
20
20
|
}
|
|
21
21
|
return undefined;
|
|
22
22
|
}
|
|
23
23
|
async function loadPackageJsonName(packageJsonPath) {
|
|
24
|
-
// eslint-disable-next-line @typescript-eslint/no-
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
25
25
|
return require(packageJsonPath).name;
|
|
26
26
|
}
|
|
27
27
|
async function loadSiteVersion(siteDir) {
|
|
@@ -11,7 +11,6 @@ const tslib_1 = require("tslib");
|
|
|
11
11
|
const node_worker_threads_1 = require("node:worker_threads");
|
|
12
12
|
const logger_1 = tslib_1.__importStar(require("@docusaurus/logger"));
|
|
13
13
|
const ssgRenderer_js_1 = require("./ssgRenderer.js");
|
|
14
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
15
14
|
const workerId = process?.__tinypool_state__?.workerId;
|
|
16
15
|
if (!workerId) {
|
|
17
16
|
throw new Error('SSG Worker Thread not executing in Tinypool context?');
|
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-
|
|
4
|
+
"version": "3.10.1-canary-6611",
|
|
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-
|
|
37
|
-
"@docusaurus/bundler": "3.10.1-canary-
|
|
38
|
-
"@docusaurus/logger": "3.10.1-canary-
|
|
39
|
-
"@docusaurus/mdx-loader": "3.10.1-canary-
|
|
40
|
-
"@docusaurus/utils": "3.10.1-canary-
|
|
41
|
-
"@docusaurus/utils-common": "3.10.1-canary-
|
|
42
|
-
"@docusaurus/utils-validation": "3.10.1-canary-
|
|
36
|
+
"@docusaurus/babel": "3.10.1-canary-6611",
|
|
37
|
+
"@docusaurus/bundler": "3.10.1-canary-6611",
|
|
38
|
+
"@docusaurus/logger": "3.10.1-canary-6611",
|
|
39
|
+
"@docusaurus/mdx-loader": "3.10.1-canary-6611",
|
|
40
|
+
"@docusaurus/utils": "3.10.1-canary-6611",
|
|
41
|
+
"@docusaurus/utils-common": "3.10.1-canary-6611",
|
|
42
|
+
"@docusaurus/utils-validation": "3.10.1-canary-6611",
|
|
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-
|
|
81
|
-
"@docusaurus/types": "3.10.1-canary-
|
|
80
|
+
"@docusaurus/module-type-aliases": "3.10.1-canary-6611",
|
|
81
|
+
"@docusaurus/types": "3.10.1-canary-6611",
|
|
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": "
|
|
107
|
+
"gitHead": "1415301312e8a95204263b5c23892b818deff26c"
|
|
108
108
|
}
|