diff --git a/demo/client/components.js b/demo/client/components.js deleted file mode 100644 index 39aa96cf65..0000000000 --- a/demo/client/components.js +++ /dev/null @@ -1,9 +0,0 @@ -import PageList from '../collections/Page/components/List'; - -const components = { - pages: { - List: PageList, - }, -}; - -export default components; diff --git a/demo/collections/CustomComponents/components/fields/Description/Filter/index.js b/demo/collections/CustomComponents/components/fields/Description/Filter/index.js index 01bca27921..4c45183724 100644 --- a/demo/collections/CustomComponents/components/fields/Description/Filter/index.js +++ b/demo/collections/CustomComponents/components/fields/Description/Filter/index.js @@ -3,16 +3,14 @@ import PropTypes from 'prop-types'; import './index.scss'; -const Filter = ({ onChange, value }) => { - return ( - onChange(e.target.value)} - value={value} - /> - ); -}; +const Filter = ({ onChange, value }) => ( + onChange(e.target.value)} + value={value} + /> +); Filter.defaultProps = { value: '', diff --git a/demo/collections/CustomComponents/components/views/List/index.js b/demo/collections/CustomComponents/components/views/List/index.js index a63ea17ba4..9f1c88abcb 100644 --- a/demo/collections/CustomComponents/components/views/List/index.js +++ b/demo/collections/CustomComponents/components/views/List/index.js @@ -4,15 +4,13 @@ import DefaultList from '../../../../../../src/client/components/views/collectio import './index.scss'; -const CustomListView = (props) => { - return ( -
-

This is a custom Pages list view

-

Sup

- -
- ); -}; +const CustomListView = (props) => ( +
+

This is a custom Pages list view

+

Sup

+ +
+); CustomListView.propTypes = { collection: PropTypes.shape({ diff --git a/demo/collections/CustomComponents/index.js b/demo/collections/CustomComponents/index.js index 92c8c8bac0..e25091d65a 100644 --- a/demo/collections/CustomComponents/index.js +++ b/demo/collections/CustomComponents/index.js @@ -1,3 +1,12 @@ +const DescriptionField = require('./components/fields/Description/Field'); +const DescriptionCell = require('./components/fields/Description/Cell'); +const DescriptionFilter = require('./components/fields/Description/Filter'); +const NestedArrayField = require('./components/fields/NestedArrayCustomField/Field'); +const GroupField = require('./components/fields/Group/Field'); +const NestedGroupField = require('./components/fields/NestedGroupCustomField/Field'); +const NestedText1Field = require('./components/fields/NestedText1/Field'); +const ListView = require('./components/views/List'); + module.exports = { slug: 'custom-components', labels: { @@ -23,9 +32,9 @@ module.exports = { localized: true, admin: { components: { - field: 'collections/CustomComponents/components/fields/Description/Field/index.js', - cell: 'collections/CustomComponents/components/fields/Description/Cell/index.js', - filter: 'collections/CustomComponents/components/fields/Description/Filter/index.js', + field: DescriptionField, + cell: DescriptionCell, + filter: DescriptionFilter, }, }, }, @@ -40,7 +49,7 @@ module.exports = { label: 'Nested Array Custom Field', admin: { components: { - field: 'collections/CustomComponents/components/fields/NestedArrayCustomField/Field/index.js', + field: NestedArrayField, }, }, }, @@ -52,7 +61,7 @@ module.exports = { type: 'group', admin: { components: { - field: 'collections/CustomComponents/components/fields/Group/Field/index.js', + field: GroupField, }, }, fields: [ @@ -62,7 +71,7 @@ module.exports = { label: 'Nested Group Custom Field', admin: { components: { - field: 'collections/CustomComponents/components/fields/NestedGroupCustomField/Field/index.js', + field: NestedGroupField, }, }, }, @@ -77,7 +86,7 @@ module.exports = { type: 'text', admin: { components: { - field: 'collections/CustomComponents/components/fields/NestedText1/Field/index.js', + field: NestedText1Field, }, }, }, { @@ -93,7 +102,7 @@ module.exports = { useAsTitle: 'title', components: { views: { - List: 'collections/CustomComponents/components/views/List/index.js', + List: ListView, }, }, }, diff --git a/demo/collections/RichText.js b/demo/collections/RichText.js index 4164181b9b..be5e297fd2 100644 --- a/demo/collections/RichText.js +++ b/demo/collections/RichText.js @@ -1,3 +1,8 @@ +const ButtonToolbarButton = require('../client/components/richText/elements/Button/Button'); +const ButtonElement = require('../client/components/richText/elements/Button/Element'); +const StrikethroughButton = require('../client/components/richText/leaves/Strikethrough/Button'); +const StrikethroughLeaf = require('../client/components/richText/leaves/Strikethrough/Leaf'); + const RichText = { slug: 'rich-text', labels: { @@ -17,8 +22,8 @@ const RichText = { // 'h3', { name: 'button', - button: 'client/components/richText/elements/Button/Button', - element: 'client/components/richText/elements/Button/Element', + button: ButtonToolbarButton, + element: ButtonElement, }, // 'blockquote', 'ul', @@ -29,8 +34,8 @@ const RichText = { 'italic', { name: 'strikethrough', - button: 'client/components/richText/leaves/Strikethrough/Button', - leaf: 'client/components/richText/leaves/Strikethrough/Leaf', + button: StrikethroughButton, + leaf: StrikethroughLeaf, }, ], }, diff --git a/demo/payload.config.js b/demo/payload.config.js index c3ccb639f7..d22da1d3d6 100644 --- a/demo/payload.config.js +++ b/demo/payload.config.js @@ -37,7 +37,9 @@ module.exports = { disable: false, components: { layout: { - // Sidebar: 'client/components/layout/Sidebar/index.js', + // Sidebar: () => ( + //
Hello
+ // ), }, }, }, diff --git a/package.json b/package.json index 9b20fa745e..ad86ceb14f 100644 --- a/package.json +++ b/package.json @@ -19,10 +19,12 @@ "test:unit": "cross-env PAYLOAD_CONFIG_PATH=demo/payload.config.js NODE_ENV=test jest" }, "dependencies": { + "@babel/core": "^7.11.6", "@babel/plugin-proposal-class-properties": "^7.8.3", "@babel/plugin-proposal-optional-chaining": "^7.8.3", "@babel/preset-env": "^7.8.3", "@babel/preset-react": "^7.8.3", + "@babel/register": "^7.11.5", "@date-io/date-fns": "^1.3.13", "@faceless-ui/collapsibles": "^0.1.0", "@faceless-ui/modal": "^1.0.4", @@ -31,8 +33,9 @@ "@udecode/slate-plugins": "^0.64.3", "async-some": "^1.0.2", "autoprefixer": "^9.7.4", - "babel-core": "^7.0.0-bridge.0", "babel-loader": "^8.0.6", + "babel-plugin-add-module-exports": "^1.0.4", + "babel-plugin-module-resolver": "^4.0.0", "body-parser": "^1.19.0", "compression": "^1.7.4", "connect-history-api-fallback": "^1.6.0", @@ -55,6 +58,7 @@ "graphql-type-json": "^0.3.1", "html-webpack-plugin": "^3.2.0", "http-status": "^1.4.2", + "ignore-styles": "^5.0.1", "image-size": "^0.7.5", "is-hotkey": "^0.1.6", "isomorphic-fetch": "^2.2.1", @@ -110,7 +114,7 @@ "style-loader": "^0.21.0", "url-loader": "^1.0.1", "uuid": "^8.1.0", - "val-loader": "^2.1.0", + "val-loader": "^2.1.1", "webpack": "^4.43.0", "webpack-bundle-analyzer": "^3.8.0", "webpack-dev-middleware": "^3.7.2", diff --git a/src/client/components/Routes.js b/src/client/components/Routes.js index e59f40f0d8..1523d8673c 100644 --- a/src/client/components/Routes.js +++ b/src/client/components/Routes.js @@ -2,9 +2,9 @@ import React, { useState, useEffect } from 'react'; import { Route, Switch, withRouter, Redirect, useHistory, } from 'react-router-dom'; -import config from 'payload/config'; +import { useConfig } from './providers/Config'; import List from './views/collections/List'; -import { useUser } from './data/User'; +import { useAuthentication } from './providers/Authentication'; import DefaultTemplate from './templates/Default'; import Dashboard from './views/Dashboard'; import ForgotPassword from './views/ForgotPassword'; @@ -20,14 +20,14 @@ import Unauthorized from './views/Unauthorized'; import Account from './views/Account'; import Loading from './elements/Loading'; -const { - admin: { user: userSlug }, routes, collections, globals, -} = config; - const Routes = () => { const history = useHistory(); const [initialized, setInitialized] = useState(null); - const { user, permissions, permissions: { canAccessAdmin } } = useUser(); + const { user, permissions, permissions: { canAccessAdmin } } = useAuthentication(); + + const { + admin: { user: userSlug }, routes, collections, globals, + } = useConfig(); useEffect(() => { requests.get(`${routes.api}/${userSlug}/init`).then((res) => res.json().then((data) => { @@ -35,7 +35,7 @@ const Routes = () => { setInitialized(data.initialized); } })); - }, []); + }, [routes, userSlug]); useEffect(() => { history.replace(); diff --git a/src/client/components/elements/DeleteDocument/index.js b/src/client/components/elements/DeleteDocument/index.js index a21b98a4f1..351360ea34 100644 --- a/src/client/components/elements/DeleteDocument/index.js +++ b/src/client/components/elements/DeleteDocument/index.js @@ -1,8 +1,8 @@ import React, { useState, useCallback } from 'react'; import PropTypes from 'prop-types'; -import config from 'payload/config'; import { useHistory } from 'react-router-dom'; import { Modal, useModal } from '@faceless-ui/modal'; +import { useConfig } from '../../providers/Config'; import Button from '../Button'; import MinimalTemplate from '../../templates/Minimal'; import useTitle from '../../../hooks/useTitle'; @@ -11,8 +11,6 @@ import { useStatusList } from '../Status'; import './index.scss'; -const { serverURL, routes: { api, admin } } = config; - const baseClass = 'delete-document'; const DeleteDocument = (props) => { @@ -30,6 +28,7 @@ const DeleteDocument = (props) => { } = {}, } = props; + const { serverURL, routes: { api, admin } } = useConfig(); const { replaceStatus } = useStatusList(); const [deleting, setDeleting] = useState(false); const { closeAll, toggle } = useModal(); @@ -78,7 +77,7 @@ const DeleteDocument = (props) => { return addDefaultError(); } }); - }, [addDefaultError, closeAll, history, id, replaceStatus, singular, slug, title]); + }, [addDefaultError, closeAll, history, id, replaceStatus, singular, slug, title, admin, api, serverURL]); if (id) { return ( diff --git a/src/client/components/elements/DuplicateDocument/index.js b/src/client/components/elements/DuplicateDocument/index.js index 6a1ed11b65..65402605ae 100644 --- a/src/client/components/elements/DuplicateDocument/index.js +++ b/src/client/components/elements/DuplicateDocument/index.js @@ -1,19 +1,18 @@ import React, { useCallback } from 'react'; import PropTypes from 'prop-types'; import { useHistory } from 'react-router-dom'; -import config from 'payload/config'; +import { useConfig } from '../../providers/Config'; import Button from '../Button'; import { useForm } from '../../forms/Form/context'; import './index.scss'; -const { routes: { admin } } = config; - const baseClass = 'duplicate'; const Duplicate = ({ slug }) => { const { push } = useHistory(); const { getData } = useForm(); + const { routes: { admin } } = useConfig(); const handleClick = useCallback(() => { const data = getData(); @@ -24,7 +23,7 @@ const Duplicate = ({ slug }) => { data, }, }); - }, [push, getData, slug]); + }, [push, getData, slug, admin]); return ( + + ); +}; -const Unauthorized = () => ( - - -

You are not allowed to access this page.

-
- -
-); export default Unauthorized; diff --git a/src/client/components/views/collections/Edit/Default.js b/src/client/components/views/collections/Edit/Default.js index a546f118bb..0db135560b 100644 --- a/src/client/components/views/collections/Edit/Default.js +++ b/src/client/components/views/collections/Edit/Default.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Link, useRouteMatch } from 'react-router-dom'; import format from 'date-fns/format'; -import config from 'payload/config'; +import { useConfig } from '../../../providers/Config'; import Eyebrow from '../../../elements/Eyebrow'; import Form from '../../../forms/Form'; import Loading from '../../../elements/Loading'; @@ -21,12 +21,11 @@ import Upload from './Upload'; import './index.scss'; -const { routes: { admin } } = config; - const baseClass = 'collection-edit'; const DefaultEditView = (props) => { const { params: { id } = {} } = useRouteMatch(); + const { routes: { admin } } = useConfig(); const { collection, @@ -108,7 +107,6 @@ const DefaultEditView = (props) => { filter={(field) => (!field?.admin?.position || (field?.admin?.position !== 'sidebar'))} fieldTypes={fieldTypes} fieldSchema={fields} - customComponentsPath={`${slug}.fields.`} /> )} @@ -171,7 +169,6 @@ const DefaultEditView = (props) => { position="sidebar" fieldTypes={fieldTypes} fieldSchema={fields} - customComponentsPath={`${slug}.fields.`} /> {isEditing && ( diff --git a/src/client/components/views/collections/Edit/index.js b/src/client/components/views/collections/Edit/index.js index 9a7ff7cfbf..f77fdd3a7d 100644 --- a/src/client/components/views/collections/Edit/index.js +++ b/src/client/components/views/collections/Edit/index.js @@ -1,17 +1,15 @@ import React, { useState, useEffect } from 'react'; import PropTypes from 'prop-types'; import { Redirect, useRouteMatch, useHistory, useLocation } from 'react-router-dom'; -import config from 'payload/config'; +import { useConfig } from '../../../providers/Config'; import { useStepNav } from '../../../elements/StepNav'; import usePayloadAPI from '../../../../hooks/usePayloadAPI'; -import { useUser } from '../../../data/User'; +import { useAuthentication } from '../../../providers/Authentication'; import RenderCustomComponent from '../../../utilities/RenderCustomComponent'; import DefaultEdit from './Default'; import buildStateFromSchema from '../../../forms/Form/buildStateFromSchema'; -const { serverURL, routes: { admin, api } } = config; - const EditView = (props) => { const { collection, isEditing } = props; @@ -22,16 +20,22 @@ const EditView = (props) => { }, admin: { useAsTitle, + components: { + views: { + edit: CustomEdit, + } = {}, + } = {}, }, fields, } = collection; + const { serverURL, routes: { admin, api } } = useConfig(); const { params: { id } = {} } = useRouteMatch(); const { state: locationState } = useLocation(); const history = useHistory(); const { setStepNav } = useStepNav(); const [initialState, setInitialState] = useState({}); - const { permissions } = useUser(); + const { permissions } = useAuthentication(); const onSave = (json) => { history.push(`${admin}/collections/${collection.slug}/${json?.doc?.id}`, { @@ -95,7 +99,7 @@ const EditView = (props) => { return ( { const { field, cellData } = props; const { relationTo } = field; - + const { collections } = useConfig(); const [data, setData] = useState(); useEffect(() => { diff --git a/src/client/components/views/collections/List/Cell/index.js b/src/client/components/views/collections/List/Cell/index.js index 0112a5375b..a0601a9e59 100644 --- a/src/client/components/views/collections/List/Cell/index.js +++ b/src/client/components/views/collections/List/Cell/index.js @@ -2,13 +2,11 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import format from 'date-fns/format'; -import config from 'payload/config'; +import { useConfig } from '../../../../providers/Config'; import RenderCustomComponent from '../../../../utilities/RenderCustomComponent'; import Thumbnail from '../../../../elements/Thumbnail'; import Relationship from './Relationship'; -const { routes: { admin } } = config; - const DefaultCell = (props) => { const { field, @@ -29,6 +27,8 @@ const DefaultCell = (props) => { } = {}, } = props; + const { routes: { admin } } = useConfig(); + let WrapElement = 'span'; const wrapElementProps = {}; @@ -89,14 +89,15 @@ const Cell = (props) => { const { colIndex, collection, - collection: { - slug, - }, cellData, rowData, field, field: { - name, + admin: { + components: { + cell: CustomCell, + } = {}, + } = {}, }, } = props; @@ -109,7 +110,7 @@ const Cell = (props) => { collection, field, }} - path={`${slug}.fields.${name}.cell`} + CustomComponent={CustomCell} DefaultComponent={DefaultCell} /> ); @@ -141,6 +142,11 @@ const propTypes = { field: PropTypes.shape({ name: PropTypes.string, type: PropTypes.string, + admin: PropTypes.shape({ + components: PropTypes.shape({ + cell: PropTypes.func, + }), + }), }).isRequired, }; diff --git a/src/client/components/views/collections/List/Default.js b/src/client/components/views/collections/List/Default.js index 4134f42b3c..f9ac46bec2 100644 --- a/src/client/components/views/collections/List/Default.js +++ b/src/client/components/views/collections/List/Default.js @@ -1,7 +1,7 @@ import React from 'react'; import { useHistory } from 'react-router-dom'; import PropTypes from 'prop-types'; -import config from 'payload/config'; +import { useConfig } from '../../../providers/Config'; import UploadGallery from '../../../elements/UploadGallery'; import Eyebrow from '../../../elements/Eyebrow'; import Paginator from '../../../elements/Paginator'; @@ -13,8 +13,6 @@ import Meta from '../../../utilities/Meta'; import './index.scss'; -const { routes: { admin } } = config; - const baseClass = 'collection-list'; const DefaultList = (props) => { @@ -35,6 +33,7 @@ const DefaultList = (props) => { hasCreatePermission, } = props; + const { routes: { admin } } = useConfig(); const history = useHistory(); return ( diff --git a/src/client/components/views/collections/List/index.js b/src/client/components/views/collections/List/index.js index 773a21bfbb..8c2197cd61 100644 --- a/src/client/components/views/collections/List/index.js +++ b/src/client/components/views/collections/List/index.js @@ -2,8 +2,8 @@ import React, { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; import queryString from 'qs'; import { useLocation } from 'react-router-dom'; -import config from 'payload/config'; -import { useUser } from '../../../data/User'; +import { useConfig } from '../../../providers/Config'; +import { useAuthentication } from '../../../providers/Authentication'; import usePayloadAPI from '../../../../hooks/usePayloadAPI'; import DefaultList from './Default'; import RenderCustomComponent from '../../../utilities/RenderCustomComponent'; @@ -11,8 +11,6 @@ import { useStepNav } from '../../../elements/StepNav'; import formatFields from './formatFields'; import buildColumns from './buildColumns'; -const { serverURL, routes: { api, admin } } = config; - const ListView = (props) => { const { collection, @@ -24,7 +22,8 @@ const ListView = (props) => { }, } = props; - const { permissions } = useUser(); + const { serverURL, routes: { api, admin } } = useConfig(); + const { permissions } = useAuthentication(); const location = useLocation(); const { setStepNav } = useStepNav(); diff --git a/src/client/config.js b/src/client/config.js deleted file mode 100644 index 112f804564..0000000000 --- a/src/client/config.js +++ /dev/null @@ -1,6 +0,0 @@ -import config from 'payload/unsanitizedConfig'; -import sanitizeConfig from '../utilities/sanitizeConfig'; - -const sanitizedConfig = sanitizeConfig(config); - -export default sanitizedConfig; diff --git a/src/utilities/getConfig.js b/src/utilities/getConfig.js index 7222235a38..f872d2a99d 100644 --- a/src/utilities/getConfig.js +++ b/src/utilities/getConfig.js @@ -1,7 +1,42 @@ -const findConfig = require('./findConfig'); - /* eslint-disable import/no-dynamic-require */ /* eslint-disable global-require */ +const findConfig = require('./findConfig'); + +const configPath = findConfig(); + +require('ignore-styles'); +require('@babel/register')({ + presets: [ + [ + '@babel/preset-env', + { + targets: [ + 'defaults', + 'not IE 11', + 'not IE_Mob 11', + 'maintained node versions', + ], + }, + ], + '@babel/preset-react', + ], + plugins: [ + ['module-resolver', { + alias: { + 'payload/unsanitizedConfig': configPath, + '@payloadcms/payload$': '../', + }, + }], + '@babel/plugin-proposal-class-properties', + '@babel/plugin-proposal-optional-chaining', + 'add-module-exports', + ], + ignore: [ + '*.scss', + '*.css', + 'node_modules', + ], +}); const getConfig = (options = {}) => { if (!options.secret) { @@ -12,7 +47,6 @@ const getConfig = (options = {}) => { throw new Error('Error: missing MongoDB connection URL.'); } - const configPath = findConfig(); const publicConfig = require(configPath); const email = { ...(publicConfig.email || {}), ...(options.email || {}) }; diff --git a/src/webpack/getWebpackDevConfig.js b/src/webpack/getWebpackDevConfig.js index 3a411038d7..98b0137554 100644 --- a/src/webpack/getWebpackDevConfig.js +++ b/src/webpack/getWebpackDevConfig.js @@ -24,15 +24,6 @@ module.exports = (config) => { resolveLoader: { modules: ['node_modules', path.join(__dirname, '../../node_modules')] }, module: { rules: [ - { - test: require.resolve('../client/components/customComponents'), - use: [ - { - loader: 'val-loader', - options: config, - }, - ], - }, { test: /\.js$/, exclude: /node_modules\/(?!(@payloadcms\/payload)\/).*/, @@ -47,15 +38,15 @@ module.exports = (config) => { 'defaults', 'not IE 11', 'not IE_Mob 11', - 'maintained node versions', ], }, ], require.resolve('@babel/preset-react'), ], plugins: [ - require.resolve('@babel/plugin-proposal-class-properties'), - require.resolve('@babel/plugin-proposal-optional-chaining'), + 'add-module-exports', + '@babel/plugin-proposal-class-properties', + '@babel/plugin-proposal-optional-chaining', ], }, }, @@ -115,7 +106,6 @@ module.exports = (config) => { modules: ['node_modules', path.resolve(__dirname, '../../node_modules')], alias: { 'payload/unsanitizedConfig': config.paths.config, - 'payload/config': path.resolve(__dirname, '../client/config.js'), '@payloadcms/payload$': mockModulePath, }, }, diff --git a/src/webpack/getWebpackProdConfig.js b/src/webpack/getWebpackProdConfig.js index 30c56983e8..b90647cfd6 100644 --- a/src/webpack/getWebpackProdConfig.js +++ b/src/webpack/getWebpackProdConfig.js @@ -50,6 +50,7 @@ module.exports = (config) => { require.resolve('@babel/preset-react'), ], plugins: [ + 'add-module-exports', require.resolve('@babel/plugin-proposal-optional-chaining'), require.resolve('@babel/plugin-proposal-class-properties'), ], diff --git a/yarn.lock b/yarn.lock index 7425f7a0e3..8318746195 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,7 +18,7 @@ invariant "^2.2.4" semver "^5.5.0" -"@babel/core@^7.1.0", "@babel/core@^7.7.5": +"@babel/core@^7.1.0", "@babel/core@^7.11.6", "@babel/core@^7.7.5": version "7.11.6" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.11.6.tgz#3a9455dc7387ff1bac45770650bc13ba04a15651" integrity sha512-Wpcv03AGnmkgm6uS6k8iwhIwTrcP0m17TL1n1sy7qD0qelDu4XNeW0dN0mHfa+Gei211yDaLoEe/VlbXQzM4Bg== @@ -889,6 +889,17 @@ "@babel/plugin-transform-react-jsx-source" "^7.10.4" "@babel/plugin-transform-react-pure-annotations" "^7.10.4" +"@babel/register@^7.11.5": + version "7.11.5" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.11.5.tgz#79becf89e0ddd0fba8b92bc279bc0f5d2d7ce2ea" + integrity sha512-CAml0ioKX+kOAvBQDHa/+t1fgOt3qkTIz0TrRtRAT6XY0m5qYZXR85k6/sLCNPMGhYDlCFHCYuU0ybTJbvlC6w== + dependencies: + find-cache-dir "^2.0.0" + lodash "^4.17.19" + make-dir "^2.1.0" + pirates "^4.0.0" + source-map-support "^0.5.16" + "@babel/runtime-corejs3@^7.10.2": version "7.11.2" resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.11.2.tgz#02c3029743150188edeb66541195f54600278419" @@ -2134,11 +2145,6 @@ babel-code-frame@^6.26.0: esutils "^2.0.2" js-tokens "^3.0.2" -babel-core@^7.0.0-bridge.0: - version "7.0.0-bridge.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" - integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg== - babel-eslint@^10.0.1: version "10.1.0" resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232" @@ -2176,6 +2182,11 @@ babel-loader@^8.0.6: pify "^4.0.1" schema-utils "^2.6.5" +babel-plugin-add-module-exports@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-1.0.4.tgz#6caa4ddbe1f578c6a5264d4d3e6c8a2720a7ca2b" + integrity sha512-g+8yxHUZ60RcyaUpfNzy56OtWW+x9cyEe9j+CranqLiqbju2yf/Cy6ZtYK40EZxtrdHllzlVZgLmcOUCTlJ7Jg== + babel-plugin-dynamic-import-node@^2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" @@ -2228,6 +2239,17 @@ babel-plugin-macros@^2.0.0: cosmiconfig "^6.0.0" resolve "^1.12.0" +babel-plugin-module-resolver@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-4.0.0.tgz#8f3a3d9d48287dc1d3b0d5595113adabd36a847f" + integrity sha512-3pdEq3PXALilSJ6dnC4wMWr0AZixHRM4utpdpBR9g5QG7B7JwWyukQv7a9hVxkbGFl+nQbrHDqqQOIBtTXTP/Q== + dependencies: + find-babel-config "^1.2.0" + glob "^7.1.6" + pkg-up "^3.1.0" + reselect "^4.0.0" + resolve "^1.13.1" + babel-plugin-syntax-jsx@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" @@ -4745,7 +4767,15 @@ finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" -find-cache-dir@^2.1.0: +find-babel-config@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/find-babel-config/-/find-babel-config-1.2.0.tgz#a9b7b317eb5b9860cda9d54740a8c8337a2283a2" + integrity sha512-jB2CHJeqy6a820ssiqwrKMeyC6nNdmrcgkKWJWmpoxpE8RKciYJXCcXRq1h2AzCo5I5BJeN2tkGEO3hLTuePRA== + dependencies: + json5 "^0.5.1" + path-exists "^3.0.0" + +find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== @@ -5530,6 +5560,11 @@ ignore-by-default@^1.0.1: resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" integrity sha1-SMptcvbGo68Aqa1K5odr44ieKwk= +ignore-styles@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ignore-styles/-/ignore-styles-5.0.1.tgz#b49ef2274bdafcd8a4880a966bfe38d1a0bf4671" + integrity sha1-tJ7yJ0va/NikiAqWa/440aC/RnE= + ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" @@ -6640,7 +6675,7 @@ json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= -json5@^0.5.0: +json5@^0.5.0, json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= @@ -7033,7 +7068,7 @@ make-dir@^1.0.0: dependencies: pify "^3.0.0" -make-dir@^2.0.0: +make-dir@^2.0.0, make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== @@ -8371,7 +8406,7 @@ pino@^6.4.1: quick-format-unescaped "^4.0.1" sonic-boom "^1.0.2" -pirates@^4.0.1: +pirates@^4.0.0, pirates@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== @@ -8399,6 +8434,13 @@ pkg-dir@^4.1.0, pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +pkg-up@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" + integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== + dependencies: + find-up "^3.0.0" + pn@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" @@ -9865,6 +9907,11 @@ requireindex@^1.2.0: resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef" integrity sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww== +reselect@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.0.0.tgz#f2529830e5d3d0e021408b246a206ef4ea4437f7" + integrity sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA== + resize-observer-polyfill@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" @@ -10495,7 +10542,7 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.6, source-map-support@~0.5.12: +source-map-support@^0.5.16, source-map-support@^0.5.6, source-map-support@~0.5.12: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== @@ -11697,7 +11744,7 @@ v8-to-istanbul@^4.1.3: convert-source-map "^1.6.0" source-map "^0.7.3" -val-loader@^2.1.0: +val-loader@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/val-loader/-/val-loader-2.1.1.tgz#6d9a51e5f4d7604683fab1a739acd4c9540e1ef4" integrity sha512-0JKslgCSncZEGFuXAZp+caZMi15gjSC+WRUhrG0B6wPzLT7c0KfUzaOJHPYS49TrCbfUstXNQsw60FLUFqwmPw==