Upgarding dependencies

This commit is contained in:
Jeff Avallone 2019-03-23 15:45:23 -04:00
parent 59ebe433b6
commit 51c21881cc
29 changed files with 2311 additions and 2504 deletions

View File

@ -55,7 +55,9 @@
"src", "src",
"node_modules" "node_modules"
], ],
"setupTestFrameworkScriptFile": "<rootDir>/jest/setup.js", "setupFilesAfterEnv": [
"<rootDir>/jest/setup.js"
],
"snapshotSerializers": [ "snapshotSerializers": [
"enzyme-to-json/serializer" "enzyme-to-json/serializer"
], ],
@ -79,9 +81,10 @@
"@babel/core": "^7.2.2", "@babel/core": "^7.2.2",
"@ungap/url-search-params": "^0.1.2", "@ungap/url-search-params": "^0.1.2",
"babel-core": "^7.0.0-bridge.0", "babel-core": "^7.0.0-bridge.0",
"babel-jest": "^23.6.0", "babel-jest": "^24.5.0",
"babel-plugin-dynamic-import-node": "^2.2.0", "babel-plugin-dynamic-import-node": "^2.2.0",
"babel-preset-gatsby": "^0.1.6", "babel-preset-gatsby": "^0.1.6",
"core-js": "2",
"enzyme": "^3.8.0", "enzyme": "^3.8.0",
"enzyme-adapter-react-16": "^1.7.1", "enzyme-adapter-react-16": "^1.7.1",
"enzyme-to-json": "^3.3.5", "enzyme-to-json": "^3.3.5",
@ -97,11 +100,11 @@
"gatsby-plugin-react-helmet": "^3.0.5", "gatsby-plugin-react-helmet": "^3.0.5",
"gatsby-plugin-sentry": "^1.0.0", "gatsby-plugin-sentry": "^1.0.0",
"husky": "^1.3.1", "husky": "^1.3.1",
"i18next": "^14.0.1", "i18next": "^15.0.7",
"i18next-browser-languagedetector": "^2.2.4", "i18next-browser-languagedetector": "^3.0.1",
"i18next-xhr-backend": "^1.5.1", "i18next-xhr-backend": "^2.0.1",
"identity-obj-proxy": "^3.0.0", "identity-obj-proxy": "^3.0.0",
"jest": "^23.6.0", "jest": "^24.5.0",
"postcss-cssnext": "^3.1.0", "postcss-cssnext": "^3.1.0",
"postcss-import": "^12.0.1", "postcss-import": "^12.0.1",
"prop-types": "^15.6.2", "prop-types": "^15.6.2",
@ -109,7 +112,7 @@
"react-dom": "^16.7.0", "react-dom": "^16.7.0",
"react-feather": "^1.1.5", "react-feather": "^1.1.5",
"react-helmet": "^5.2.0", "react-helmet": "^5.2.0",
"react-i18next": "^9.0.2", "react-i18next": "^10.5.3",
"react-modal": "^3.8.1" "react-modal": "^3.8.1"
} }
} }

View File

