Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lighthouse-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);
}

/**
Expand Down Expand Up @@ -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 &&
Expand Down
14 changes: 10 additions & 4 deletions packages/docusaurus/src/commands/utils/openBrowser/openBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 [];
}
Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-3.8.1/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -461,7 +461,7 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Test build website
run: npm build
run: npm run build
```

</TabItem>
Expand Down
23 changes: 13 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -9649,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==
Expand Down
Loading