From 0239c18b784db2f5eea2e2f9550539c22921e6f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 10:01:03 +0200 Subject: [PATCH 1/5] chore(deps): bump marocchino/sticky-pull-request-comment from 2.9.3 to 2.9.4 (#11341) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/lighthouse-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lighthouse-report.yml b/.github/workflows/lighthouse-report.yml index 118cd61afbcd..ce28df365ec3 100644 --- a/.github/workflows/lighthouse-report.yml +++ b/.github/workflows/lighthouse-report.yml @@ -65,7 +65,7 @@ jobs: - name: Add Lighthouse stats as comment id: comment_to_pr - uses: marocchino/sticky-pull-request-comment@d2ad0de260ae8b0235ce059e63f2949ba9e05943 # 2.9.3 + uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # 2.9.4 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} number: ${{ github.event.pull_request.number }} From 2655db686e42b727271b3e6d2cf4959735ddfc9e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 10:01:10 +0200 Subject: [PATCH 2/5] chore(deps): bump form-data from 4.0.1 to 4.0.4 (#11342) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index b1d51b9392fb..47772572cf7d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8166,14 +8166,15 @@ es-object-atoms@^1.0.0: dependencies: es-errors "^1.3.0" -es-set-tostringtag@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz#8bb60f0a440c2e4281962428438d58545af39777" - integrity sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ== +es-set-tostringtag@^2.0.3, es-set-tostringtag@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d" + integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== dependencies: - get-intrinsic "^1.2.4" + es-errors "^1.3.0" + get-intrinsic "^1.2.6" has-tostringtag "^1.0.2" - hasown "^2.0.1" + hasown "^2.0.2" es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2: version "1.0.2" @@ -9059,12 +9060,14 @@ form-data-encoder@^2.1.2: integrity sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw== form-data@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.1.tgz#ba1076daaaa5bfd7e99c1a6cb02aa0a5cff90d48" - integrity sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw== + version "4.0.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.4.tgz#784cdcce0669a9d68e94d11ac4eea98088edd2c4" + integrity sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow== dependencies: asynckit "^0.4.0" combined-stream "^1.0.8" + es-set-tostringtag "^2.1.0" + hasown "^2.0.2" mime-types "^2.1.12" format@^0.2.0: From e83747f323809023bf9dc1f4a7c41869ce1690f2 Mon Sep 17 00:00:00 2001 From: Guo Ci Date: Thu, 24 Jul 2025 04:03:46 -0400 Subject: [PATCH 3/5] Fix npm command typos in deployment.mdx (#11337) --- website/versioned_docs/version-3.8.1/deployment.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/versioned_docs/version-3.8.1/deployment.mdx b/website/versioned_docs/version-3.8.1/deployment.mdx index 5a6cfb00ee85..98f8f02cfa62 100644 --- a/website/versioned_docs/version-3.8.1/deployment.mdx +++ b/website/versioned_docs/version-3.8.1/deployment.mdx @@ -407,7 +407,7 @@ jobs: - name: Install dependencies run: npm ci - name: Build website - run: npm build + run: npm run build - name: Upload Build Artifact uses: actions/upload-pages-artifact@v3 @@ -461,7 +461,7 @@ jobs: - name: Install dependencies run: npm ci - name: Test build website - run: npm build + run: npm run build ``` From c81808459d9f494fe6a801473987d0c783ddb642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Thu, 24 Jul 2025 11:01:03 +0200 Subject: [PATCH 4/5] fix(core): Fix docusaurus start on macOS when exec throws a synchronous error (#11347) Co-authored-by: slorber <749374+slorber@users.noreply.github.com> --- .../src/commands/utils/openBrowser/openBrowser.ts | 14 ++++++++++---- yarn.lock | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/docusaurus/src/commands/utils/openBrowser/openBrowser.ts b/packages/docusaurus/src/commands/utils/openBrowser/openBrowser.ts index a0dd2654ce7e..2c4d2789a62d 100644 --- a/packages/docusaurus/src/commands/utils/openBrowser/openBrowser.ts +++ b/packages/docusaurus/src/commands/utils/openBrowser/openBrowser.ts @@ -72,10 +72,16 @@ async function tryOpenWithAppleScript({ '|', )})$"`; - const result = await execPromise(command).catch(() => { - // Ignore grep errors when macOS user has no Chromium-based browser open - // See https://github.com/facebook/docusaurus/issues/11204 - }); + const result = await Promise + // TODO Docusaurus v4: use Promise.try() + // See why here https://github.com/facebook/docusaurus/issues/11204#issuecomment-3073480330 + .resolve() + .then(() => execPromise(command)) + .catch(() => { + // Ignore all errors + // In particular grep errors when macOS user has no Chromium-based browser open + // See https://github.com/facebook/docusaurus/issues/11204 + }); if (!result) { return []; } diff --git a/yarn.lock b/yarn.lock index 47772572cf7d..38003b5fcb24 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9652,7 +9652,7 @@ has-yarn@^3.0.0: resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-3.0.0.tgz#c3c21e559730d1d3b57e28af1f30d06fac38147d" integrity sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA== -hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: +hasown@^2.0.0, hasown@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== From 12bcad983735b83b668cb21ea1869a87f3480fe2 Mon Sep 17 00:00:00 2001 From: hjcho Date: Thu, 24 Jul 2025 18:03:25 +0900 Subject: [PATCH 5/5] fix(theme-classic): fix collapsed sidebar category expansion when navigating to another link within that category (#11338) Co-authored-by: qqq614 --- .../theme/DocSidebarItem/Category/index.tsx | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx index cf29059928b1..22270f21a30f 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx @@ -37,18 +37,30 @@ function useAutoExpandActiveCategory({ isActive, collapsed, updateCollapsed, + activePath, }: { isActive: boolean; collapsed: boolean; updateCollapsed: (b: boolean) => void; + activePath: string; }) { const wasActive = usePrevious(isActive); + const previousActivePath = usePrevious(activePath); useEffect(() => { const justBecameActive = isActive && !wasActive; - if (justBecameActive && collapsed) { + const stillActiveButPathChanged = + isActive && wasActive && activePath !== previousActivePath; + if ((justBecameActive || stillActiveButPathChanged) && collapsed) { updateCollapsed(false); } - }, [isActive, wasActive, collapsed, updateCollapsed]); + }, [ + isActive, + wasActive, + collapsed, + updateCollapsed, + activePath, + previousActivePath, + ]); } /** @@ -150,7 +162,12 @@ export default function DocSidebarItemCategory({ setExpandedItem(toCollapsed ? null : index); setCollapsed(toCollapsed); }; - useAutoExpandActiveCategory({isActive, collapsed, updateCollapsed}); + useAutoExpandActiveCategory({ + isActive, + collapsed, + updateCollapsed, + activePath, + }); useEffect(() => { if ( collapsible &&