@ -2,7 +2,7 @@
exports[`App removing rendered expression 1`] = ` exports[`App removing rendered expression 1`] = `
<Fragment> <Fragment>
<LoadNamespace(Form) <withI18nextTranslation(Form)
expr="test expression" expr="test expression"
onSubmit={[Function]} onSubmit={[Function]}
syntax="js" syntax="js"
@ -19,8 +19,8 @@ exports[`App removing rendered expression 1`] = `
] ]
} }
> >
<LoadNamespace(FormActions) /> <withI18nextTranslation(FormActions) />
</LoadNamespace(Form)> </withI18nextTranslation(Form)>
<Render <Render
data="LAYOUT(PARSED(test expression))" data="LAYOUT(PARSED(test expression))"
onRender={[Function]} onRender={[Function]}
@ -30,7 +30,7 @@ exports[`App removing rendered expression 1`] = `
exports[`App removing rendered expression 2`] = ` exports[`App removing rendered expression 2`] = `
<Fragment> <Fragment>
<LoadNamespace(Form) <withI18nextTranslation(Form)
expr="" expr=""
onSubmit={[Function]} onSubmit={[Function]}
syntax="js" syntax="js"
@ -52,7 +52,7 @@ exports[`App removing rendered expression 2`] = `
exports[`App rendering 1`] = ` exports[`App rendering 1`] = `
<Fragment> <Fragment>
<LoadNamespace(Form) <withI18nextTranslation(Form)
expr="" expr=""
onSubmit={[Function]} onSubmit={[Function]}
syntax="js" syntax="js"
@ -74,7 +74,7 @@ exports[`App rendering 1`] = `
exports[`App rendering an expression 1`] = ` exports[`App rendering an expression 1`] = `
<Fragment> <Fragment>
<LoadNamespace(Form) <withI18nextTranslation(Form)
expr="" expr=""
onSubmit={[Function]} onSubmit={[Function]}
syntax="js" syntax="js"
@ -96,7 +96,7 @@ exports[`App rendering an expression 1`] = `
exports[`App rendering an expression 2`] = ` exports[`App rendering an expression 2`] = `
<Fragment> <Fragment>
<LoadNamespace(Form) <withI18nextTranslation(Form)
expr="test expression" expr="test expression"
onSubmit={[Function]} onSubmit={[Function]}
syntax="js" syntax="js"
@ -113,13 +113,13 @@ exports[`App rendering an expression 2`] = `
] ]
} }
/> />
<LoadNamespace(Loader) /> <withI18nextTranslation(Loader) />
</Fragment> </Fragment>
`; `;
exports[`App rendering an expression 3`] = ` exports[`App rendering an expression 3`] = `
<Fragment> <Fragment>
<LoadNamespace(Form) <withI18nextTranslation(Form)
expr="test expression" expr="test expression"
onSubmit={[Function]} onSubmit={[Function]}
syntax="js" syntax="js"
@ -136,8 +136,8 @@ exports[`App rendering an expression 3`] = `
] ]
} }
> >
<LoadNamespace(FormActions) /> <withI18nextTranslation(FormActions) />
</LoadNamespace(Form)> </withI18nextTranslation(Form)>
<Render <Render
data="LAYOUT(PARSED(test expression))" data="LAYOUT(PARSED(test expression))"
onRender={[Function]} onRender={[Function]}
@ -147,7 +147,7 @@ exports[`App rendering an expression 3`] = `
exports[`App rendering image details 1`] = ` exports[`App rendering image details 1`] = `
<Fragment> <Fragment>
<LoadNamespace(Form) <withI18nextTranslation(Form)
expr="test expression" expr="test expression"
onSubmit={[Function]} onSubmit={[Function]}
syntax="js" syntax="js"
@ -164,8 +164,8 @@ exports[`App rendering image details 1`] = `
] ]
} }
> >
<LoadNamespace(FormActions) /> <withI18nextTranslation(FormActions) />
</LoadNamespace(Form)> </withI18nextTranslation(Form)>
<Render <Render
data="LAYOUT(PARSED(test expression))" data="LAYOUT(PARSED(test expression))"
onRender={[Function]} onRender={[Function]}
@ -175,7 +175,7 @@ exports[`App rendering image details 1`] = `
exports[`App rendering image details 2`] = ` exports[`App rendering image details 2`] = `
<Fragment> <Fragment>
<LoadNamespace(Form) <withI18nextTranslation(Form)
expr="test expression" expr="test expression"
onSubmit={[Function]} onSubmit={[Function]}
syntax="js" syntax="js"
@ -192,14 +192,14 @@ exports[`App rendering image details 2`] = `
] ]
} }
> >
<LoadNamespace(FormActions) <withI18nextTranslation(FormActions)
imageDetails={ imageDetails={
Object { Object {
"svg": "test svg content", "svg": "test svg content",
} }
} }
/> />
</LoadNamespace(Form)> </withI18nextTranslation(Form)>
<Render <Render
data="LAYOUT(PARSED(test expression))" data="LAYOUT(PARSED(test expression))"
onRender={[Function]} onRender={[Function]}
@ -209,7 +209,7 @@ exports[`App rendering image details 2`] = `
exports[`App rendering with an invalid syntax 1`] = ` exports[`App rendering with an invalid syntax 1`] = `
<Fragment> <Fragment>
<LoadNamespace(Form) <withI18nextTranslation(Form)
expr="" expr=""
onSubmit={[Function]} onSubmit={[Function]}
syntax="invalid" syntax="invalid"
@ -231,7 +231,7 @@ exports[`App rendering with an invalid syntax 1`] = `
exports[`App rendering with an invalid syntax 2`] = ` exports[`App rendering with an invalid syntax 2`] = `
<Fragment> <Fragment>
<LoadNamespace(Form) <withI18nextTranslation(Form)
expr="test expression" expr="test expression"
onSubmit={[Function]} onSubmit={[Function]}
syntax="invalid" syntax="invalid"
@ -248,13 +248,13 @@ exports[`App rendering with an invalid syntax 2`] = `
] ]
} }
/> />
<LoadNamespace(Loader) /> <withI18nextTranslation(Loader) />
</Fragment> </Fragment>
`; `;
exports[`App rendering with an invalid syntax 3`] = ` exports[`App rendering with an invalid syntax 3`] = `
<Fragment> <Fragment>
<LoadNamespace(Form) <withI18nextTranslation(Form)
expr="test expression" expr="test expression"
onSubmit={[Function]} onSubmit={[Function]}
syntax="invalid" syntax="invalid"
@ -276,17 +276,17 @@ exports[`App rendering with an invalid syntax 3`] = `
type="error" type="error"
> >
<p> <p>
<WithMergedOptions(TransComponent)> <Trans>
An error occurred while rendering the regular expression. An error occurred while rendering the regular expression.
</WithMergedOptions(TransComponent)> </Trans>
</p> </p>
<a <a
href="#retry" href="#retry"
onClick={[Function]} onClick={[Function]}
> >
<WithMergedOptions(TransComponent)> <Trans>
Retry Retry
</WithMergedOptions(TransComponent)> </Trans>
</a> </a>
</Message> </Message>
</Fragment> </Fragment>

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { withNamespaces, Trans } from 'react-i18next'; import { withTranslation, Trans } from 'react-i18next';
import * as Sentry from '@sentry/browser'; import * as Sentry from '@sentry/browser';
import URLSearchParams from '@ungap/url-search-params'; import URLSearchParams from '@ungap/url-search-params';
@ -162,4 +162,4 @@ class App extends React.PureComponent {
} }
export { App }; export { App };
export default withNamespaces()(App); export default withTranslation()(App);

View File

@ -8,17 +8,17 @@ exports[`Footer rendering 1`] = `
className="list" className="list"
> >
<li> <li>
<WithMergedOptions(TransComponent)> <Trans>
Created by Created by
<a <a
href="mailto:jeff.avallone@gmail.com" href="mailto:jeff.avallone@gmail.com"
> >
Jeff Avallone Jeff Avallone
</a> </a>
</WithMergedOptions(TransComponent)> </Trans>
</li> </li>
<li> <li>
<WithMergedOptions(TransComponent)> <Trans>
Generated images licensed: Generated images licensed:
<a <a
href="http://creativecommons.org/licenses/by/3.0/" href="http://creativecommons.org/licenses/by/3.0/"
@ -30,7 +30,7 @@ exports[`Footer rendering 1`] = `
src="cc-by.svg" src="cc-by.svg"
/> />
</a> </a>
</WithMergedOptions(TransComponent)> </Trans>
</li> </li>
</ul> </ul>
<div <div

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { withNamespaces, Trans } from 'react-i18next'; import { withTranslation, Trans } from 'react-i18next';
import ccLogo from './cc-by.svg'; import ccLogo from './cc-by.svg';
@ -34,4 +34,4 @@ Footer.propTypes = {
buildId: PropTypes.string.isRequired buildId: PropTypes.string.isRequired
}; };
export default withNamespaces()(Footer); export default withTranslation()(Footer);

View File

@ -18,9 +18,9 @@ exports[`Form rendering 1`] = `
<button <button
type="submit" type="submit"
> >
<WithMergedOptions(TransComponent)> <Trans>
Display Display
</WithMergedOptions(TransComponent)> </Trans>
</button> </button>
<div <div
className="select" className="select"

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { withNamespaces, Trans } from 'react-i18next'; import { withTranslation, Trans } from 'react-i18next';
import ExpandIcon from 'react-feather/dist/icons/chevrons-down'; import ExpandIcon from 'react-feather/dist/icons/chevrons-down';
@ -81,4 +81,4 @@ class Form extends React.PureComponent {
} }
export { Form }; export { Form };
export default withNamespaces()(Form); export default withTranslation()(Form);

