From 600ef7ae28e6564737801984f0a5fb7814cdecfe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Jun 2020 14:58:25 +0300 Subject: [PATCH 1/2] chore(deps): bump websocket-extensions from 0.1.3 to 0.1.4 (#2899) Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4. - [Release notes](https://github.com/faye/websocket-extensions-node/releases) - [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md) - [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 91e7e38350393..970634db79ce5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17775,9 +17775,9 @@ websocket-driver@>=0.5.1: websocket-extensions ">=0.1.1" websocket-extensions@>=0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29" - integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg== + version "0.1.4" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" + integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.5: version "1.0.5" From afe9ff91a4247316f0081c9b080655d575298416 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Sun, 7 Jun 2020 08:40:06 +0300 Subject: [PATCH 2/2] chore(v2): replace classnames with clsx (#2895) --- .../templates/classic/package.json | 2 +- .../templates/classic/src/pages/index.js | 8 +++---- .../templates/facebook/package.json | 2 +- .../templates/facebook/src/pages/index.js | 8 +++---- .../docusaurus-theme-classic/package.json | 2 +- .../src/theme/BlogPostItem/index.js | 4 ++-- .../src/theme/CodeBlock/index.js | 6 ++--- .../src/theme/DocItem/index.js | 9 +++----- .../src/theme/DocSidebar/index.js | 14 ++++++------ .../src/theme/Footer/index.js | 4 ++-- .../src/theme/Heading/index.js | 4 ++-- .../src/theme/Navbar/index.js | 12 +++++----- .../src/theme/Tabs/index.js | 6 ++--- .../src/theme/Toggle/index.js | 6 ++--- .../package.json | 2 +- .../src/theme/Playground/index.js | 6 ++--- .../package.json | 2 +- .../src/pages/search/index.js | 13 +++++------ .../src/theme/SearchBar/index.js | 6 ++--- packages/docusaurus/package.json | 1 - website/docs/migrating-from-v1-to-v2.md | 2 +- website/package.json | 2 +- website/src/pages/feedback/index.js | 4 ++-- website/src/pages/index.js | 22 ++++++++----------- website/src/pages/showcase/index.js | 4 ++-- yarn.lock | 5 +++++ 26 files changed, 76 insertions(+), 80 deletions(-) diff --git a/packages/docusaurus-init/templates/classic/package.json b/packages/docusaurus-init/templates/classic/package.json index 6420af2cbbcdf..c2d09a5b02972 100644 --- a/packages/docusaurus-init/templates/classic/package.json +++ b/packages/docusaurus-init/templates/classic/package.json @@ -11,7 +11,7 @@ "dependencies": { "@docusaurus/core": "^2.0.0-alpha.56", "@docusaurus/preset-classic": "^2.0.0-alpha.56", - "classnames": "^2.2.6", + "clsx": "^1.1.1", "react": "^16.8.4", "react-dom": "^16.8.4" }, diff --git a/packages/docusaurus-init/templates/classic/src/pages/index.js b/packages/docusaurus-init/templates/classic/src/pages/index.js index f24bc96214584..de04f5c846432 100644 --- a/packages/docusaurus-init/templates/classic/src/pages/index.js +++ b/packages/docusaurus-init/templates/classic/src/pages/index.js @@ -1,5 +1,5 @@ import React from 'react'; -import classnames from 'classnames'; +import clsx from 'clsx'; import Layout from '@theme/Layout'; import Link from '@docusaurus/Link'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; @@ -42,7 +42,7 @@ const features = [ function Feature({imageUrl, title, description}) { const imgUrl = useBaseUrl(imageUrl); return ( -
+
{imgUrl && (
{title} @@ -61,13 +61,13 @@ function Home() { -
+

{siteConfig.title}

{siteConfig.tagline}

+
{imgUrl && (
{title} @@ -70,13 +70,13 @@ function Home() { -
+

{siteConfig.title}

{siteConfig.tagline}

+ className={clsx('margin-bottom--sm', styles.blogPostTitle)}> {isBlogPostPage ? title : {title}}
diff --git a/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.js b/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.js index 4aea707bb6438..3cd64a3327224 100644 --- a/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.js +++ b/packages/docusaurus-theme-classic/src/theme/CodeBlock/index.js @@ -8,7 +8,7 @@ /* eslint-disable jsx-a11y/no-noninteractive-tabindex */ import React, {useEffect, useState, useRef} from 'react'; -import classnames from 'classnames'; +import clsx from 'clsx'; import Highlight, {defaultProps} from 'prism-react-renderer'; import Clipboard from 'clipboard'; import rangeParser from 'parse-numeric-range'; @@ -221,7 +221,7 @@ export default ({children, className: languageClassName, metastring}) => { ref={button} type="button" aria-label="Copy code to clipboard" - className={classnames(styles.copyButton, { + className={clsx(styles.copyButton, { [styles.copyButtonWithTitle]: codeBlockTitle, })} onClick={handleCopyCode}> @@ -229,7 +229,7 @@ export default ({children, className: languageClassName, metastring}) => {
diff --git a/packages/docusaurus-theme-classic/src/theme/DocItem/index.js b/packages/docusaurus-theme-classic/src/theme/DocItem/index.js index b14ccf2a3ba2f..8d0c4c880f842 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocItem/index.js +++ b/packages/docusaurus-theme-classic/src/theme/DocItem/index.js @@ -13,7 +13,7 @@ import useBaseUrl from '@docusaurus/useBaseUrl'; import DocPaginator from '@theme/DocPaginator'; import useTOCHighlight from '@theme/hooks/useTOCHighlight'; -import classnames from 'classnames'; +import clsx from 'clsx'; import styles from './styles.module.css'; const LINK_CLASS_NAME = 'table-of-contents__link'; @@ -102,13 +102,10 @@ function DocItem(props) { {permalink && }
+ className={clsx('container padding-vert--lg', styles.docItemWrapper)}>
diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebar/index.js b/packages/docusaurus-theme-classic/src/theme/DocSidebar/index.js index 387c33a4fb2bf..68e710db040a9 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebar/index.js +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebar/index.js @@ -6,7 +6,7 @@ */ import React, {useState, useCallback, useEffect, useRef} from 'react'; -import classnames from 'classnames'; +import clsx from 'clsx'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import useUserPreferencesContext from '@theme/hooks/useUserPreferencesContext'; import useLockBodyScroll from '@theme/hooks/useLockBodyScroll'; @@ -82,12 +82,12 @@ function DocSidebarItemCategory({ return (
  • {hideOnScroll && ( @@ -207,7 +207,7 @@ function DocSidebar(props) { )}
    {showResponsiveSidebar ? ( diff --git a/packages/docusaurus-theme-classic/src/theme/Footer/index.js b/packages/docusaurus-theme-classic/src/theme/Footer/index.js index 8adcf20ca2afc..a680051a690ef 100644 --- a/packages/docusaurus-theme-classic/src/theme/Footer/index.js +++ b/packages/docusaurus-theme-classic/src/theme/Footer/index.js @@ -6,7 +6,7 @@ */ import React from 'react'; -import classnames from 'classnames'; +import clsx from 'clsx'; import Link from '@docusaurus/Link'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; @@ -54,7 +54,7 @@ function Footer() { return (