@docusaurus/core 3.10.1-canary-6650 → 3.10.1-canary-6651
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.
|
@@ -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
|
|
7
|
+
import { type ReactNode } from 'react';
|
|
8
8
|
import type { Props } from '@docusaurus/Link';
|
|
9
|
-
declare
|
|
10
|
-
export default
|
|
9
|
+
declare function Link({ isNavLink, to, href, activeClassName, isActive, 'data-noBrokenLinkCheck': noBrokenLinkCheck, autoAddBaseUrl, ...props }: Props): ReactNode;
|
|
10
|
+
export default Link;
|
|
@@ -18,14 +18,14 @@ import { useBaseUrlUtils } from './useBaseUrl';
|
|
|
18
18
|
// this is because useBaseUrl() actually transforms relative links
|
|
19
19
|
// like "introduction" to "/baseUrl/introduction" => bad behavior to fix
|
|
20
20
|
const shouldAddBaseUrlAutomatically = (to) => to.startsWith('/');
|
|
21
|
-
function Link({ isNavLink, to, href, activeClassName, isActive, 'data-noBrokenLinkCheck': noBrokenLinkCheck, autoAddBaseUrl = true, ...props }
|
|
21
|
+
function Link({ isNavLink, to, href, activeClassName, isActive, 'data-noBrokenLinkCheck': noBrokenLinkCheck, autoAddBaseUrl = true, ...props }) {
|
|
22
22
|
const { siteConfig } = useDocusaurusContext();
|
|
23
23
|
const { trailingSlash, baseUrl } = siteConfig;
|
|
24
24
|
const router = siteConfig.future.experimental_router;
|
|
25
25
|
const { withBaseUrl } = useBaseUrlUtils();
|
|
26
26
|
const brokenLinks = useBrokenLinks();
|
|
27
27
|
const innerRef = useRef(null);
|
|
28
|
-
useImperativeHandle(
|
|
28
|
+
useImperativeHandle(props.ref, () => innerRef.current);
|
|
29
29
|
// IMPORTANT: using to or href should not change anything
|
|
30
30
|
// For example, MDX links will ALWAYS give us the href props
|
|
31
31
|
// Using one prop or the other should not be used to distinguish
|
|
@@ -139,4 +139,4 @@ function Link({ isNavLink, to, href, activeClassName, isActive, 'data-noBrokenLi
|
|
|
139
139
|
// element"
|
|
140
140
|
{...(isNavLink && { isActive, activeClassName })} {...testOnlyProps}/>);
|
|
141
141
|
}
|
|
142
|
-
export default
|
|
142
|
+
export default Link;
|
|
@@ -51,12 +51,7 @@ async function tryOpenWithAppleScript({ url, browser, }) {
|
|
|
51
51
|
];
|
|
52
52
|
// Among all the supported browsers, retrieves to stdout the active ones
|
|
53
53
|
const command = `ps cax -o command | grep -E "^(${supportedChromiumBrowsers.join('|')})$"`;
|
|
54
|
-
const result = await Promise
|
|
55
|
-
// TODO Docusaurus v4: use Promise.try()
|
|
56
|
-
// See why here https://github.com/facebook/docusaurus/issues/11204#issuecomment-3073480330
|
|
57
|
-
.resolve()
|
|
58
|
-
.then(() => execPromise(command))
|
|
59
|
-
.catch(() => {
|
|
54
|
+
const result = await Promise.try(() => execPromise(command)).catch(() => {
|
|
60
55
|
// Ignore all errors
|
|
61
56
|
// In particular grep errors when macOS user has no Chromium-based browser open
|
|
62
57
|
// See https://github.com/facebook/docusaurus/issues/11204
|
package/lib/server/i18n.js
CHANGED
|
@@ -64,11 +64,7 @@ function getDefaultDirection(localeStr) {
|
|
|
64
64
|
const locale = new Intl.Locale(localeStr);
|
|
65
65
|
// see https://github.com/tc39/proposal-intl-locale-info
|
|
66
66
|
// see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo
|
|
67
|
-
|
|
68
|
-
// TODO Docusaurus v4: remove the fallback to locale.textInfo
|
|
69
|
-
// @ts-expect-error: The TC39 proposal was updated
|
|
70
|
-
const textInto = locale.getTextInfo?.() ?? locale.textInfo;
|
|
71
|
-
return textInto.direction ?? 'ltr';
|
|
67
|
+
return locale.getTextInfo().direction ?? 'ltr';
|
|
72
68
|
}
|
|
73
69
|
function getDefaultLocaleConfig(
|
|
74
70
|
// Locale "key/identifier"
|
package/lib/ssg/ssgEnv.js
CHANGED
|
@@ -9,9 +9,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.SSGWorkerThreadRecyclerMaxMemory = exports.SSGWorkerThreadTaskSize = exports.SSGWorkerThreadCount = exports.SSGConcurrency = void 0;
|
|
10
10
|
// Secret way to set SSR plugin async concurrency option
|
|
11
11
|
// Waiting for feedback before documenting this officially?
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
? parseInt(process.env.DOCUSAURUS_SSR_CONCURRENCY, 10)
|
|
12
|
+
exports.SSGConcurrency = process.env.DOCUSAURUS_SSG_CONCURRENCY
|
|
13
|
+
? parseInt(process.env.DOCUSAURUS_SSG_CONCURRENCY, 10)
|
|
15
14
|
: // Not easy to define a reasonable option default
|
|
16
15
|
// Will still be better than Infinity
|
|
17
16
|
// See also https://github.com/sindresorhus/p-map/issues/24
|
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-6651",
|
|
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-6651",
|
|
37
|
+
"@docusaurus/bundler": "3.10.1-canary-6651",
|
|
38
|
+
"@docusaurus/logger": "3.10.1-canary-6651",
|
|
39
|
+
"@docusaurus/mdx-loader": "3.10.1-canary-6651",
|
|
40
|
+
"@docusaurus/utils": "3.10.1-canary-6651",
|
|
41
|
+
"@docusaurus/utils-common": "3.10.1-canary-6651",
|
|
42
|
+
"@docusaurus/utils-validation": "3.10.1-canary-6651",
|
|
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-6651",
|
|
81
|
+
"@docusaurus/types": "3.10.1-canary-6651",
|
|
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": "24bda5c01915c8e8c37b1177d1f9368f8eb3aa1a"
|
|
108
108
|
}
|