View File

@ -51,9 +51,9 @@ exports[`FormActions rendering download links with data after mounting 1`] = `
color="currentColor" color="currentColor"
size="24" size="24"
/> />
<WithMergedOptions(TransComponent)> <Trans>
Permalink Permalink
</WithMergedOptions(TransComponent)> </Trans>
</a> </a>
</li> </li>
</ul> </ul>
@ -97,9 +97,9 @@ exports[`FormActions rendering download links with data after mounting 2`] = `
color="currentColor" color="currentColor"
size="24" size="24"
/> />
<WithMergedOptions(TransComponent)> <Trans>
Permalink Permalink
</WithMergedOptions(TransComponent)> </Trans>
</a> </a>
</li> </li>
</ul> </ul>
@ -143,9 +143,9 @@ exports[`FormActions rendering download links with data after mounting 3`] = `
color="currentColor" color="currentColor"
size="24" size="24"
/> />
<WithMergedOptions(TransComponent)> <Trans>
Permalink Permalink
</WithMergedOptions(TransComponent)> </Trans>
</a> </a>
</li> </li>
</ul> </ul>
@ -163,9 +163,9 @@ exports[`FormActions rendering with a permalink 1`] = `
color="currentColor" color="currentColor"
size="24" size="24"
/> />
<WithMergedOptions(TransComponent)> <Trans>
Permalink Permalink
</WithMergedOptions(TransComponent)> </Trans>
</a> </a>
</li> </li>
</ul> </ul>

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { withNamespaces, Trans } from 'react-i18next'; import { withTranslation, Trans } from 'react-i18next';
import DownloadIcon from 'react-feather/dist/icons/download'; import DownloadIcon from 'react-feather/dist/icons/download';
import LinkIcon from 'react-feather/dist/icons/link'; import LinkIcon from 'react-feather/dist/icons/link';
@ -94,4 +94,4 @@ class FormActions extends React.PureComponent {
} }
export { FormActions }; export { FormActions };
export default withNamespaces()(FormActions); export default withTranslation()(FormActions);

