From 16be2523d57c0b1509b61fcd9a33869e5c74703d Mon Sep 17 00:00:00 2001 From: Minh Nguyen Date: Fri, 31 Jan 2020 03:06:44 +0300 Subject: [PATCH] Add CJS, ESM, UMD builds (#2) * Add .editorconfig * Inline invariant * Replace `console.error` with `error` * Rename package * Tweak build configuration * Update dependencies --- .editorconfig | 18 + .gitignore | 1 + .prettierrc | 7 + LICENSE | 21 + README.md | 67 +++- babel.config.js | 27 +- shallow.js => index.js | 0 jest.config.js | 1 + npm/esm/index.js | 1 + npm/index.js | 3 + npm/shallow.js | 7 - package.json | 45 ++- rollup.config.js | 83 ++++ .../babel/transform-object-assign-require.js | 46 +++ scripts/copyFiles.js | 22 + src/ReactShallowRenderer.js | 101 ++--- src/__tests__/ReactShallowRenderer-test.js | 2 +- .../ReactShallowRendererHooks-test.js | 2 +- .../ReactShallowRendererMemo-test.js | 2 +- src/shared/ReactLazyComponent.js | 4 +- src/shared/consoleWithStackDev.js | 56 +++ src/shared/getComponentName.js | 3 +- src/shared/invariant.js | 54 --- yarn.lock | 375 ++++++++++++------ 24 files changed, 672 insertions(+), 276 deletions(-) create mode 100644 .editorconfig create mode 100644 .prettierrc create mode 100644 LICENSE rename shallow.js => index.js (100%) create mode 100644 npm/esm/index.js create mode 100644 npm/index.js delete mode 100644 npm/shallow.js create mode 100644 rollup.config.js create mode 100644 scripts/babel/transform-object-assign-require.js create mode 100644 scripts/copyFiles.js create mode 100644 src/shared/consoleWithStackDev.js delete mode 100644 src/shared/invariant.js diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d763873 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +# http://editorconfig.org +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +max_line_length = 80 +trim_trailing_whitespace = true + +[*.md] +max_line_length = 0 +trim_trailing_whitespace = false + +[COMMIT_EDITMSG] +max_line_length = 0 diff --git a/.gitignore b/.gitignore index 3c3629e..25871d0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +build/ diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..0c200df --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "bracketSpacing": false, + "singleQuote": true, + "jsxBracketSameLine": true, + "trailingComma": "all", + "printWidth": 80 +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b96dcb0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 5ce816c..b33f792 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,63 @@ -# `react-test-renderer` +# `react-shallow-renderer` -This package provides an experimental React renderer that can be used to render React components to pure JavaScript objects, without depending on the DOM or a native mobile environment. +When writing unit tests for React, shallow rendering can be helpful. Shallow rendering lets you render a component "one level deep" and assert facts about what its render method returns, without worrying about the behavior of child components, which are not instantiated or rendered. This does not require a DOM. -Essentially, this package makes it easy to grab a snapshot of the "DOM tree" rendered by a React DOM or React Native component without using a browser or jsdom. +## Installation -Documentation: +```sh +# npm +npm install react-shallow-renderer --save-dev -[https://reactjs.org/docs/test-renderer.html](https://reactjs.org/docs/test-renderer.html) +# Yarn +yarn add react-shallow-renderer --dev +``` + +## Usage -Usage: +For example, if you have the following component: ```jsx -const ReactTestRenderer = require('react-test-renderer'); +function MyComponent() { + return ( +
+ Title + +
+ ); +} +``` -const renderer = ReactTestRenderer.create( - Facebook -); +Then you can assert: -console.log(renderer.toJSON()); -// { type: 'a', -// props: { href: 'https://www.facebook.com/' }, -// children: [ 'Facebook' ] } +```jsx +import ShallowRenderer from 'react-shallow-renderer'; +// in your test: +const renderer = new ShallowRenderer(); +renderer.render(); +const result = renderer.getRenderOutput(); +expect(result.type).toBe('div'); +expect(result.props.children).toEqual([ + Title, + , +]); ``` -You can also use Jest's snapshot testing feature to automatically save a copy of the JSON tree to a file and check in your tests that it hasn't changed: https://facebook.github.io/jest/blog/2016/07/27/jest-14.html. +Shallow testing currently has some limitations, namely not supporting refs. + +> Note: +> +> We also recommend checking out Enzyme's [Shallow Rendering API](https://airbnb.io/enzyme/docs/api/shallow.html). It provides a nicer higher-level API over the same functionality. + +## Reference + +### `shallowRenderer.render()` + +You can think of the shallowRenderer as a "place" to render the component you're testing, and from which you can extract the component's output. + +`shallowRenderer.render()` is similar to [`ReactDOM.render()`](https://reactjs.org/docs/react-dom.html#render) but it doesn't require DOM and only renders a single level deep. This means you can test components isolated from how their children are implemented. + +### `shallowRenderer.getRenderOutput()` + +After `shallowRenderer.render()` has been called, you can use `shallowRenderer.getRenderOutput()` to get the shallowly rendered output. + +You can then begin to assert facts about the output. diff --git a/babel.config.js b/babel.config.js index 90efca4..440763c 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,7 +1,30 @@ module.exports = { - presets: ['@babel/preset-env', '@babel/preset-react'], + presets: [ + [ + '@babel/preset-env', + { + modules: process.env.NODE_ENV === 'test' ? 'auto' : false, + // Exclude transforms that make all code slower. + exclude: ['transform-typeof-symbol'], + targets: process.env.NODE_ENV === 'test' ? {node: 'current'} : {ie: 11}, + }, + ], + '@babel/preset-react', + ], plugins: [ - '@babel/plugin-proposal-class-properties', + ['@babel/plugin-proposal-class-properties', {loose: true}], + ['@babel/plugin-transform-classes', {loose: true}], + ['@babel/plugin-transform-template-literals', {loose: true}], + // The following plugin is configured to use `Object.assign` directly. + // Note that we ponyfill `Object.assign` below. + // { ...todo, complete: true } + [ + '@babel/plugin-proposal-object-rest-spread', + {loose: true, useBuiltIns: true}, + ], + // Use 'object-assign' ponyfill. + require.resolve('./scripts/babel/transform-object-assign-require'), + // Keep stacks detailed in tests. process.env.NODE_ENV === 'test' && '@babel/plugin-transform-react-jsx-source', ].filter(Boolean), diff --git a/shallow.js b/index.js similarity index 100% rename from shallow.js rename to index.js diff --git a/jest.config.js b/jest.config.js index a9d0053..3b061f0 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,3 +1,4 @@ module.exports = { + modulePathIgnorePatterns: ['/build/'], setupFilesAfterEnv: ['./scripts/jest/setupTests.js'], }; diff --git a/npm/esm/index.js b/npm/esm/index.js new file mode 100644 index 0000000..0b112d6 --- /dev/null +++ b/npm/esm/index.js @@ -0,0 +1 @@ +export {default} from './react-shallow-renderer'; diff --git a/npm/index.js b/npm/index.js new file mode 100644 index 0000000..2a21afa --- /dev/null +++ b/npm/index.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = require('./cjs/react-shallow-renderer.js'); diff --git a/npm/shallow.js b/npm/shallow.js deleted file mode 100644 index 9a91f99..0000000 --- a/npm/shallow.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict'; - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./cjs/react-test-renderer-shallow.production.min.js'); -} else { - module.exports = require('./cjs/react-test-renderer-shallow.development.js'); -} diff --git a/package.json b/package.json index 8e8e668..80c0f2a 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,10 @@ { - "name": "react-test-renderer", + "name": "react-shallow-renderer", "version": "16.12.0", - "description": "React package for snapshot testing.", + "description": "React package for shallow rendering.", "main": "index.js", - "repository": { - "type": "git", - "url": "https://github.com/facebook/react.git", - "directory": "packages/react-test-renderer" - }, + "module": "esm/index.js", + "repository": "https://github.com/NMinhNguyen/react-shallow-renderer.git", "keywords": [ "react", "react-native", @@ -15,28 +12,36 @@ ], "license": "MIT", "bugs": { - "url": "https://github.com/facebook/react/issues" + "url": "https://github.com/NMinhNguyen/react-shallow-renderer/issues" }, "homepage": "https://reactjs.org/", "dependencies": { "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "react-is": "^16.8.6", - "scheduler": "^0.18.0" + "prop-types": "^15.7.2", + "react-is": "^16.12.0" }, "devDependencies": { - "@babel/cli": "^7.8.3", - "@babel/core": "^7.8.3", + "@babel/cli": "^7.8.4", + "@babel/core": "^7.8.4", "@babel/plugin-proposal-class-properties": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-proposal-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-classes": "^7.8.3", "@babel/plugin-transform-react-jsx-source": "^7.8.3", - "@babel/preset-env": "^7.8.3", - "@babel/preset-flow": "^7.8.3", + "@babel/plugin-transform-template-literals": "^7.8.3", + "@babel/preset-env": "^7.8.4", "@babel/preset-react": "^7.8.3", + "@rollup/plugin-commonjs": "^11.0.1", + "@rollup/plugin-node-resolve": "^7.0.0", + "@rollup/plugin-replace": "^2.3.0", "babel-jest": "^25.1.0", + "fs-extra": "^8.1.0", "jest": "^25.1.0", "jest-diff": "^25.1.0", - "react": "^16.12.0" + "react": "^16.12.0", + "rimraf": "^3.0.1", + "rollup": "^1.30.1", + "rollup-plugin-babel": "^4.3.3", + "rollup-plugin-strip-banner": "^1.0.0" }, "peerDependencies": { "react": "^16.0.0" @@ -44,13 +49,15 @@ "files": [ "LICENSE", "README.md", - "build-info.json", "index.js", - "shallow.js", "cjs/", + "esm/", "umd/" ], "scripts": { + "prebuild": "rimraf build", + "build": "rollup --config", + "postbuild": "node ./scripts/copyFiles.js", "test": "jest", "test:debug": "node --inspect-brk node_modules/jest/bin/jest.js --runInBand --no-cache" } diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..b24e959 --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,83 @@ +import resolve from '@rollup/plugin-node-resolve'; +import babel from 'rollup-plugin-babel'; +import replace from '@rollup/plugin-replace'; +import commonjs from '@rollup/plugin-commonjs'; +import stripBanner from 'rollup-plugin-strip-banner'; + +import pkgJson from './package.json'; + +const reactShallowRendererVersion = pkgJson.version; + +const knownGlobals = { + react: 'React', +}; + +const license = ` * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree.`; + +function wrapBundle(source, filename) { + return `/** @license ReactShallowRenderer v${reactShallowRendererVersion} + * ${filename} + * +${license} + */ + +${source}`; +} + +function createConfig(bundleType) { + const filename = 'react-shallow-renderer.js'; + const outputPath = `build/${bundleType}/${filename}`; + + const shouldBundleDependencies = bundleType === 'umd'; + const isUMDBundle = bundleType === 'umd'; + + let externals = Object.keys(knownGlobals); + if (!shouldBundleDependencies) { + externals = [...externals, ...Object.keys(pkgJson.dependencies)]; + } + + return { + input: 'src/ReactShallowRenderer.js', + external(id) { + const containsThisModule = pkg => id === pkg || id.startsWith(pkg + '/'); + const isProvidedByDependency = externals.some(containsThisModule); + if (!shouldBundleDependencies && isProvidedByDependency) { + return true; + } + return !!knownGlobals[id]; + }, + plugins: [ + resolve(), + stripBanner({ + exclude: /node_modules/, + }), + babel({exclude: 'node_modules/**'}), + isUMDBundle && + replace({ + 'process.env.NODE_ENV': "'development'", + }), + commonjs({ + include: /node_modules/, + namedExports: {'react-is': ['isForwardRef', 'isMemo', 'ForwardRef']}, + }), + // License header. + { + renderChunk(source) { + return wrapBundle(source, filename); + }, + }, + ].filter(Boolean), + output: { + file: outputPath, + format: bundleType, + globals: knownGlobals, + interop: false, + name: 'ReactShallowRenderer', + }, + }; +} + +export default [createConfig('cjs'), createConfig('esm'), createConfig('umd')]; diff --git a/scripts/babel/transform-object-assign-require.js b/scripts/babel/transform-object-assign-require.js new file mode 100644 index 0000000..a1ea7d5 --- /dev/null +++ b/scripts/babel/transform-object-assign-require.js @@ -0,0 +1,46 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +'use strict'; + +const helperModuleImports = require('@babel/helper-module-imports'); + +module.exports = function autoImporter(babel) { + function getAssignIdent(path, file, state) { + if (state.id) { + return babel.types.cloneNode(state.id); + } + state.id = helperModuleImports.addDefault(path, 'object-assign', { + nameHint: 'assign', + }); + return state.id; + } + + return { + pre: function() { + // map from module to generated identifier + this.id = null; + }, + + visitor: { + CallExpression: function(path, file) { + if (path.get('callee').matchesPattern('Object.assign')) { + // generate identifier and require if it hasn't been already + const id = getAssignIdent(path, file, this); + path.node.callee = id; + } + }, + + MemberExpression: function(path, file) { + if (path.matchesPattern('Object.assign')) { + const id = getAssignIdent(path, file, this); + path.replaceWith(id); + } + }, + }, + }; +}; diff --git a/scripts/copyFiles.js b/scripts/copyFiles.js new file mode 100644 index 0000000..12564aa --- /dev/null +++ b/scripts/copyFiles.js @@ -0,0 +1,22 @@ +'use strict'; + +const fs = require('fs-extra'); + +// Makes the script crash on unhandled rejections instead of silently +// ignoring them. In the future, promise rejections that are not handled will +// terminate the Node.js process with a non-zero exit code. +// See https://github.com/facebook/create-react-app/blob/4582491/packages/react-scripts/scripts/build.js#L15-L20 +process.on('unhandledRejection', err => { + throw err; +}); + +async function copyFiles() { + await Promise.all([ + fs.copy('LICENSE', 'build/LICENSE'), + fs.copy('package.json', 'build/package.json'), + fs.copy('README.md', 'build/README.md'), + fs.copy('npm', 'build'), + ]); +} + +copyFiles(); diff --git a/src/ReactShallowRenderer.js b/src/ReactShallowRenderer.js index 8ee2746..3b8db26 100644 --- a/src/ReactShallowRenderer.js +++ b/src/ReactShallowRenderer.js @@ -12,9 +12,9 @@ import {isForwardRef, isMemo, ForwardRef} from 'react-is'; import describeComponentFrame from './shared/describeComponentFrame'; import getComponentName from './shared/getComponentName'; import shallowEqual from './shared/shallowEqual'; -import invariant from './shared/invariant'; import checkPropTypes from 'prop-types/checkPropTypes'; import ReactSharedInternals from './shared/ReactSharedInternals'; +import {error} from './shared/consoleWithStackDev'; import is from './shared/objectIs'; const {ReactCurrentDispatcher} = ReactSharedInternals; @@ -32,7 +32,7 @@ let currentHookNameInDev; function areHookInputsEqual(nextDeps, prevDeps) { if (prevDeps === null) { if (process.env.NODE_ENV !== 'production') { - console.error( + error( '%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', @@ -46,7 +46,7 @@ function areHookInputsEqual(nextDeps, prevDeps) { // Don't bother comparing lengths in prod because these arrays should be // passed inline. if (nextDeps.length !== prevDeps.length) { - console.error( + error( 'The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + @@ -141,7 +141,6 @@ function createHook() { } function basicStateReducer(state, action) { - // $FlowFixMe: Flow doesn't like mixed types return typeof action === 'function' ? action(state) : action; } @@ -173,15 +172,13 @@ class ReactShallowRenderer { } _validateCurrentlyRenderingComponent() { - invariant( - this._rendering && !this._instance, - 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + - ' one of the following reasons:\n' + - '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + - '2. You might be breaking the Rules of Hooks\n' + - '3. You might have more than one copy of React in the same app\n' + - 'See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.', - ); + if (!(this._rendering && !this._instance)) { + throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: +1. You might have mismatching versions of React and the renderer (such as React DOM) +2. You might be breaking the Rules of Hooks +3. You might have more than one copy of React in the same app +See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.`); + } } _createDispatcher() { @@ -351,11 +348,11 @@ class ReactShallowRenderer { } _dispatchAction(queue, action) { - invariant( - this._numberOfReRenders < RE_RENDER_LIMIT, - 'Too many re-renders. React limits the number of renders to prevent ' + - 'an infinite loop.', - ); + if (!(this._numberOfReRenders < RE_RENDER_LIMIT)) { + throw Error( + `Too many re-renders. React limits the number of renders to prevent an infinite loop.`, + ); + } if (this._rendering) { // This is a render phase update. Stash it in a lazily-created map of @@ -457,35 +454,39 @@ class ReactShallowRenderer { } render(element, context = emptyObject) { - invariant( - React.isValidElement(element), - 'ReactShallowRenderer render(): Invalid component element.%s', - typeof element === 'function' - ? ' Instead of passing a component class, make sure to instantiate ' + - 'it by passing it to React.createElement.' - : '', - ); - element = element; + if (!React.isValidElement(element)) { + throw Error( + `ReactShallowRenderer render(): Invalid component element.${ + typeof element === 'function' + ? ' Instead of passing a component class, make sure to instantiate ' + + 'it by passing it to React.createElement.' + : '' + }`, + ); + } // Show a special message for host elements since it's a common case. - invariant( - typeof element.type !== 'string', - 'ReactShallowRenderer render(): Shallow rendering works only with custom ' + - 'components, not primitives (%s). Instead of calling `.render(el)` and ' + - 'inspecting the rendered output, look at `el.props` directly instead.', - element.type, - ); - invariant( - isForwardRef(element) || + if (!(typeof element.type !== 'string')) { + throw Error( + `ReactShallowRenderer render(): Shallow rendering works only with custom components, not primitives (${element.type}). Instead of calling \`.render(el)\` and inspecting the rendered output, look at \`el.props\` directly instead.`, + ); + } + if ( + !( + isForwardRef(element) || typeof element.type === 'function' || - isMemo(element), - 'ReactShallowRenderer render(): Shallow rendering works only with custom ' + - 'components, but the provided element type was `%s`.', - Array.isArray(element.type) - ? 'array' - : element.type === null - ? 'null' - : typeof element.type, - ); + isMemo(element) + ) + ) { + throw Error( + `ReactShallowRenderer render(): Shallow rendering works only with custom components, but the provided element type was \`${ + Array.isArray(element.type) + ? 'array' + : element.type === null + ? 'null' + : typeof element.type + }\`.`, + ); + } if (this._rendering) { return; @@ -567,11 +568,11 @@ class ReactShallowRenderer { // elementType could still be a ForwardRef if it was // nested inside Memo. if (elementType.$$typeof === ForwardRef) { - invariant( - typeof elementType.render === 'function', - 'forwardRef requires a render function but was given %s.', - typeof elementType.render, - ); + if (!(typeof elementType.render === 'function')) { + throw Error( + `forwardRef requires a render function but was given ${typeof elementType.render}.`, + ); + } this._rendered = elementType.render.call( undefined, element.props, diff --git a/src/__tests__/ReactShallowRenderer-test.js b/src/__tests__/ReactShallowRenderer-test.js index 68c8299..3974058 100644 --- a/src/__tests__/ReactShallowRenderer-test.js +++ b/src/__tests__/ReactShallowRenderer-test.js @@ -18,7 +18,7 @@ describe('ReactShallowRenderer', () => { beforeEach(() => { jest.resetModules(); - createRenderer = require('react-test-renderer/shallow').createRenderer; + createRenderer = require('react-shallow-renderer').createRenderer; PropTypes = require('prop-types'); React = require('react'); }); diff --git a/src/__tests__/ReactShallowRendererHooks-test.js b/src/__tests__/ReactShallowRendererHooks-test.js index 6b8a962..ee5dfef 100644 --- a/src/__tests__/ReactShallowRendererHooks-test.js +++ b/src/__tests__/ReactShallowRendererHooks-test.js @@ -16,7 +16,7 @@ let React; describe('ReactShallowRenderer with hooks', () => { beforeEach(() => { jest.resetModules(); - createRenderer = require('react-test-renderer/shallow').createRenderer; + createRenderer = require('react-shallow-renderer').createRenderer; React = require('react'); }); diff --git a/src/__tests__/ReactShallowRendererMemo-test.js b/src/__tests__/ReactShallowRendererMemo-test.js index 9ed3bc6..5ce0944 100644 --- a/src/__tests__/ReactShallowRendererMemo-test.js +++ b/src/__tests__/ReactShallowRendererMemo-test.js @@ -18,7 +18,7 @@ describe('ReactShallowRendererMemo', () => { beforeEach(() => { jest.resetModules(); - createRenderer = require('react-test-renderer/shallow').createRenderer; + createRenderer = require('react-shallow-renderer').createRenderer; PropTypes = require('prop-types'); React = require('react'); }); diff --git a/src/shared/ReactLazyComponent.js b/src/shared/ReactLazyComponent.js index eac13be..955cf1a 100644 --- a/src/shared/ReactLazyComponent.js +++ b/src/shared/ReactLazyComponent.js @@ -7,6 +7,8 @@ * */ +import {error} from './consoleWithStackDev'; + export const Uninitialized = -1; export const Pending = 0; export const Resolved = 1; @@ -28,7 +30,7 @@ export function initializeLazyComponentType(lazyComponent) { const defaultExport = moduleObject.default; if (process.env.NODE_ENV !== 'production') { if (defaultExport === undefined) { - console.error( + error( 'lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + "const MyComponent = lazy(() => import('./MyComponent'))", diff --git a/src/shared/consoleWithStackDev.js b/src/shared/consoleWithStackDev.js new file mode 100644 index 0000000..de9a56b --- /dev/null +++ b/src/shared/consoleWithStackDev.js @@ -0,0 +1,56 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import ReactSharedInternals from './ReactSharedInternals'; + +export function warn(format, ...args) { + if (process.env.NODE_ENV !== 'production') { + printWarning('warn', format, args); + } +} + +export function error(format, ...args) { + if (process.env.NODE_ENV !== 'production') { + printWarning('error', format, args); + } +} + +function printWarning(level, format, args) { + if (process.env.NODE_ENV !== 'production') { + const hasExistingStack = + args.length > 0 && + typeof args[args.length - 1] === 'string' && + args[args.length - 1].indexOf('\n in') === 0; + + if (!hasExistingStack) { + const ReactDebugCurrentFrame = + ReactSharedInternals.ReactDebugCurrentFrame; + const stack = ReactDebugCurrentFrame.getStackAddendum(); + if (stack !== '') { + format += '%s'; + args = args.concat([stack]); + } + } + + const argsWithFormat = args.map(item => '' + item); + // Careful: RN currently depends on this prefix + argsWithFormat.unshift('Warning: ' + format); + // We intentionally don't use spread (or .apply) directly because it + // breaks IE9: https://github.com/facebook/react/issues/13610 + Function.prototype.apply.call(console[level], console, argsWithFormat); + + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + let argIndex = 0; + const message = + 'Warning: ' + format.replace(/%s/g, () => args[argIndex++]); + throw new Error(message); + } catch (x) {} + } +} diff --git a/src/shared/getComponentName.js b/src/shared/getComponentName.js index e313a36..4947e51 100644 --- a/src/shared/getComponentName.js +++ b/src/shared/getComponentName.js @@ -7,6 +7,7 @@ * */ +import {error} from './consoleWithStackDev'; import { REACT_CONTEXT_TYPE, REACT_FORWARD_REF_TYPE, @@ -38,7 +39,7 @@ function getComponentName(type) { } if (process.env.NODE_ENV !== 'production') { if (typeof type.tag === 'number') { - console.error( + error( 'Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.', ); diff --git a/src/shared/invariant.js b/src/shared/invariant.js deleted file mode 100644 index f010595..0000000 --- a/src/shared/invariant.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ - -/** - * Use invariant() to assert state which your program assumes to be true. - * - * Provide sprintf-style format (only %s is supported) and arguments - * to provide information about what broke and what you were - * expecting. - * - * The invariant message will be stripped in production, but the invariant - * will remain to ensure logic does not differ in production. - */ - -let validateFormat = () => {}; - -if (process.env.NODE_ENV !== 'production') { - validateFormat = function(format) { - if (format === undefined) { - throw new Error('invariant requires an error message argument'); - } - }; -} - -export default function invariant(condition, format, a, b, c, d, e, f) { - validateFormat(format); - - if (!condition) { - let error; - if (format === undefined) { - error = new Error( - 'Minified exception occurred; use the non-minified dev environment ' + - 'for the full error message and additional helpful warnings.', - ); - } else { - const args = [a, b, c, d, e, f]; - let argIndex = 0; - error = new Error( - format.replace(/%s/g, function() { - return args[argIndex++]; - }), - ); - error.name = 'Invariant Violation'; - } - - error.framesToPop = 1; // we don't care about invariant's own frame - throw error; - } -} diff --git a/yarn.lock b/yarn.lock index 0e10a2d..3aaed7b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@babel/cli@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.8.3.tgz#121beb7c273e0521eb2feeb3883a2b7435d12328" - integrity sha512-K2UXPZCKMv7KwWy9Bl4sa6+jTNP7JyDiHKzoOiUUygaEDbC60vaargZDnO9oFMvlq8pIKOOyUUgeMYrsaN9djA== +"@babel/cli@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.8.4.tgz#505fb053721a98777b2b175323ea4f090b7d3c1c" + integrity sha512-XXLgAm6LBbaNxaGhMAznXXaxtCWfuv6PIDJ9Alsy9JYTOh+j2jJz+L/162kkfU1j/pTSxK1xGmlwI4pdIMkoag== dependencies: commander "^4.0.1" convert-source-map "^1.1.0" @@ -25,26 +25,26 @@ dependencies: "@babel/highlight" "^7.8.3" -"@babel/compat-data@^7.8.0", "@babel/compat-data@^7.8.1": - version "7.8.1" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.8.1.tgz#fc0bbbb7991e4fb2b47e168e60f2cc2c41680be9" - integrity sha512-Z+6ZOXvyOWYxJ50BwxzdhRnRsGST8Y3jaZgxYig575lTjVSs3KtJnmESwZegg6e2Dn0td1eDhoWlp1wI4BTCPw== +"@babel/compat-data@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.8.4.tgz#bbe65d05a291667a8394fe8a0e0e277ef22b0d2a" + integrity sha512-lHLhlsvFjJAqNU71b7k6Vv9ewjmTXKvqaMv7n0G1etdCabWLw3nEYE8mmgoVOxMIFE07xOvo7H7XBASirX6Rrg== dependencies: - browserslist "^4.8.2" + browserslist "^4.8.5" invariant "^2.2.4" semver "^5.5.0" -"@babel/core@^7.1.0", "@babel/core@^7.7.5", "@babel/core@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.3.tgz#30b0ebb4dd1585de6923a0b4d179e0b9f5d82941" - integrity sha512-4XFkf8AwyrEG7Ziu3L2L0Cv+WyY47Tcsp70JFmpftbAA1K7YL/sgE9jh9HyNj08Y/U50ItUchpN0w6HxAoX1rA== +"@babel/core@^7.1.0", "@babel/core@^7.7.5", "@babel/core@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.4.tgz#d496799e5c12195b3602d0fddd77294e3e38e80e" + integrity sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.3" - "@babel/helpers" "^7.8.3" - "@babel/parser" "^7.8.3" + "@babel/generator" "^7.8.4" + "@babel/helpers" "^7.8.4" + "@babel/parser" "^7.8.4" "@babel/template" "^7.8.3" - "@babel/traverse" "^7.8.3" + "@babel/traverse" "^7.8.4" "@babel/types" "^7.8.3" convert-source-map "^1.7.0" debug "^4.1.0" @@ -55,10 +55,10 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.3.tgz#0e22c005b0a94c1c74eafe19ef78ce53a4d45c03" - integrity sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug== +"@babel/generator@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.4.tgz#35bbc74486956fe4251829f9f6c48330e8d0985e" + integrity sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA== dependencies: "@babel/types" "^7.8.3" jsesc "^2.5.1" @@ -97,15 +97,15 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helper-compilation-targets@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.3.tgz#2deedc816fd41dca7355ef39fd40c9ea69f0719a" - integrity sha512-JLylPCsFjhLN+6uBSSh3iYdxKdeO9MNmoY96PE/99d8kyBFaXLORtAVhqN6iHa+wtPeqxKLghDOZry0+Aiw9Tw== +"@babel/helper-compilation-targets@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.4.tgz#03d7ecd454b7ebe19a254f76617e61770aed2c88" + integrity sha512-3k3BsKMvPp5bjxgMdrFyq0UaEO48HciVrOVF0+lon8pp95cyJ2ujAh0TrBHNMnJGT2rr0iKOJPFFbSqjDyf/Pg== dependencies: - "@babel/compat-data" "^7.8.1" - browserslist "^4.8.2" + "@babel/compat-data" "^7.8.4" + browserslist "^4.8.5" invariant "^2.2.4" - levenary "^1.1.0" + levenary "^1.1.1" semver "^5.5.0" "@babel/helper-create-class-features-plugin@^7.8.3": @@ -175,7 +175,7 @@ dependencies: "@babel/types" "^7.8.3" -"@babel/helper-module-imports@^7.8.3": +"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498" integrity sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg== @@ -259,13 +259,13 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helpers@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.3.tgz#382fbb0382ce7c4ce905945ab9641d688336ce85" - integrity sha512-LmU3q9Pah/XyZU89QvBgGt+BCsTPoQa+73RxAQh8fb8qkDyIfeQnmgs+hvzhTCKTzqOyk7JTkS3MS1S8Mq5yrQ== +"@babel/helpers@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.4.tgz#754eb3ee727c165e0a240d6c207de7c455f36f73" + integrity sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w== dependencies: "@babel/template" "^7.8.3" - "@babel/traverse" "^7.8.3" + "@babel/traverse" "^7.8.4" "@babel/types" "^7.8.3" "@babel/highlight@^7.8.3": @@ -277,10 +277,10 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.7.5", "@babel/parser@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.3.tgz#790874091d2001c9be6ec426c2eed47bc7679081" - integrity sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ== +"@babel/parser@^7.1.0", "@babel/parser@^7.7.5", "@babel/parser@^7.8.3", "@babel/parser@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.4.tgz#d1dbe64691d60358a974295fa53da074dd2ce8e8" + integrity sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw== "@babel/plugin-proposal-async-generator-functions@^7.8.3": version "7.8.3" @@ -369,13 +369,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-class-properties@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.8.3.tgz#6cb933a8872c8d359bfde69bbeaae5162fd1e8f7" - integrity sha512-UcAyQWg2bAN647Q+O811tG9MrJ38Z10jjhQdKNAL8fsyPzE3cCN/uT+f55cFVY4aGO4jqJAvmqsuY3GQDwAoXg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-syntax-dynamic-import@^7.8.0": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" @@ -383,13 +376,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-flow@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.8.3.tgz#f2c883bd61a6316f2c89380ae5122f923ba4527f" - integrity sha512-innAx3bUbA0KSYj2E2MNFSn9hiCeowOFLxlsuhXzw8hMQnzkDomUr9QCD7E9VF60NmnG1sNTuuv6Qf4f8INYsg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-syntax-json-strings@^7.8.0": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" @@ -521,18 +507,10 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-flow-strip-types@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.8.3.tgz#da705a655466b2a9b36046b57bf0cbcd53551bd4" - integrity sha512-g/6WTWG/xbdd2exBBzMfygjX/zw4eyNC4X8pRaq7aRHRoDUCzAIu3kGYIXviOv8BjCuWm8vDBwjHcjiRNgXrPA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-syntax-flow" "^7.8.3" - -"@babel/plugin-transform-for-of@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.3.tgz#15f17bce2fc95c7d59a24b299e83e81cedc22e18" - integrity sha512-ZjXznLNTxhpf4Q5q3x1NsngzGA38t9naWH8Gt+0qYZEJAcvPI9waSStSh56u19Ofjr7QmD0wUsQ8hw8s/p1VnA== +"@babel/plugin-transform-for-of@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.4.tgz#6fe8eae5d6875086ee185dd0b098a8513783b47d" + integrity sha512-iAXNlOWvcYUYoV8YIxwS7TxGRJcxyl8eQCfT+A5j8sKUzRFvJdcyjp97jL2IghWSRDaL2PU2O2tX8Cu9dTBq5A== dependencies: "@babel/helper-plugin-utils" "^7.8.3" @@ -617,10 +595,10 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-replace-supers" "^7.8.3" -"@babel/plugin-transform-parameters@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.3.tgz#7890576a13b17325d8b7d44cb37f21dc3bbdda59" - integrity sha512-/pqngtGb54JwMBZ6S/D3XYylQDFtGjWrnoCF4gXZOUpFV/ujbxnoNGNvDGu6doFWRPBveE72qTx/RRU44j5I/Q== +"@babel/plugin-transform-parameters@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.4.tgz#1d5155de0b65db0ccf9971165745d3bb990d77d3" + integrity sha512-IsS3oTxeTsZlE5KqzTbcC2sV0P9pXdec53SU+Yxv7o/6dvGM5AkTotQKhoSffhNgZ/dftsSiOoxy7evCYJXzVA== dependencies: "@babel/helper-call-delegate" "^7.8.3" "@babel/helper-get-function-arity" "^7.8.3" @@ -709,10 +687,10 @@ "@babel/helper-annotate-as-pure" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-typeof-symbol@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.3.tgz#5cffb216fb25c8c64ba6bf5f76ce49d3ab079f4d" - integrity sha512-3TrkKd4LPqm4jHs6nPtSDI/SV9Cm5PRJkHLUgTcqRQQTMAZ44ZaAdDZJtvWFSaRcvT0a1rTmJ5ZA5tDKjleF3g== +"@babel/plugin-transform-typeof-symbol@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz#ede4062315ce0aaf8a657a920858f1a2f35fc412" + integrity sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg== dependencies: "@babel/helper-plugin-utils" "^7.8.3" @@ -724,13 +702,13 @@ "@babel/helper-create-regexp-features-plugin" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/preset-env@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.8.3.tgz#dc0fb2938f52bbddd79b3c861a4b3427dd3a6c54" - integrity sha512-Rs4RPL2KjSLSE2mWAx5/iCH+GC1ikKdxPrhnRS6PfFVaiZeom22VFKN4X8ZthyN61kAaR05tfXTbCvatl9WIQg== +"@babel/preset-env@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.8.4.tgz#9dac6df5f423015d3d49b6e9e5fa3413e4a72c4e" + integrity sha512-HihCgpr45AnSOHRbS5cWNTINs0TwaR8BS8xIIH+QwiW8cKL0llV91njQMpeMReEPVs+1Ao0x3RLEBLtt1hOq4w== dependencies: - "@babel/compat-data" "^7.8.0" - "@babel/helper-compilation-targets" "^7.8.3" + "@babel/compat-data" "^7.8.4" + "@babel/helper-compilation-targets" "^7.8.4" "@babel/helper-module-imports" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-proposal-async-generator-functions" "^7.8.3" @@ -759,7 +737,7 @@ "@babel/plugin-transform-dotall-regex" "^7.8.3" "@babel/plugin-transform-duplicate-keys" "^7.8.3" "@babel/plugin-transform-exponentiation-operator" "^7.8.3" - "@babel/plugin-transform-for-of" "^7.8.3" + "@babel/plugin-transform-for-of" "^7.8.4" "@babel/plugin-transform-function-name" "^7.8.3" "@babel/plugin-transform-literals" "^7.8.3" "@babel/plugin-transform-member-expression-literals" "^7.8.3" @@ -770,7 +748,7 @@ "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3" "@babel/plugin-transform-new-target" "^7.8.3" "@babel/plugin-transform-object-super" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.8.4" "@babel/plugin-transform-property-literals" "^7.8.3" "@babel/plugin-transform-regenerator" "^7.8.3" "@babel/plugin-transform-reserved-words" "^7.8.3" @@ -778,23 +756,15 @@ "@babel/plugin-transform-spread" "^7.8.3" "@babel/plugin-transform-sticky-regex" "^7.8.3" "@babel/plugin-transform-template-literals" "^7.8.3" - "@babel/plugin-transform-typeof-symbol" "^7.8.3" + "@babel/plugin-transform-typeof-symbol" "^7.8.4" "@babel/plugin-transform-unicode-regex" "^7.8.3" "@babel/types" "^7.8.3" - browserslist "^4.8.2" + browserslist "^4.8.5" core-js-compat "^3.6.2" invariant "^2.2.2" - levenary "^1.1.0" + levenary "^1.1.1" semver "^5.5.0" -"@babel/preset-flow@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.8.3.tgz#52af74c6a4e80d889bd9436e8e278d0fecac6e18" - integrity sha512-iCXFk+T4demnq+dNLLvlGOgvYF6sPZ/hS1EmswugOqh1Ysp2vuiqJzpgsnp5rW8+6dLJT/0CXDzye28ZH6BAfQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-transform-flow-strip-types" "^7.8.3" - "@babel/preset-react@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.8.3.tgz#23dc63f1b5b0751283e04252e78cf1d6589273d2" @@ -815,16 +785,16 @@ "@babel/parser" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.3.tgz#a826215b011c9b4f73f3a893afbc05151358bf9a" - integrity sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.4": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.4.tgz#f0845822365f9d5b0e312ed3959d3f827f869e3c" + integrity sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.3" + "@babel/generator" "^7.8.4" "@babel/helper-function-name" "^7.8.3" "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.8.3" + "@babel/parser" "^7.8.4" "@babel/types" "^7.8.3" debug "^4.1.0" globals "^11.1.0" @@ -1026,6 +996,43 @@ "@types/yargs" "^15.0.0" chalk "^3.0.0" +"@rollup/plugin-commonjs@^11.0.1": + version "11.0.1" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-11.0.1.tgz#6056a6757286901cc6c1599123e6680a78cad6c2" + integrity sha512-SaVUoaLDg3KnIXC5IBNIspr1APTYDzk05VaYcI6qz+0XX3ZlSCwAkfAhNSOxfd5GAdcm/63Noi4TowOY9MpcDg== + dependencies: + "@rollup/pluginutils" "^3.0.0" + estree-walker "^0.6.1" + is-reference "^1.1.2" + magic-string "^0.25.2" + resolve "^1.11.0" + +"@rollup/plugin-node-resolve@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.0.0.tgz#cce3826df801538b001972fbf9b6b1c22b69fdf8" + integrity sha512-+vOx2+WMBMFotYKM3yYeDGZxIvcQ7yO4g+SuKDFsjKaq8Lw3EPgfB6qNlp8Z/3ceDCEhHvC9/b+PgBGwDQGbzQ== + dependencies: + "@rollup/pluginutils" "^3.0.0" + "@types/resolve" "0.0.8" + builtin-modules "^3.1.0" + is-module "^1.0.0" + resolve "^1.11.1" + +"@rollup/plugin-replace@^2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-2.3.0.tgz#86d88746383e40dd81cffb5216449cc51a734eb9" + integrity sha512-rzWAMqXAHC1w3eKpK6LxRqiF4f3qVFaa1sGii6Bp3rluKcwHNOpPt+hWRCmAH6SDEPtbPiLFf0pfNQyHs6Btlg== + dependencies: + magic-string "^0.25.2" + rollup-pluginutils "^2.6.0" + +"@rollup/pluginutils@^3.0.0": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.0.6.tgz#3ae0bbbce2eed53bf46b7fba8c393557c6c7f705" + integrity sha512-Nb6U7sg11v8D+E4mxRxwT+UumUL7MSnwI8V1SJB3THyW2MOGD/Q6GyxLtpnjrbT3zTRPSozzDMyVZwemgldO3w== + dependencies: + estree-walker "^1.0.1" + "@sinonjs/commons@^1.7.0": version "1.7.0" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.7.0.tgz#f90ffc52a2e519f018b13b6c4da03cbff36ebed6" @@ -1071,6 +1078,11 @@ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== +"@types/estree@*", "@types/estree@0.0.39": + version "0.0.39" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" + integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== + "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" @@ -1091,6 +1103,18 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-lib-report" "*" +"@types/node@*": + version "13.5.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.5.3.tgz#37f1f539b7535b9fb4ef77d59db1847a837b7f17" + integrity sha512-ZPnWX9PW992w6DUsz3JIXHaSb5v7qmKCVzC3km6SxcDGxk7zmLfYaCJTbktIa5NeywJkkZDhGldKqDIvC5DRrA== + +"@types/resolve@0.0.8": + version "0.0.8" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" + integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== + dependencies: + "@types/node" "*" + "@types/stack-utils@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" @@ -1400,14 +1424,14 @@ browser-resolve@^1.11.3: dependencies: resolve "1.1.7" -browserslist@^4.8.2, browserslist@^4.8.3: - version "4.8.5" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.5.tgz#691af4e327ac877b25e7a3f7ee869c4ef36cdea3" - integrity sha512-4LMHuicxkabIB+n9874jZX/az1IaZ5a+EUuvD7KFOu9x/Bd5YHyO0DIz2ls/Kl8g0ItS4X/ilEgf4T1Br0lgSg== +browserslist@^4.8.3, browserslist@^4.8.5: + version "4.8.6" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.6.tgz#96406f3f5f0755d272e27a66f4163ca821590a7e" + integrity sha512-ZHao85gf0eZ0ESxLfCp73GG9O/VTytYDIkIiZDlURppLTI9wErSM/5yAKEq6rcUdxBLjMELmrYUJGg5sxGKMHg== dependencies: - caniuse-lite "^1.0.30001022" - electron-to-chromium "^1.3.338" - node-releases "^1.1.46" + caniuse-lite "^1.0.30001023" + electron-to-chromium "^1.3.341" + node-releases "^1.1.47" bser@2.1.1: version "2.1.1" @@ -1421,6 +1445,11 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== +builtin-modules@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.1.0.tgz#aad97c15131eb76b65b50ef208e7584cd76a7484" + integrity sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw== + cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -1446,7 +1475,7 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@^1.0.30001022: +caniuse-lite@^1.0.30001023: version "1.0.30001023" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001023.tgz#b82155827f3f5009077bdd2df3d8968bcbcc6fc4" integrity sha512-C5TDMiYG11EOhVOA62W1p3UsJ2z4DsHtMBQtjzp3ZsUglcQn62WOUgW0y795c7A5uZ+GCEIvzkMatLIlAsbNTA== @@ -1753,10 +1782,10 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -electron-to-chromium@^1.3.338: - version "1.3.341" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.341.tgz#ad4c039bf621715a12dd814a95a7d89ec80b092c" - integrity sha512-iezlV55/tan1rvdvt7yg7VHRSkt+sKfzQ16wTDqTbQqtl4+pSUkKPXpQHDvEt0c7gKcUHHwUbffOgXz6bn096g== +electron-to-chromium@^1.3.341: + version "1.3.344" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.344.tgz#f1397a633c35e726730c24be1084cd25c3ee8148" + integrity sha512-tvbx2Wl8WBR+ym3u492D0L6/jH+8NoQXqe46+QhbWH3voVPauGuZYeb1QAXYoOAWuiP2dbSvlBx0kQ1F3hu/Mw== emoji-regex@^8.0.0: version "8.0.0" @@ -1823,6 +1852,16 @@ estraverse@^4.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== +estree-walker@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" + integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== + +estree-walker@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" + integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== + esutils@^2.0.0, esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -1926,6 +1965,14 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" +extract-banner@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/extract-banner/-/extract-banner-0.1.2.tgz#61d1ed5cce3acdadb35f4323910b420364241a7f" + integrity sha1-YdHtXM46za2zX0MjkQtCA2QkGn8= + dependencies: + strip-bom-string "^0.1.2" + strip-use-strict "^0.1.0" + extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -2014,6 +2061,15 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-readdir-recursive@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" @@ -2103,7 +2159,7 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -graceful-fs@^4.1.11, graceful-fs@^4.2.3: +graceful-fs@^4.1.11, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== @@ -2366,6 +2422,11 @@ is-glob@^4.0.0: dependencies: is-extglob "^2.1.1" +is-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" + integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= + is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -2385,6 +2446,13 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" +is-reference@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.1.4.tgz#3f95849886ddb70256a3e6d062b1a68c13c51427" + integrity sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw== + dependencies: + "@types/estree" "0.0.39" + is-regex@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" @@ -2925,6 +2993,13 @@ json5@^2.1.0: dependencies: minimist "^1.2.0" +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" @@ -2969,7 +3044,7 @@ leven@^3.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== -levenary@^1.1.0: +levenary@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/levenary/-/levenary-1.1.1.tgz#842a9ee98d2075aa7faeedbe32679e9205f46f77" integrity sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ== @@ -3015,6 +3090,13 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" +magic-string@0.25.4, magic-string@^0.25.2: + version "0.25.4" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.4.tgz#325b8a0a79fc423db109b77fd5a19183b7ba5143" + integrity sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw== + dependencies: + sourcemap-codec "^1.4.4" + make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" @@ -3193,7 +3275,7 @@ node-notifier@^6.0.0: shellwords "^0.1.1" which "^1.3.1" -node-releases@^1.1.46: +node-releases@^1.1.47: version "1.1.47" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.47.tgz#c59ef739a1fd7ecbd9f0b7cf5b7871e8a8b591e4" integrity sha512-k4xjVPx5FpwBUj0Gw7uvFOTF4Ep8Hok1I6qjwL3pLfwe7Y0REQSAqOwwv9TWBCUtMHxcXfY4PgRLRozcChvTcA== @@ -3464,7 +3546,7 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.3" -prop-types@^15.6.2: +prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -3501,7 +3583,7 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== -react-is@^16.12.0, react-is@^16.8.1, react-is@^16.8.6: +react-is@^16.12.0, react-is@^16.8.1: version "16.12.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c" integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q== @@ -3684,7 +3766,7 @@ resolve@1.1.7: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.3.2: +resolve@^1.11.0, resolve@^1.11.1, resolve@^1.3.2: version "1.15.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.0.tgz#1b7ca96073ebb52e741ffd799f6b39ea462c67f5" integrity sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw== @@ -3696,13 +3778,46 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -rimraf@^3.0.0: +rimraf@^3.0.0, rimraf@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.1.tgz#48d3d4cb46c80d388ab26cd61b1b466ae9ae225a" integrity sha512-IQ4ikL8SjBiEDZfk+DFVwqRK8md24RWMEJkdSlgNLkyyAImcjf8SWvU1qFMDOb4igBClbTQ/ugPqXcRwdFTxZw== dependencies: glob "^7.1.3" +rollup-plugin-babel@^4.3.3: + version "4.3.3" + resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-4.3.3.tgz#7eb5ac16d9b5831c3fd5d97e8df77ba25c72a2aa" + integrity sha512-tKzWOCmIJD/6aKNz0H1GMM+lW1q9KyFubbWzGiOG540zxPPifnEAHTZwjo0g991Y+DyOZcLqBgqOdqazYE5fkw== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + rollup-pluginutils "^2.8.1" + +rollup-plugin-strip-banner@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-strip-banner/-/rollup-plugin-strip-banner-1.0.0.tgz#28ddfb74e7b9c1fe3e612124fa83e571b914e893" + integrity sha512-hatiuCbYCM7db/JmogCn5a4/Un5dLnAIT4ixXmH9qNCbzXJqd0/jnVd/8ZDA3fF7WmmVh7D18GAzha0MMmRpSQ== + dependencies: + extract-banner "0.1.2" + magic-string "0.25.4" + rollup-pluginutils "2.8.2" + +rollup-pluginutils@2.8.2, rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.1: + version "2.8.2" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" + integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== + dependencies: + estree-walker "^0.6.1" + +rollup@^1.30.1: + version "1.30.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-1.30.1.tgz#3fd28d6198beb2f3cd1640732047d5ec16c2d3a0" + integrity sha512-Uus8mwQXwaO+ZVoNwBcXKhT0AvycFCBW/W8VZtkpVGsotRllWk9oldfCjqWmTnFRI0y7x6BnEqSqc65N+/YdBw== + dependencies: + "@types/estree" "*" + "@types/node" "*" + acorn "^7.1.0" + rsvp@^4.8.4: version "4.8.5" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" @@ -3752,14 +3867,6 @@ saxes@^3.1.9: dependencies: xmlchars "^2.1.1" -scheduler@^0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.18.0.tgz#5901ad6659bc1d8f3fdaf36eb7a67b0d6746b1c4" - integrity sha512-agTSHR1Nbfi6ulI0kYNK0203joW2Y5W4po4l+v03tOoiJKpTBbxpNhWDvqc/4IcOw+KLmSiQLTasZ4cab2/UWQ== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - semver@7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" @@ -3913,6 +4020,11 @@ source-map@^0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== +sourcemap-codec@^1.4.4: + version "1.4.8" + resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4" + integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== + split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" @@ -4012,6 +4124,11 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" +strip-bom-string@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-0.1.2.tgz#9c6e720a313ba9836589518405ccfb88a5f41b9c" + integrity sha1-nG5yCjE7qYNliVGEBcz7iKX0G5w= + strip-bom@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" @@ -4027,6 +4144,11 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== +strip-use-strict@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/strip-use-strict/-/strip-use-strict-0.1.0.tgz#e30e8fd2206834e41e5eb3f3dc1ea7a4e4258f5f" + integrity sha1-4w6P0iBoNOQeXrPz3B6npOQlj18= + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -4219,6 +4341,11 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^2.0.1" +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + unset-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559"