Upgrade react-syntax-highlighter to the latest version

This commit is contained in:
Christophe Coevoet 2019-10-02 10:56:21 +02:00
parent 7225340394
commit d99d96c0c0
5 changed files with 33 additions and 33 deletions

View File

@ -38,7 +38,7 @@
"loader-utils": "^1.2.3",
"prettier": "^1.16.4",
"prop-types": "^15.7.2",
"react-syntax-highlighter": "^8.0.1",
"react-syntax-highlighter": "^11.0.2",
"regenerator-runtime": "^0.13.3",
"util-deprecate": "^1.0.2"
},

View File

@ -4,7 +4,7 @@ import { styled } from '@storybook/theming';
import { Link } from '@storybook/router';
import { SyntaxHighlighter } from '@storybook/components';
import createElement from 'react-syntax-highlighter/create-element';
import createElement from 'react-syntax-highlighter/dist/esm/create-element';
import { EVENT_ID } from './events';
const StyledStoryLink = styled(Link)(({ theme }) => ({

View File

@ -29,7 +29,7 @@
"dependencies": {
"@storybook/client-logger": "5.3.0-alpha.9",
"@storybook/theming": "5.3.0-alpha.9",
"@types/react-syntax-highlighter": "10.1.0",
"@types/react-syntax-highlighter": "11.0.1",
"core-js": "^3.0.1",
"global": "^4.3.2",
"markdown-to-jsx": "^6.9.1",
@ -42,7 +42,7 @@
"react-focus-lock": "^2.1.0",
"react-helmet-async": "^1.0.2",
"react-popper-tooltip": "^2.8.3",
"react-syntax-highlighter": "^8.0.1",
"react-syntax-highlighter": "^11.0.2",
"react-textarea-autosize": "^7.1.0",
"simplebar-react": "^1.0.0-alpha.6",
"ts-dedent": "^1.1.0"

View File

@ -3,22 +3,22 @@ import { styled } from '@storybook/theming';
import { document, window } from 'global';
import memoize from 'memoizerific';
import jsx from 'react-syntax-highlighter/languages/prism/jsx';
import bash from 'react-syntax-highlighter/languages/prism/bash';
import css from 'react-syntax-highlighter/languages/prism/css';
import html from 'react-syntax-highlighter/languages/prism/markup';
import jsx from 'react-syntax-highlighter/dist/esm/languages/prism/jsx';
import bash from 'react-syntax-highlighter/dist/esm/languages/prism/bash';
import css from 'react-syntax-highlighter/dist/esm/languages/prism/css';
import html from 'react-syntax-highlighter/dist/esm/languages/prism/markup';
import ReactSyntaxHighlighter, { registerLanguage } from 'react-syntax-highlighter/prism-light';
import { PrismLight as ReactSyntaxHighlighter } from 'react-syntax-highlighter';
import { ActionBar } from '../ActionBar/ActionBar';
import { ScrollArea } from '../ScrollArea/ScrollArea';
import { formatter } from './formatter';
registerLanguage('jsx', jsx);
registerLanguage('bash', bash);
registerLanguage('css', css);
registerLanguage('html', html);
ReactSyntaxHighlighter.registerLanguage('jsx', jsx);
ReactSyntaxHighlighter.registerLanguage('bash', bash);
ReactSyntaxHighlighter.registerLanguage('css', css);
ReactSyntaxHighlighter.registerLanguage('html', html);
const themedSyntax = memoize(2)(theme =>
Object.entries(theme.code || {}).reduce((acc, [key, val]) => ({ ...acc, [`* .${key}`]: val }), {})

View File

@ -3923,10 +3923,10 @@
"@types/react-dom" "*"
"@types/react-transition-group" "*"
"@types/react-syntax-highlighter@10.1.0":
version "10.1.0"
resolved "https://registry.yarnpkg.com/@types/react-syntax-highlighter/-/react-syntax-highlighter-10.1.0.tgz#9c534e29bbe05dba9beae1234f3ae944836685d4"
integrity sha512-dF49hC4FZp1dIKyzacOrHvqMUe8U2IXyQCQXOcT1e6n64gLBp+xM6qGtPsThIT9XjiIHSg2W5Jc2V5IqekBfnA==
"@types/react-syntax-highlighter@11.0.1":
version "11.0.1"
resolved "https://registry.yarnpkg.com/@types/react-syntax-highlighter/-/react-syntax-highlighter-11.0.1.tgz#37215d91c23c556d8b369cd7d9a2d8756ec8c9c5"
integrity sha512-SQfkfKoSOQE1RLSJtPzo/uguliluNNt9tmjENca6+wZ1jfojUM3jNOQ2c6KCzQVtIknOZWrJTCoJMy4RSQcGOA==
dependencies:
"@types/react" "*"
@ -14842,10 +14842,10 @@ highlight.js@^9.12.0:
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.15.10.tgz#7b18ed75c90348c045eef9ed08ca1319a2219ad2"
integrity sha512-RoV7OkQm0T3os3Dd2VHLNMoaoDVx77Wygln3n9l5YV172XonWG6rgQD3XnF/BuFFZw9A0TJgmMSO8FEWQgvcXw==
highlight.js@~9.12.0:
version "9.12.0"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.12.0.tgz#e6d9dbe57cbefe60751f02af336195870c90c01e"
integrity sha1-5tnb5Xy+/mB1HwKvM2GVhwyQwB4=
highlight.js@~9.13.0:
version "9.13.1"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.13.1.tgz#054586d53a6863311168488a0f58d6c505ce641e"
integrity sha512-Sc28JNQNDzaH6PORtRLMvif9RSn1mYuOoX3omVjnb0+HbpPygU2ALBI0R/wsiqCb4/fcp07Gdo8g+fhtFrQl6A==
hmac-drbg@^1.0.0:
version "1.0.1"
@ -18766,13 +18766,13 @@ lowercase-keys@^2.0.0:
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479"
integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==
lowlight@~1.9.1:
version "1.9.2"
resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-1.9.2.tgz#0b9127e3cec2c3021b7795dd81005c709a42fdd1"
integrity sha512-Ek18ElVCf/wF/jEm1b92gTnigh94CtBNWiZ2ad+vTgW7cTmQxUY3I98BjHK68gZAJEWmybGBZgx9qv3QxLQB/Q==
lowlight@~1.11.0:
version "1.11.0"
resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-1.11.0.tgz#1304d83005126d4e8b1dc0f07981e9b689ec2efc"
integrity sha512-xrGGN6XLL7MbTMdPD6NfWPwY43SNkjf/d0mecSx/CW36fUZTjRHEq0/Cdug3TWKtRXLWi7iMl1eP0olYxj/a4A==
dependencies:
fault "^1.0.2"
highlight.js "~9.12.0"
highlight.js "~9.13.0"
lru-cache@^4.0.0, lru-cache@^4.0.1, lru-cache@^4.1.1, lru-cache@^4.1.2, lru-cache@^4.1.5:
version "4.1.5"
@ -24901,14 +24901,14 @@ react-sizeme@^2.5.2, react-sizeme@^2.6.7:
shallowequal "^1.1.0"
throttle-debounce "^2.1.0"
react-syntax-highlighter@^8.0.1:
version "8.1.0"
resolved "https://registry.yarnpkg.com/react-syntax-highlighter/-/react-syntax-highlighter-8.1.0.tgz#59103ff17a828a27ed7c8f035ae2558f09b6b78c"
integrity sha512-G2bkZxmF3VOa4atEdXIDSfwwCqjw6ZQX5znfTaHcErA1WqHIS0o6DaSCDKFPVaOMXQEB9Hf1UySYQvuJmV8CXg==
react-syntax-highlighter@^11.0.2:
version "11.0.2"
resolved "https://registry.yarnpkg.com/react-syntax-highlighter/-/react-syntax-highlighter-11.0.2.tgz#4e3f376e752b20d2f54e4c55652fd663149e4029"
integrity sha512-kqmpM2OH5OodInbEADKARwccwSQWBfZi0970l5Jhp4h39q9Q65C4frNcnd6uHE5pR00W8pOWj9HDRntj2G4Rww==
dependencies:
babel-runtime "^6.18.0"
highlight.js "~9.12.0"
lowlight "~1.9.1"
"@babel/runtime" "^7.3.1"
highlight.js "~9.13.0"
lowlight "~1.11.0"
prismjs "^1.8.4"
refractor "^2.4.1"