diff --git a/.gitignore b/.gitignore index d068d5993..42bc3069d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ npm-debug.log.* dist .DS_Store bundle-stats.html +.vscode diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fd928f23..251351dbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,10 @@ All notable changes to this project will be documented in this file. If a contri ## Unreleased -- N/A +- Prevent `withTheme` HOC from breaking when passing a theme from `defaultProps`, thanks to [@kutyel](https://github.com/kutyel) (see [#1130](https://github.com/styled-components/styled-components/pull/1130)) +- Refactor out theme logic in StyledComponent's componentWillMount & componentWillReceiveProps (see [#1130](https://github.com/styled-components/styled-components/issues/1130)) +- Add onReset to valid react props list (see [#1234](https://github.com/styled-components/styled-components/pull/1234)) +- Add support for ServerStyleSheet PropType in both StyleSheetManager and StyledComponent (see [#1245](https://github.com/styled-components/styled-components/pull/1245)) ## [v2.2.1] - 2017-10-04 diff --git a/dangerfile.js b/dangerfile.js index 6ebe1632e..463188bec 100644 --- a/dangerfile.js +++ b/dangerfile.js @@ -2,6 +2,9 @@ import { danger, warn, fail, message } from 'danger' import fs from 'fs' +import jest from 'danger-plugin-jest' + +jest() const jsModifiedFiles = danger.git.modified_files.filter(path => path.startsWith('src') && path.endsWith('js')) const vendorModifiedFiles = danger.git.modified_files.filter(path => path.startsWith('src/vendor') && path.endsWith('js')) diff --git a/package.json b/package.json index edb9c5e64..a1229e2b8 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "is-function": "^1.0.1", "is-plain-object": "^2.0.1", "prop-types": "^15.5.4", - "stylis": "^3.2.1", + "stylis": "3.x", "supports-color": "^3.2.3" }, "devDependencies": { @@ -90,6 +90,7 @@ "bundlesize": "^0.13.2", "chokidar": "^1.6.0", "danger": "^0.16.0", + "danger-plugin-jest": "^1.0.1", "enzyme": "^2.8.2", "eslint": "^3.15.0", "eslint-config-airbnb": "^13.0.0", @@ -102,6 +103,7 @@ "flow-bin": "^0.47.0", "flow-watch": "^1.1.1", "jest": "^20.0.4", + "jest-json-reporter": "^1.2.2", "jsdom": "^9.10.0", "lint-staged": "^3.3.0", "node-watch": "^0.4.1", @@ -136,7 +138,8 @@ "testPathIgnorePatterns": [ "/src/native", "/src/primitives" - ] + ], + "testResultsProcessor": "jest-json-reporter" }, "lint-staged": { "*.js": [ @@ -148,7 +151,7 @@ "bundlesize": [ { "path": "./dist/styled-components.min.js", - "threshold": "14kB" + "threshold": "14.5kB" } ] } diff --git a/src/constructors/test/injectGlobal.test.js b/src/constructors/test/injectGlobal.test.js index 7f425f824..36325e617 100644 --- a/src/constructors/test/injectGlobal.test.js +++ b/src/constructors/test/injectGlobal.test.js @@ -10,9 +10,9 @@ import { expectCSSMatches, resetStyled } from '../../test/utils' const injectGlobal = _injectGlobal(stringifyRules, css) let styled = resetStyled() -const rule1 = 'width: 100%;' -const rule2 = 'padding: 10px;' -const rule3 = 'color: blue;' +const rule1 = 'width:100%;' +const rule2 = 'padding:10px;' +const rule3 = 'color:blue;' describe('injectGlobal', () => { beforeEach(() => { diff --git a/src/constructors/test/keyframes.test.js b/src/constructors/test/keyframes.test.js index b85be8374..654783481 100644 --- a/src/constructors/test/keyframes.test.js +++ b/src/constructors/test/keyframes.test.js @@ -41,19 +41,19 @@ describe('keyframes', () => { expectCSSMatches(` @-webkit-keyframes ${name} { 0% { - opacity: 0; + opacity:0; } 100% { - opacity: 1; + opacity:1; } } @keyframes ${name} { 0% { - opacity: 0; + opacity:0; } 100% { - opacity: 1; + opacity:1; } } `) diff --git a/src/hoc/withTheme.js b/src/hoc/withTheme.js index fd906f840..d46f592be 100644 --- a/src/hoc/withTheme.js +++ b/src/hoc/withTheme.js @@ -6,6 +6,7 @@ import PropTypes from 'prop-types' import hoistStatics from 'hoist-non-react-statics' import { CHANNEL, CHANNEL_NEXT, CONTEXT_CHANNEL_SHAPE } from '../models/ThemeProvider' import _isStyledComponent from '../utils/isStyledComponent' +import determineTheme from '../utils/determineTheme' const wrapWithTheme = (Component: ReactClass) => { const componentName = ( @@ -31,17 +32,29 @@ const wrapWithTheme = (Component: ReactClass) => { unsubscribeId: number = -1 componentWillMount() { + const { defaultProps } = this.constructor const styledContext = this.context[CHANNEL_NEXT] - if (styledContext === undefined) { + const themeProp = determineTheme(this.props, undefined, defaultProps) + if (styledContext === undefined && themeProp === undefined && process.env.NODE_ENV !== 'production') { // eslint-disable-next-line no-console - console.error('[withTheme] Please use ThemeProvider to be able to use withTheme') - return + console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps') + } else if (styledContext === undefined && themeProp !== undefined) { + this.setState({ theme: themeProp }) + } else { + const { subscribe } = styledContext + this.unsubscribeId = subscribe(nextTheme => { + const theme = determineTheme(this.props, nextTheme, defaultProps) + this.setState({ theme }) + }) } + } + componentWillReceiveProps(nextProps: { theme?: ?Object, [key: string]: any }) { + const { defaultProps } = this.constructor + this.setState((oldState) => { + const theme = determineTheme(nextProps, oldState.theme, defaultProps) - const { subscribe } = styledContext - this.unsubscribeId = subscribe(theme => { - this.setState({ theme }) + return { theme } }) } diff --git a/src/models/ComponentStyle.js b/src/models/ComponentStyle.js index f5c2df179..5c71e5a2b 100644 --- a/src/models/ComponentStyle.js +++ b/src/models/ComponentStyle.js @@ -4,6 +4,7 @@ import hashStr from '../vendor/glamor/hash' import type { RuleSet, NameGenerator, Flattener, Stringifier } from '../types' import StyleSheet from './StyleSheet' import isStyledComponent from '../utils/isStyledComponent' +import getComponentCssSelector from '../utils/getComponentCssSelector' const isStaticRules = (rules: RuleSet): boolean => { for (let i = 0; i < rules.length; i += 1) { @@ -33,7 +34,6 @@ export default (nameGenerator: NameGenerator, flatten: Flattener, stringifyRules isStatic: boolean lastClassName: ?string - constructor(rules: RuleSet, componentId: string) { this.rules = rules this.isStatic = isStaticRules(rules) @@ -49,7 +49,11 @@ export default (nameGenerator: NameGenerator, flatten: Flattener, stringifyRules * Hashes it, wraps the whole chunk in a .hash1234 {} * Returns the hash to be injected on render() * */ - generateAndInjectStyles(executionContext: Object, styleSheet: StyleSheet) { + generateAndInjectStyles( + executionContext: Object, + styleSheet: StyleSheet, + options: Object = {}, + ) { const { isStatic, lastClassName } = this if (isStatic && lastClassName !== undefined) { return lastClassName @@ -74,7 +78,9 @@ export default (nameGenerator: NameGenerator, flatten: Flattener, stringifyRules return name } - const css = `\n${stringifyRules(flatCSS, `.${name}`)}` + const selector = getComponentCssSelector(name, options) + + const css = `\n${stringifyRules(flatCSS, selector)}` // NOTE: this can only be set when we inject the class-name. // For some reason, presumably due to how css is stringifyRules behaves in // differently between client and server, styles break. diff --git a/src/models/StyleSheet.js b/src/models/StyleSheet.js index 01f415b63..b9e3c48b2 100644 --- a/src/models/StyleSheet.js +++ b/src/models/StyleSheet.js @@ -31,7 +31,7 @@ export default class StyleSheet { deferredInjections: { [string]: string } = {} componentTags: { [string]: Tag } // helper for `ComponentStyle` to know when it cache static styles. - // staticly styled-component can not safely cache styles on the server + // statically styled-component can not safely cache styles on the server // without all `ComponentStyle` instances saving a reference to the // the styleSheet instance they last rendered with, // or listening to creation / reset events. otherwise you might create diff --git a/src/models/StyleSheetManager.js b/src/models/StyleSheetManager.js index 56834b6ec..c7949e049 100644 --- a/src/models/StyleSheetManager.js +++ b/src/models/StyleSheetManager.js @@ -2,6 +2,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import StyleSheet, { CONTEXT_KEY } from './StyleSheet' +import ServerStyleSheet from './ServerStyleSheet' class StyleSheetManager extends Component { getChildContext() { @@ -18,11 +19,17 @@ class StyleSheetManager extends Component { } StyleSheetManager.childContextTypes = { - [CONTEXT_KEY]: PropTypes.instanceOf(StyleSheet).isRequired, + [CONTEXT_KEY]: PropTypes.oneOfType([ + PropTypes.instanceOf(StyleSheet), + PropTypes.instanceOf(ServerStyleSheet), + ]).isRequired, } StyleSheetManager.propTypes = { - sheet: PropTypes.instanceOf(StyleSheet).isRequired, + sheet: PropTypes.oneOfType([ + PropTypes.instanceOf(StyleSheet), + PropTypes.instanceOf(ServerStyleSheet), + ]).isRequired, } export default StyleSheetManager diff --git a/src/models/StyledComponent.js b/src/models/StyledComponent.js index e44721f73..739ba6ed3 100644 --- a/src/models/StyledComponent.js +++ b/src/models/StyledComponent.js @@ -10,10 +10,12 @@ import validAttr from '../utils/validAttr' import isTag from '../utils/isTag' import isStyledComponent from '../utils/isStyledComponent' import getComponentName from '../utils/getComponentName' +import determineTheme from '../utils/determineTheme' import type { RuleSet, Target } from '../types' import { CHANNEL, CHANNEL_NEXT, CONTEXT_CHANNEL_SHAPE } from './ThemeProvider' import StyleSheet, { CONTEXT_KEY } from './StyleSheet' +import ServerStyleSheet from './ServerStyleSheet' const escapeRegex = /[[\].#*$><+~=|^:(),"'`]/g const multiDashRegex = /--+/g @@ -26,173 +28,167 @@ export default (ComponentStyle: Function, constructWithOptions: Function) => { /* We depend on components having unique IDs */ const identifiers = {} const generateId = (_displayName: string, parentComponentId: string) => { - const displayName = typeof _displayName !== 'string' ? - 'sc' : _displayName - .replace(escapeRegex, '-') // Replace all possible CSS selectors - .replace(multiDashRegex, '-') // Replace multiple -- with single - + const displayName = + typeof _displayName !== 'string' + ? 'sc' + : _displayName + .replace(escapeRegex, '-') // Replace all possible CSS selectors + .replace(multiDashRegex, '-') // Replace multiple -- with single - const nr = (identifiers[displayName] || 0) + 1 identifiers[displayName] = nr const hash = ComponentStyle.generateName(displayName + nr) const componentId = `${displayName}-${hash}` - return parentComponentId !== undefined - ? `${parentComponentId}-${componentId}` - : componentId + return parentComponentId !== undefined ? `${parentComponentId}-${componentId}` : componentId } - class BaseStyledComponent extends Component { - static target: Target - static styledComponentId: string - static attrs: Object - static componentStyle: Object - static warnTooManyClasses: Function - - attrs = {} - state = { - theme: null, - generatedClassName: '', - } - unsubscribeId: number = -1 - - unsubscribeFromContext() { - if (this.unsubscribeId !== -1) { - this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId) + const createBaseStyledComponent = (options: Object) => { + class BaseStyledComponent extends Component { + static target: Target + static styledComponentId: string + static attrs: Object + static componentStyle: Object + static warnTooManyClasses: Function + + attrs = {} + state = { + theme: null, + generatedClassName: '', } - } + unsubscribeId: number = -1 - buildExecutionContext(theme: any, props: any) { - const { attrs } = this.constructor - const context = { ...props, theme } - if (attrs === undefined) { - return context + unsubscribeFromContext() { + if (this.unsubscribeId !== -1) { + this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId) + } } - this.attrs = Object.keys(attrs).reduce((acc, key) => { - const attr = attrs[key] - // eslint-disable-next-line no-param-reassign - acc[key] = typeof attr === 'function' ? attr(context) : attr - return acc - }, {}) - - return { ...context, ...this.attrs } - } - - generateAndInjectStyles(theme: any, props: any) { - const { attrs, componentStyle, warnTooManyClasses } = this.constructor - const styleSheet = this.context[CONTEXT_KEY] || StyleSheet.instance + buildExecutionContext(theme: any, props: any) { + const { attrs } = this.constructor + const context = { ...props, theme } + if (attrs === undefined) { + return context + } - // staticaly styled-components don't need to build an execution context object, - // and shouldn't be increasing the number of class names - if (componentStyle.isStatic && attrs === undefined) { - return componentStyle.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, styleSheet) - } else { - const executionContext = this.buildExecutionContext(theme, props) - const className = componentStyle.generateAndInjectStyles(executionContext, styleSheet) + this.attrs = Object.keys(attrs).reduce((acc, key) => { + const attr = attrs[key] + // eslint-disable-next-line no-param-reassign + acc[key] = typeof attr === 'function' ? attr(context) : attr + return acc + }, {}) - if (warnTooManyClasses !== undefined) warnTooManyClasses(className) + return { ...context, ...this.attrs } + } - return className + generateAndInjectStyles(theme: any, props: any) { + const { attrs, componentStyle, warnTooManyClasses } = this.constructor + const styleSheet = this.context[CONTEXT_KEY] || StyleSheet.instance + + // statically styled-components don't need to build an execution context object, + // and shouldn't be increasing the number of class names + if (componentStyle.isStatic && attrs === undefined) { + return componentStyle.generateAndInjectStyles( + STATIC_EXECUTION_CONTEXT, + styleSheet, + options, + ) + } else { + const executionContext = this.buildExecutionContext(theme, props) + const className = componentStyle.generateAndInjectStyles( + executionContext, + styleSheet, + options, + ) + + if (warnTooManyClasses !== undefined) warnTooManyClasses(className) + + return className + } } - } - componentWillMount() { - const { componentStyle } = this.constructor - const styledContext = this.context[CHANNEL_NEXT] - - // If this is a staticaly-styled component, we don't need to the theme - // to generate or build styles. - if (componentStyle.isStatic) { - const generatedClassName = this.generateAndInjectStyles( - STATIC_EXECUTION_CONTEXT, - this.props, - ) - this.setState({ generatedClassName }) - // If there is a theme in the context, subscribe to the event emitter. This - // is necessary due to pure components blocking context updates, this circumvents - // that by updating when an event is emitted - } else if (styledContext !== undefined) { - const { subscribe } = styledContext - this.unsubscribeId = subscribe(nextTheme => { - // This will be called once immediately - - // Props should take precedence over ThemeProvider, which should take precedence over - // defaultProps, but React automatically puts defaultProps on props. - const { defaultProps } = this.constructor - /* eslint-disable react/prop-types */ - const isDefaultTheme = defaultProps && this.props.theme === defaultProps.theme - const theme = this.props.theme && !isDefaultTheme ? this.props.theme : nextTheme - /* eslint-enable */ + componentWillMount() { + const { componentStyle } = this.constructor + const styledContext = this.context[CHANNEL_NEXT] + + // If this is a statically-styled component, we don't need to the theme + // to generate or build styles. + if (componentStyle.isStatic) { + const generatedClassName = this.generateAndInjectStyles( + STATIC_EXECUTION_CONTEXT, + this.props, + ) + this.setState({ generatedClassName }) + // If there is a theme in the context, subscribe to the event emitter. This + // is necessary due to pure components blocking context updates, this circumvents + // that by updating when an event is emitted + } else if (styledContext !== undefined) { + const { subscribe } = styledContext + this.unsubscribeId = subscribe(nextTheme => { + // This will be called once immediately + const theme = determineTheme(this.props, nextTheme, this.constructor.defaultProps) + const generatedClassName = this.generateAndInjectStyles(theme, this.props) + + this.setState({ theme, generatedClassName }) + }) + } else { + // eslint-disable-next-line react/prop-types + const theme = this.props.theme || {} const generatedClassName = this.generateAndInjectStyles(theme, this.props) this.setState({ theme, generatedClassName }) - }) - } else { - // eslint-disable-next-line react/prop-types - const theme = this.props.theme || {} - const generatedClassName = this.generateAndInjectStyles( - theme, - this.props, - ) - this.setState({ theme, generatedClassName }) - } - } - - componentWillReceiveProps(nextProps: { theme?: Theme, [key: string]: any }) { - // If this is a staticaly-styled component, we don't need to listen to - // props changes to update styles - const { componentStyle } = this.constructor - if (componentStyle.isStatic) { - return + } } - this.setState((oldState) => { - // Props should take precedence over ThemeProvider, which should take precedence over - // defaultProps, but React automatically puts defaultProps on props. - const { defaultProps } = this.constructor - /* eslint-disable react/prop-types */ - const isDefaultTheme = defaultProps && nextProps.theme === defaultProps.theme - const theme = nextProps.theme && !isDefaultTheme ? nextProps.theme : oldState.theme - /* eslint-enable */ - const generatedClassName = this.generateAndInjectStyles(theme, nextProps) - - return { theme, generatedClassName } - }) - } + componentWillReceiveProps(nextProps: { theme?: Theme, [key: string]: any }) { + // If this is a statically-styled component, we don't need to listen to + // props changes to update styles + const { componentStyle } = this.constructor + if (componentStyle.isStatic) { + return + } - componentWillUnmount() { - this.unsubscribeFromContext() - } + this.setState(oldState => { + const theme = determineTheme(nextProps, oldState.theme, this.constructor.defaultProps) + const generatedClassName = this.generateAndInjectStyles(theme, nextProps) - render() { - // eslint-disable-next-line react/prop-types - const { innerRef } = this.props - const { generatedClassName } = this.state - const { styledComponentId, target } = this.constructor + return { theme, generatedClassName } + }) + } - const isTargetTag = isTag(target) + componentWillUnmount() { + this.unsubscribeFromContext() + } - const className = [ + render() { // eslint-disable-next-line react/prop-types - this.props.className, - styledComponentId, - this.attrs.className, - generatedClassName, - ].filter(Boolean).join(' ') - - const baseProps = { - ...this.attrs, - className, - } + const { innerRef } = this.props + const { generatedClassName } = this.state + const { styledComponentId, target } = this.constructor + + const isTargetTag = isTag(target) + + const className = [ + // eslint-disable-next-line react/prop-types + this.props.className, + styledComponentId, + this.attrs.className, + generatedClassName, + ] + .filter(Boolean) + .join(' ') + + const baseProps = { + ...this.attrs, + className, + } - if (isStyledComponent(target)) { - baseProps.innerRef = innerRef - } else { - baseProps.ref = innerRef - } + if (isStyledComponent(target)) { + baseProps.innerRef = innerRef + } else { + baseProps.ref = innerRef + } - const propsForElement = Object - .keys(this.props) - .reduce((acc, propName) => { + const propsForElement = Object.keys(this.props).reduce((acc, propName) => { // Don't pass through non HTML tags through to HTML elements // always omit innerRef if ( @@ -207,25 +203,26 @@ export default (ComponentStyle: Function, constructWithOptions: Function) => { return acc }, baseProps) - return createElement(target, propsForElement) + return createElement(target, propsForElement) + } } + + return BaseStyledComponent } - const createStyledComponent = ( - target: Target, - options: Object, - rules: RuleSet, - ) => { + const createStyledComponent = (target: Target, options: Object, rules: RuleSet) => { const { displayName = isTag(target) ? `styled.${target}` : `Styled(${getComponentName(target)})`, componentId = generateId(options.displayName, options.parentComponentId), - ParentComponent = BaseStyledComponent, + ParentComponent = createBaseStyledComponent(options), rules: extendingRules, attrs, } = options - const styledComponentId = (options.displayName && options.componentId) ? - `${options.displayName}-${options.componentId}` : componentId + const styledComponentId = + options.displayName && options.componentId + ? `${options.displayName}-${options.componentId}` + : componentId let warnTooManyClasses if (process.env.NODE_ENV !== 'production') { @@ -241,7 +238,10 @@ export default (ComponentStyle: Function, constructWithOptions: Function) => { static contextTypes = { [CHANNEL]: PropTypes.func, [CHANNEL_NEXT]: CONTEXT_CHANNEL_SHAPE, - [CONTEXT_KEY]: PropTypes.instanceOf(StyleSheet), + [CONTEXT_KEY]: PropTypes.oneOfType([ + PropTypes.instanceOf(StyleSheet), + PropTypes.instanceOf(ServerStyleSheet), + ]), } static displayName = displayName @@ -274,10 +274,7 @@ export default (ComponentStyle: Function, constructWithOptions: Function) => { ...optionsToCopy } = options - const newRules = - rulesFromOptions === undefined - ? rules - : rulesFromOptions.concat(rules) + const newRules = rulesFromOptions === undefined ? rules : rulesFromOptions.concat(rules) const newOptions = { ...optionsToCopy, diff --git a/src/models/StyledNativeComponent.js b/src/models/StyledNativeComponent.js index 520e97f5c..f115a79ab 100644 --- a/src/models/StyledNativeComponent.js +++ b/src/models/StyledNativeComponent.js @@ -7,6 +7,7 @@ import type { Theme } from './ThemeProvider' import isTag from '../utils/isTag' import isStyledComponent from '../utils/isStyledComponent' import getComponentName from '../utils/getComponentName' +import determineTheme from '../utils/determineTheme' import type { RuleSet, Target } from '../types' import { CHANNEL, CHANNEL_NEXT, CONTEXT_CHANNEL_SHAPE } from './ThemeProvider' @@ -67,15 +68,9 @@ export default (constructWithOptions: Function, InlineStyle: Function) => { const { subscribe } = styledContext this.unsubscribeId = subscribe(nextTheme => { // This will be called once immediately - - // Props should take precedence over ThemeProvider, which should take precedence over - // defaultProps, but React automatically puts defaultProps on props. - const { defaultProps } = this.constructor - /* eslint-disable react/prop-types */ - const isDefaultTheme = defaultProps && this.props.theme === defaultProps.theme - const theme = this.props.theme && !isDefaultTheme ? this.props.theme : nextTheme - /* eslint-enable */ + const theme = determineTheme(this.props, nextTheme, this.constructor.defaultProps) const generatedStyles = this.generateAndInjectStyles(theme, this.props) + this.setState({ theme, generatedStyles }) }) } else { @@ -91,16 +86,10 @@ export default (constructWithOptions: Function, InlineStyle: Function) => { componentWillReceiveProps(nextProps: { theme?: Theme, [key: string]: any }) { this.setState((oldState) => { - // Props should take precedence over ThemeProvider, which should take precedence over - // defaultProps, but React automatically puts defaultProps on props. - const { defaultProps } = this.constructor - /* eslint-disable react/prop-types */ - const isDefaultTheme = defaultProps && nextProps.theme === defaultProps.theme - const theme = nextProps.theme && !isDefaultTheme ? nextProps.theme : oldState.theme - /* eslint-enable */ - const generatedStyles = this.generateAndInjectStyles(theme, nextProps) - - return { theme, generatedStyles } + const theme = determineTheme(nextProps, oldState.theme, this.constructor.defaultProps) + const generatedClassName = this.generateAndInjectStyles(theme, nextProps) + + return { theme, generatedClassName } }) } diff --git a/src/test/__snapshots__/ssr.test.js.snap b/src/test/__snapshots__/ssr.test.js.snap index f2d737bcb..4e2445623 100644 --- a/src/test/__snapshots__/ssr.test.js.snap +++ b/src/test/__snapshots__/ssr.test.js.snap @@ -4,11 +4,11 @@ exports[`ssr should add a nonce to the stylesheet if webpack nonce is detected i exports[`ssr should add a nonce to the stylesheet if webpack nonce is detected in the global scope 2`] = ` "" `; @@ -16,13 +16,13 @@ exports[`ssr should allow global styles to be injected during rendering 1`] = `" exports[`ssr should allow global styles to be injected during rendering 2`] = ` "" `; @@ -30,17 +30,17 @@ exports[`ssr should allow global styles to be injected during rendering 3`] = `" exports[`ssr should allow global styles to be injected during rendering 4`] = ` "" `; @@ -48,13 +48,13 @@ exports[`ssr should dispatch global styles to each ServerStyleSheet 1`] = `"