View File

@ -16,7 +16,7 @@ exports[`Header closing the Privacy Policy modal 1`] = `
shouldFocusAfterRender={true} shouldFocusAfterRender={true}
shouldReturnFocusAfterClose={true} shouldReturnFocusAfterClose={true}
> >
<LoadNamespace(PrivacyPolicy) <withI18nextTranslation(PrivacyPolicy)
onClose={[Function]} onClose={[Function]}
/> />
</Modal> </Modal>
@ -44,9 +44,9 @@ exports[`Header closing the Privacy Policy modal 1`] = `
color="currentColor" color="currentColor"
size="24" size="24"
/> />
<WithMergedOptions(TransComponent)> <Trans>
Source on GitLab Source on GitLab
</WithMergedOptions(TransComponent)> </Trans>
</a> </a>
</li> </li>
<li> <li>
@ -54,18 +54,18 @@ exports[`Header closing the Privacy Policy modal 1`] = `
onClick={[Function]} onClick={[Function]}
to="/privacy" to="/privacy"
> >
<WithMergedOptions(TransComponent)> <Trans>
Privacy Policy Privacy Policy
</WithMergedOptions(TransComponent)> </Trans>
</mockConstructor> </mockConstructor>
</li> </li>
<li> <li>
<LoadNamespace(InstallPrompt) /> <withI18nextTranslation(InstallPrompt) />
</li> </li>
<li <li
data-requires-js={true} data-requires-js={true}
> >
<LoadNamespace(LocaleSwitcher) /> <withI18nextTranslation(LocaleSwitcher) />
</li> </li>
</ul> </ul>
</header> </header>
@ -88,7 +88,7 @@ exports[`Header closing the Privacy Policy modal 2`] = `
shouldFocusAfterRender={true} shouldFocusAfterRender={true}
shouldReturnFocusAfterClose={true} shouldReturnFocusAfterClose={true}
> >
<LoadNamespace(PrivacyPolicy) <withI18nextTranslation(PrivacyPolicy)
onClose={[Function]} onClose={[Function]}
/> />
</Modal> </Modal>
@ -116,9 +116,9 @@ exports[`Header closing the Privacy Policy modal 2`] = `
color="currentColor" color="currentColor"
size="24" size="24"
/> />
<WithMergedOptions(TransComponent)> <Trans>
Source on GitLab Source on GitLab
</WithMergedOptions(TransComponent)> </Trans>
</a> </a>
</li> </li>
<li> <li>
@ -126,18 +126,18 @@ exports[`Header closing the Privacy Policy modal 2`] = `
onClick={[Function]} onClick={[Function]}
to="/privacy" to="/privacy"
> >
<WithMergedOptions(TransComponent)> <Trans>
Privacy Policy Privacy Policy
</WithMergedOptions(TransComponent)> </Trans>
</mockConstructor> </mockConstructor>
</li> </li>
<li> <li>
<LoadNamespace(InstallPrompt) /> <withI18nextTranslation(InstallPrompt) />
</li> </li>
<li <li
data-requires-js={true} data-requires-js={true}
> >
<LoadNamespace(LocaleSwitcher) /> <withI18nextTranslation(LocaleSwitcher) />
</li> </li>
</ul> </ul>
</header> </header>
@ -160,7 +160,7 @@ exports[`Header opening the Privacy Policy modal 1`] = `
shouldFocusAfterRender={true} shouldFocusAfterRender={true}
shouldReturnFocusAfterClose={true} shouldReturnFocusAfterClose={true}
> >
<LoadNamespace(PrivacyPolicy) <withI18nextTranslation(PrivacyPolicy)
onClose={[Function]} onClose={[Function]}
/> />
</Modal> </Modal>
@ -188,9 +188,9 @@ exports[`Header opening the Privacy Policy modal 1`] = `
color="currentColor" color="currentColor"
size="24" size="24"
/> />
<WithMergedOptions(TransComponent)> <Trans>
Source on GitLab Source on GitLab
</WithMergedOptions(TransComponent)> </Trans>
</a> </a>
</li> </li>
<li> <li>
@ -198,18 +198,18 @@ exports[`Header opening the Privacy Policy modal 1`] = `
onClick={[Function]} onClick={[Function]}
to="/privacy" to="/privacy"
> >
<WithMergedOptions(TransComponent)> <Trans>
Privacy Policy Privacy Policy
</WithMergedOptions(TransComponent)> </Trans>
</mockConstructor> </mockConstructor>
</li> </li>
<li> <li>
<LoadNamespace(InstallPrompt) /> <withI18nextTranslation(InstallPrompt) />
</li> </li>
<li <li
data-requires-js={true} data-requires-js={true}
> >
<LoadNamespace(LocaleSwitcher) /> <withI18nextTranslation(LocaleSwitcher) />
</li> </li>
</ul> </ul>
</header> </header>
@ -232,7 +232,7 @@ exports[`Header rendering 1`] = `
shouldFocusAfterRender={true} shouldFocusAfterRender={true}
shouldReturnFocusAfterClose={true} shouldReturnFocusAfterClose={true}
> >
<LoadNamespace(PrivacyPolicy) <withI18nextTranslation(PrivacyPolicy)
onClose={[Function]} onClose={[Function]}
/> />
</Modal> </Modal>
@ -260,9 +260,9 @@ exports[`Header rendering 1`] = `
color="currentColor" color="currentColor"
size="24" size="24"
/> />
<WithMergedOptions(TransComponent)> <Trans>
Source on GitLab Source on GitLab
</WithMergedOptions(TransComponent)> </Trans>
</a> </a>
</li> </li>
<li> <li>
@ -270,18 +270,18 @@ exports[`Header rendering 1`] = `
onClick={[Function]} onClick={[Function]}
to="/privacy" to="/privacy"
> >
<WithMergedOptions(TransComponent)> <Trans>
Privacy Policy Privacy Policy
</WithMergedOptions(TransComponent)> </Trans>
</mockConstructor> </mockConstructor>
</li> </li>
<li> <li>
<LoadNamespace(InstallPrompt) /> <withI18nextTranslation(InstallPrompt) />
</li> </li>
<li <li
data-requires-js={true} data-requires-js={true}
> >
<LoadNamespace(LocaleSwitcher) /> <withI18nextTranslation(LocaleSwitcher) />
</li> </li>
</ul> </ul>
</header> </header>
@ -304,7 +304,7 @@ exports[`Header rendering with no banner 1`] = `
shouldFocusAfterRender={true} shouldFocusAfterRender={true}
shouldReturnFocusAfterClose={true} shouldReturnFocusAfterClose={true}
> >
<LoadNamespace(PrivacyPolicy) <withI18nextTranslation(PrivacyPolicy)
onClose={[Function]} onClose={[Function]}
/> />
</Modal> </Modal>
@ -332,9 +332,9 @@ exports[`Header rendering with no banner 1`] = `
color="currentColor" color="currentColor"
size="24" size="24"
/> />
<WithMergedOptions(TransComponent)> <Trans>
Source on GitLab Source on GitLab
</WithMergedOptions(TransComponent)> </Trans>
</a> </a>
</li> </li>
<li> <li>
@ -342,18 +342,18 @@ exports[`Header rendering with no banner 1`] = `
onClick={[Function]} onClick={[Function]}
to="/privacy" to="/privacy"
> >
<WithMergedOptions(TransComponent)> <Trans>
Privacy Policy Privacy Policy
</WithMergedOptions(TransComponent)> </Trans>
</mockConstructor> </mockConstructor>
</li> </li>
<li> <li>
<LoadNamespace(InstallPrompt) /> <withI18nextTranslation(InstallPrompt) />
</li> </li>
<li <li
data-requires-js={true} data-requires-js={true}
> >
<LoadNamespace(LocaleSwitcher) /> <withI18nextTranslation(LocaleSwitcher) />
</li> </li>
</ul> </ul>
</header> </header>

View File

@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import Modal from 'react-modal'; import Modal from 'react-modal';
import { Link } from 'gatsby'; import { Link } from 'gatsby';
import { withNamespaces, Trans } from 'react-i18next'; import { withTranslation, Trans } from 'react-i18next';
import GitlabIcon from 'react-feather/dist/icons/gitlab'; import GitlabIcon from 'react-feather/dist/icons/gitlab';
@ -81,4 +81,4 @@ class Header extends React.PureComponent {
} }
export { Header }; export { Header };
export default withNamespaces()(Header); export default withTranslation()(Header);

View File

@ -9,8 +9,8 @@ exports[`InstallPrompt rendering after an install prompt has been requested 2`]
href="#install" href="#install"
onClick={[Function]} onClick={[Function]}
> >
<WithMergedOptions(TransComponent)> <Trans>
Add to Home Screen Add to Home Screen
</WithMergedOptions(TransComponent)> </Trans>
</a> </a>
`; `;

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { withNamespaces, Trans } from 'react-i18next'; import { withTranslation, Trans } from 'react-i18next';
class InstallPrompt extends React.PureComponent { class InstallPrompt extends React.PureComponent {
state = { state = {
@ -50,4 +50,4 @@ class InstallPrompt extends React.PureComponent {
} }
export { InstallPrompt }; export { InstallPrompt };
export default withNamespaces()(InstallPrompt); export default withTranslation()(InstallPrompt);

View File

@ -13,13 +13,13 @@ exports[`Layout rendering 1`] = `
</style> </style>
</noscript> </noscript>
<LoadNamespace(Header) <withI18nextTranslation(Header)
banner="Test Banner" banner="Test Banner"
/> />
<SentryBoundary> <SentryBoundary>
Example content Example content
</SentryBoundary> </SentryBoundary>
<LoadNamespace(Footer) <withI18nextTranslation(Footer)
buildId="test-buildid" buildId="test-buildid"
/> />
</SentryBoundary> </SentryBoundary>

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { withNamespaces } from 'react-i18next'; import { withTranslation } from 'react-i18next';
import LoaderIcon from 'react-feather/dist/icons/loader'; import LoaderIcon from 'react-feather/dist/icons/loader';
@ -18,4 +18,4 @@ Loader.propTypes = {
}; };
export { Loader }; export { Loader };
export default withNamespaces()(Loader); export default withTranslation()(Loader);

