From 0fbb4613b37876e78213de8306f6f0512548f575 Mon Sep 17 00:00:00 2001 From: jffarge Date: Thu, 18 Nov 2021 11:50:01 +0100 Subject: [PATCH 1/3] docs: :bug: Use common import instead of dynamic for Amplitude-js Signed-off-by: jffarge --- website/src/theme/DocPage/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/website/src/theme/DocPage/index.js b/website/src/theme/DocPage/index.js index eaa6b371..d70ff2fd 100644 --- a/website/src/theme/DocPage/index.js +++ b/website/src/theme/DocPage/index.js @@ -19,6 +19,7 @@ import clsx from 'clsx'; import styles from './styles.module.css'; import {ThemeClassNames, docVersionSearchTag} from '@docusaurus/theme-common'; import DocPageCustom from "../../components/DocPageCustom" +import amplitude from 'amplitude-js'; function DocPageContent({currentDocRoute, versionMetadata, children}) { const {pluginId, version} = versionMetadata; @@ -138,7 +139,6 @@ function DocPage(props) { ); useEffect(() => { - import('amplitude-js').then(amplitude => { if (userAccessStatus?.login) { var amplitudeInstance = amplitude.getInstance().init(process.env.REACT_APP_AMPLITUDE_ID, userAccessStatus?.login.toLowerCase(), { apiEndpoint: `${window.location.hostname}/t` @@ -149,7 +149,6 @@ function DocPage(props) { window.hj("identify", userAccessStatus?.login.toLowerCase(), {}); } } - }) }, [location.pathname, userAccessStatus]) if (process.env.OAUTH_ENABLE == 'true' && userAccessStatus?.permission !== true) { From fa8925fd0a425d91752e365911bde542e359ef61 Mon Sep 17 00:00:00 2001 From: jffarge Date: Thu, 18 Nov 2021 14:57:22 +0100 Subject: [PATCH 2/3] docs: :bug: downgrade cypress to 8.5.0 avoiding a Runner unexpectedly exited Related Cypress issue : https://github.com/cypress-io/cypress/issues/18681 Signed-off-by: jffarge --- website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/package.json b/website/package.json index ee9afc2d..4d450fd1 100644 --- a/website/package.json +++ b/website/package.json @@ -49,7 +49,7 @@ }, "devDependencies": { "concurrently": "^6.4.0", - "cypress": "^9.0.0", + "cypress": "8.5.0", "cypress-localstorage-commands": "^1.6.1", "start-server-and-test": "^1.13.1" } From 4d07e2af401aae9f73c66970fd5fd98854ad0ac8 Mon Sep 17 00:00:00 2001 From: jffarge Date: Thu, 18 Nov 2021 15:39:53 +0100 Subject: [PATCH 3/3] docs: :bug: remove --frozen-lockfile option to update yarn.lock Signed-off-by: jffarge --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a913da8..415474e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -183,6 +183,7 @@ jobs: REACT_APP_AMPLITUDE_ID: 123 with: config: chromeWebSecurity=false + install-command: yarn install --silent start: | yarn start yarn start:withAuth