/* sc-component-id: sc-global-2303210225 */ -body{background: papayawhip;} +body{background:papayawhip;} " `; @@ -62,11 +62,11 @@ exports[`ssr should extract both global and local CSS 1`] = `"

/* sc-component-id: sc-global-2303210225 */ -body{background: papayawhip;} +body{background:papayawhip;} " `; @@ -76,7 +76,7 @@ exports[`ssr should extract the CSS in a simple case 2`] = ` "" `; @@ -86,11 +86,11 @@ exports[`ssr should render CSS in the order the components were defined, not ren "" `; @@ -98,7 +98,7 @@ exports[`ssr should return a generated React style element 1`] = ` Object { "dangerouslySetInnerHTML": Object { "__html": "/* sc-component-id: sc-global-2303210225 */ -body{background: papayawhip;} +body{background:papayawhip;} ", }, "data-styled-components": "", @@ -113,7 +113,7 @@ Object { "__html": "/* sc-component-id: sc-a */ .sc-a {} -.b{color: red;} +.b{color:red;} ", }, "data-styled-components": "b", @@ -126,11 +126,11 @@ exports[`ssr should share global styles but keep renders separate 1`] = `"

/* sc-component-id: sc-global-2303210225 */ -body{background: papayawhip;} +body{background:papayawhip;} " `; @@ -138,10 +138,10 @@ exports[`ssr should share global styles but keep renders separate 3`] = `"

