From e28e9aa9efe04c8b489a53bb47dc2da5628d199e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 00:20:15 +0000 Subject: [PATCH 1/3] Bump the github-actions group across 1 directory with 2 updates (#3200) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/CI.yml | 4 ++-- .github/workflows/codeql.yml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4997bddb..4bbb4183 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -41,7 +41,7 @@ jobs: # Verify it compiles - run: pnpm build-site - - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 + - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest' with: name: site @@ -71,7 +71,7 @@ jobs: - name: Upload diff artifact if: ${{ failure() && steps.check-diff.conclusion == 'failure' }} - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 with: name: missing.patch path: missing.patch diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index fbb1e903..d5de1d74 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -44,7 +44,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 + uses: github/codeql-action/init@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0 with: config-file: ./.github/codeql/codeql-configuration.yml # Override language selection by uncommenting this and choosing your languages @@ -54,7 +54,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below). - name: Autobuild - uses: github/codeql-action/autobuild@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 + uses: github/codeql-action/autobuild@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0 # ℹī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -68,4 +68,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 + uses: github/codeql-action/analyze@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0 From 86a5883497918bda159fe3b1b5aa2d915732e15e Mon Sep 17 00:00:00 2001 From: JaeYoung <87258182+SaeWooKKang@users.noreply.github.com> Date: Fri, 16 Aug 2024 02:37:16 +0900 Subject: [PATCH 2/3] Fix: Algolia search not working when directly entering the `/play` page (#3203) --- .../src/components/layout/TopNav.tsx | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/packages/typescriptlang-org/src/components/layout/TopNav.tsx b/packages/typescriptlang-org/src/components/layout/TopNav.tsx index 904c5dc9..501e28f6 100644 --- a/packages/typescriptlang-org/src/components/layout/TopNav.tsx +++ b/packages/typescriptlang-org/src/components/layout/TopNav.tsx @@ -18,7 +18,7 @@ import { OpenInMyLangQuickJump } from "./LanguageRecommendation"; export const SiteNav = (props: Props) => { const i = createInternational(useIntl()) const IntlLink = createIntlLink(props.lang) - const loadDocSearch = () => { + const loadDocSearch = (docsearch) => { const fixURL = (url: string) => { const u = new URL(url); if (u.host === document.location.host) return url; @@ -47,26 +47,35 @@ export const SiteNav = (props: Props) => { useEffect(() => { setupStickyNavigation() - // @ts-ignore - this comes from the script above - if (window.docsearch) { - loadDocSearch(); - } - if (document.getElementById("algolia-search")) return - const searchScript = document.createElement('script'); searchScript.id = "algolia-search" - const searchCSS = document.createElement('link'); searchScript.src = withPrefix("/js/docsearch.js"); searchScript.async = true; - searchScript.onload = () => { - // @ts-ignore - this comes from the script above - if (window.docsearch) { - loadDocSearch(); + searchScript.onload = async () => { + // @ts-ignore this comes from the script above + let universalDocSearch = window.docsearch; + + if (global.require) { + universalDocSearch = await new Promise(resolve => { + const re: any = global.require; + re(['/js/docsearch.js'], (docsearch) => { + resolve(docsearch); + }); + }); + } + + if (universalDocSearch) { + loadDocSearch(universalDocSearch); + } + + if (!document.querySelector("#docsearch-css")) { + const searchCSS = document.createElement('link'); searchCSS.rel = 'stylesheet'; searchCSS.href = withPrefix('/css/docsearch.css'); searchCSS.type = 'text/css'; + searchCSS.id = 'docsearch-css'; document.body.appendChild(searchCSS); document.getElementById("search-form")?.classList.add("search-enabled") From ac68b8b8e4a621113c4ee45c4051002fd55ede24 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 23:37:04 +0000 Subject: [PATCH 3/3] Bump github/codeql-action from 3.26.0 to 3.26.3 in the github-actions group (#3206) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/codeql.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d5de1d74..d39fb86d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -44,7 +44,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0 + uses: github/codeql-action/init@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3 with: config-file: ./.github/codeql/codeql-configuration.yml # Override language selection by uncommenting this and choosing your languages @@ -54,7 +54,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below). - name: Autobuild - uses: github/codeql-action/autobuild@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0 + uses: github/codeql-action/autobuild@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3 # ℹī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -68,4 +68,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0 + uses: github/codeql-action/analyze@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3