View File

@ -2,9 +2,9 @@
exports[`LocaleSwitcher rendering 1`] = ` exports[`LocaleSwitcher rendering 1`] = `
<label> <label>
<WithMergedOptions(TransComponent)> <Trans>
Language Language
</WithMergedOptions(TransComponent)> </Trans>
<div <div
className="switcher" className="switcher"
> >

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import { withNamespaces, Trans } from 'react-i18next'; import { withTranslation, Trans } from 'react-i18next';
import ExpandIcon from 'react-feather/dist/icons/chevrons-down'; import ExpandIcon from 'react-feather/dist/icons/chevrons-down';
@ -51,4 +51,4 @@ export class LocaleSwitcher extends React.PureComponent {
} }
} }
export default withNamespaces()(LocaleSwitcher); export default withTranslation()(LocaleSwitcher);

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { withNamespaces } from 'react-i18next'; import { withTranslation } from 'react-i18next';
import { Helmet } from 'react-helmet'; import { Helmet } from 'react-helmet';
class Metadata extends React.PureComponent { class Metadata extends React.PureComponent {
@ -26,4 +26,4 @@ class Metadata extends React.PureComponent {
} }
export { Metadata }; export { Metadata };
export default withNamespaces()(Metadata); export default withTranslation()(Metadata);

View File

@ -6,7 +6,7 @@ exports[`PrivacyPolicy rendering 1`] = `
onClose={[MockFunction]} onClose={[MockFunction]}
type="info" type="info"
> >
<WithMergedOptions(TransComponent) <Trans
i18nKey="Privacy policy copy" i18nKey="Privacy policy copy"
> >
<p> <p>
@ -51,6 +51,6 @@ exports[`PrivacyPolicy rendering 1`] = `
<p> <p>
Regexper is not supported by ad revenue or sales of any kind. Regexper is not supported by ad revenue or sales of any kind.
</p> </p>
</WithMergedOptions(TransComponent)> </Trans>
</Message> </Message>
`; `;

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { withNamespaces, Trans } from 'react-i18next'; import { withTranslation, Trans } from 'react-i18next';
import Message from 'components/Message'; import Message from 'components/Message';
@ -51,4 +51,4 @@ PrivacyPolicy.propTypes = {
t: PropTypes.func.isRequired t: PropTypes.func.isRequired
}; };
export default withNamespaces()(PrivacyPolicy); export default withTranslation()(PrivacyPolicy);