/* sc-component-id: sc-global-2303210225 */ -body{background: papayawhip;} +body{background:papayawhip;} " `; diff --git a/src/test/attrs.test.js b/src/test/attrs.test.js index aca742e8d..06a141aa4 100644 --- a/src/test/attrs.test.js +++ b/src/test/attrs.test.js @@ -110,13 +110,13 @@ describe('attrs', () => { href: '#', activeClassName: '--is-active' })` - color: blue; + color:blue; &.${props => props.activeClassName} { - color: red; + color:red; } ` expect(shallow().html()).toEqual('') - expectCSSMatches('.sc-a {} .b { color: blue; } .b.--is-active { color: red; }') + expectCSSMatches('.sc-a {} .b { color:blue; } .b.--is-active { color:red; }') }) it('should pass through children as a normal prop', () => { diff --git a/src/test/basic.test.js b/src/test/basic.test.js index 679d03433..d9f5abe6a 100644 --- a/src/test/basic.test.js +++ b/src/test/basic.test.js @@ -46,7 +46,7 @@ describe('basic', () => { color: blue; ` shallow() - expectCSSMatches('.sc-a { } .b { color: blue; }') + expectCSSMatches('.sc-a { } .b { color:blue; }') }) it('should inject only once for a styled component, no matter how often it\'s mounted', () => { @@ -55,7 +55,7 @@ describe('basic', () => { ` shallow() shallow() - expectCSSMatches('.sc-a {} .b { color: blue; }') + expectCSSMatches('.sc-a {} .b { color:blue; }') }) it('Should have the correct styled(component) displayName', () => { @@ -177,7 +177,7 @@ describe('basic', () => { shallow() shallow() - expectCSSMatches('.sc-a {} .d { color: red; } .sc-b {} .c { color: blue; }') + expectCSSMatches('.sc-a {} .d { color:red; } .sc-b {} .c { color:blue; }') }) }) }) diff --git a/src/test/css.test.js b/src/test/css.test.js index 9a22cc0ab..735f73610 100644 --- a/src/test/css.test.js +++ b/src/test/css.test.js @@ -16,7 +16,7 @@ describe('css features', () => { transition: opacity 0.3s; ` shallow() - expectCSSMatches('.sc-a {} .b { -webkit-transition: opacity 0.3s; transition: opacity 0.3s; }') + expectCSSMatches('.sc-a {} .b { -webkit-transition:opacity 0.3s; transition:opacity 0.3s; }') }) it('should add vendor prefixes for display', () => { @@ -29,7 +29,7 @@ describe('css features', () => { expectCSSMatches(` .sc-a {} .b { - display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; -webkit-align-items: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; + display:-webkit-box; display:-webkit-flex; display:-ms-flexbox; display:flex; -webkit-flex-direction:column; -ms-flex-direction:column; flex-direction:column; -webkit-align-items:center; -webkit-box-align:center; -ms-flex-align:center; align-items:center; } `) }) @@ -39,6 +39,6 @@ describe('css features', () => { --custom-prop: some-val; ` shallow() - expectCSSMatches('.sc-a {} .b { --custom-prop: some-val; }') + expectCSSMatches('.sc-a {} .b { --custom-prop:some-val; }') }) }) diff --git a/src/test/extending.test.js b/src/test/extending.test.js index e22a70bc9..7bdfa5fc4 100644 --- a/src/test/extending.test.js +++ b/src/test/extending.test.js @@ -32,7 +32,7 @@ describe('extending', () => { shallow() shallow() - expectCSSMatches('.sc-a {} .c { color: blue; } .sc-b {} .d { color: blue; }') + expectCSSMatches('.sc-a {} .c { color:blue; } .sc-b {} .d { color:blue; }') }) it('should attach styles to child class if only child has styles', () => { @@ -42,7 +42,7 @@ describe('extending', () => { shallow() shallow() - expectCSSMatches('.sc-a {} .sc-b {} .d { color: blue; }') + expectCSSMatches('.sc-a {} .sc-b {} .d { color:blue; }') }) it('should generate a class for the child with the rules of the parent', () => { @@ -51,7 +51,7 @@ describe('extending', () => { shallow() - expectCSSMatches('.sc-b {} .c { color: blue;color: red; }') + expectCSSMatches('.sc-b {} .c { color:blue;color:red; }') }) it('should generate different classes for both parent and child', () => { @@ -61,7 +61,7 @@ describe('extending', () => { shallow() shallow() - expectCSSMatches('.sc-a {} .c { color: blue; } .sc-b {} .d { color: blue;color: red; }') + expectCSSMatches('.sc-a {} .c { color:blue; } .sc-b {} .d { color:blue;color:red; }') }) it('should copy nested rules to the child', () => { @@ -76,11 +76,11 @@ describe('extending', () => { expectCSSMatches(` .sc-a {} - .c{ color: blue; } - .c > h1{ font-size: 4rem; } + .c{ color:blue; } + .c > h1{ font-size:4rem; } .sc-b {} - .d { color: blue; color: red; } - .d > h1 { font-size: 4rem; } + .d { color:blue; color:red; } + .d > h1 { font-size:4rem; } `) }) @@ -98,8 +98,8 @@ describe('extending', () => { shallow() expectCSSMatches(` - .sc-a {} .c { color: red; } - .sc-b {} .d { color: red; background-color: green; } + .sc-a {} .c { color:red; } + .sc-b {} .d { color:red; background-color:green; } `) }) @@ -162,13 +162,13 @@ describe('extending', () => { expectCSSMatches(` .sc-a { } - .e { background-color: red; } + .e { background-color:red; } .sc-b { } - .f { background-color: red; color: blue; } + .f { background-color:red; color:blue; } .sc-c { } - .g { background-color: red; color: blue; border: 2px solid black; } + .g { background-color:red; color:blue; border:2px solid black; } .sc-d { } - .h { background-color: red; color: blue; border: 2px solid black; border-width: 10; } + .h { background-color:red; color:blue; border:2px solid black; border-width:10; } `) }) @@ -189,7 +189,7 @@ describe('extending', () => { expect(shallow().html()).toEqual('') expectCSSMatches(` - .sc-c {} .d { color: red; color: green; } + .sc-c {} .d { color:red; color:green; } `) }) diff --git a/src/test/overriding.test.js b/src/test/overriding.test.js index 94c12eb69..becf08409 100644 --- a/src/test/overriding.test.js +++ b/src/test/overriding.test.js @@ -29,10 +29,10 @@ describe('extending', () => { shallow() expectCSSMatches(` .sc-a {} - .c { color: blue; font-weight: light; } + .c { color:blue; font-weight:light; } .sc-b {} - .d { padding: 1rem; } - .d > .sc-a { font-weight: bold; } + .d { padding:1rem; } + .d > .sc-a { font-weight:bold; } `) }) }) diff --git a/src/test/props.test.js b/src/test/props.test.js index 9879281a1..adf28c257 100644 --- a/src/test/props.test.js +++ b/src/test/props.test.js @@ -16,12 +16,12 @@ describe('props', () => { color: ${props => props.fg || 'black'}; ` shallow() - expectCSSMatches('.sc-a {} .b { color: black; }') + expectCSSMatches('.sc-a {} .b { color:black; }') }) it('should execute interpolations and inject props', () => { const Comp = styled.div`color: ${props => props.fg || 'black'};` shallow() - expectCSSMatches('.sc-a {} .b { color: red; }') + expectCSSMatches('.sc-a {} .b { color:red; }') }) it('should ignore non-0 falsy object interpolations', () => { const Comp = styled.div` @@ -34,6 +34,6 @@ describe('props', () => { })}; ` shallow() - expectCSSMatches('.sc-a {} .b { border-width: 0; ; ; }') + expectCSSMatches('.sc-a {} .b { border-width:0; }') }) }) diff --git a/src/test/rehydration.test.js b/src/test/rehydration.test.js index ea65a91e1..f93b761cf 100644 --- a/src/test/rehydration.test.js +++ b/src/test/rehydration.test.js @@ -52,7 +52,7 @@ describe('rehydration', () => { color: blue; ` shallow() - expectCSSMatches('.TWO {} .b { color: red; } .ONE { } .a { color: blue; }') + expectCSSMatches('.TWO {} .b { color: red; } .ONE { } .a { color:blue; }') }) it('should reuse a componentId', () => { @@ -60,7 +60,7 @@ describe('rehydration', () => { shallow() const B = styled.div.withConfig({ componentId: 'TWO' })`` shallow() - expectCSSMatches('.TWO {} .b { color: red; } .ONE { } .a { color: blue; }') + expectCSSMatches('.TWO {} .b { color: red; } .ONE { } .a { color:blue; }') }) it('should reuse a componentId and generated class', () => { @@ -68,7 +68,7 @@ describe('rehydration', () => { shallow() const B = styled.div.withConfig({ componentId: 'TWO' })`color: red;` shallow() - expectCSSMatches('.TWO {} .b { color: red; } .ONE { } .a { color: blue; }') + expectCSSMatches('.TWO {} .b { color: red; } .ONE { } .a { color:blue; }') }) it('should reuse a componentId and inject new classes', () => { @@ -78,7 +78,7 @@ describe('rehydration', () => { shallow() const C = styled.div.withConfig({ componentId: 'TWO' })`color: green;` shallow() - expectCSSMatches('.TWO {} .b { color: red; } .c { color: green; } .ONE { } .a { color: blue; }') + expectCSSMatches('.TWO {} .b { color: red; } .c { color:green; } .ONE { } .a { color:blue; }') }) }) @@ -124,7 +124,7 @@ describe('rehydration', () => { ` shallow() expectCSSMatches(` - .ONE { } .a { color: blue; } .x { color: green; } + .ONE { } .a { color: blue; } .x { color:green; } .TWO { } .b { color: red; } `) }) @@ -152,7 +152,7 @@ describe('rehydration', () => { shallow() const B = styled.div.withConfig({ componentId: 'TWO' })`color: red;` shallow() - expectCSSMatches('.TWO {} .b { color: red; } .ONE { } .a { color: blue; } .TWO {} .b { color: red; } ') + expectCSSMatches('.TWO {} .b { color: red; } .ONE { } .a { color:blue; } .TWO {} .b { color:red; } ') }) }) @@ -183,12 +183,12 @@ describe('rehydration', () => { injectGlobal` body { color: tomato; } ` - expectCSSMatches('body { background: papayawhip; } .TWO {} .b { color: red; } body { color: tomato; }') + expectCSSMatches('body { background: papayawhip; } .TWO {} .b { color: red; } body { color:tomato; }') expect(getStyleTags()).toEqual([ { isLocal: 'false', css: '/* sc-component-id: sc-global-557410406 */ body { background: papayawhip; }', }, { isLocal: 'true', css: '/* sc-component-id: TWO */ .TWO {} .b { color: red; }', }, - { isLocal: 'false', css: '/* sc-component-id: sc-global-2299393384 */ body{color: tomato;}', }, + { isLocal: 'false', css: '/* sc-component-id: sc-global-2299393384 */ body{color:tomato;}', }, ]) }) @@ -199,12 +199,12 @@ describe('rehydration', () => { const A = styled.div.withConfig({ componentId: 'ONE' })`color: blue;` shallow() - expectCSSMatches('body { background: papayawhip; } .TWO {} .b { color: red; } body { color: tomato; } .ONE { } .a { color: blue; }') + expectCSSMatches('body { background: papayawhip; } .TWO {} .b { color: red; } body { color:tomato; } .ONE { } .a { color:blue; }') expect(getStyleTags()).toEqual([ { isLocal: 'false', css: '/* sc-component-id: sc-global-557410406 */ body { background: papayawhip; }', }, { isLocal: 'true', css: '/* sc-component-id: TWO */ .TWO {} .b { color: red; }', }, - { isLocal: 'false', css: '/* sc-component-id: sc-global-2299393384 */ body{color: tomato;}', }, - { isLocal: 'true', css: '/* sc-component-id: ONE */ .ONE {} .a{color: blue;}', }, + { isLocal: 'false', css: '/* sc-component-id: sc-global-2299393384 */ body{color:tomato;}', }, + { isLocal: 'true', css: '/* sc-component-id: ONE */ .ONE {} .a{color:blue;}', }, ]) }) }) @@ -271,7 +271,7 @@ describe('rehydration', () => { /* ...the new data attribute for the new classname "c"... */ .replace(new RegExp(`${SC_ATTR}="a b"`), `${SC_ATTR}="a b c"`) /* ...and the new CSS before the closing tag. */ - .replace(/(?=<\/style>)/, '\n/* sc-component-id: THREE */\n.THREE {}\n.c{color: green;}') + .replace(/(?=<\/style>)/, '\n/* sc-component-id: THREE */\n.THREE {}\n.c{color:green;}') ) /* Note: any future additions don't replace the style tag */ @@ -285,8 +285,8 @@ describe('rehydration', () => { html { font-size: 16px; } body { background: papayawhip; } .ONE { } .a { color: blue; } - .TWO { } .b { color: red; } .d { color: tomato; } - .THREE { } .c { color: green; } + .TWO { } .b { color: red; } .d { color:tomato; } + .THREE { } .c { color:green; } `) }) @@ -363,7 +363,7 @@ describe('rehydration', () => { ` expectCSSMatches(` @-webkit-keyframes keyframe_880 {from {opacity: 0;}}@keyframes keyframe_880 {from {opacity: 0;}} - @-webkit-keyframes keyframe_144 {from {opacity: 1;}}@keyframes keyframe_144 {from {opacity: 1;}} + @-webkit-keyframes keyframe_144 {from {opacity:1;}}@keyframes keyframe_144 {from {opacity:1;}} `) }) @@ -383,7 +383,7 @@ describe('rehydration', () => { expectCSSMatches(` @-webkit-keyframes keyframe_880 {from {opacity: 0;}}@keyframes keyframe_880 {from {opacity: 0;}} .sc-a { } .d { -webkit-animation:keyframe_880 1s both; animation:keyframe_880 1s both; } - @-webkit-keyframes keyframe_144 {from {opacity: 1;}}@keyframes keyframe_144 {from {opacity: 1;}} + @-webkit-keyframes keyframe_144 {from {opacity:1;}}@keyframes keyframe_144 {from {opacity:1;}} .sc-b { } .c { -webkit-animation:keyframe_144 1s both; animation:keyframe_144 1s both; } `) }) diff --git a/src/test/styles.test.js b/src/test/styles.test.js index d99d62d67..5b9956f4d 100644 --- a/src/test/styles.test.js +++ b/src/test/styles.test.js @@ -27,7 +27,7 @@ describe('with styles', () => { ${rule} ` shallow() - expectCSSMatches('.sc-a {} .b { color: blue; }') + expectCSSMatches('.sc-a {} .b { color:blue; }') }) it('should append multiple styles', () => { @@ -38,7 +38,7 @@ describe('with styles', () => { ${rule2} ` shallow() - expectCSSMatches('.sc-a {} .b { color: blue; background: red; }') + expectCSSMatches('.sc-a {} .b { color:blue; background:red; }') }) it('should handle inline style objects', () => { @@ -49,7 +49,7 @@ describe('with styles', () => { ${rule1} ` shallow() - expectCSSMatches('.sc-a {} .b { background-color: blue; }') + expectCSSMatches('.sc-a {} .b { background-color:blue; }') }) it('should handle inline style objects with media queries', () => { @@ -63,7 +63,7 @@ describe('with styles', () => { ${rule1} ` shallow() - expectCSSMatches('.sc-a {} .b { background-color: blue; } @media screen and (min-width: 250px) { .b { background-color: red; } }') + expectCSSMatches('.sc-a {} .b { background-color:blue; } @media screen and (min-width:250px) { .b { background-color:red; } }') }) it('should handle inline style objects with pseudo selectors', () => { @@ -77,7 +77,7 @@ describe('with styles', () => { ${rule1} ` shallow() - expectCSSMatches('.sc-a {} .b { background-color: blue; } .b:hover { -webkit-text-decoration: underline; text-decoration: underline; }') + expectCSSMatches('.sc-a {} .b { background-color:blue; } .b:hover { text-decoration:underline; }') }) it('should handle inline style objects with pseudo selectors', () => { @@ -91,7 +91,7 @@ describe('with styles', () => { ${rule1} ` shallow() - expectCSSMatches('.sc-a {} .b { background-color: blue; } .b:hover { -webkit-text-decoration: underline; text-decoration: underline; }') + expectCSSMatches('.sc-a {} .b { background-color:blue; } .b:hover { text-decoration:underline; }') }) it('should handle inline style objects with nesting', () => { @@ -105,7 +105,7 @@ describe('with styles', () => { ${rule1} ` shallow() - expectCSSMatches('.sc-a {} .b { background-color: blue; } .b > h1 { color: white; }') + expectCSSMatches('.sc-a {} .b { background-color:blue; } .b > h1 { color:white; }') }) it('should handle inline style objects with contextual selectors', () => { @@ -119,7 +119,7 @@ describe('with styles', () => { ${rule1} ` shallow() - expectCSSMatches('.sc-a {} .b { background-color: blue; } html.something .b { color: white; }') + expectCSSMatches('.sc-a {} .b { background-color:blue; } html.something .b { color:white; }') }) it('should inject styles of multiple components', () => { @@ -135,7 +135,7 @@ describe('with styles', () => { shallow() shallow() - expectCSSMatches('.sc-a {} .c { background: blue; } .sc-b {} .d { background: red; }') + expectCSSMatches('.sc-a {} .c { background:blue; } .sc-b {} .d { background:red; }') }) it('should inject styles of multiple components based on creation, not rendering order', () => { @@ -155,9 +155,9 @@ describe('with styles', () => { // Classes _do_ get generated in the order of rendering but that's ok expectCSSMatches(` .sc-a {} - .d { content: "first rule"; } + .d { content:"first rule"; } .sc-b {} - .c { content: "second rule"; } + .c { content:"second rule"; } `) }) @@ -172,7 +172,7 @@ describe('with styles', () => { expectCSSMatches(` .sc-a {} .b { - color: blue; + color:blue; } `) }) @@ -188,7 +188,7 @@ describe('with styles', () => { expectCSSMatches(` .sc-a {} .b { - color: blue; + color:blue; } `) @@ -211,11 +211,11 @@ describe('with styles', () => { shallow() expectCSSMatches(` html { - background: red; + background:red; } .sc-a {} .b { - color: blue; + color:blue; } `) diff --git a/src/test/theme.test.js b/src/test/theme.test.js index 499f72101..6ff1b9976 100644 --- a/src/test/theme.test.js +++ b/src/test/theme.test.js @@ -23,7 +23,7 @@ describe('theming', () => { ) - expectCSSMatches(`.sc-a {} .b { color: ${theme.color}; }`) + expectCSSMatches(`.sc-a {} .b { color:${theme.color}; }`) }) it('should inject props.theme into a styled component multiple levels deep', () => { @@ -40,7 +40,7 @@ describe('theming', () => { ) - expectCSSMatches(`.sc-a {} .b { color: ${theme.color}; }`) + expectCSSMatches(`.sc-a {} .b { color:${theme.color}; }`) }) it('should properly allow a component to fallback to its default props when a theme is not provided', () => { @@ -60,7 +60,7 @@ describe('theming', () => { ) - expectCSSMatches(`.sc-a {} .b { color: purple; }`) + expectCSSMatches(`.sc-a {} .b { color:purple; }`) }) // https://github.com/styled-components/styled-components/issues/344 @@ -83,7 +83,7 @@ describe('theming', () => { ) - expectCSSMatches(`.sc-a {} .b { color: green; }`) + expectCSSMatches(`.sc-a {} .b { color:green; }`) }) it('should properly allow a component to override the theme with a prop even if it is equal to defaultProps theme', () => { @@ -105,7 +105,7 @@ describe('theming', () => { ) - expectCSSMatches(`.sc-a {} .b { color: purple; }`) + expectCSSMatches(`.sc-a {} .b { color:purple; }`) }) it('should properly allow a component to override the theme with a prop', () => { @@ -120,11 +120,11 @@ describe('theming', () => { render(
- +
) - expectCSSMatches(`.sc-a {} .b { color: red; }`) + expectCSSMatches(`.sc-a {} .b { color:red; }`) }) it('should properly set the theme with an empty object when no theme is provided and no defaults are set', () => { @@ -136,7 +136,7 @@ describe('theming', () => { ) - expectCSSMatches(`.sc-a {} .b { color: ; }`) + expectCSSMatches(`.sc-a {}`) }) it('should only inject props.theme into styled components within its child component tree', () => { @@ -158,7 +158,7 @@ describe('theming', () => { ) - expectCSSMatches(`.sc-a {} .c { color: ${theme.color}; } .sc-b {} .d { background: ; }`) + expectCSSMatches(`.sc-a {} .c { color:${theme.color}; } .sc-b {}`) }) it('should inject props.theme into all styled components within the child component tree', () => { @@ -179,7 +179,7 @@ describe('theming', () => { ) - expectCSSMatches(`.sc-a {} .c { color: ${theme.color}; } .sc-b {} .d { background: ${theme.color}; }`) + expectCSSMatches(`.sc-a {} .c { color:${theme.color}; } .sc-b {} .d { background:${theme.color}; }`) }) it('should inject new CSS when the theme changes', () => { @@ -198,11 +198,11 @@ describe('theming', () => { ) } renderComp() - const initialCSS = expectCSSMatches(`.sc-a {} .b { color: ${theme.color}; }`) + const initialCSS = expectCSSMatches(`.sc-a {} .b { color:${theme.color}; }`) // Change the theme theme = newTheme renderComp() - expectCSSMatches(`${initialCSS} .c { color: ${newTheme.color}; }`) + expectCSSMatches(`${initialCSS} .c { color:${newTheme.color}; }`) }) }) @@ -224,10 +224,10 @@ describe('theming', () => { const wrapper = mount( ) - expectCSSMatches(`.sc-a {} .b { color: purple; }`) + expectCSSMatches(`.sc-a {} .b { color:purple; }`) wrapper.update(); - expectCSSMatches(`.sc-a {} .b { color: purple; }`) + expectCSSMatches(`.sc-a {} .b { color:purple; }`) }) it('should properly update style if theme is changed', () => { @@ -243,10 +243,10 @@ describe('theming', () => { const wrapper = mount( ) - expectCSSMatches(`.sc-a {} .b { color: purple; }`) + expectCSSMatches(`.sc-a {} .b { color:purple; }`) wrapper.setProps({ theme: { color: 'pink' } }) - expectCSSMatches(`.sc-a {} .b { color: purple; } .c { color: pink; }`) + expectCSSMatches(`.sc-a {} .b { color:purple; } .c { color:pink; }`) }) it('should properly update style if props used in styles is changed', () => { @@ -264,15 +264,15 @@ describe('theming', () => { const wrapper = mount( ) - let expectedStyles = `.sc-a {} .b { color: purple; z-index: 0px; }` + let expectedStyles = `.sc-a {} .b { color:purple; z-index:0px; }` expectCSSMatches(expectedStyles) wrapper.setProps({ theme: { color: 'pink' } }) - expectedStyles = `${expectedStyles} .c { color: pink; z-index: 0px; }` + expectedStyles = `${expectedStyles} .c { color:pink; z-index:0px; }` expectCSSMatches(expectedStyles) wrapper.setProps({ zIndex: 1 }); - expectCSSMatches(`${expectedStyles} .d { color: pink; z-index: 1px; }`) + expectCSSMatches(`${expectedStyles} .d { color:pink; z-index:1px; }`) }) it('should change the classnames when the theme changes', () => { @@ -294,13 +294,13 @@ describe('theming', () => { ) - expectCSSMatches(`.sc-a {} .b { color: ${originalTheme.color}; }`) + expectCSSMatches(`.sc-a {} .b { color:${originalTheme.color}; }`) expect(wrapper.find('div').prop('className')).toBe('sc-a b') // Change theme wrapper.setProps({ theme: newTheme }) - expectCSSMatches(`.sc-a {} .b { color: ${originalTheme.color}; } .c { color: ${newTheme.color}; }`) + expectCSSMatches(`.sc-a {} .b { color:${originalTheme.color}; } .c { color:${newTheme.color}; }`) expect(wrapper.find('div').prop('className')).toBe('sc-a c') }) @@ -366,11 +366,11 @@ describe('theming', () => { ) - expectCSSMatches(`.sc-a { } .b { color: green; } `) + expectCSSMatches(`.sc-a { } .b { color:green; } `) wrapper.setProps({ prop: 'bar' }) - expectCSSMatches(`.sc-a { } .b { color: green; } `) + expectCSSMatches(`.sc-a { } .b { color:green; } `) }) // https://github.com/styled-components/styled-components/issues/596 @@ -424,4 +424,23 @@ describe('theming', () => { expect(ref).toHaveBeenCalledWith(inner.getDOMNode()) expect(inner.prop('innerRef')).toBe(ref) }) + + // https://github.com/styled-components/styled-components/issues/1130 + it('should not break without a ThemeProvier if it has a defaultTheme', () => { + const MyDiv = ({ theme }) =>
{theme.color}
+ const MyDivWithTheme = withTheme(MyDiv); + const theme = { color: 'red' } + const newTheme = { color: 'blue' } + + MyDivWithTheme.defaultProps = { theme } + + const wrapper = mount() + + expect(wrapper.find('div').text()).toBe('red') + + // Change theme + wrapper.setProps({ theme: newTheme }) + + expect(wrapper.find('div').text()).toBe('blue') + }) }) diff --git a/src/utils/determineTheme.js b/src/utils/determineTheme.js new file mode 100644 index 000000000..98158783b --- /dev/null +++ b/src/utils/determineTheme.js @@ -0,0 +1,16 @@ +// @flow +type Props = { + theme?: any, +} + +export default (props: Props, fallbackTheme: any, defaultProps: any) => { + // Props should take precedence over ThemeProvider, which should take precedence over + // defaultProps, but React automatically puts defaultProps on props. + + /* eslint-disable react/prop-types */ + const isDefaultTheme = defaultProps && props.theme === defaultProps.theme + const theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme + /* eslint-enable */ + + return theme +} diff --git a/src/utils/getComponentCssSelector.js b/src/utils/getComponentCssSelector.js new file mode 100644 index 000000000..d471bd44b --- /dev/null +++ b/src/utils/getComponentCssSelector.js @@ -0,0 +1,12 @@ +// @flow + +/** + * Adjusts the css selector for the component's css to increase specificity when needed + */ +export default function getComponentCssSelector(componentName: string, options: Object) { + if (options && options.specificityClass) { + return `.${options.specificityClass} .${componentName}` + } + + return `.${componentName}` +} diff --git a/src/utils/test/determineTheme.test.js b/src/utils/test/determineTheme.test.js new file mode 100644 index 000000000..399524921 --- /dev/null +++ b/src/utils/test/determineTheme.test.js @@ -0,0 +1,17 @@ +// @flow +import determineTheme from '../determineTheme'; + +const theme = { color: 'red' } +const fallback = { color: 'blue' } +const props = { theme } +const defaultProps = { theme: fallback } + +describe('determineTheme', () => { + it('should take precedence over ThemeProvider', () => { + expect(determineTheme(props, fallback, defaultProps)).toEqual(theme) + }) + + it('should fallback to default theme', () => { + expect(determineTheme({}, fallback, props)).toEqual(fallback) + }) +}) diff --git a/src/utils/test/getComponentCssSelector.test.js b/src/utils/test/getComponentCssSelector.test.js new file mode 100644 index 000000000..dcbaab031 --- /dev/null +++ b/src/utils/test/getComponentCssSelector.test.js @@ -0,0 +1,23 @@ +// @flow +import getComponentCssSelector from '../getComponentCssSelector' + +describe('getComponentCssSelector', () => { + const testComponentName = 'testComponent' + const testSpecificityClass = 'moreSpecific' + + it('returns the name as selector if options are not provided', () => { + expect(getComponentCssSelector(testComponentName)).toEqual(`.${testComponentName}`) + }) + + it('returns the name if the specificity class is not defined on options', () => { + expect(getComponentCssSelector(testComponentName, { displayName: 'test' })).toEqual( + `.${testComponentName}`, + ) + }) + + it('returns the name prepended with the specificity class', () => { + expect( + getComponentCssSelector(testComponentName, { specificityClass: testSpecificityClass }), + ).toEqual(`.${testSpecificityClass} .${testComponentName}`) + }) +}) diff --git a/src/utils/test/validAttr.test.js b/src/utils/test/validAttr.test.js index 2e20c7217..e9a9b45b8 100644 --- a/src/utils/test/validAttr.test.js +++ b/src/utils/test/validAttr.test.js @@ -445,6 +445,8 @@ describe('validAttr', () => { expect(validAttr('onInputCapture')).toEqual(true) expect(validAttr('onSubmit')).toEqual(true) expect(validAttr('onSubmitCapture')).toEqual(true) + expect(validAttr('onReset')).toEqual(true) + expect(validAttr('onResetCapture')).toEqual(true) expect(validAttr('onClick')).toEqual(true) expect(validAttr('onClickCapture')).toEqual(true) expect(validAttr('onContextMenu')).toEqual(true) diff --git a/src/utils/validAttr.js b/src/utils/validAttr.js index 8fb0f270b..d278edc7b 100644 --- a/src/utils/validAttr.js +++ b/src/utils/validAttr.js @@ -35,6 +35,7 @@ const reactProps = { onChange: true, onInput: true, onSubmit: true, + onReset: true, onClick: true, onContextMenu: true, onDoubleClick: true, @@ -103,6 +104,7 @@ const reactProps = { onChangeCapture: true, onInputCapture: true, onSubmitCapture: true, + onResetCapture: true, onClickCapture: true, onContextMenuCapture: true, onDoubleClickCapture: true, diff --git a/test-results.json b/test-results.json new file mode 100644 index 000000000..f5ccf6133 --- /dev/null +++ b/test-results.json @@ -0,0 +1 @@ +{"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":25,"numPassedTests":190,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTotalTestSuites":25,"numTotalTests":190,"snapshot":{"added":0,"didUpdate":false,"failure":false,"filesAdded":0,"filesRemoved":0,"filesUnmatched":0,"filesUpdated":0,"matched":20,"total":20,"unchecked":0,"unmatched":0,"updated":0},"startTime":1508127942441,"success":true,"testResults":[{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":6,"numPendingTests":0,"perfStats":{"end":1508127944870,"start":1508127943910},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/models/test/ThemeProvider.test.js","testResults":[{"ancestorTitles":["ThemeProvider"],"duration":12,"failureMessages":[],"fullName":"ThemeProvider should not throw an error when no children are passed","numPassingAsserts":0,"status":"passed","title":"should not throw an error when no children are passed"},{"ancestorTitles":["ThemeProvider"],"duration":3,"failureMessages":[],"fullName":"ThemeProvider should accept a theme prop that's a plain object","numPassingAsserts":0,"status":"passed","title":"should accept a theme prop that's a plain object"},{"ancestorTitles":["ThemeProvider"],"duration":7,"failureMessages":[],"fullName":"ThemeProvider should render its child","numPassingAsserts":0,"status":"passed","title":"should render its child"},{"ancestorTitles":["ThemeProvider"],"duration":13,"failureMessages":[],"fullName":"ThemeProvider should merge its theme with an outer theme","numPassingAsserts":0,"status":"passed","title":"should merge its theme with an outer theme"},{"ancestorTitles":["ThemeProvider"],"duration":2,"failureMessages":[],"fullName":"ThemeProvider should merge its theme with multiple outer themes","numPassingAsserts":0,"status":"passed","title":"should merge its theme with multiple outer themes"},{"ancestorTitles":["ThemeProvider"],"duration":4,"failureMessages":[],"fullName":"ThemeProvider should be able to render two independent themes","numPassingAsserts":0,"status":"passed","title":"should be able to render two independent themes"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":3,"numPendingTests":0,"perfStats":{"end":1508127944918,"start":1508127943913},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/no-parser/test/basic.test.js","testResults":[{"ancestorTitles":["basic"],"duration":21,"failureMessages":[],"fullName":"basic should throw a meaningful error when called with null","numPassingAsserts":0,"status":"passed","title":"should throw a meaningful error when called with null"},{"ancestorTitles":["basic"],"duration":30,"failureMessages":[],"fullName":"basic should correctly assemble preprocessed CSS","numPassingAsserts":0,"status":"passed","title":"should correctly assemble preprocessed CSS"},{"ancestorTitles":["basic"],"duration":7,"failureMessages":[],"fullName":"basic should correctly execute passed functions and assemble preprocessed CSS","numPassingAsserts":0,"status":"passed","title":"should correctly execute passed functions and assemble preprocessed CSS"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":3,"numPendingTests":0,"perfStats":{"end":1508127944961,"start":1508127943904},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/constructors/test/injectGlobal.test.js","testResults":[{"ancestorTitles":["injectGlobal"],"duration":29,"failureMessages":[],"fullName":"injectGlobal should inject rules into the head","numPassingAsserts":0,"status":"passed","title":"should inject rules into the head"},{"ancestorTitles":["injectGlobal"],"duration":5,"failureMessages":[],"fullName":"injectGlobal should non-destructively inject styles when called repeatedly","numPassingAsserts":0,"status":"passed","title":"should non-destructively inject styles when called repeatedly"},{"ancestorTitles":["injectGlobal"],"duration":19,"failureMessages":[],"fullName":"injectGlobal should non-destructively inject styles when called after a component","numPassingAsserts":0,"status":"passed","title":"should non-destructively inject styles when called after a component"}],"sourceMaps":{},"skipped":false},{"console":[{"message":"Warning: Unknown prop `activeClassName` on
tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop\n in a","origin":"/Users/cferris/src/styled-components/node_modules/fbjs/lib/warning.js:36","type":"error"}],"failureMessage":null,"numFailingTests":0,"numPassingTests":14,"numPendingTests":0,"perfStats":{"end":1508127944985,"start":1508127943891},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/test/attrs.test.js","testResults":[{"ancestorTitles":["attrs"],"duration":53,"failureMessages":[],"fullName":"attrs work fine with an empty object","numPassingAsserts":0,"status":"passed","title":"work fine with an empty object"},{"ancestorTitles":["attrs"],"duration":5,"failureMessages":[],"fullName":"attrs pass a simple attr","numPassingAsserts":0,"status":"passed","title":"pass a simple attr"},{"ancestorTitles":["attrs"],"duration":8,"failureMessages":[],"fullName":"attrs call an attr function","numPassingAsserts":0,"status":"passed","title":"call an attr function"},{"ancestorTitles":["attrs"],"duration":4,"failureMessages":[],"fullName":"attrs pass props to the attr function","numPassingAsserts":0,"status":"passed","title":"pass props to the attr function"},{"ancestorTitles":["attrs"],"duration":5,"failureMessages":[],"fullName":"attrs should replace attrs with props","numPassingAsserts":0,"status":"passed","title":"should replace attrs with props"},{"ancestorTitles":["attrs"],"duration":5,"failureMessages":[],"fullName":"attrs should merge className","numPassingAsserts":0,"status":"passed","title":"should merge className"},{"ancestorTitles":["attrs"],"duration":5,"failureMessages":[],"fullName":"attrs should merge className even if its a function","numPassingAsserts":0,"status":"passed","title":"should merge className even if its a function"},{"ancestorTitles":["attrs"],"duration":3,"failureMessages":[],"fullName":"attrs should work with data and aria attributes","numPassingAsserts":0,"status":"passed","title":"should work with data and aria attributes"},{"ancestorTitles":["attrs"],"duration":2,"failureMessages":[],"fullName":"attrs merge attrs","numPassingAsserts":0,"status":"passed","title":"merge attrs"},{"ancestorTitles":["attrs"],"duration":3,"failureMessages":[],"fullName":"attrs merge attrs when inheriting SC","numPassingAsserts":0,"status":"passed","title":"merge attrs when inheriting SC"},{"ancestorTitles":["attrs"],"duration":7,"failureMessages":[],"fullName":"attrs pass attrs to style block","numPassingAsserts":0,"status":"passed","title":"pass attrs to style block"},{"ancestorTitles":["attrs"],"duration":6,"failureMessages":[],"fullName":"attrs should pass through children as a normal prop","numPassingAsserts":0,"status":"passed","title":"should pass through children as a normal prop"},{"ancestorTitles":["attrs"],"duration":5,"failureMessages":[],"fullName":"attrs should pass through complex children as well","numPassingAsserts":0,"status":"passed","title":"should pass through complex children as well"},{"ancestorTitles":["attrs"],"duration":3,"failureMessages":[],"fullName":"attrs should override children of course","numPassingAsserts":0,"status":"passed","title":"should override children of course"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":10,"numPendingTests":0,"perfStats":{"end":1508127944994,"start":1508127943905},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/test/expanded-api.test.js","testResults":[{"ancestorTitles":["expanded api","displayName"],"duration":33,"failureMessages":[],"fullName":"expanded api displayName should be auto-generated if none passed","numPassingAsserts":0,"status":"passed","title":"should be auto-generated if none passed"},{"ancestorTitles":["expanded api","displayName"],"duration":7,"failureMessages":[],"fullName":"expanded api displayName should be attached if supplied","numPassingAsserts":0,"status":"passed","title":"should be attached if supplied"},{"ancestorTitles":["expanded api","componentId"],"duration":24,"failureMessages":[],"fullName":"expanded api componentId should be generated as \"sc\" + hash","numPassingAsserts":0,"status":"passed","title":"should be generated as \"sc\" + hash"},{"ancestorTitles":["expanded api","componentId"],"duration":5,"failureMessages":[],"fullName":"expanded api componentId should be generated from displayName + hash","numPassingAsserts":0,"status":"passed","title":"should be generated from displayName + hash"},{"ancestorTitles":["expanded api","componentId"],"duration":5,"failureMessages":[],"fullName":"expanded api componentId should be attached if passed in","numPassingAsserts":0,"status":"passed","title":"should be attached if passed in"},{"ancestorTitles":["expanded api","componentId"],"duration":5,"failureMessages":[],"fullName":"expanded api componentId should be combined with displayName if both passed in","numPassingAsserts":0,"status":"passed","title":"should be combined with displayName if both passed in"},{"ancestorTitles":["expanded api","componentId"],"duration":9,"failureMessages":[],"fullName":"expanded api componentId should work with `.extend`","numPassingAsserts":0,"status":"passed","title":"should work with `.extend`"},{"ancestorTitles":["expanded api","componentId"],"duration":5,"failureMessages":[],"fullName":"expanded api componentId should work with `.withComponent`","numPassingAsserts":0,"status":"passed","title":"should work with `.withComponent`"},{"ancestorTitles":["expanded api","chaining"],"duration":2,"failureMessages":[],"fullName":"expanded api chaining should merge the options strings","numPassingAsserts":0,"status":"passed","title":"should merge the options strings"},{"ancestorTitles":["expanded api","chaining"],"duration":5,"failureMessages":[],"fullName":"expanded api chaining should keep the last value passed in when merging","numPassingAsserts":0,"status":"passed","title":"should keep the last value passed in when merging"}],"sourceMaps":{},"skipped":false},{"console":[{"message":"[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps","origin":"/Users/cferris/src/styled-components/src/hoc/withTheme.js:40","type":"warn"}],"failureMessage":null,"numFailingTests":0,"numPassingTests":21,"numPendingTests":0,"perfStats":{"end":1508127945123,"start":1508127943893},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/test/theme.test.js","testResults":[{"ancestorTitles":["theming"],"duration":74,"failureMessages":[],"fullName":"theming should inject props.theme into a styled component","numPassingAsserts":0,"status":"passed","title":"should inject props.theme into a styled component"},{"ancestorTitles":["theming"],"duration":11,"failureMessages":[],"fullName":"theming should inject props.theme into a styled component multiple levels deep","numPassingAsserts":0,"status":"passed","title":"should inject props.theme into a styled component multiple levels deep"},{"ancestorTitles":["theming"],"duration":4,"failureMessages":[],"fullName":"theming should properly allow a component to fallback to its default props when a theme is not provided","numPassingAsserts":0,"status":"passed","title":"should properly allow a component to fallback to its default props when a theme is not provided"},{"ancestorTitles":["theming"],"duration":3,"failureMessages":[],"fullName":"theming should use ThemeProvider theme instead of defaultProps theme","numPassingAsserts":0,"status":"passed","title":"should use ThemeProvider theme instead of defaultProps theme"},{"ancestorTitles":["theming"],"duration":4,"failureMessages":[],"fullName":"theming should properly allow a component to override the theme with a prop even if it is equal to defaultProps theme","numPassingAsserts":0,"status":"passed","title":"should properly allow a component to override the theme with a prop even if it is equal to defaultProps theme"},{"ancestorTitles":["theming"],"duration":4,"failureMessages":[],"fullName":"theming should properly allow a component to override the theme with a prop","numPassingAsserts":0,"status":"passed","title":"should properly allow a component to override the theme with a prop"},{"ancestorTitles":["theming"],"duration":3,"failureMessages":[],"fullName":"theming should properly set the theme with an empty object when no theme is provided and no defaults are set","numPassingAsserts":0,"status":"passed","title":"should properly set the theme with an empty object when no theme is provided and no defaults are set"},{"ancestorTitles":["theming"],"duration":7,"failureMessages":[],"fullName":"theming should only inject props.theme into styled components within its child component tree","numPassingAsserts":0,"status":"passed","title":"should only inject props.theme into styled components within its child component tree"},{"ancestorTitles":["theming"],"duration":4,"failureMessages":[],"fullName":"theming should inject props.theme into all styled components within the child component tree","numPassingAsserts":0,"status":"passed","title":"should inject props.theme into all styled components within the child component tree"},{"ancestorTitles":["theming"],"duration":11,"failureMessages":[],"fullName":"theming should inject new CSS when the theme changes","numPassingAsserts":0,"status":"passed","title":"should inject new CSS when the theme changes"},{"ancestorTitles":["theming"],"duration":24,"failureMessages":[],"fullName":"theming should properly render with the same theme from default props on re-render","numPassingAsserts":0,"status":"passed","title":"should properly render with the same theme from default props on re-render"},{"ancestorTitles":["theming"],"duration":8,"failureMessages":[],"fullName":"theming should properly update style if theme is changed","numPassingAsserts":0,"status":"passed","title":"should properly update style if theme is changed"},{"ancestorTitles":["theming"],"duration":7,"failureMessages":[],"fullName":"theming should properly update style if props used in styles is changed","numPassingAsserts":0,"status":"passed","title":"should properly update style if props used in styles is changed"},{"ancestorTitles":["theming"],"duration":17,"failureMessages":[],"fullName":"theming should change the classnames when the theme changes","numPassingAsserts":0,"status":"passed","title":"should change the classnames when the theme changes"},{"ancestorTitles":["theming"],"duration":6,"failureMessages":[],"fullName":"theming should inject props.theme into a component that uses withTheme hoc","numPassingAsserts":0,"status":"passed","title":"should inject props.theme into a component that uses withTheme hoc"},{"ancestorTitles":["theming"],"duration":6,"failureMessages":[],"fullName":"theming should properly update theme prop on hoc component when theme is changed","numPassingAsserts":0,"status":"passed","title":"should properly update theme prop on hoc component when theme is changed"},{"ancestorTitles":["theming"],"duration":8,"failureMessages":[],"fullName":"theming should use ThemeProvider theme instead of defaultProps theme after initial render","numPassingAsserts":0,"status":"passed","title":"should use ThemeProvider theme instead of defaultProps theme after initial render"},{"ancestorTitles":["theming"],"duration":1,"failureMessages":[],"fullName":"theming should hoist static properties when using withTheme","numPassingAsserts":0,"status":"passed","title":"should hoist static properties when using withTheme"},{"ancestorTitles":["theming"],"duration":7,"failureMessages":[],"fullName":"theming should accept innerRef and pass it on as ref","numPassingAsserts":0,"status":"passed","title":"should accept innerRef and pass it on as ref"},{"ancestorTitles":["theming"],"duration":5,"failureMessages":[],"fullName":"theming should accept innerRef and pass it on for styled components","numPassingAsserts":0,"status":"passed","title":"should accept innerRef and pass it on for styled components"},{"ancestorTitles":["theming"],"duration":8,"failureMessages":[],"fullName":"theming should not break without a ThemeProvier if it has a defaultTheme","numPassingAsserts":0,"status":"passed","title":"should not break without a ThemeProvier if it has a defaultTheme"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":3,"numPendingTests":0,"perfStats":{"end":1508127945292,"start":1508127945032},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/test/props.test.js","testResults":[{"ancestorTitles":["props"],"duration":8,"failureMessages":[],"fullName":"props should execute interpolations and fall back","numPassingAsserts":0,"status":"passed","title":"should execute interpolations and fall back"},{"ancestorTitles":["props"],"duration":4,"failureMessages":[],"fullName":"props should execute interpolations and inject props","numPassingAsserts":0,"status":"passed","title":"should execute interpolations and inject props"},{"ancestorTitles":["props"],"duration":3,"failureMessages":[],"fullName":"props should ignore non-0 falsy object interpolations","numPassingAsserts":0,"status":"passed","title":"should ignore non-0 falsy object interpolations"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":13,"numPendingTests":0,"perfStats":{"end":1508127945293,"start":1508127944991},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/test/styles.test.js","testResults":[{"ancestorTitles":["with styles"],"duration":11,"failureMessages":[],"fullName":"with styles should append a style","numPassingAsserts":0,"status":"passed","title":"should append a style"},{"ancestorTitles":["with styles"],"duration":3,"failureMessages":[],"fullName":"with styles should append multiple styles","numPassingAsserts":0,"status":"passed","title":"should append multiple styles"},{"ancestorTitles":["with styles"],"duration":3,"failureMessages":[],"fullName":"with styles should handle inline style objects","numPassingAsserts":0,"status":"passed","title":"should handle inline style objects"},{"ancestorTitles":["with styles"],"duration":14,"failureMessages":[],"fullName":"with styles should handle inline style objects with media queries","numPassingAsserts":0,"status":"passed","title":"should handle inline style objects with media queries"},{"ancestorTitles":["with styles"],"duration":4,"failureMessages":[],"fullName":"with styles should handle inline style objects with pseudo selectors","numPassingAsserts":0,"status":"passed","title":"should handle inline style objects with pseudo selectors"},{"ancestorTitles":["with styles"],"duration":5,"failureMessages":[],"fullName":"with styles should handle inline style objects with pseudo selectors","numPassingAsserts":0,"status":"passed","title":"should handle inline style objects with pseudo selectors"},{"ancestorTitles":["with styles"],"duration":3,"failureMessages":[],"fullName":"with styles should handle inline style objects with nesting","numPassingAsserts":0,"status":"passed","title":"should handle inline style objects with nesting"},{"ancestorTitles":["with styles"],"duration":5,"failureMessages":[],"fullName":"with styles should handle inline style objects with contextual selectors","numPassingAsserts":0,"status":"passed","title":"should handle inline style objects with contextual selectors"},{"ancestorTitles":["with styles"],"duration":3,"failureMessages":[],"fullName":"with styles should inject styles of multiple components","numPassingAsserts":0,"status":"passed","title":"should inject styles of multiple components"},{"ancestorTitles":["with styles"],"duration":4,"failureMessages":[],"fullName":"with styles should inject styles of multiple components based on creation, not rendering order","numPassingAsserts":0,"status":"passed","title":"should inject styles of multiple components based on creation, not rendering order"},{"ancestorTitles":["with styles"],"duration":3,"failureMessages":[],"fullName":"with styles should strip a JS-style (invalid) comment in the styles","numPassingAsserts":0,"status":"passed","title":"should strip a JS-style (invalid) comment in the styles"},{"ancestorTitles":["with styles"],"duration":3,"failureMessages":[],"fullName":"with styles should add a webpack nonce to the style tags if one is available in the global scope","numPassingAsserts":0,"status":"passed","title":"should add a webpack nonce to the style tags if one is available in the global scope"},{"ancestorTitles":["with styles"],"duration":4,"failureMessages":[],"fullName":"with styles should add a webpack nonce to the global style tags if one is available in the global scope","numPassingAsserts":0,"status":"passed","title":"should add a webpack nonce to the global style tags if one is available in the global scope"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":12,"numPendingTests":0,"perfStats":{"end":1508127945315,"start":1508127944905},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/test/basic.test.js","testResults":[{"ancestorTitles":["basic"],"duration":24,"failureMessages":[],"fullName":"basic should not throw an error when called","numPassingAsserts":0,"status":"passed","title":"should not throw an error when called"},{"ancestorTitles":["basic"],"duration":5,"failureMessages":[],"fullName":"basic should throw a meaningful error when called with null","numPassingAsserts":0,"status":"passed","title":"should throw a meaningful error when called with null"},{"ancestorTitles":["basic"],"duration":3,"failureMessages":[],"fullName":"basic should not inject anything by default","numPassingAsserts":0,"status":"passed","title":"should not inject anything by default"},{"ancestorTitles":["basic"],"duration":12,"failureMessages":[],"fullName":"basic should inject component class when rendered even if no styles are passed","numPassingAsserts":0,"status":"passed","title":"should inject component class when rendered even if no styles are passed"},{"ancestorTitles":["basic"],"duration":4,"failureMessages":[],"fullName":"basic should inject styles","numPassingAsserts":0,"status":"passed","title":"should inject styles"},{"ancestorTitles":["basic"],"duration":4,"failureMessages":[],"fullName":"basic should inject only once for a styled component, no matter how often it's mounted","numPassingAsserts":0,"status":"passed","title":"should inject only once for a styled component, no matter how often it's mounted"},{"ancestorTitles":["basic"],"duration":5,"failureMessages":[],"fullName":"basic Should have the correct styled(component) displayName","numPassingAsserts":0,"status":"passed","title":"Should have the correct styled(component) displayName"},{"ancestorTitles":["basic","jsdom tests"],"duration":18,"failureMessages":[],"fullName":"basic jsdom tests should pass the ref to the component","numPassingAsserts":0,"status":"passed","title":"should pass the ref to the component"},{"ancestorTitles":["basic","jsdom tests"],"duration":13,"failureMessages":[],"fullName":"basic jsdom tests should not leak the innerRef prop to the wrapped child","numPassingAsserts":0,"status":"passed","title":"should not leak the innerRef prop to the wrapped child"},{"ancestorTitles":["basic","jsdom tests"],"duration":4,"failureMessages":[],"fullName":"basic jsdom tests should pass the full className to the wrapped child","numPassingAsserts":0,"status":"passed","title":"should pass the full className to the wrapped child"},{"ancestorTitles":["basic","jsdom tests"],"duration":5,"failureMessages":[],"fullName":"basic jsdom tests should pass the innerRef to the wrapped styled component","numPassingAsserts":0,"status":"passed","title":"should pass the innerRef to the wrapped styled component"},{"ancestorTitles":["basic","jsdom tests"],"duration":7,"failureMessages":[],"fullName":"basic jsdom tests should respect the order of StyledComponent creation for CSS ordering","numPassingAsserts":0,"status":"passed","title":"should respect the order of StyledComponent creation for CSS ordering"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":14,"numPendingTests":0,"perfStats":{"end":1508127945324,"start":1508127945020},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/test/extending.test.js","testResults":[{"ancestorTitles":["extending"],"duration":8,"failureMessages":[],"fullName":"extending should generate empty classes with no styles","numPassingAsserts":0,"status":"passed","title":"should generate empty classes with no styles"},{"ancestorTitles":["extending"],"duration":4,"failureMessages":[],"fullName":"extending should attach styles to both classes if only parent has styles","numPassingAsserts":0,"status":"passed","title":"should attach styles to both classes if only parent has styles"},{"ancestorTitles":["extending"],"duration":4,"failureMessages":[],"fullName":"extending should attach styles to child class if only child has styles","numPassingAsserts":0,"status":"passed","title":"should attach styles to child class if only child has styles"},{"ancestorTitles":["extending"],"duration":2,"failureMessages":[],"fullName":"extending should generate a class for the child with the rules of the parent","numPassingAsserts":0,"status":"passed","title":"should generate a class for the child with the rules of the parent"},{"ancestorTitles":["extending"],"duration":3,"failureMessages":[],"fullName":"extending should generate different classes for both parent and child","numPassingAsserts":0,"status":"passed","title":"should generate different classes for both parent and child"},{"ancestorTitles":["extending"],"duration":4,"failureMessages":[],"fullName":"extending should copy nested rules to the child","numPassingAsserts":0,"status":"passed","title":"should copy nested rules to the child"},{"ancestorTitles":["extending"],"duration":4,"failureMessages":[],"fullName":"extending should keep default props from parent","numPassingAsserts":0,"status":"passed","title":"should keep default props from parent"},{"ancestorTitles":["extending"],"duration":2,"failureMessages":[],"fullName":"extending should keep prop types from parent","numPassingAsserts":0,"status":"passed","title":"should keep prop types from parent"},{"ancestorTitles":["extending"],"duration":2,"failureMessages":[],"fullName":"extending should keep custom static member from parent","numPassingAsserts":0,"status":"passed","title":"should keep custom static member from parent"},{"ancestorTitles":["extending"],"duration":3,"failureMessages":[],"fullName":"extending should keep static member in triple inheritance","numPassingAsserts":0,"status":"passed","title":"should keep static member in triple inheritance"},{"ancestorTitles":["extending"],"duration":5,"failureMessages":[],"fullName":"extending should keep styles in >= 3 inheritances","numPassingAsserts":0,"status":"passed","title":"should keep styles in >= 3 inheritances"},{"ancestorTitles":["extending"],"duration":4,"failureMessages":[],"fullName":"extending should allow changing component","numPassingAsserts":0,"status":"passed","title":"should allow changing component"},{"ancestorTitles":["extending"],"duration":4,"failureMessages":[],"fullName":"extending should allow changing component and extending","numPassingAsserts":0,"status":"passed","title":"should allow changing component and extending"},{"ancestorTitles":["extending"],"duration":3,"failureMessages":[],"fullName":"extending should allow changing component and adding attributes","numPassingAsserts":0,"status":"passed","title":"should allow changing component and adding attributes"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":21,"numPendingTests":0,"perfStats":{"end":1508127945330,"start":1508127944961},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/test/rehydration.test.js","testResults":[{"ancestorTitles":["rehydration","with existing styled components"],"duration":9,"failureMessages":[],"fullName":"rehydration with existing styled components should preserve the styles","numPassingAsserts":0,"status":"passed","title":"should preserve the styles"},{"ancestorTitles":["rehydration","with existing styled components"],"duration":9,"failureMessages":[],"fullName":"rehydration with existing styled components should append a new component like normal","numPassingAsserts":0,"status":"passed","title":"should append a new component like normal"},{"ancestorTitles":["rehydration","with existing styled components"],"duration":6,"failureMessages":[],"fullName":"rehydration with existing styled components should reuse a componentId","numPassingAsserts":0,"status":"passed","title":"should reuse a componentId"},{"ancestorTitles":["rehydration","with existing styled components"],"duration":18,"failureMessages":[],"fullName":"rehydration with existing styled components should reuse a componentId and generated class","numPassingAsserts":0,"status":"passed","title":"should reuse a componentId and generated class"},{"ancestorTitles":["rehydration","with existing styled components"],"duration":5,"failureMessages":[],"fullName":"rehydration with existing styled components should reuse a componentId and inject new classes","numPassingAsserts":0,"status":"passed","title":"should reuse a componentId and inject new classes"},{"ancestorTitles":["rehydration","with styled components with props"],"duration":4,"failureMessages":[],"fullName":"rehydration with styled components with props should preserve the styles","numPassingAsserts":0,"status":"passed","title":"should preserve the styles"},{"ancestorTitles":["rehydration","with styled components with props"],"duration":5,"failureMessages":[],"fullName":"rehydration with styled components with props should not inject new styles for a component already rendered","numPassingAsserts":0,"status":"passed","title":"should not inject new styles for a component already rendered"},{"ancestorTitles":["rehydration","with styled components with props"],"duration":4,"failureMessages":[],"fullName":"rehydration with styled components with props should inject new styles for a new computed style of a component","numPassingAsserts":0,"status":"passed","title":"should inject new styles for a new computed style of a component"},{"ancestorTitles":["rehydration","with inline styles that werent rendered by us"],"duration":2,"failureMessages":[],"fullName":"rehydration with inline styles that werent rendered by us should leave the existing styles there","numPassingAsserts":0,"status":"passed","title":"should leave the existing styles there"},{"ancestorTitles":["rehydration","with inline styles that werent rendered by us"],"duration":4,"failureMessages":[],"fullName":"rehydration with inline styles that werent rendered by us should generate new classes, even if they have the same name","numPassingAsserts":0,"status":"passed","title":"should generate new classes, even if they have the same name"},{"ancestorTitles":["rehydration","with global styles"],"duration":2,"failureMessages":[],"fullName":"rehydration with global styles should leave the existing styles there","numPassingAsserts":0,"status":"passed","title":"should leave the existing styles there"},{"ancestorTitles":["rehydration","with global styles"],"duration":4,"failureMessages":[],"fullName":"rehydration with global styles should inject new global styles at the end","numPassingAsserts":0,"status":"passed","title":"should inject new global styles at the end"},{"ancestorTitles":["rehydration","with global styles"],"duration":3,"failureMessages":[],"fullName":"rehydration with global styles should interleave global and local styles","numPassingAsserts":0,"status":"passed","title":"should interleave global and local styles"},{"ancestorTitles":["rehydration","with all styles already rendered"],"duration":3,"failureMessages":[],"fullName":"rehydration with all styles already rendered should not touch existing styles","numPassingAsserts":0,"status":"passed","title":"should not touch existing styles"},{"ancestorTitles":["rehydration","with all styles already rendered"],"duration":11,"failureMessages":[],"fullName":"rehydration with all styles already rendered should replace stylesheets on-demand","numPassingAsserts":0,"status":"passed","title":"should replace stylesheets on-demand"},{"ancestorTitles":["rehydration","with all styles already rendered"],"duration":4,"failureMessages":[],"fullName":"rehydration with all styles already rendered should not change styles if rendered in the same order they were created with","numPassingAsserts":0,"status":"passed","title":"should not change styles if rendered in the same order they were created with"},{"ancestorTitles":["rehydration","with all styles already rendered"],"duration":4,"failureMessages":[],"fullName":"rehydration with all styles already rendered should still not change styles if rendered in a different order","numPassingAsserts":0,"status":"passed","title":"should still not change styles if rendered in a different order"},{"ancestorTitles":["rehydration","with keyframes"],"duration":3,"failureMessages":[],"fullName":"rehydration with keyframes should not touch existing styles","numPassingAsserts":0,"status":"passed","title":"should not touch existing styles"},{"ancestorTitles":["rehydration","with keyframes"],"duration":3,"failureMessages":[],"fullName":"rehydration with keyframes should not regenerate keyframes","numPassingAsserts":0,"status":"passed","title":"should not regenerate keyframes"},{"ancestorTitles":["rehydration","with keyframes"],"duration":4,"failureMessages":[],"fullName":"rehydration with keyframes should still inject new keyframes","numPassingAsserts":0,"status":"passed","title":"should still inject new keyframes"},{"ancestorTitles":["rehydration","with keyframes"],"duration":9,"failureMessages":[],"fullName":"rehydration with keyframes should pass the keyframes name along as well","numPassingAsserts":0,"status":"passed","title":"should pass the keyframes name along as well"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":3,"numPendingTests":0,"perfStats":{"end":1508127945363,"start":1508127943895},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/test/warnTooManyClasses.test.js","testResults":[{"ancestorTitles":["warn too many classes"],"duration":259,"failureMessages":[],"fullName":"warn too many classes should warn once","numPassingAsserts":0,"status":"passed","title":"should warn once"},{"ancestorTitles":["warn too many classes"],"duration":131,"failureMessages":[],"fullName":"warn too many classes should warn if number of classes is 200","numPassingAsserts":0,"status":"passed","title":"should warn if number of classes is 200"},{"ancestorTitles":["warn too many classes"],"duration":106,"failureMessages":[],"fullName":"warn too many classes should not warn if number of classes is below 200","numPassingAsserts":0,"status":"passed","title":"should not warn if number of classes is below 200"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":3,"numPendingTests":0,"perfStats":{"end":1508127945420,"start":1508127945152},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/test/css.test.js","testResults":[{"ancestorTitles":["css features"],"duration":19,"failureMessages":[],"fullName":"css features should add vendor prefixes in the right order","numPassingAsserts":0,"status":"passed","title":"should add vendor prefixes in the right order"},{"ancestorTitles":["css features"],"duration":5,"failureMessages":[],"fullName":"css features should add vendor prefixes for display","numPassingAsserts":0,"status":"passed","title":"should add vendor prefixes for display"},{"ancestorTitles":["css features"],"duration":5,"failureMessages":[],"fullName":"css features should pass through custom properties","numPassingAsserts":0,"status":"passed","title":"should pass through custom properties"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":1,"numPendingTests":0,"perfStats":{"end":1508127945429,"start":1508127945320},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/constructors/test/styled.test.js","testResults":[{"ancestorTitles":["styled"],"duration":41,"failureMessages":[],"fullName":"styled should have all valid HTML5 elements defined as properties","numPassingAsserts":0,"status":"passed","title":"should have all valid HTML5 elements defined as properties"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":2,"numPendingTests":0,"perfStats":{"end":1508127945439,"start":1508127945354},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/constructors/test/keyframes.test.js","testResults":[{"ancestorTitles":["keyframes"],"duration":8,"failureMessages":[],"fullName":"keyframes should return its name","numPassingAsserts":0,"status":"passed","title":"should return its name"},{"ancestorTitles":["keyframes"],"duration":3,"failureMessages":[],"fullName":"keyframes should insert the correct styles","numPassingAsserts":0,"status":"passed","title":"should insert the correct styles"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":6,"numPendingTests":0,"perfStats":{"end":1508127945470,"start":1508127945339},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/utils/test/validAttr.test.js","testResults":[{"ancestorTitles":["validAttr"],"duration":14,"failureMessages":[],"fullName":"validAttr should allow all the reactProps","numPassingAsserts":0,"status":"passed","title":"should allow all the reactProps"},{"ancestorTitles":["validAttr"],"duration":25,"failureMessages":[],"fullName":"validAttr should allow all the html props","numPassingAsserts":0,"status":"passed","title":"should allow all the html props"},{"ancestorTitles":["validAttr"],"duration":16,"failureMessages":[],"fullName":"validAttr should handle all the SVG props","numPassingAsserts":0,"status":"passed","title":"should handle all the SVG props"},{"ancestorTitles":["validAttr"],"duration":1,"failureMessages":[],"fullName":"validAttr should handle aria and data attributes","numPassingAsserts":0,"status":"passed","title":"should handle aria and data attributes"},{"ancestorTitles":["validAttr"],"duration":0,"failureMessages":[],"fullName":"validAttr should handle uppercase aria and data attributes","numPassingAsserts":0,"status":"passed","title":"should handle uppercase aria and data attributes"},{"ancestorTitles":["validAttr"],"duration":14,"failureMessages":[],"fullName":"validAttr should allow all the event handlers","numPassingAsserts":0,"status":"passed","title":"should allow all the event handlers"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":1,"numPendingTests":0,"perfStats":{"end":1508127945487,"start":1508127945398},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/no-parser/test/keyframes.test.js","testResults":[{"ancestorTitles":["keyframes"],"duration":6,"failureMessages":[],"fullName":"keyframes should correctly assemble preprocessed CSS","numPassingAsserts":0,"status":"passed","title":"should correctly assemble preprocessed CSS"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":7,"numPendingTests":0,"perfStats":{"end":1508127945516,"start":1508127945458},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/utils/test/extractCompsFromCSS.test.js","testResults":[{"ancestorTitles":["extractCompsFromCSS"],"duration":4,"failureMessages":[],"fullName":"extractCompsFromCSS should work for null or empty","numPassingAsserts":0,"status":"passed","title":"should work for null or empty"},{"ancestorTitles":["extractCompsFromCSS"],"duration":0,"failureMessages":[],"fullName":"extractCompsFromCSS should ignore anything before the first SC","numPassingAsserts":0,"status":"passed","title":"should ignore anything before the first SC"},{"ancestorTitles":["extractCompsFromCSS"],"duration":0,"failureMessages":[],"fullName":"extractCompsFromCSS should return a single SC","numPassingAsserts":0,"status":"passed","title":"should return a single SC"},{"ancestorTitles":["extractCompsFromCSS"],"duration":0,"failureMessages":[],"fullName":"extractCompsFromCSS should return a single SC with multiple lines","numPassingAsserts":0,"status":"passed","title":"should return a single SC with multiple lines"},{"ancestorTitles":["extractCompsFromCSS"],"duration":0,"failureMessages":[],"fullName":"extractCompsFromCSS should return multiple SCs with single lines","numPassingAsserts":0,"status":"passed","title":"should return multiple SCs with single lines"},{"ancestorTitles":["extractCompsFromCSS"],"duration":0,"failureMessages":[],"fullName":"extractCompsFromCSS should return multiple SCs with multiple lines","numPassingAsserts":0,"status":"passed","title":"should return multiple SCs with multiple lines"},{"ancestorTitles":["extractCompsFromCSS"],"duration":0,"failureMessages":[],"fullName":"extractCompsFromCSS should include whitespace after a component","numPassingAsserts":0,"status":"passed","title":"should include whitespace after a component"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":20,"numPendingTests":0,"perfStats":{"end":1508127945519,"start":1508127945449},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/no-parser/test/flatten.test.js","testResults":[{"ancestorTitles":["preparsed flatten without executionContext"],"duration":3,"failureMessages":[],"fullName":"preparsed flatten without executionContext doesnt merge strings","numPassingAsserts":0,"status":"passed","title":"doesnt merge strings"},{"ancestorTitles":["preparsed flatten without executionContext"],"duration":1,"failureMessages":[],"fullName":"preparsed flatten without executionContext drops nulls","numPassingAsserts":0,"status":"passed","title":"drops nulls"},{"ancestorTitles":["preparsed flatten without executionContext"],"duration":0,"failureMessages":[],"fullName":"preparsed flatten without executionContext doesnt drop any numbers","numPassingAsserts":0,"status":"passed","title":"doesnt drop any numbers"},{"ancestorTitles":["preparsed flatten without executionContext"],"duration":1,"failureMessages":[],"fullName":"preparsed flatten without executionContext toStrings everything","numPassingAsserts":0,"status":"passed","title":"toStrings everything"},{"ancestorTitles":["preparsed flatten without executionContext"],"duration":1,"failureMessages":[],"fullName":"preparsed flatten without executionContext hypenates objects","numPassingAsserts":0,"status":"passed","title":"hypenates objects"},{"ancestorTitles":["preparsed flatten without executionContext"],"duration":0,"failureMessages":[],"fullName":"preparsed flatten without executionContext flattens nested rulesets","numPassingAsserts":0,"status":"passed","title":"flattens nested rulesets"},{"ancestorTitles":["preparsed flatten without executionContext"],"duration":1,"failureMessages":[],"fullName":"preparsed flatten without executionContext flattens double nested rulesets","numPassingAsserts":0,"status":"passed","title":"flattens double nested rulesets"},{"ancestorTitles":["preparsed flatten without executionContext"],"duration":1,"failureMessages":[],"fullName":"preparsed flatten without executionContext flattens subarrays","numPassingAsserts":0,"status":"passed","title":"flattens subarrays"},{"ancestorTitles":["preparsed flatten without executionContext"],"duration":3,"failureMessages":[],"fullName":"preparsed flatten without executionContext defers functions","numPassingAsserts":0,"status":"passed","title":"defers functions"},{"ancestorTitles":["preparsed flatten with executionContext"],"duration":0,"failureMessages":[],"fullName":"preparsed flatten with executionContext merges strings","numPassingAsserts":0,"status":"passed","title":"merges strings"},{"ancestorTitles":["preparsed flatten with executionContext"],"duration":1,"failureMessages":[],"fullName":"preparsed flatten with executionContext drops nulls","numPassingAsserts":0,"status":"passed","title":"drops nulls"},{"ancestorTitles":["preparsed flatten with executionContext"],"duration":0,"failureMessages":[],"fullName":"preparsed flatten with executionContext doesnt drop any numbers","numPassingAsserts":0,"status":"passed","title":"doesnt drop any numbers"},{"ancestorTitles":["preparsed flatten with executionContext"],"duration":1,"failureMessages":[],"fullName":"preparsed flatten with executionContext toStrings everything","numPassingAsserts":0,"status":"passed","title":"toStrings everything"},{"ancestorTitles":["preparsed flatten with executionContext"],"duration":1,"failureMessages":[],"fullName":"preparsed flatten with executionContext hypenates objects","numPassingAsserts":0,"status":"passed","title":"hypenates objects"},{"ancestorTitles":["preparsed flatten with executionContext"],"duration":1,"failureMessages":[],"fullName":"preparsed flatten with executionContext flattens nested rulesets","numPassingAsserts":0,"status":"passed","title":"flattens nested rulesets"},{"ancestorTitles":["preparsed flatten with executionContext"],"duration":0,"failureMessages":[],"fullName":"preparsed flatten with executionContext flattens double nested rulesets","numPassingAsserts":0,"status":"passed","title":"flattens double nested rulesets"},{"ancestorTitles":["preparsed flatten with executionContext"],"duration":0,"failureMessages":[],"fullName":"preparsed flatten with executionContext flattens subarrays","numPassingAsserts":0,"status":"passed","title":"flattens subarrays"},{"ancestorTitles":["preparsed flatten with executionContext"],"duration":1,"failureMessages":[],"fullName":"preparsed flatten with executionContext executes functions","numPassingAsserts":0,"status":"passed","title":"executes functions"},{"ancestorTitles":["preparsed flatten with executionContext"],"duration":0,"failureMessages":[],"fullName":"preparsed flatten with executionContext resolves rulesets after executing functions","numPassingAsserts":0,"status":"passed","title":"resolves rulesets after executing functions"},{"ancestorTitles":["preparsed flatten with executionContext"],"duration":1,"failureMessages":[],"fullName":"preparsed flatten with executionContext resolves double nested rulesets after executing functions","numPassingAsserts":0,"status":"passed","title":"resolves double nested rulesets after executing functions"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":9,"numPendingTests":0,"perfStats":{"end":1508127945536,"start":1508127945370},"snapshot":{"added":0,"fileDeleted":false,"matched":20,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/test/ssr.test.js","testResults":[{"ancestorTitles":["ssr"],"duration":20,"failureMessages":[],"fullName":"ssr should extract the CSS in a simple case","numPassingAsserts":0,"status":"passed","title":"should extract the CSS in a simple case"},{"ancestorTitles":["ssr"],"duration":3,"failureMessages":[],"fullName":"ssr should extract both global and local CSS","numPassingAsserts":0,"status":"passed","title":"should extract both global and local CSS"},{"ancestorTitles":["ssr"],"duration":3,"failureMessages":[],"fullName":"ssr should add a nonce to the stylesheet if webpack nonce is detected in the global scope","numPassingAsserts":0,"status":"passed","title":"should add a nonce to the stylesheet if webpack nonce is detected in the global scope"},{"ancestorTitles":["ssr"],"duration":3,"failureMessages":[],"fullName":"ssr should render CSS in the order the components were defined, not rendered","numPassingAsserts":0,"status":"passed","title":"should render CSS in the order the components were defined, not rendered"},{"ancestorTitles":["ssr"],"duration":9,"failureMessages":[],"fullName":"ssr should share global styles but keep renders separate","numPassingAsserts":0,"status":"passed","title":"should share global styles but keep renders separate"},{"ancestorTitles":["ssr"],"duration":5,"failureMessages":[],"fullName":"ssr should allow global styles to be injected during rendering","numPassingAsserts":0,"status":"passed","title":"should allow global styles to be injected during rendering"},{"ancestorTitles":["ssr"],"duration":4,"failureMessages":[],"fullName":"ssr should dispatch global styles to each ServerStyleSheet","numPassingAsserts":0,"status":"passed","title":"should dispatch global styles to each ServerStyleSheet"},{"ancestorTitles":["ssr"],"duration":18,"failureMessages":[],"fullName":"ssr should return a generated React style element","numPassingAsserts":0,"status":"passed","title":"should return a generated React style element"},{"ancestorTitles":["ssr"],"duration":6,"failureMessages":[],"fullName":"ssr should return a generated React style element with nonce if webpack nonce is preset in the global scope","numPassingAsserts":0,"status":"passed","title":"should return a generated React style element with nonce if webpack nonce is preset in the global scope"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":2,"numPendingTests":0,"perfStats":{"end":1508127945543,"start":1508127945493},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/utils/test/determineTheme.test.js","testResults":[{"ancestorTitles":["determineTheme"],"duration":2,"failureMessages":[],"fullName":"determineTheme should take precedence over ThemeProvider","numPassingAsserts":0,"status":"passed","title":"should take precedence over ThemeProvider"},{"ancestorTitles":["determineTheme"],"duration":1,"failureMessages":[],"fullName":"determineTheme should fallback to default theme","numPassingAsserts":0,"status":"passed","title":"should fallback to default theme"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":12,"numPendingTests":0,"perfStats":{"end":1508127945544,"start":1508127945472},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/utils/test/flatten.test.js","testResults":[{"ancestorTitles":["flatten"],"duration":2,"failureMessages":[],"fullName":"flatten doesnt merge strings","numPassingAsserts":0,"status":"passed","title":"doesnt merge strings"},{"ancestorTitles":["flatten"],"duration":1,"failureMessages":[],"fullName":"flatten drops nulls","numPassingAsserts":0,"status":"passed","title":"drops nulls"},{"ancestorTitles":["flatten"],"duration":0,"failureMessages":[],"fullName":"flatten doesnt drop any numbers","numPassingAsserts":0,"status":"passed","title":"doesnt drop any numbers"},{"ancestorTitles":["flatten"],"duration":0,"failureMessages":[],"fullName":"flatten toStrings everything","numPassingAsserts":0,"status":"passed","title":"toStrings everything"},{"ancestorTitles":["flatten"],"duration":1,"failureMessages":[],"fullName":"flatten hypenates objects","numPassingAsserts":0,"status":"passed","title":"hypenates objects"},{"ancestorTitles":["flatten"],"duration":2,"failureMessages":[],"fullName":"flatten handles nested objects","numPassingAsserts":0,"status":"passed","title":"handles nested objects"},{"ancestorTitles":["flatten"],"duration":0,"failureMessages":[],"fullName":"flatten toStrings class instances","numPassingAsserts":0,"status":"passed","title":"toStrings class instances"},{"ancestorTitles":["flatten"],"duration":0,"failureMessages":[],"fullName":"flatten flattens subarrays","numPassingAsserts":0,"status":"passed","title":"flattens subarrays"},{"ancestorTitles":["flatten"],"duration":1,"failureMessages":[],"fullName":"flatten defers functions","numPassingAsserts":0,"status":"passed","title":"defers functions"},{"ancestorTitles":["flatten"],"duration":0,"failureMessages":[],"fullName":"flatten executes functions","numPassingAsserts":0,"status":"passed","title":"executes functions"},{"ancestorTitles":["flatten"],"duration":0,"failureMessages":[],"fullName":"flatten passes values to function","numPassingAsserts":0,"status":"passed","title":"passes values to function"},{"ancestorTitles":["flatten"],"duration":1,"failureMessages":[],"fullName":"flatten recursively calls functions","numPassingAsserts":0,"status":"passed","title":"recursively calls functions"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":1,"numPendingTests":0,"perfStats":{"end":1508127945555,"start":1508127945513},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/utils/test/generateAlphabeticName.test.js","testResults":[{"ancestorTitles":["generateAlphabeticName"],"duration":1,"failureMessages":[],"fullName":"generateAlphabeticName should create alphabetic names for number input data","numPassingAsserts":0,"status":"passed","title":"should create alphabetic names for number input data"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":1,"numPendingTests":0,"perfStats":{"end":1508127945558,"start":1508127945316},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/test/overriding.test.js","testResults":[{"ancestorTitles":["extending"],"duration":6,"failureMessages":[],"fullName":"extending should let you use another component in a css rule","numPassingAsserts":0,"status":"passed","title":"should let you use another component in a css rule"}],"sourceMaps":{},"skipped":false},{"console":[],"failureMessage":null,"numFailingTests":0,"numPassingTests":2,"numPendingTests":0,"perfStats":{"end":1508127945575,"start":1508127945542},"snapshot":{"added":0,"fileDeleted":false,"matched":0,"unchecked":0,"unmatched":0,"updated":0},"testFilePath":"/Users/cferris/src/styled-components/src/utils/test/interleave.test.js","testResults":[{"ancestorTitles":["interleave"],"duration":1,"failureMessages":[],"fullName":"interleave blindly interleave","numPassingAsserts":0,"status":"passed","title":"blindly interleave"},{"ancestorTitles":["interleave"],"duration":0,"failureMessages":[],"fullName":"interleave should be driven off the number of interpolations","numPassingAsserts":0,"status":"passed","title":"should be driven off the number of interpolations"}],"sourceMaps":{},"skipped":false}],"wasInterrupted":false} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 6c7f153dc..ebb1c810d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -44,6 +44,13 @@ accepts@~1.3.0, accepts@~1.3.3: mime-types "~2.1.11" negotiator "0.6.1" +accepts@~1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.4.tgz#86246758c7dd6d21a6474ff084a4740ec05eb21f" + dependencies: + mime-types "~2.1.16" + negotiator "0.6.1" + acorn-globals@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" @@ -68,6 +75,10 @@ acorn@^5.0.1: version "5.0.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" +address@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/address/-/address-1.0.3.tgz#b5f50631f8d6cec8bd20c963963afb55e06cbce9" + ajv-keywords@^1.0.0: version "1.5.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" @@ -111,6 +122,12 @@ ansi-align@^1.1.0: dependencies: string-width "^1.0.1" +ansi-align@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" + dependencies: + string-width "^2.0.0" + ansi-escapes@^1.0.0, ansi-escapes@^1.1.0, ansi-escapes@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" @@ -167,6 +184,26 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +args@2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/args/-/args-2.6.1.tgz#b2590ed4168cd31b62444199bdc5166bb1920c2f" + dependencies: + camelcase "4.1.0" + chalk "1.1.3" + minimist "1.2.0" + pkginfo "0.4.0" + string-similarity "1.1.0" + +args@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/args/-/args-3.0.2.tgz#850bb8e881f3139203a5e4cb176431092b562c2d" + dependencies: + camelcase "4.1.0" + chalk "1.1.3" + minimist "1.2.0" + pkginfo "0.4.0" + string-similarity "1.1.0" + arr-diff@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" @@ -254,6 +291,13 @@ async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" +async-to-gen@1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/async-to-gen/-/async-to-gen-1.3.3.tgz#d52c9fb4801f0df44abc4d2de1870b48b60e20bb" + dependencies: + babylon "^6.14.0" + magic-string "^0.19.0" + async@^1.4.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" @@ -1092,6 +1136,10 @@ babylon@^6.11.0, babylon@^6.14.1, babylon@^6.15.0, babylon@^6.17.0: version "6.17.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.0.tgz#37da948878488b9c4e3c4038893fa3314b3fc932" +babylon@^6.14.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + babylon@^6.17.4: version "6.17.4" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.4.tgz#3e8b7402b88d22c3423e137a1577883b15ff869a" @@ -1116,6 +1164,10 @@ basic-auth-connect@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/basic-auth-connect/-/basic-auth-connect-1.0.0.tgz#fdb0b43962ca7b40456a7c2bb48fe173da2d2122" +basic-auth@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-1.1.0.tgz#45221ee429f7ee1e5035be3f51533f1cdfd29884" + basic-auth@~1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-1.0.4.tgz#030935b01de7c9b94a824b29f3fccb750d3a5290" @@ -1148,6 +1200,10 @@ block-stream@*: dependencies: inherits "~2.0.0" +bluebird@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.0.tgz#791420d7f551eea2897453a8a77653f96606d67c" + body-parser@~1.13.3: version "1.13.3" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.13.3.tgz#c08cf330c3358e151016a05746f13f029c97fa97" @@ -1177,6 +1233,18 @@ bowser@^1.0.0, bowser@^1.6.0: version "1.7.0" resolved "https://registry.yarnpkg.com/bowser/-/bowser-1.7.0.tgz#169de4018711f994242bff9a8009e77a1f35e003" +boxen@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.1.0.tgz#b1b69dd522305e807a99deee777dbd6e5167b102" + dependencies: + ansi-align "^2.0.0" + camelcase "^4.0.0" + chalk "^1.1.1" + cli-boxes "^1.0.0" + string-width "^2.0.0" + term-size "^0.1.0" + widest-line "^1.0.0" + boxen@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.0.0.tgz#b2694baf1f605f708ff0177c12193b22f29aaaab" @@ -1282,6 +1350,10 @@ bytes@2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.4.0.tgz#7d97196f9d5baf7f6935e25985549edd2a6c2339" +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + bytes@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.5.0.tgz#4c9423ea2d252c270c41b2bdefeff9bb6b62c06a" @@ -1300,6 +1372,10 @@ callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" +camelcase@4.1.0, camelcase@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + camelcase@^1.0.2: version "1.2.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" @@ -1308,10 +1384,6 @@ camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" -camelcase@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - caniuse-db@^1.0.30000639: version "1.0.30000657" resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000657.tgz#8192aec745019cc050217ad049c60dad21e3d1bc" @@ -1414,6 +1486,18 @@ cli-width@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" +clipboardy@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-1.1.1.tgz#75b5a7ac50d83c98025fb6303298c6a9007c16c7" + dependencies: + execa "^0.6.0" + +clipboardy@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/clipboardy/-/clipboardy-1.1.4.tgz#51b17574fc682588e2dd295cfa6e6aa109eab5ee" + dependencies: + execa "^0.6.0" + cliui@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" @@ -1480,12 +1564,30 @@ commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" +compressible@~2.0.11: + version "2.0.11" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.11.tgz#16718a75de283ed8e604041625a2064586797d8a" + dependencies: + mime-db ">= 1.29.0 < 2" + compressible@~2.0.5: version "2.0.10" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.10.tgz#feda1c7f7617912732b29bf8cf26252a20b9eecd" dependencies: mime-db ">= 1.27.0 < 2" +compression@^1.6.2: + version "1.7.1" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.1.tgz#eff2603efc2e22cf86f35d2eb93589f9875373db" + dependencies: + accepts "~1.3.4" + bytes "3.0.0" + compressible "~2.0.11" + debug "2.6.9" + on-headers "~1.0.1" + safe-buffer "5.1.1" + vary "~1.1.2" + compression@~1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/compression/-/compression-1.5.2.tgz#b03b8d86e6f8ad29683cba8df91ddc6ffc77b395" @@ -1764,6 +1866,12 @@ damerau-levenshtein@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" +danger-plugin-jest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/danger-plugin-jest/-/danger-plugin-jest-1.0.1.tgz#ef3de0096573e70db9c882ebdc02a6414de76ab8" + optionalDependencies: + serve "^5.1.5" + danger@^0.16.0: version "0.16.0" resolved "https://registry.yarnpkg.com/danger/-/danger-0.16.0.tgz#d48ac67208819239a77b9bed15026ce6a9ce0c81" @@ -1786,6 +1894,10 @@ danger@^0.16.0: rfc6902 "^1.3.0" voca "^1.2.0" +dargs@5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/dargs/-/dargs-5.1.0.tgz#ec7ea50c78564cd36c9d5ec18f66329fade27829" + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -1822,6 +1934,18 @@ debug@2.6.3: dependencies: ms "0.7.2" +debug@2.6.7: + version "2.6.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.7.tgz#92bad1f6d05bbb6bba22cca88bcd0ec894c2861e" + dependencies: + ms "2.0.0" + +debug@2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + debug@^2.1.1, debug@^2.2.0, debug@^2.4.5, debug@^2.6.0, debug@^2.6.3: version "2.6.4" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.4.tgz#7586a9b3c39741c0282ae33445c4e8ac74734fe0" @@ -1905,6 +2029,13 @@ detect-indent@^4.0.0: dependencies: repeating "^2.0.0" +detect-port@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.2.1.tgz#a2c0a048aa9df2b703fc54bb4436ce2118f09b5a" + dependencies: + address "^1.0.1" + debug "^2.6.0" + diff@^3.0.0, diff@^3.0.1, diff@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" @@ -2541,6 +2672,10 @@ fileset@^2.0.2: glob "^7.0.3" minimatch "^3.0.3" +filesize@3.5.10: + version "3.5.10" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.5.10.tgz#fc8fa23ddb4ef9e5e0ab6e1e64f679a24a56761f" + fill-range@^2.1.0: version "2.2.3" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" @@ -2683,6 +2818,14 @@ from@~0: version "0.1.7" resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" +fs-extra@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^3.0.0" + universalify "^0.1.0" + fs-extra@^0.26.2: version "0.26.7" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.26.7.tgz#9ae1fdd94897798edab76d0918cf42d0c3184fa9" @@ -2774,6 +2917,10 @@ get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" +get-port@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.1.0.tgz#ef01b18a84ca6486970ff99e54446141a73ffd3e" + get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -2941,6 +3088,16 @@ gzip-size@^3.0.0: dependencies: duplexer "^0.1.1" +handlebars@4.0.10: + version "4.0.10" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.10.tgz#3d30c718b09a3d96f23ea4cc1f403c4d3ba9ff4f" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + handlebars@^4.0.3: version "4.0.6" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.6.tgz#2ce4484850537f9c97a8026d5399b935c4ed4ed7" @@ -3069,6 +3226,10 @@ iconv-lite@0.4.13, iconv-lite@~0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" +iconv-lite@0.4.15: + version "0.4.15" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb" + ieee754@^1.1.4: version "1.1.8" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" @@ -3089,6 +3250,10 @@ immutable@~3.7.6: version "3.7.6" resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.7.6.tgz#13b4d3cb12befa15482a26fe1b2ebae640071e4b" +import-lazy@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" + imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -3168,6 +3333,10 @@ invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" +ip@1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" + ipaddr.js@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.3.0.tgz#1e03a52fdad83a8bbb2b25cbf4998b4cffcd3dec" @@ -3176,6 +3345,10 @@ is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" +is-async-supported@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-async-supported/-/is-async-supported-1.2.0.tgz#20d58ac4d6707eb1cb3712dd38480c0536f27c07" + is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" @@ -3351,6 +3524,10 @@ is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" +is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -3384,7 +3561,7 @@ isomorphic-fetch@^2.1.1: node-fetch "^1.0.1" whatwg-fetch ">=0.10.0" -isstream@~0.1.2: +isstream@0.1.2, isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -3629,6 +3806,12 @@ jest-jasmine2@^20.0.4: once "^1.4.0" p-map "^1.1.1" +jest-json-reporter@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/jest-json-reporter/-/jest-json-reporter-1.2.2.tgz#f2180f9cff0efa339916bbf13a2e4b1da984ad9e" + dependencies: + read-pkg "^2.0.0" + jest-matcher-utils@^19.0.0: version "19.0.0" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-19.0.0.tgz#5ecd9b63565d2b001f61fbf7ec4c7f537964564d" @@ -3924,6 +4107,12 @@ jsonfile@^2.1.0: optionalDependencies: graceful-fs "^4.1.6" +jsonfile@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" + optionalDependencies: + graceful-fs "^4.1.6" + jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" @@ -4298,7 +4487,7 @@ lodash@^3.5.0: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" -lodash@^4.0.0, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.16.6, lodash@^4.17.2, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.6.1: +lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lodash@^4.16.6, lodash@^4.17.2, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.6.1: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -4389,6 +4578,31 @@ methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" +micro-compress@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/micro-compress/-/micro-compress-1.0.0.tgz#53f5a80b4ad0320ca165a559b6e3df145d4f704f" + dependencies: + compression "^1.6.2" + +micro@7.3.3: + version "7.3.3" + resolved "https://registry.yarnpkg.com/micro/-/micro-7.3.3.tgz#8261c56d2a31a7df93986eff86441396f2b4b070" + dependencies: + args "2.6.1" + async-to-gen "1.3.3" + bluebird "3.5.0" + boxen "1.1.0" + chalk "1.1.3" + clipboardy "1.1.1" + get-port "3.1.0" + ip "1.1.5" + is-async-supported "1.2.0" + isstream "0.1.2" + media-typer "0.3.0" + node-version "1.0.0" + raw-body "2.2.0" + update-notifier "2.1.0" + micromatch@^2.1.5, micromatch@^2.3.11: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" @@ -4411,6 +4625,10 @@ micromatch@^2.1.5, micromatch@^2.3.11: version "1.27.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" +"mime-db@>= 1.29.0 < 2", mime-db@~1.30.0: + version "1.30.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" + mime-db@~1.23.0: version "1.23.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.23.0.tgz#a31b4070adaea27d732ea333740a64d0ec9a6659" @@ -4421,12 +4639,18 @@ mime-types@2.1.11, mime-types@~2.1.11: dependencies: mime-db "~1.23.0" -mime-types@^2.1.12, mime-types@~2.1.15, mime-types@~2.1.6, mime-types@~2.1.7, mime-types@~2.1.9: +mime-types@2.1.15, mime-types@^2.1.12, mime-types@~2.1.15, mime-types@~2.1.6, mime-types@~2.1.7, mime-types@~2.1.9: version "2.1.15" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" dependencies: mime-db "~1.27.0" +mime-types@~2.1.16: + version "2.1.17" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" + dependencies: + mime-db "~1.30.0" + mime@1.3.4, mime@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" @@ -4453,7 +4677,7 @@ minimist@0.0.8, minimist@~0.0.1: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0: +minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -4489,6 +4713,10 @@ ms@0.7.3: version "0.7.3" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.3.tgz#708155a5e44e33f5fd0fc53e81d0d40a91be1fff" +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + multimatch@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b" @@ -4575,6 +4803,10 @@ node-uuid@1.4.7: version "1.4.7" resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.7.tgz#6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f" +node-version@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-version/-/node-version-1.0.0.tgz#1b9b9584a9a7f7a6123f215cd14a652bf21ab19e" + node-watch@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/node-watch/-/node-watch-0.4.1.tgz#d0947d54a995f91135db4056b68722c6d7c322ad" @@ -4762,6 +4994,12 @@ onetime@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" +opn@5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/opn/-/opn-5.1.0.tgz#72ce2306a17dbea58ff1041853352b4a8fc77519" + dependencies: + is-wsl "^1.1.0" + opn@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/opn/-/opn-3.0.3.tgz#b6d99e7399f78d65c3baaffef1fb288e9b85243a" @@ -4927,6 +5165,12 @@ path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" +path-type@2.0.0, path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" + path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" @@ -4935,12 +5179,6 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" -path-type@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" - dependencies: - pify "^2.0.0" - pause-stream@0.0.11: version "0.0.11" resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" @@ -4985,6 +5223,10 @@ pkg-up@^1.0.0: dependencies: find-up "^1.0.0" +pkginfo@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.0.tgz#349dbb7ffd38081fcadc0853df687f0c7744cd65" + plist@1.2.0, plist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/plist/-/plist-1.2.0.tgz#084b5093ddc92506e259f874b8d9b1afb8c79593" @@ -5136,6 +5378,14 @@ range-parser@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" +raw-body@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.2.0.tgz#994976cf6a5096a41162840492f0bdc5d6e7fb96" + dependencies: + bytes "2.4.0" + iconv-lite "0.4.15" + unpipe "1.0.0" + raw-body@~2.1.2: version "2.1.7" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.1.7.tgz#adfeace2e4fb3098058014d08c072dcc59758774" @@ -5680,6 +5930,10 @@ rxjs@^5.0.0-beta.11: dependencies: symbol-observable "^1.0.1" +safe-buffer@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" + safe-buffer@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" @@ -5772,6 +6026,24 @@ send@0.15.1: range-parser "~1.2.0" statuses "~1.3.1" +send@0.15.3: + version "0.15.3" + resolved "https://registry.yarnpkg.com/send/-/send-0.15.3.tgz#5013f9f99023df50d1bd9892c19e3defd1d53309" + dependencies: + debug "2.6.7" + depd "~1.1.0" + destroy "~1.0.4" + encodeurl "~1.0.1" + escape-html "~1.0.3" + etag "~1.8.0" + fresh "0.5.0" + http-errors "~1.6.1" + mime "1.3.4" + ms "2.0.0" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.3.1" + serve-favicon@~2.3.0: version "2.3.2" resolved "https://registry.yarnpkg.com/serve-favicon/-/serve-favicon-2.3.2.tgz#dd419e268de012ab72b319d337f2105013f9381f" @@ -5810,6 +6082,31 @@ serve-static@~1.10.0: parseurl "~1.3.1" send "0.13.2" +serve@^5.1.5: + version "5.2.4" + resolved "https://registry.yarnpkg.com/serve/-/serve-5.2.4.tgz#4742c05f65a2330f788cdde901cd7a09b23a99f6" + dependencies: + args "3.0.2" + basic-auth "1.1.0" + bluebird "3.5.0" + boxen "1.1.0" + chalk "1.1.3" + clipboardy "1.1.4" + dargs "5.1.0" + detect-port "1.2.1" + filesize "3.5.10" + fs-extra "3.0.1" + handlebars "4.0.10" + ip "1.1.5" + micro "7.3.3" + micro-compress "1.0.0" + mime-types "2.1.15" + node-version "1.0.0" + opn "5.1.0" + path-type "2.0.0" + send "0.15.3" + update-notifier "2.2.0" + set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -6009,6 +6306,12 @@ string-length@^1.0.0, string-length@^1.0.1: dependencies: strip-ansi "^3.0.0" +string-similarity@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/string-similarity/-/string-similarity-1.1.0.tgz#3c66498858a465ec7c40c7d81739bbd995904914" + dependencies: + lodash "^4.13.1" + string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -6062,9 +6365,9 @@ strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" -stylis@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.2.1.tgz#7a88988f8ccb5c238be3cc3cec173735cc594740" +stylis@3.x: + version "3.3.2" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.3.2.tgz#95ef285836e98243f8b8f64a9a72706ea6c893ea" supports-color@^2.0.0: version "2.0.0" @@ -6308,6 +6611,10 @@ unique-string@^1.0.0: dependencies: crypto-random-string "^1.0.0" +universalify@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -6328,7 +6635,7 @@ update-notifier@0.5.0: semver-diff "^2.0.0" string-length "^1.0.0" -update-notifier@^2.0.0: +update-notifier@2.1.0, update-notifier@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.1.0.tgz#ec0c1e53536b76647a24b77cb83966d9315123d9" dependencies: @@ -6341,6 +6648,19 @@ update-notifier@^2.0.0: semver-diff "^2.0.0" xdg-basedir "^3.0.0" +update-notifier@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.2.0.tgz#1b5837cf90c0736d88627732b661c138f86de72f" + dependencies: + boxen "^1.0.0" + chalk "^1.0.0" + configstore "^3.0.0" + import-lazy "^2.1.0" + is-npm "^1.0.0" + latest-version "^3.0.0" + semver-diff "^2.0.0" + xdg-basedir "^3.0.0" + url-parse-lax@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" @@ -6394,6 +6714,10 @@ vary@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.1.tgz#67535ebb694c1d52257457984665323f587e8d37" +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + verror@1.3.6: version "1.3.6" resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c"