View File

@ -2,6 +2,6 @@
exports[`SentryBoundary error handling 1`] = `<Child />`; exports[`SentryBoundary error handling 1`] = `<Child />`;
exports[`SentryBoundary error handling 2`] = `<LoadNamespace(SentryError) />`; exports[`SentryBoundary error handling 2`] = `<withI18nextTranslation(SentryError) />`;
exports[`SentryBoundary rendering 1`] = `"Example content"`; exports[`SentryBoundary rendering 1`] = `"Example content"`;

View File

@ -6,7 +6,7 @@ exports[`SentryError rendering 1`] = `
type="error" type="error"
> >
<p> <p>
<WithMergedOptions(TransComponent)> <Trans>
This error has been logged. You may also This error has been logged. You may also
<a <a
href="#error-report" href="#error-report"
@ -15,7 +15,7 @@ exports[`SentryError rendering 1`] = `
fill out a report fill out a report
</a> </a>
. .
</WithMergedOptions(TransComponent)> </Trans>
</p> </p>
</Message> </Message>
`; `;

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import * as Sentry from '@sentry/browser'; import * as Sentry from '@sentry/browser';
import { withNamespaces, Trans } from 'react-i18next'; import { withTranslation, Trans } from 'react-i18next';
import Message from 'components/Message'; import Message from 'components/Message';
@ -26,4 +26,4 @@ SentryError.propTypes = {
t: PropTypes.func.isRequired t: PropTypes.func.isRequired
}; };
export default withNamespaces()(SentryError); export default withTranslation()(SentryError);

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { withNamespaces, Trans } from 'react-i18next'; import { withTranslation, Trans } from 'react-i18next';
import Metadata from 'components/Metadata'; import Metadata from 'components/Metadata';
import Message from 'components/Message'; import Message from 'components/Message';
@ -16,4 +16,4 @@ ErrorPage.propTypes = {
t: PropTypes.func.isRequired t: PropTypes.func.isRequired
}; };
export default withNamespaces()(ErrorPage); export default withTranslation()(ErrorPage);

View File

@ -2,7 +2,7 @@
exports[`Error Page rendering 1`] = ` exports[`Error Page rendering 1`] = `
<Fragment> <Fragment>
<LoadNamespace(Metadata) <withI18nextTranslation(Metadata)
title="TRANSLATE(Page Not Found)" title="TRANSLATE(Page Not Found)"
/> />
<Message <Message
@ -10,9 +10,9 @@ exports[`Error Page rendering 1`] = `
type="error" type="error"
> >
<p> <p>
<WithMergedOptions(TransComponent)> <Trans>
The page you have requested could not be found. The page you have requested could not be found.
</WithMergedOptions(TransComponent)> </Trans>
</p> </p>
</Message> </Message>
</Fragment> </Fragment>

View File

@ -2,7 +2,7 @@
exports[`Index Page rendering 1`] = ` exports[`Index Page rendering 1`] = `
<Fragment> <Fragment>
<LoadNamespace(Metadata) <withI18nextTranslation(Metadata)
description="Test description" description="Test description"
/> />
<noscript> <noscript>
@ -24,7 +24,7 @@ exports[`Index Page rendering 1`] = `
</p> </p>
</Message> </Message>
</noscript> </noscript>
<LoadNamespace(App) <withI18nextTranslation(App)
expr="" expr=""
permalinkUrl={null} permalinkUrl={null}
syntax="testJs" syntax="testJs"
@ -46,7 +46,7 @@ exports[`Index Page rendering 1`] = `
exports[`Index Page rendering with an expression on the URL 1`] = ` exports[`Index Page rendering with an expression on the URL 1`] = `
<Fragment> <Fragment>
<LoadNamespace(Metadata) <withI18nextTranslation(Metadata)
description="Test description" description="Test description"
/> />
<noscript> <noscript>
@ -68,7 +68,7 @@ exports[`Index Page rendering with an expression on the URL 1`] = `
</p> </p>
</Message> </Message>
</noscript> </noscript>
<LoadNamespace(App) <withI18nextTranslation(App)
expr="testing" expr="testing"
permalinkUrl="http://example.com" permalinkUrl="http://example.com"
syntax="test" syntax="test"

View File

@ -2,9 +2,9 @@
exports[`Privacy Page rendering 1`] = ` exports[`Privacy Page rendering 1`] = `
<Fragment> <Fragment>
<LoadNamespace(Metadata) <withI18nextTranslation(Metadata)
title="TRANSLATE(Privacy Policy)" title="TRANSLATE(Privacy Policy)"
/> />
<LoadNamespace(PrivacyPolicy) /> <withI18nextTranslation(PrivacyPolicy) />
</Fragment> </Fragment>
`; `;

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { withNamespaces } from 'react-i18next'; import { withTranslation } from 'react-i18next';
import Metadata from 'components/Metadata'; import Metadata from 'components/Metadata';
import PrivacyPolicy from 'components/PrivacyPolicy'; import PrivacyPolicy from 'components/PrivacyPolicy';
@ -14,4 +14,4 @@ PrivacyPage.propTypes = {
t: PropTypes.func.isRequired t: PropTypes.func.isRequired
}; };
export default withNamespaces()(PrivacyPage); export default withTranslation()(PrivacyPage);

4558
yarn.lock

File diff suppressed because it is too large Load Diff