diff --git a/package.json b/package.json index 7653a0f1..c1ff298d 100644 --- a/package.json +++ b/package.json @@ -56,8 +56,8 @@ } }, "dependencies": { - "@babel/types": "7.8.3", - "babel-plugin-syntax-jsx": "6.18.0", + "@babel/plugin-syntax-jsx": "7.14.5", + "@babel/types": "7.15.0", "convert-source-map": "1.7.0", "loader-utils": "1.2.3", "source-map": "0.7.3", @@ -77,7 +77,6 @@ "@babel/register": "7.12.1", "@babel/runtime": "7.12.5", "ava": "1.2.1", - "babel-core": "6.26.3", "babel-plugin-macros": "2.8.0", "eslint-config-prettier": "4.0.0", "husky": "4.3.0", diff --git a/src/babel-test.js b/src/babel-test.js index 1bf8a2a7..3e0d3232 100644 --- a/src/babel-test.js +++ b/src/babel-test.js @@ -1,4 +1,4 @@ -import jsx from 'babel-plugin-syntax-jsx' +import jsx from '@babel/plugin-syntax-jsx' export default function() { return { diff --git a/src/babel.js b/src/babel.js index 27abc95c..d3cf6ba5 100644 --- a/src/babel.js +++ b/src/babel.js @@ -1,5 +1,5 @@ // Packages -import jsx from 'babel-plugin-syntax-jsx' +import jsx from '@babel/plugin-syntax-jsx' import { visitor as externalStylesVisitor } from './babel-external' diff --git a/test/babel6/_transform.js b/test/babel6/_transform.js deleted file mode 100644 index 67bc90dc..00000000 --- a/test/babel6/_transform.js +++ /dev/null @@ -1,35 +0,0 @@ -import path from 'path' -import { transformFile, transform } from 'babel-core' - -export default (file, opts = {}) => - new Promise((resolve, reject) => { - transformFile( - path.resolve(__dirname, file), - { - babelrc: false, - ...opts - }, - (error, data) => { - if (error) { - return reject(error) - } - - resolve(data) - } - ) - }) - -export const transformSource = (src, opts = {}) => - new Promise((resolve, reject) => { - try { - resolve( - // In Babel 7 this will be async - transform(src, { - babelrc: false, - ...opts - }) - ) - } catch (error) { - reject(error) - } - }) diff --git a/test/babel6/attribute.js b/test/babel6/attribute.js deleted file mode 100644 index 8fc10b22..00000000 --- a/test/babel6/attribute.js +++ /dev/null @@ -1,24 +0,0 @@ -// Packages -import test from 'ava' - -// Ours -import plugin from '../../src/babel' -import _transform from './_transform' - -const transform = (file, opts = {}) => - _transform(file, { - plugins: [plugin], - ...opts - }) - -test('rewrites className', async t => { - const { code } = await transform( - '../fixtures/attribute-generation-classname-rewriting.js' - ) - t.snapshot(code) -}) - -test('generate attribute for mixed modes (global, static, dynamic)', async t => { - const { code } = await transform('../fixtures/attribute-generation-modes.js') - t.snapshot(code) -}) diff --git a/test/babel6/external.js b/test/babel6/external.js deleted file mode 100644 index 457ba31b..00000000 --- a/test/babel6/external.js +++ /dev/null @@ -1,95 +0,0 @@ -// Packages -import test from 'ava' - -// Ours -import plugin from '../../src/babel' -import _transform, { transformSource as _transformSource } from './_transform' - -const transform = (file, opts = {}) => - _transform(file, { - plugins: [[plugin, opts]] - }) - -const transformSource = (src, opts = {}) => - _transformSource(src.trim(), { - plugins: [[plugin, opts]], - ...opts - }) - -test('transpiles external stylesheets', async t => { - const { code } = await transform('../fixtures/styles.js') - t.snapshot(code) -}) - -test('(optimized) transpiles external stylesheets', async t => { - const { code } = await transform('../fixtures/styles.js', { - optimizeForSpeed: true - }) - t.snapshot(code) -}) - -test('transpiles external stylesheets (CommonJS modules)', async t => { - const { code } = await transform('../fixtures/styles2.js') - t.snapshot(code) -}) - -test('(optimized) transpiles external stylesheets (CommonJS modules)', async t => { - const { code } = await transform('../fixtures/styles2.js', { - optimizeForSpeed: true - }) - t.snapshot(code) -}) - -test('does not transpile non-styled-jsx tagged teplate literals', async t => { - const { code } = await transform( - '../fixtures/not-styled-jsx-tagged-templates.js' - ) - t.snapshot(code) -}) - -test('throws when using `this.something` in external stylesheets', async t => { - const { message } = await t.throwsAsync(() => - transform('../fixtures/styles-external-invalid.js') - ) - t.regex(message, /this\.props/) -}) - -test('throws when referring an undefined value in external stylesheets', async t => { - const { message } = await t.throwsAsync(() => - transform('../fixtures/styles-external-invalid2.js') - ) - t.regex(message, /props\.color/) -}) - -test('use external stylesheets', async t => { - const { code } = await transform('../fixtures/external-stylesheet.js') - t.snapshot(code) -}) - -test('use external stylesheets (multi-line)', async t => { - const { code } = await transform( - '../fixtures/external-stylesheet-multi-line.js' - ) - t.snapshot(code) -}) - -test('use external stylesheets (global only)', async t => { - const { code } = await transform('../fixtures/external-stylesheet-global.js') - t.snapshot(code) -}) - -test('injects JSXStyle for nested scope', async t => { - const { code } = await transformSource(` - import css from 'styled-jsx/css' - - function test() { - css.resolve\`div { color: red }\` - } - `) - t.snapshot(code) -}) - -test('use external stylesheet and dynamic element', async t => { - const { code } = await transform('../fixtures/dynamic-element-external.js') - t.snapshot(code) -}) diff --git a/test/babel6/index.js b/test/babel6/index.js deleted file mode 100644 index c30c8b64..00000000 --- a/test/babel6/index.js +++ /dev/null @@ -1,221 +0,0 @@ -// Packages -import test from 'ava' -import React from 'react' -import ReactDOM from 'react-dom/server' - -// Ours -import plugin from '../../src/babel' -import JSXStyle from '../../src/style' -import flush, { flushToHTML } from '../../src/server' -import _transform from './_transform' - -const transform = (file, opts = {}) => - _transform(file, { - plugins: [plugin], - ...opts - }) - -test('works with stateless', async t => { - const { code } = await transform('../fixtures/stateless.js') - t.snapshot(code) -}) - -test('does not handle shorthand fragment <>', async t => { - const { message } = await t.throwsAsync(() => - transform('../fixtures/simple-fragment.js') - ) - t.regex(message, /Unexpected token/) -}) - -test('ignores whitespace around expression container', async t => { - const { code } = await transform('../fixtures/whitespace.js') - t.snapshot(code) -}) - -test('works with class', async t => { - const { code } = await transform('../fixtures/class.js') - t.snapshot(code) -}) - -test('ignores when attribute is absent', async t => { - const { code } = await transform('../fixtures/absent.js') - t.snapshot(code) -}) - -test('works with global styles', async t => { - const { code } = await transform('../fixtures/global.js') - t.snapshot(code) -}) - -test('generates source maps', async t => { - const { code } = await transform('../fixtures/source-maps.js', { - plugins: [[plugin, { sourceMaps: true }]] - }) - t.snapshot(code) -}) - -test('mixed global and scoped', async t => { - const { code } = await transform('../fixtures/mixed-global-scoped.js') - t.snapshot(code) -}) - -test('works with multiple jsx blocks', async t => { - const { code } = await transform('../fixtures/multiple-jsx.js') - t.snapshot(code) -}) - -test('should not add the data-jsx attribute to components instances', async t => { - const { code } = await transform('../fixtures/component-attribute.js') - t.snapshot(code) -}) - -test('works with expressions in template literals', async t => { - const { code } = await transform('../fixtures/expressions.js') - t.snapshot(code) -}) - -test('should have different jsx ids', async t => { - const { code } = await transform('../fixtures/different-jsx-ids.js') - t.snapshot(code) -}) - -test('works with non styled-jsx styles', async t => { - const { code } = await transform('../fixtures/non-styled-jsx-style.js') - t.snapshot(code) -}) - -test('works with css tagged template literals in the same file', async t => { - const { code } = await transform('../fixtures/css-tag-same-file.js') - t.snapshot(code) -}) - -test('works with dynamic element', async t => { - const { code } = await transform('../fixtures/dynamic-element.js') - t.snapshot(code) -}) - -test('works with dynamic element in class', async t => { - const { code } = await transform('../fixtures/dynamic-element-class.js') - t.snapshot(code) -}) - -test('does not transpile nested style tags', async t => { - const { message } = await t.throwsAsync(() => - transform('../fixtures/nested-style-tags.js') - ) - t.regex(message, /detected nested style tag/i) -}) - -test('server rendering', t => { - function App() { - const color = 'green' - return React.createElement( - 'div', - null, - React.createElement( - JSXStyle, - { - id: 1 - }, - 'p { color: red }' - ), - React.createElement( - JSXStyle, - { - id: 2 - }, - 'div { color: blue }' - ), - React.createElement( - JSXStyle, - { - id: 3 - }, - `div { color: ${color} }` - ) - ) - } - - // Expected CSS - const expected = - '' + - '' + - '' - - // Render using react - ReactDOM.renderToString(React.createElement(App)) - const html = ReactDOM.renderToStaticMarkup( - React.createElement('head', null, flush()) - ) - - t.is(html, `${expected}`) - - // Assert that memory is empty - t.is(0, flush().length) - t.is('', flushToHTML()) - - // Render to html again - ReactDOM.renderToString(React.createElement(App)) - t.is(expected, flushToHTML()) - - // Assert that memory is empty - t.is(0, flush().length) - t.is('', flushToHTML()) -}) - -test('server rendering with nonce', t => { - function App() { - const color = 'green' - return React.createElement( - 'div', - null, - React.createElement( - JSXStyle, - { - id: 1 - }, - 'p { color: red }' - ), - React.createElement( - JSXStyle, - { - id: 2 - }, - 'div { color: blue }' - ), - React.createElement( - JSXStyle, - { - id: 3 - }, - `div { color: ${color} }` - ) - ) - } - - // Expected CSS - const expected = - '' + - '' + - '' - - // Render using react - ReactDOM.renderToString(React.createElement(App)) - const html = ReactDOM.renderToStaticMarkup( - React.createElement('head', null, flush({ nonce: 'test-nonce' })) - ) - - t.is(html, `${expected}`) - - // Assert that memory is empty - t.is(0, flush({ nonce: 'test-nonce' }).length) - t.is('', flushToHTML({ nonce: 'test-nonce' })) - - // Render to html again - ReactDOM.renderToString(React.createElement(App)) - t.is(expected, flushToHTML({ nonce: 'test-nonce' })) - - // Assert that memory is empty - t.is(0, flush({ nonce: 'test-nonce' }).length) - t.is('', flushToHTML({ nonce: 'test-nonce' })) -}) diff --git a/test/babel6/macro.js b/test/babel6/macro.js deleted file mode 100644 index 37bb638d..00000000 --- a/test/babel6/macro.js +++ /dev/null @@ -1,117 +0,0 @@ -// Packages -import test from 'ava' - -// Ours -import macros from 'babel-plugin-macros' -import jsx from 'babel-plugin-syntax-jsx' -import _transform, { transformSource as _transformSource } from './_transform' - -const transform = (file, opts = {}) => - _transform(file, { - plugins: [macros, jsx], - ...opts - }) - -const transformSource = (src, opts = {}) => - _transformSource(src.trim(), { - filename: './index.js', - plugins: [macros, jsx], - ...opts - }) - -test('transpiles correctly', async t => { - const { code } = await transform('../fixtures/macro.js') - t.snapshot(code) -}) - -test('throws when using the default export directly', async t => { - const { message } = await t.throwsAsync(() => - transformSource(` - import css from './src/macro' - - css\`div { color: red }\` - `) - ) - - t.regex(message, /can't use default import directly/i) -}) - -test('throws when using the default export directly and it is not called css', async t => { - const { message } = await t.throwsAsync(() => - transformSource(` - import foo from './src/macro' - - foo\`div { color: red }\` - `) - ) - - t.regex(message, /can't use default import directly/i) -}) - -test('throws when using the default export directly and it is not called resolve', async t => { - const { message } = await t.throwsAsync(() => - transformSource(` - import resolve from './src/macro' - - resolve\`div { color: red }\` - `) - ) - - t.regex(message, /can't use default import directly/i) -}) - -test('throws when using an invalid method from the default export', async t => { - const { message } = await t.throwsAsync(() => - transformSource(` - import css from './src/macro' - - css.foo\`div { color: red }\` - `) - ) - - t.regex(message, /using an invalid tag/i) -}) - -test('throws when using a named import different than resolve', async t => { - const { message } = await t.throwsAsync(() => - transformSource(` - import { foo } from './src/macro' - - foo\`div { color: red }\` - `) - ) - - t.regex(message, /imported an invalid named import/i) -}) - -test('throws when using a named import as a member expression', async t => { - const { message } = await t.throwsAsync(() => - transformSource(` - import { resolve } from './src/macro' - - resolve.foo\`div { color: red }\` - `) - ) - - t.regex(message, /can't use named import/i) -}) - -test('can alias the named import', async t => { - const { code } = await transformSource(` - import { resolve as foo } from './src/macro' - - foo\`div { color: red }\` - `) - t.snapshot(code) -}) - -test('injects JSXStyle for nested scope', async t => { - const { code } = await transformSource(` - import { resolve } from './src/macro' - - function test() { - resolve\`div { color: red }\` - } - `) - t.snapshot(code) -}) diff --git a/test/babel6/plugins.js b/test/babel6/plugins.js deleted file mode 100644 index 886e6f60..00000000 --- a/test/babel6/plugins.js +++ /dev/null @@ -1,133 +0,0 @@ -// Packages -import test from 'ava' - -// Ours -import babelPlugin from '../../src/babel' -import babelTestPlugin from '../../src/babel-test' -import { combinePlugins } from '../../src/_utils' -import testPlugin1 from '../fixtures/plugins/plugin' -import testPlugin2 from '../fixtures/plugins/another-plugin' -import _transform from './_transform' - -const transform = (file, opts = {}) => - _transform(file, { - plugins: [ - [ - babelPlugin, - { plugins: [require.resolve('../fixtures/plugins/another-plugin')] } - ] - ], - ...opts - }) - -test('combinePlugins returns an identity function when plugins is undefined', t => { - const test = 'test' - const plugins = combinePlugins() - t.is(plugins(test), test) -}) - -test('combinePlugins throws if plugins is not an array', t => { - t.throws(() => { - combinePlugins(2) - }) -}) - -test('combinePlugins throws if plugins is not an array of strings', t => { - t.throws(() => { - combinePlugins(['test', 2]) - }) -}) - -test('combinePlugins throws if loaded plugins are not functions', t => { - t.throws(() => { - combinePlugins([ - require.resolve('../fixtures/plugins/plugin'), - require.resolve('../fixtures/plugins/invalid-plugin') - ]) - }) -}) - -test('combinePlugins works with a single plugin', t => { - const plugins = combinePlugins([ - require.resolve('../fixtures/plugins/plugin') - ]) - - t.is(testPlugin1('test'), plugins('test')) -}) - -test('combinePlugins works with options', t => { - const expectedOption = 'my-test' - const plugins = combinePlugins([ - [ - require.resolve('../fixtures/plugins/options'), - { - test: expectedOption - } - ] - ]) - t.is(plugins(''), expectedOption) -}) - -test('combinePlugins applies plugins left to right', t => { - const plugins = combinePlugins([ - require.resolve('../fixtures/plugins/plugin'), - require.resolve('../fixtures/plugins/another-plugin') - ]) - - t.is(testPlugin2(testPlugin1('test')), plugins('test')) -}) - -test('applies plugins', async t => { - const { code } = await transform('../fixtures/with-plugins.js') - t.snapshot(code) -}) - -test('babel-test plugin strips jsx attribute', async t => { - const { code } = await transform('../fixtures/with-plugins.js', { - plugins: [babelTestPlugin] - }) - - t.snapshot(code) -}) - -test('passes options to plugins', async t => { - const { code } = await transform('../fixtures/with-plugins.js', { - plugins: [ - [ - babelPlugin, - { - plugins: [ - [require.resolve('../fixtures/plugins/options'), { foo: true }], - require.resolve('../fixtures/plugins/multiple-options'), - [ - require.resolve('../fixtures/plugins/multiple-options'), - { foo: false } - ] - ], - vendorPrefixes: false - } - ] - ] - }) - t.snapshot(code) -}) - -test('combinePlugins throws if passing an option called `babel`', t => { - t.throws(() => { - combinePlugins([['test', { babel: true }]]) - }) -}) - -test('combinePlugins memoizes calls', t => { - const v1 = combinePlugins([require.resolve('../fixtures/plugins/plugin')]) - const v2 = combinePlugins([require.resolve('../fixtures/plugins/plugin')]) - - t.is(v1('test div'), v2('test div')) - - const v3 = combinePlugins([ - require.resolve('../fixtures/plugins/plugin'), - require.resolve('../fixtures/plugins/another-plugin') - ]) - - t.not(v2('test div'), v3('test div')) -}) diff --git a/test/babel6/snapshots/attribute.js.md b/test/babel6/snapshots/attribute.js.md deleted file mode 100644 index 442b8aba..00000000 --- a/test/babel6/snapshots/attribute.js.md +++ /dev/null @@ -1,165 +0,0 @@ -# Snapshot report for `test/babel6/attribute.js` - -The actual snapshot is saved in `attribute.js.snap`. - -Generated by [AVA](https://ava.li). - -## generate attribute for mixed modes (global, static, dynamic) - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - import styles from './styles';␊ - ␊ - const styles2 = require('./styles2');␊ - ␊ - // external only␊ - export const Test1 = () =>
␊ -

external only

␊ - <_JSXStyle id={styles.__hash}>{styles}␊ - <_JSXStyle id={styles2.__hash}>{styles2}␊ -
;␊ - ␊ - // external and static␊ - export const Test2 = () =>
␊ -

external and static

␊ - <_JSXStyle id={"2982525546"}>{"p.jsx-2982525546{color:red;}"}␊ - <_JSXStyle id={styles.__hash}>{styles}␊ -
;␊ - ␊ - // external and dynamic␊ - export const Test3 = ({ color }) =>
␊ -

external and dynamic

␊ - <_JSXStyle id={"1947484460"} dynamic={[color]}>{`p.__jsx-style-dynamic-selector{color:${color};}`}␊ - <_JSXStyle id={styles.__hash}>{styles}␊ -
;␊ - ␊ - // external, static and dynamic␊ - export const Test4 = ({ color }) =>
␊ -

external, static and dynamic

␊ - <_JSXStyle id={"3190985107"}>{"p.jsx-3190985107{display:inline-block;}"}␊ - <_JSXStyle id={"1336444426"} dynamic={[color]}>{`p.__jsx-style-dynamic-selector{color:${color};}`}␊ - <_JSXStyle id={styles.__hash}>{styles}␊ -
;␊ - ␊ - // static only␊ - export const Test5 = () =>
␊ -

static only

␊ - <_JSXStyle id={"3190985107"}>{"p.jsx-1372669040{display:inline-block;}"}␊ - <_JSXStyle id={"2982525546"}>{"p.jsx-1372669040{color:red;}"}␊ -
;␊ - ␊ - // static and dynamic␊ - export const Test6 = ({ color }) =>
␊ -

static and dynamic

␊ - <_JSXStyle id={"3190985107"}>{"p.jsx-3190985107{display:inline-block;}"}␊ - <_JSXStyle id={"1336444426"} dynamic={[color]}>{`p.__jsx-style-dynamic-selector{color:${color};}`}␊ -
;␊ - ␊ - // dynamic only␊ - export const Test7 = ({ color }) =>
␊ -

dynamic only

␊ - <_JSXStyle id={"1947484460"} dynamic={[color]}>{`p.__jsx-style-dynamic-selector{color:${color};}`}␊ -
;␊ - ␊ - // dynamic with scoped compound variable␊ - export const Test8 = ({ color }) => {␊ - if (color) {␊ - const innerProps = { color };␊ - ␊ - return
␊ -

dynamic with scoped compound variable

␊ - <_JSXStyle id={"1791723528"} dynamic={[innerProps.color]}>{`p.__jsx-style-dynamic-selector{color:${innerProps.color};}`}␊ -
;␊ - }␊ - };␊ - ␊ - // dynamic with compound variable␊ - export const Test9 = ({ color }) => {␊ - const innerProps = { color };␊ - ␊ - return
␊ -

dynamic with compound variable

␊ - <_JSXStyle id={"248922593"} dynamic={[innerProps.color]}>{`p.__jsx-style-dynamic-selector{color:${innerProps.color};}`}␊ -
;␊ - };␊ - ␊ - const foo = 'red';␊ - ␊ - // dynamic with constant variable␊ - export const Test10 = () =>
␊ -

dynamic with constant variable

␊ - <_JSXStyle id={"461505126"}>{`p.jsx-461505126{color:${foo};}`}␊ -
;␊ - ␊ - // dynamic with complex scope␊ - export const Test11 = ({ color }) => {␊ - const items = Array.from({ length: 5 }).map((item, i) =>
  • ␊ - <_JSXStyle id={"2172653867"} dynamic={[color]}>{`.item.__jsx-style-dynamic-selector{color:${color};}`}␊ - Item #{i + 1}␊ -
  • );␊ - ␊ - return ;␊ - };` - -## rewrites className - -> Snapshot 1 - - `var _this = this;␊ - ␊ - import _JSXStyle from "styled-jsx/style";␊ - export default (() => {␊ - const Element = 'div';␊ - return
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ -
    ␊ - ␊ - ␊ - ␊ - <_JSXStyle id={"2886504620"}>{"div.jsx-2886504620{color:red;}"}␊ -
    ;␊ - });` diff --git a/test/babel6/snapshots/attribute.js.snap b/test/babel6/snapshots/attribute.js.snap deleted file mode 100644 index ec209517..00000000 Binary files a/test/babel6/snapshots/attribute.js.snap and /dev/null differ diff --git a/test/babel6/snapshots/external.js.md b/test/babel6/snapshots/external.js.md deleted file mode 100644 index 7e7ce819..00000000 --- a/test/babel6/snapshots/external.js.md +++ /dev/null @@ -1,238 +0,0 @@ -# Snapshot report for `test/babel6/external.js` - -The actual snapshot is saved in `external.js.snap`. - -Generated by [AVA](https://ava.li). - -## (optimized) transpiles external stylesheets - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - ␊ - import colors, { size } from './constants';␊ - const color = 'red';␊ - ␊ - const bar = ['div.jsx-2141779268{font-size:3em;}'];␊ - ␊ - bar.__hash = '2141779268';␊ - const baz = ['div{font-size:3em;}'];␊ - ␊ - baz.__hash = '2141779268';␊ - const a = [`div{font-size:${size}em;}`];␊ - ␊ - a.__hash = '262929833';␊ - export const uh = bar;␊ - ␊ - export const foo = [`div.jsx-2299908427{color:${color};}`];␊ - ␊ - foo.__hash = '2299908427';␊ - ({␊ - styles: <_JSXStyle id={"1329679275"}>{[`div.jsx-1329679275{color:${colors.green.light};}`, 'a.jsx-1329679275{color:red;}']},␊ - className: 'jsx-1329679275'␊ - });␊ - ␊ - const b = {␊ - styles: <_JSXStyle id={"1329679275"}>{[`div.jsx-1329679275{color:${colors.green.light};}`, 'a.jsx-1329679275{color:red;}']},␊ - className: 'jsx-1329679275'␊ - };␊ - ␊ - const dynamic = colors => {␊ - const b = {␊ - styles: <_JSXStyle id={"3325296745"} dynamic={[colors.green.light]}>{[`div.__jsx-style-dynamic-selector{color:${colors.green.light};}`, 'a.__jsx-style-dynamic-selector{color:red;}']},␊ - className: _JSXStyle.dynamic([['3325296745', [colors.green.light]]])␊ - };␊ - };␊ - ␊ - export default {␊ - styles: <_JSXStyle id={"3290112549"}>{['div.jsx-3290112549{font-size:3em;}', `p.jsx-3290112549{color:${color};}`]},␊ - className: 'jsx-3290112549'␊ - };` - -## (optimized) transpiles external stylesheets (CommonJS modules) - -> Snapshot 1 - - `const _defaultExport = ['div.jsx-2292456818{font-size:3em;}'];␊ - _defaultExport.__hash = '2292456818';␊ - ␊ - ␊ - module.exports = _defaultExport;` - -## does not transpile non-styled-jsx tagged teplate literals - -> Snapshot 1 - - `import css from 'hell';␊ - ␊ - const color = 'red';␊ - ␊ - const bar = css`␊ - div {␊ - font-size: 3em;␊ - }␊ - `;␊ - export const uh = bar;␊ - ␊ - export const foo = css`div { color: ${color}}`;␊ - ␊ - export default css`␊ - div {␊ - font-size: 3em;␊ - }␊ - p {␊ - color: ${color};␊ - }␊ - `;␊ - ␊ - const Title = styled.h1`␊ - color: red;␊ - font-size: 50px;␊ - `;␊ - ␊ - const AnotherTitle = Title.extend`color: blue;`;␊ - ␊ - export const Component = () => My page;` - -## injects JSXStyle for nested scope - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - ␊ - ␊ - function test() {␊ - ({␊ - styles: <_JSXStyle id={"2886504620"}>{"div.jsx-2886504620{color:red;}"},␊ - className: 'jsx-2886504620'␊ - });␊ - }` - -## transpiles external stylesheets - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - ␊ - import colors, { size } from './constants';␊ - const color = 'red';␊ - ␊ - const bar = new String('div.jsx-2141779268{font-size:3em;}');␊ - ␊ - bar.__hash = '2141779268';␊ - const baz = new String('div{font-size:3em;}');␊ - ␊ - baz.__hash = '2141779268';␊ - const a = new String(`div{font-size:${size}em;}`);␊ - ␊ - a.__hash = '262929833';␊ - export const uh = bar;␊ - ␊ - export const foo = new String(`div.jsx-2299908427{color:${color};}`);␊ - ␊ - foo.__hash = '2299908427';␊ - ({␊ - styles: <_JSXStyle id={"1329679275"}>{`div.jsx-1329679275{color:${colors.green.light};}a.jsx-1329679275{color:red;}`},␊ - className: 'jsx-1329679275'␊ - });␊ - ␊ - const b = {␊ - styles: <_JSXStyle id={"1329679275"}>{`div.jsx-1329679275{color:${colors.green.light};}a.jsx-1329679275{color:red;}`},␊ - className: 'jsx-1329679275'␊ - };␊ - ␊ - const dynamic = colors => {␊ - const b = {␊ - styles: <_JSXStyle id={"3325296745"} dynamic={[colors.green.light]}>{`div.__jsx-style-dynamic-selector{color:${colors.green.light};}a.__jsx-style-dynamic-selector{color:red;}`},␊ - className: _JSXStyle.dynamic([['3325296745', [colors.green.light]]])␊ - };␊ - };␊ - ␊ - export default {␊ - styles: <_JSXStyle id={"3290112549"}>{`div.jsx-3290112549{font-size:3em;}p.jsx-3290112549{color:${color};}`},␊ - className: 'jsx-3290112549'␊ - };` - -## transpiles external stylesheets (CommonJS modules) - -> Snapshot 1 - - `const _defaultExport = new String('div.jsx-2292456818{font-size:3em;}');␊ - ␊ - _defaultExport.__hash = '2292456818';␊ - ␊ - ␊ - module.exports = _defaultExport;` - -## use external stylesheet and dynamic element - -> Snapshot 1 - - `import _JSXStyle from "styled-jsx/style";␊ - import styles from './styles2';␊ - ␊ - export default (({ level = 1 }) => {␊ - const Element = `h${level}`;␊ - ␊ - return ␊ -

    dynamic element

    ␊ - <_JSXStyle id={styles.__hash}>{styles}␊ -
    ;␊ - });` - -## use external stylesheets - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - import styles from './styles';␊ - const styles2 = require('./styles2');␊ - import { foo as styles3 } from './styles';␊ - ␊ - export default (() =>
    ␊ -

    test

    ␊ -

    woot

    ␊ - <_JSXStyle id={styles2.__hash}>{styles2}␊ - <_JSXStyle id={styles3.__hash}>{styles3}␊ -
    woot
    ␊ - <_JSXStyle id={"1646697228"}>{"p.jsx-1646697228{color:red;}div.jsx-1646697228{color:green;}"}␊ - <_JSXStyle id={styles.__hash}>{styles}␊ -
    );␊ - ␊ - export const Test = () =>
    ␊ -

    test

    ␊ -

    woot

    ␊ - <_JSXStyle id={styles3.__hash}>{styles3}␊ -
    woot
    ␊ - <_JSXStyle id={"1646697228"}>{"p.jsx-1646697228{color:red;}div.jsx-1646697228{color:green;}"}␊ -
    ;` - -## use external stylesheets (global only) - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - import styles, { foo as styles3 } from './styles';␊ - ␊ - const styles2 = require('./styles2');␊ - ␊ - export default (() =>
    ␊ -

    test

    ␊ -
    woot
    ␊ -

    woot

    ␊ - <_JSXStyle id={styles2.__hash}>{styles2}␊ - <_JSXStyle id={styles3.__hash}>{styles3}␊ - <_JSXStyle id={styles.__hash}>{styles}␊ -
    );` - -## use external stylesheets (multi-line) - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - import styles from './styles';␊ - ␊ - export default (() =>
    ␊ -

    test

    ␊ - <_JSXStyle id={styles.__hash}>{styles}␊ -
    );` diff --git a/test/babel6/snapshots/external.js.snap b/test/babel6/snapshots/external.js.snap deleted file mode 100644 index e3b035cf..00000000 Binary files a/test/babel6/snapshots/external.js.snap and /dev/null differ diff --git a/test/babel6/snapshots/index.js.md b/test/babel6/snapshots/index.js.md deleted file mode 100644 index a8ede4b3..00000000 --- a/test/babel6/snapshots/index.js.md +++ /dev/null @@ -1,275 +0,0 @@ -# Snapshot report for `test/babel6/index.js` - -The actual snapshot is saved in `index.js.snap`. - -Generated by [AVA](https://ava.li). - -## generates source maps - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - export default (() =>
    ␊ -

    test

    ␊ -

    woot

    ␊ - <_JSXStyle id={"2743241663"}>{"p.jsx-2743241663{color:red;}\\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXBzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlnQixBQUNjLFVBQUMiLCJmaWxlIjoic291cmNlLW1hcHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCAoKSA9PiAoXG4gIDxkaXY+XG4gICAgPHA+dGVzdDwvcD5cbiAgICA8cD53b290PC9wPlxuICAgIDxzdHlsZSBqc3g+eydwIHsgY29sb3I6IHJlZCB9J308L3N0eWxlPlxuICA8L2Rpdj5cbilcbiJdfQ== */\\n/*@ sourceURL=source-maps.js */"}␊ -
    );` - -## ignores when attribute is absent - -> Snapshot 1 - - `const a = () =>
    ␊ -

    hi

    ␊ - ␊ -
    ;` - -## ignores whitespace around expression container - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - export default (() =>
    ␊ -

    test

    ␊ -

    woot

    ␊ -

    woot

    ␊ - <_JSXStyle id={"2743241663"}>{"p.jsx-2743241663{color:red;}"}␊ -
    );` - -## mixed global and scoped - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - const Test = () => <_JSXStyle id={"2743241663"}>{"p{color:red;}"};␊ - ␊ - export default (() =>
    ␊ -

    test

    ␊ - <_JSXStyle id={"4269072806"}>{"body{background:red;}"}␊ - <_JSXStyle id={"2743241663"}>{"p.jsx-2673076688{color:red;}"}␊ -
    );` - -## should have different jsx ids - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - const color = 'red';␊ - const otherColor = 'green';␊ - ␊ - const A = () =>
    ␊ -

    test

    ␊ - <_JSXStyle id={"57381496"}>{`p.jsx-57381496{color:${color};}`}␊ -
    ;␊ - ␊ - const B = () =>
    ␊ -

    test

    ␊ - <_JSXStyle id={"3099245642"}>{`p.jsx-3099245642{color:${otherColor};}`}␊ -
    ;␊ - ␊ - export default (() => );` - -## should not add the data-jsx attribute to components instances - -> Snapshot 1 - - `import _JSXStyle from "styled-jsx/style";␊ - const Test = () =>
    ␊ - test␊ - ␊ - <_JSXStyle id={"2529315885"}>{"span.jsx-2529315885{color:red;}"}␊ -
    ;` - -## works with class - -> Snapshot 1 - - `import _JSXStyle from "styled-jsx/style";␊ - export default class {␊ - render() {␊ - return
    ␊ -

    test

    ␊ - <_JSXStyle id={"2101845350"}>{"p.jsx-2101845350{color:red;}"}␊ -
    ;␊ - }␊ - }` - -## works with css tagged template literals in the same file - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - ␊ - ␊ - export default (({ children }) =>
    ␊ -

    {children}

    ␊ - <_JSXStyle id={styles.__hash}>{styles}␊ -
    );␊ - ␊ - const styles = new String('p.jsx-2587355013{color:red;}');␊ - ␊ - styles.__hash = '2587355013';␊ - class Test extends React.Component {␊ - render() {␊ - return
    ␊ -

    {this.props.children}

    ␊ - <_JSXStyle id={styles.__hash}>{styles}␊ -
    ;␊ - }␊ - }` - -## works with dynamic element - -> Snapshot 1 - - `import _JSXStyle from "styled-jsx/style";␊ - export default (({ level = 1 }) => {␊ - const Element = `h${level}`;␊ - ␊ - return ␊ -

    dynamic element

    ␊ - <_JSXStyle id={"1253978709"}>{".root.jsx-1253978709{background:red;}"}␊ -
    ;␊ - });␊ - ␊ - export const TestLowerCase = ({ level = 1 }) => {␊ - const element = `h${level}`;␊ - ␊ - return ␊ -

    dynamic element

    ␊ - <_JSXStyle id={"1253978709"}>{".root.jsx-1253978709{background:red;}"}␊ -
    ;␊ - };␊ - ␊ - const Element2 = 'div';␊ - export const Test2 = () => {␊ - return ␊ -

    dynamic element

    ␊ - <_JSXStyle id={"1253978709"}>{".root.jsx-1253978709{background:red;}"}␊ -
    ;␊ - };` - -## works with dynamic element in class - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - export default class {␊ - render() {␊ - const Element = 'div';␊ - ␊ - return ␊ -

    dynamic element

    ␊ - <_JSXStyle id={"1800172487"}>{".root.jsx-1800172487{background:red;}"}␊ -
    ;␊ - }␊ - }␊ - ␊ - const Element2 = 'div';␊ - export const Test2 = class {␊ - render() {␊ - return ␊ -

    dynamic element

    ␊ - <_JSXStyle id={"1800172487"}>{".root.jsx-1800172487{background:red;}"}␊ -
    ;␊ - }␊ - };` - -## works with expressions in template literals - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - const darken = c => c;␊ - const color = 'red';␊ - const otherColor = 'green';␊ - const mediumScreen = '680px';␊ - const animationDuration = '200ms';␊ - const animationName = 'my-cool-animation';␊ - const obj = { display: 'block' };␊ - ␊ - export default (({ display }) =>
    ␊ -

    test

    ␊ - <_JSXStyle id={"1003380713"}>{`p.${color}.jsx-3956171631{color:${otherColor};display:${obj.display};}`}␊ - <_JSXStyle id={"2743241663"}>{"p.jsx-3956171631{color:red;}"}␊ - <_JSXStyle id={"602592955"}>{`body{background:${color};}`}␊ - <_JSXStyle id={"602592955"}>{`body{background:${color};}`}␊ - <_JSXStyle id={"128557999"}>{`p.jsx-3956171631{color:${color};}`}␊ - <_JSXStyle id={"128557999"}>{`p.jsx-3956171631{color:${color};}`}␊ - <_JSXStyle id={"2143443147"} dynamic={[darken(color)]}>{`p.__jsx-style-dynamic-selector{color:${darken(color)};}`}␊ - <_JSXStyle id={"2381675492"} dynamic={[darken(color) + 2]}>{`p.__jsx-style-dynamic-selector{color:${darken(color) + 2};}`}␊ - <_JSXStyle id={"309852217"}>{`@media (min-width:${mediumScreen}){p.jsx-3956171631{color:green;}p.jsx-3956171631{color:${`red`};}}p.jsx-3956171631{color:red;}`}␊ - <_JSXStyle id={"2824547816"}>{`p.jsx-3956171631{-webkit-animation-duration:${animationDuration};animation-duration:${animationDuration};}`}␊ - <_JSXStyle id={"417951176"}>{`p.jsx-3956171631{-webkit-animation:${animationDuration} forwards ${animationName};animation:${animationDuration} forwards ${animationName};}div.jsx-3956171631{background:${color};}`}␊ - ␊ - <_JSXStyle id={"3830663176"} dynamic={[display ? 'block' : 'none']}>{`span.__jsx-style-dynamic-selector{display:${display ? 'block' : 'none'};}`}␊ - <_JSXStyle id={"1555166447"} dynamic={[display ? 'block' : 'none']}>{`span.__jsx-style-dynamic-selector:before{display:${display ? 'block' : 'none'};content:'\\`';}`}␊ -
    );` - -## works with global styles - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - const Test = () =>
    ␊ - <_JSXStyle id={"2209073070"}>{"body{color:red;}:hover{color:red;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-animation:foo 1s ease-out;animation:foo 1s ease-out;}div a{display:none;}[data-test]>div{color:red;}"}␊ -
    ;␊ - ␊ - const Test2 = () => <_JSXStyle id={"2743241663"}>{"p{color:red;}"};` - -## works with multiple jsx blocks - -> Snapshot 1 - - `import _JSXStyle from "styled-jsx/style";␊ - const attrs = {␊ - id: 'test'␊ - };␊ - ␊ - const Test1 = () =>
    ␊ - test␊ - ␊ - <_JSXStyle id={"2529315885"}>{"span.jsx-2529315885{color:red;}"}␊ -
    ;␊ - ␊ - const Test2 = () => test;␊ - ␊ - const Test3 = () =>
    ␊ - test␊ - <_JSXStyle id={"2529315885"}>{"span.jsx-2529315885{color:red;}"}␊ -
    ;␊ - ␊ - export default class {␊ - render() {␊ - return
    ␊ -

    test

    ␊ - <_JSXStyle id={"2101845350"}>{"p.jsx-2101845350{color:red;}"}␊ -
    ;␊ - }␊ - }` - -## works with non styled-jsx styles - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - export default (() =>
    ␊ -

    woot

    ␊ - ␊ - <_JSXStyle id={"2743241663"}>{"p.jsx-2743241663{color:red;}"}␊ -
    );` - -## works with stateless - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - export default (() =>
    ␊ -

    test

    ␊ -

    woot

    ␊ -

    woot

    ␊ - <_JSXStyle id={"2743241663"}>{"p.jsx-2743241663{color:red;}"}␊ -
    );` diff --git a/test/babel6/snapshots/index.js.snap b/test/babel6/snapshots/index.js.snap deleted file mode 100644 index bd862666..00000000 Binary files a/test/babel6/snapshots/index.js.snap and /dev/null differ diff --git a/test/babel6/snapshots/macro.js.md b/test/babel6/snapshots/macro.js.md deleted file mode 100644 index eecb7c37..00000000 --- a/test/babel6/snapshots/macro.js.md +++ /dev/null @@ -1,67 +0,0 @@ -# Snapshot report for `test/babel6/macro.js` - -The actual snapshot is saved in `macro.js.snap`. - -Generated by [AVA](https://ava.li). - -## can alias the named import - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - ␊ - ␊ - ({␊ - styles: <_JSXStyle id={"2886504620"}>{"div.jsx-2886504620{color:red;}"},␊ - className: 'jsx-2886504620'␊ - });` - -## injects JSXStyle for nested scope - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - ␊ - ␊ - function test() {␊ - ({␊ - styles: <_JSXStyle id={"2886504620"}>{"div.jsx-2886504620{color:red;}"},␊ - className: 'jsx-2886504620'␊ - });␊ - }` - -## transpiles correctly - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - ␊ - ␊ - const { className, styles } = {␊ - styles: <_JSXStyle id={"2052294191"}>{"div.jsx-2052294191{color:red;}"},␊ - className: 'jsx-2052294191'␊ - };␊ - ␊ - const dynamicStyles = props => ({␊ - styles: <_JSXStyle id={"290194820"} dynamic={[props.color]}>{`div.__jsx-style-dynamic-selector{color:${props.color};}`},␊ - className: _JSXStyle.dynamic([['290194820', [props.color]]])␊ - });␊ - ␊ - const test = {␊ - styles: <_JSXStyle id={"2052294191"}>{"div.jsx-2052294191{color:red;}"},␊ - className: 'jsx-2052294191'␊ - };␊ - ␊ - const dynamicStyles2 = props => ({␊ - styles: <_JSXStyle id={"290194820"} dynamic={[props.color]}>{`div.__jsx-style-dynamic-selector{color:${props.color};}`},␊ - className: _JSXStyle.dynamic([['290194820', [props.color]]])␊ - });␊ - ␊ - const ExampleComponent = props => {␊ - const { className, styles } = dynamicStyles(props);␊ - ␊ - return
    ␊ - howdy␊ - {styles}␊ -
    ;␊ - };` diff --git a/test/babel6/snapshots/macro.js.snap b/test/babel6/snapshots/macro.js.snap deleted file mode 100644 index 532e5ab0..00000000 Binary files a/test/babel6/snapshots/macro.js.snap and /dev/null differ diff --git a/test/babel6/snapshots/plugins.js.md b/test/babel6/snapshots/plugins.js.md deleted file mode 100644 index b702a03a..00000000 --- a/test/babel6/snapshots/plugins.js.md +++ /dev/null @@ -1,50 +0,0 @@ -# Snapshot report for `test/babel6/plugins.js` - -The actual snapshot is saved in `plugins.js.snap`. - -Generated by [AVA](https://ava.li). - -## applies plugins - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - import styles from './styles';␊ - const color = 'red';␊ - ␊ - export default (() =>
    ␊ -

    test

    ␊ - <_JSXStyle id={"2799750516"} dynamic={[color, otherColor]}>{`span.${color}.__jsx-style-dynamic-selector{color:${otherColor};}`}␊ - <_JSXStyle id={styles.__hash}>{styles}␊ -
    );` - -## babel-test plugin strips jsx attribute - -> Snapshot 1 - - `import styles from './styles';␊ - const color = 'red';␊ - ␊ - export default (() =>
    ␊ -

    test

    ␊ - ␊ - ␊ -
    );` - -## passes options to plugins - -> Snapshot 1 - - `import _JSXStyle from 'styled-jsx/style';␊ - import styles from './styles';␊ - const color = 'red';␊ - ␊ - export default (() =>
    ␊ -

    test

    ␊ - <_JSXStyle id={"2799750516"} dynamic={[color, otherColor]}>{".test.__jsx-style-dynamic-selector{content:\\"{\\"foo\\":false,\\"babel\\":{\\"location\\":{\\"start\\":{\\"line\\":7,\\"column\\":16},\\"end\\":{\\"line\\":11,\\"column\\":5}},\\"vendorPrefixes\\":false,\\"sourceMaps\\":false,\\"isGlobal\\":false}}\\";}"}␊ - <_JSXStyle id={styles.__hash}>{styles}␊ -
    );` diff --git a/test/babel6/snapshots/plugins.js.snap b/test/babel6/snapshots/plugins.js.snap deleted file mode 100644 index 1f3946f9..00000000 Binary files a/test/babel6/snapshots/plugins.js.snap and /dev/null differ diff --git a/test/babel6/snapshots/styles.js.md b/test/babel6/snapshots/styles.js.md deleted file mode 100644 index 35fdeddf..00000000 --- a/test/babel6/snapshots/styles.js.md +++ /dev/null @@ -1,11 +0,0 @@ -# Snapshot report for `test/babel6/styles.js` - -The actual snapshot is saved in `styles.js.snap`. - -Generated by [AVA](https://ava.li). - -## transpile styles with attributes - -> Snapshot 1 - - 'html.jsx-123{background-image: linear-gradient(0deg,rgba(255,255,255,0.8),rgba(255,255,255,0.8)), url(/static/background.svg);}p{color:blue;}p{color:blue;}p,a.jsx-123{color:blue;}.foo + a{color:red;}body{font-family:-apple-system,BlinkMacSystemFont,\'Segoe UI\',Helvetica,Arial,sans-serif;}p.jsx-123{color:red;}p.jsx-123{color:red;}*.jsx-123{color:blue;}[href="woot"].jsx-123{color:red;}p.jsx-123 a.jsx-123 span.jsx-123{color:red;}p.jsx-123 span{background:blue;}p.jsx-123 a[title="\'w \' \' t\'"].jsx-123{margin:auto;}p.jsx-123 span:not(.test){color:green;}p.jsx-123,h1.jsx-123{color:blue;-webkit-animation:hahaha-jsx-123 3s ease forwards infinite;animation:hahaha-jsx-123 3s ease forwards infinite;-webkit-animation-name:hahaha-jsx-123;animation-name:hahaha-jsx-123;-webkit-animation-delay:100ms;animation-delay:100ms;}p.jsx-123{-webkit-animation:hahaha-jsx-123 1s,hehehe-jsx-123 2s;animation:hahaha-jsx-123 1s,hehehe-jsx-123 2s;}p.jsx-123:hover{color:red;}p.jsx-123::before{color:red;}.jsx-123:hover{color:red;}.jsx-123::before{color:red;}.jsx-123:hover p.jsx-123{color:red;}p.jsx-123+a.jsx-123{color:red;}p.jsx-123~a.jsx-123{color:red;}p.jsx-123>a.jsx-123{color:red;}p.jsx-123>>a.jsx-123{color:red;}@-webkit-keyframes hahaha-jsx-123{from{top:0;}to{top:100;}}@keyframes hahaha-jsx-123{from{top:0;}to{top:100;}}@-webkit-keyframes hehehe-jsx-123{from{left:0;}to{left:100;}}@keyframes hehehe-jsx-123{from{left:0;}to{left:100;}}@media (min-width:500px){.test.jsx-123{color:red;}}.test.jsx-123{display:block;}.inline-flex.jsx-123{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}.flex.jsx-123{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}.test.jsx-123{box-shadow:0 0 10px black,inset 0 0 5px black;}.test[title=","].jsx-123{display:inline-block;}.test.is-status.jsx-123 .test.jsx-123{color:red;}.a-selector.jsx-123:hover,.a-selector.jsx-123:focus{outline:none;}@media (min-width:1px) and (max-width:768px){[class*=\'grid__col--\'].jsx-123{margin-top:12px;margin-bottom:12px;}}@media (max-width:64em){.test.jsx-123{margin-bottom:1em;}@supports (-moz-appearance:none) and (display:contents){.test.jsx-123{margin-bottom:2rem;}}}' diff --git a/test/babel6/snapshots/styles.js.snap b/test/babel6/snapshots/styles.js.snap deleted file mode 100644 index 0e3f664b..00000000 Binary files a/test/babel6/snapshots/styles.js.snap and /dev/null differ diff --git a/test/babel6/styles.js b/test/babel6/styles.js deleted file mode 100644 index 96a9d9c6..00000000 --- a/test/babel6/styles.js +++ /dev/null @@ -1,254 +0,0 @@ -// Packages -import test from 'ava' - -// Ours -import transform from '../../src/lib/style-transform' -import read from '../_read' - -test('transpile styles with attributes', async t => { - const src = await read('./fixtures/transform.css') - t.snapshot(transform('.jsx-123', src)) -}) - -test('throws when using nesting', t => { - const fixtures = [ - `div { &:hover { color: red } }`, - `div { - color: green; - &:hover { color: red } }`, - `:hover { div { color: red } }`, - `@media all { - div { - &:hover { color: red } - } - }`, - `* { div { color: red } - &.test { - color: red; - } - }`, - `span {} - .test { - color: red; - div& { - color: red; - } - }` - ] - - fixtures.forEach(fixture => { - t.throws(() => transform('', fixture)) - t.throws(() => transform('.jsx-123', fixture)) - }) -}) - -test("doesn't throw when using at-rules", t => { - const fixtures = [ - '@media (min-width: 480px) { div { color: red } }', - `span {} - @media (min-width: 480px) { div { color: red } }`, - `@media (min-width: 480px) { div { color: red } } - span {}`, - `:hover {} - @media (min-width: 480px) { div { color: red } }`, - `:hover { color: green } - @media (min-width: 480px) { div { color: red } }`, - `@media (min-width: 480px) { div {} }`, - `@keyframes foo { - 0% { opacity: 0 } - 100% { opacity: 1} - } - `, - // Line with one space before @rule - `div { color: red; } - - @media screen and (min-width: 480px) { - div { color: red; } - } - `, - // Line with one tab before @rule - `div { color: red; } - - @media screen and (min-width: 480px) { - div { color: red; } - } - ` - ] - - fixtures.forEach(fixture => { - t.notThrows(() => transform('', fixture)) - t.notThrows(() => transform('.jsx-123', fixture)) - }) -}) - -test('splits rules for `optimizeForSpeed`', t => { - function assert(input, expected, prefix = '') { - t.deepEqual(transform(prefix, input, { splitRules: true }), expected) - } - - assert('div { color: red }', ['div{color:red;}']) - - assert('div { color: red } .p { color: red }', [ - 'div{color:red;}', - '.p{color:red;}' - ]) - - assert('div, span { color: red } a > .p { color: red }', [ - 'div,span{color:red;}', - 'a>.p{color:red;}' - ]) - - assert( - '@media (min-width: 400px) { div, span { color: red } } a > .p { color: red }', - ['@media (min-width:400px){div,span{color:red;}}', 'a>.p{color:red;}'] - ) - - assert( - '@media (min-width: 400px) { div { color: red } span { color: red } } a > .p { color: red }', - [ - '@media (min-width:400px){div{color:red;}span{color:red;}}', - 'a>.p{color:red;}' - ] - ) - - assert( - `@media (min-width: 1px) and (max-width: 768px) { - [class*='test__test--'] { - color: red; - } - }`, - [ - `@media (min-width:1px) and (max-width:768px){[class*='test__test--']{color:red;}}` - ] - ) - - assert( - 'span { color: red } @font-face { font-family: test; src: url(test.woff); } div { color: red }', - [ - '@font-face{font-family:test;src:url(test.woff);}', - 'span{color:red;}', - 'div{color:red;}' - ] - ) - - assert('@charset "UTF-8"', ['@charset "UTF-8";']) - - assert('@import "./test.css"', ['@import "./test.css";']) - - assert( - ` - @keyframes test { - 0% { opacity: 0 } - 100% { opacity: 1 } - } - `, - [ - '@-webkit-keyframes test{0%{opacity:0;}100%{opacity:1;}}', - '@keyframes test{0%{opacity:0;}100%{opacity:1;}}' - ] - ) - - assert( - ` - @supports (display: flex) { - div { display: flex; } - } - `, - [ - '@supports (display:-webkit-box) or (display:-webkit-flex) or (display:-ms-flexbox) or (display:flex){div{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}}' - ] - ) - - assert( - ` - @import "./test.css"; - @supports (display: flex) { - div { display: flex; } - } - div { color: red } - a, div { color: red } - @import "./test.css"; - @media (min-width: 400px) { div, span { color: red } } - `, - [ - '@import "./test.css";', - '@import "./test.css";', - '@supports (display:-webkit-box) or (display:-webkit-flex) or (display:-ms-flexbox) or (display:flex){div{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}}', - 'div{color:red;}', - 'a,div{color:red;}', - '@media (min-width:400px){div,span{color:red;}}' - ] - ) - - assert('@namespace url(http://www.w3.org/1999/xhtml)', [ - '@namespace url(http://www.w3.org/1999/xhtml);' - ]) - assert('@namespace svg url(http://www.w3.org/2000/svg)', [ - '@namespace svg url(http://www.w3.org/2000/svg);' - ]) - assert('@page :first { margin: 1in; }', ['@page :first{margin:1in;}']) - - assert( - ` - div { - animation: fade-in ease-in 1; - animation-fill-mode: forwards; - animation-duration: 500ms; - opacity: 0; - } - @keyframes fade-in { - from { - opacity: 0; - } - - to { - opacity: 1; - } - } - `, - [ - 'div.jsx-123{-webkit-animation:fade-in-jsx-123 ease-in 1;animation:fade-in-jsx-123 ease-in 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-duration:500ms;animation-duration:500ms;opacity:0;}', - '@-webkit-keyframes fade-in-jsx-123{from{opacity:0;}to{opacity:1;}}', - '@keyframes fade-in-jsx-123{from{opacity:0;}to{opacity:1;}}' - ], - '.jsx-123' - ) - - assert( - ` - div { - animation: fade-in ease-in 1; - animation-fill-mode: forwards; - animation-duration: 500ms; - opacity: 0; - } - - @keyframes fade-in { - from { - opacity: 0; - } - - to { - opacity: 1; - } - } - `, - [ - 'div{-webkit-animation:fade-in ease-in 1;animation:fade-in ease-in 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-duration:500ms;animation-duration:500ms;opacity:0;}', - '@-webkit-keyframes fade-in{from{opacity:0;}to{opacity:1;}}', - '@keyframes fade-in{from{opacity:0;}to{opacity:1;}}' - ] - ) - - assert( - `div { color: red } ::placeholder { color: green }`, - [ - 'div.jsx-123{color:red;}', - '.jsx-123::-webkit-input-placeholder{color:green;}', - '.jsx-123::-moz-placeholder{color:green;}', - '.jsx-123:-ms-input-placeholder{color:green;}', - '.jsx-123::placeholder{color:green;}' - ], - '.jsx-123' - ) -}) diff --git a/test/babel6/stylesheet-registry.js b/test/babel6/stylesheet-registry.js deleted file mode 100644 index 238b41a2..00000000 --- a/test/babel6/stylesheet-registry.js +++ /dev/null @@ -1,343 +0,0 @@ -// Packages -import test from 'ava' - -// Ours -import StyleSheetRegistry from '../../src/stylesheet-registry' -import withMock, { withMockDocument } from '../helpers/with-mock' -import makeSheet, { invalidRules } from './stylesheet' - -function makeRegistry(options = { optimizeForSpeed: true, isBrowser: true }) { - const registry = new StyleSheetRegistry({ - styleSheet: makeSheet(options), - ...options - }) - registry.selectFromServer = () => ({}) - return registry -} - -const cssRule = 'div { color: red }' -const cssRuleAlt = 'p { color: red }' - -// registry.add - -test( - 'add', - withMock(withMockDocument, t => { - const options = [ - { optimizeForSpeed: true, isBrowser: true }, - { optimizeForSpeed: false, isBrowser: true }, - { optimizeForSpeed: true, isBrowser: false }, - { optimizeForSpeed: false, isBrowser: false } - ] - - options.forEach(options => { - const registry = makeRegistry(options) - registry.add({ - id: '123', - children: options.optimizeForSpeed ? [cssRule] : cssRule - }) - - t.deepEqual(registry.cssRules(), [['jsx-123', cssRule]]) - - // Dedupe - - registry.add({ - id: '123', - children: options.optimizeForSpeed ? [cssRule] : cssRule - }) - - t.deepEqual(registry.cssRules(), [['jsx-123', cssRule]]) - - registry.add({ - id: '345', - children: options.optimizeForSpeed ? [cssRule] : cssRule - }) - - t.deepEqual(registry.cssRules(), [ - ['jsx-123', cssRule], - ['jsx-345', cssRule] - ]) - - if (options.optimizeForSpeed) { - registry.add({ id: '456', children: [cssRule, cssRuleAlt] }) - - t.deepEqual(registry.cssRules(), [ - ['jsx-123', cssRule], - ['jsx-345', cssRule], - ['jsx-456', 'div { color: red }p { color: red }'] - ]) - } - }) - }) -) - -test( - 'add - filters out invalid rules (index `-1`)', - withMock(withMockDocument, t => { - const registry = makeRegistry() - - // Insert a valid rule - registry.add({ id: '123', children: [cssRule] }) - - // Insert an invalid rule - registry.add({ id: '456', children: [invalidRules[0]] }) - - // Insert another valid rule - registry.add({ id: '678', children: [cssRule] }) - - t.deepEqual(registry.cssRules(), [ - ['jsx-123', 'div { color: red }'], - ['jsx-678', 'div { color: red }'] - ]) - }) -) - -test( - 'it does not throw when inserting an invalid rule', - withMock(withMockDocument, t => { - const registry = makeRegistry() - - // Insert a valid rule - registry.add({ id: '123', children: [cssRule] }) - - t.notThrows(() => { - // Insert an invalid rule - registry.add({ id: '456', children: [invalidRules[0]] }) - }) - - t.deepEqual(registry.cssRules(), [['jsx-123', 'div { color: red }']]) - }) -) - -test('add - sanitizes dynamic CSS on the server', t => { - const registry = makeRegistry({ optimizeForSpeed: false, isBrowser: false }) - - registry.add({ - id: '123', - children: [ - 'div.__jsx-style-dynamic-selector { color: red }' - ], - dynamic: ['red'] - }) - - t.deepEqual(registry.cssRules(), [ - [ - 'jsx-1871671996', - 'div.jsx-1871671996 { color: red<\\/style> }' - ] - ]) -}) - -test('add - nonce is properly fetched from meta tag', t => { - const originalDocument = global.document - // We need to stub a document in order to simulate the meta tag - global.document = { - querySelector(query) { - t.is(query, 'meta[property="csp-nonce"]') - return { - getAttribute(attr) { - t.is(attr, 'content') - return 'test-nonce' - } - } - } - } - - const registry = makeRegistry() - registry.add({ id: '123', children: [cssRule] }) - - t.is(registry._sheet._nonce, 'test-nonce') - - global.document = originalDocument -}) - -// registry.remove - -test( - 'remove', - withMock(withMockDocument, t => { - const options = [ - { optimizeForSpeed: true, isBrowser: true }, - { optimizeForSpeed: false, isBrowser: true }, - { optimizeForSpeed: true, isBrowser: false }, - { optimizeForSpeed: false, isBrowser: false } - ] - - options.forEach(options => { - const registry = makeRegistry(options) - registry.add({ - id: '123', - children: options.optimizeForSpeed ? [cssRule] : cssRule - }) - - registry.add({ - id: '345', - children: options.optimizeForSpeed ? [cssRuleAlt] : cssRuleAlt - }) - - registry.remove({ id: '123' }) - t.deepEqual(registry.cssRules(), [['jsx-345', cssRuleAlt]]) - - // Add a duplicate - registry.add({ - id: '345', - children: options.optimizeForSpeed ? [cssRuleAlt] : cssRuleAlt - }) - // and remove it - registry.remove({ id: '345' }) - // Still in the registry - t.deepEqual(registry.cssRules(), [['jsx-345', cssRuleAlt]]) - // remove again - registry.remove({ id: '345' }) - // now the registry should be empty - t.deepEqual(registry.cssRules(), []) - }) - }) -) - -// registry.update - -test( - 'update', - withMock(withMockDocument, t => { - const options = [ - { optimizeForSpeed: true, isBrowser: true }, - { optimizeForSpeed: false, isBrowser: true }, - { optimizeForSpeed: true, isBrowser: false }, - { optimizeForSpeed: false, isBrowser: false } - ] - - options.forEach(options => { - const registry = makeRegistry(options) - registry.add({ - id: '123', - children: options.optimizeForSpeed ? [cssRule] : cssRule - }) - - registry.add({ - id: '123', - children: options.optimizeForSpeed ? [cssRule] : cssRule - }) - - registry.update( - { id: '123' }, - { - id: '345', - children: options.optimizeForSpeed ? [cssRuleAlt] : cssRuleAlt - } - ) - // Doesn't remove when there are multiple instances of 123 - t.deepEqual(registry.cssRules(), [ - ['jsx-123', cssRule], - ['jsx-345', cssRuleAlt] - ]) - - registry.remove({ id: '345' }) - t.deepEqual(registry.cssRules(), [['jsx-123', cssRule]]) - - // Update again - registry.update( - { id: '123' }, - { - id: '345', - children: options.optimizeForSpeed ? [cssRuleAlt] : cssRuleAlt - } - ) - // 123 replaced with 345 - t.deepEqual(registry.cssRules(), [['jsx-345', cssRuleAlt]]) - }) - }) -) - -// createComputeId - -test( - 'createComputeId', - withMock(withMockDocument, t => { - const utilRegistry = makeRegistry() - const computeId = utilRegistry.createComputeId() - - // without props - t.is(computeId('123'), 'jsx-123') - - // with props - t.is(computeId('123', ['test', 3, 'test']), 'jsx-1172888331') - }) -) - -// createComputeSelector - -test( - 'createComputeSelector', - withMock(withMockDocument, t => { - const utilRegistry = makeRegistry() - const computeSelector = utilRegistry - .createComputeSelector() - .bind(utilRegistry) - - t.is( - computeSelector( - 'jsx-123', - '.test {} .__jsx-style-dynamic-selector { color: red } .__jsx-style-dynamic-selector { color: red }' - ), - '.test {} .jsx-123 { color: red } .jsx-123 { color: red }' - ) - }) -) - -// getIdAndRules - -test( - 'getIdAndRules', - withMock(withMockDocument, t => { - const utilRegistry = makeRegistry() - // simple - t.deepEqual( - utilRegistry.getIdAndRules({ - id: '123', - children: '.test {} .jsx-123 { color: red } .jsx-123 { color: red }' - }), - { - styleId: 'jsx-123', - rules: ['.test {} .jsx-123 { color: red } .jsx-123 { color: red }'] - } - ) - - // dynamic - t.deepEqual( - utilRegistry.getIdAndRules({ - id: '123', - children: - '.test {} .__jsx-style-dynamic-selector { color: red } .__jsx-style-dynamic-selector { color: red }', - dynamic: ['test', 3, 'test'] - }), - { - styleId: 'jsx-1172888331', - rules: [ - '.test {} .jsx-1172888331 { color: red } .jsx-1172888331 { color: red }' - ] - } - ) - - // dynamic, css array - t.deepEqual( - utilRegistry.getIdAndRules({ - id: '123', - children: [ - '.test {}', - '.__jsx-style-dynamic-selector { color: red }', - '.__jsx-style-dynamic-selector { color: red }' - ], - dynamic: ['test', 3, 'test'] - }), - { - styleId: 'jsx-1172888331', - rules: [ - '.test {}', - '.jsx-1172888331 { color: red }', - '.jsx-1172888331 { color: red }' - ] - } - ) - }) -) diff --git a/test/babel6/stylesheet.js b/test/babel6/stylesheet.js deleted file mode 100644 index f0d41895..00000000 --- a/test/babel6/stylesheet.js +++ /dev/null @@ -1,244 +0,0 @@ -// Packages -import test from 'ava' - -// Ours -import StyleSheet from '../../src/lib/stylesheet' -import withMock, { withMockDocument } from '../helpers/with-mock' - -export const invalidRules = ['invalid rule'] - -export default function makeSheet( - options = { optimizeForSpeed: true, isBrowser: true } -) { - const sheet = new StyleSheet(options) - // mocks - sheet.makeStyleTag = function(name, cssString) { - const cssRules = cssString ? [{ cssText: cssString }] : [] - const tag = { - sheet: { - cssRules, - insertRule: (rule, index) => { - if (invalidRules.includes(rule)) { - throw new Error('invalid rule') - } - - if (typeof index === 'number') { - cssRules[index] = { cssText: rule } - } else { - cssRules.push({ cssText: rule }) - } - - return index - }, - deleteRule: index => { - if (options.optimizeForSpeed) { - cssRules[index] = { - cssText: `#${name}-deleted-rule____{}` - } - } else { - cssRules[index] = null - } - }, - replaceRule: (index, rule) => { - cssRules[index] = { cssText: rule } - } - }, - parentNode: { - removeChild: () => {} - } - } - - let textContent = cssString - Object.defineProperty(tag, 'textContent', { - get: () => textContent, - set: text => { - textContent = text - cssRules.length = 0 - cssRules.push({ cssText: text }) - } - }) - - return tag - } - - return sheet -} - -// sheet.setOptimizeForSpeed - -test( - 'can change optimizeForSpeed only when the stylesheet is empty', - withMock(withMockDocument, t => { - const sheet = makeSheet() - - sheet.inject() - t.notThrows(() => { - sheet.setOptimizeForSpeed(true) - }) - - sheet.insertRule('div { color: red }') - t.throws(() => { - sheet.setOptimizeForSpeed(false) - }) - - sheet.flush() - t.notThrows(() => { - sheet.setOptimizeForSpeed(false) - }) - }) -) - -// sheet.insertRule - -test( - 'insertRule', - withMock(withMockDocument, t => { - const options = [ - { optimizeForSpeed: true, isBrowser: true }, - { optimizeForSpeed: false, isBrowser: true }, - { optimizeForSpeed: true, isBrowser: false } - ] - - options.forEach(options => { - const sheet = makeSheet(options) - sheet.inject() - - sheet.insertRule('div { color: red }') - t.deepEqual(sheet.cssRules(), [{ cssText: 'div { color: red }' }]) - - sheet.insertRule('div { color: green }') - t.deepEqual(sheet.cssRules(), [ - { cssText: 'div { color: red }' }, - { cssText: 'div { color: green }' } - ]) - }) - }) -) - -test( - 'insertRule - returns the rule index', - withMock(withMockDocument, t => { - const sheet = makeSheet() - sheet.inject() - - let i = sheet.insertRule('div { color: red }') - t.is(i, 0) - - i = sheet.insertRule('div { color: red }') - t.is(i, 1) - }) -) - -test( - 'insertRule - handles invalid rules and returns -1 as index', - withMock(withMockDocument, t => { - const sheet = makeSheet() - sheet.inject() - - const i = sheet.insertRule(invalidRules[0]) - t.is(i, -1) - }) -) - -test( - 'insertRule - does not fail when the css is a String object', - withMock(withMockDocument, t => { - const sheet = makeSheet() - sheet.inject() - - /* eslint-disable unicorn/new-for-builtins,no-new-wrappers */ - - sheet.insertRule(new String('div { color: red }')) - t.deepEqual(sheet.cssRules(), [ - { cssText: new String('div { color: red }') } - ]) - /* eslint-enable */ - }) -) - -// sheet.deleteRule - -test( - 'deleteRule', - withMock(withMockDocument, t => { - const options = [ - { optimizeForSpeed: true, isBrowser: true }, - { optimizeForSpeed: false, isBrowser: true }, - { optimizeForSpeed: true, isBrowser: false }, - { optimizeForSpeed: false, isBrowser: false } - ] - - options.forEach(options => { - const sheet = makeSheet(options) - sheet.inject() - - sheet.insertRule('div { color: red }') - sheet.insertRule('div { color: green }') - const rulesCount = sheet.length - - sheet.deleteRule(1) - // When deleting we replace rules with placeholders to keep the indices stable. - t.is(sheet.length, rulesCount) - - t.deepEqual(sheet.cssRules(), [{ cssText: 'div { color: red }' }, null]) - }) - }) -) - -test( - 'deleteRule - does not throw when the rule at index does not exist', - withMock(withMockDocument, t => { - const sheet = makeSheet() - sheet.inject() - - t.notThrows(() => { - sheet.deleteRule(sheet.length + 1) - }) - }) -) - -// sheet.replaceRule - -test( - 'replaceRule', - withMock(withMockDocument, t => { - const options = [ - { optimizeForSpeed: true, isBrowser: true }, - { optimizeForSpeed: false, isBrowser: true }, - { optimizeForSpeed: true, isBrowser: false }, - { optimizeForSpeed: false, isBrowser: false } - ] - - options.forEach(options => { - const sheet = makeSheet(options) - sheet.inject() - - const index = sheet.insertRule('div { color: red }') - sheet.replaceRule(index, 'p { color: hotpink }') - - t.deepEqual(sheet.cssRules(), [{ cssText: 'p { color: hotpink }' }]) - }) - }) -) - -test( - 'replaceRule - handles invalid rules gracefully', - withMock(withMockDocument, t => { - const sheet = makeSheet() - sheet.inject() - - // Insert two rules - sheet.insertRule('div { color: red }') - const index = sheet.insertRule('div { color: red }') - - // Replace the latter with an invalid rule - const i = sheet.replaceRule(index, invalidRules[0]) - t.is(i, index) - t.is(sheet.length, 2) - - // Even though replacement (insertion) failed deletion succeeded - // therefore the lib must insert a delete placeholder which resolves to `null` - // when `cssRules()` is called. - t.deepEqual(sheet.cssRules(), [{ cssText: 'div { color: red }' }, null]) - }) -) diff --git a/test/macro.js b/test/macro.js index 56d6ffef..93848fc4 100644 --- a/test/macro.js +++ b/test/macro.js @@ -3,7 +3,7 @@ import test from 'ava' // Ours import macros from 'babel-plugin-macros' -import jsx from 'babel-plugin-syntax-jsx' +import jsx from '@babel/plugin-syntax-jsx' import _transform, { transformSource as _transformSource } from './_transform' const transform = (file, opts = {}) => diff --git a/test/snapshots/attribute.js.snap b/test/snapshots/attribute.js.snap index b6a89e61..61300916 100644 Binary files a/test/snapshots/attribute.js.snap and b/test/snapshots/attribute.js.snap differ diff --git a/test/snapshots/external.js.snap b/test/snapshots/external.js.snap index fa74612a..83c58757 100644 Binary files a/test/snapshots/external.js.snap and b/test/snapshots/external.js.snap differ diff --git a/test/snapshots/index.js.snap b/test/snapshots/index.js.snap index 92634f47..ff80a432 100644 Binary files a/test/snapshots/index.js.snap and b/test/snapshots/index.js.snap differ diff --git a/test/snapshots/plugins.js.snap b/test/snapshots/plugins.js.snap index 3ddf9d22..0ecb63e0 100644 Binary files a/test/snapshots/plugins.js.snap and b/test/snapshots/plugins.js.snap differ diff --git a/yarn.lock b/yarn.lock index a4b7a7e3..4d7cf2a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -347,6 +347,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== +"@babel/helper-plugin-utils@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz#5ac822ce97eec46741ab70a517971e443a70c5a9" + integrity sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ== + "@babel/helper-regex@^7.10.4": version "7.10.5" resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.10.5.tgz#32dfbb79899073c415557053a19bd055aae50ae0" @@ -432,6 +437,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2" integrity sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== +"@babel/helper-validator-identifier@^7.14.9": + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" + integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== + "@babel/helper-validator-option@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.1.tgz#175567380c3e77d60ff98a54bb015fe78f2178d9" @@ -677,6 +687,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" +"@babel/plugin-syntax-jsx@7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.14.5.tgz#000e2e25d8673cce49300517a3eda44c263e4201" + integrity sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw== + dependencies: + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-jsx@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz#9d9d357cc818aa7ae7935917c1257f67677a0926" @@ -1252,13 +1269,12 @@ globals "^11.1.0" lodash "^4.17.13" -"@babel/types@7.8.3", "@babel/types@^7.7.0", "@babel/types@^7.7.2": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" - integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg== +"@babel/types@7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.0.tgz#61af11f2286c4e9c69ca8deb5f4375a73c72dcbd" + integrity sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ== dependencies: - esutils "^2.0.2" - lodash "^4.17.13" + "@babel/helper-validator-identifier" "^7.14.9" to-fast-properties "^2.0.0" "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.5", "@babel/types@^7.4.4": @@ -1270,6 +1286,15 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" +"@babel/types@^7.7.0", "@babel/types@^7.7.2": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" + integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@concordance/react@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@concordance/react/-/react-2.0.0.tgz#aef913f27474c53731f4fd79cc2f54897de90fde" @@ -1671,11 +1696,6 @@ ansi-regex@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -1985,69 +2005,6 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-core@6.26.3, babel-core@^6.26.0: - version "6.26.3" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" - integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.1" - debug "^2.6.9" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.8" - slash "^1.0.0" - source-map "^0.5.7" - -babel-generator@^6.26.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - -babel-helpers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= - dependencies: - babel-runtime "^6.22.0" - babel-plugin-dynamic-import-node@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" @@ -2084,73 +2041,6 @@ babel-plugin-macros@2.8.0: cosmiconfig "^6.0.0" resolve "^1.12.0" -babel-plugin-syntax-jsx@6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" - integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY= - -babel-register@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" - integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= - dependencies: - babel-core "^6.26.0" - babel-runtime "^6.26.0" - core-js "^2.5.0" - home-or-tmp "^2.0.0" - lodash "^4.17.4" - mkdirp "^0.5.1" - source-map-support "^0.4.15" - -babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.24.1, babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -2428,17 +2318,6 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.2, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -2876,7 +2755,7 @@ conventional-commits-parser@^3.0.0, conventional-commits-parser@^3.0.7: through2 "^4.0.0" trim-off-newlines "^1.0.0" -convert-source-map@1.7.0, convert-source-map@^1.1.0, convert-source-map@^1.5.1, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@1.7.0, convert-source-map@^1.1.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== @@ -2921,7 +2800,7 @@ core-js-compat@^3.6.2: browserslist "^4.14.6" semver "7.0.0" -core-js@^2.0.0, core-js@^2.4.0, core-js@^2.5.0: +core-js@^2.0.0: version "2.6.10" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.10.tgz#8a5b8391f8cc7013da703411ce5b585706300d7f" integrity sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA== @@ -3180,13 +3059,6 @@ deprecation@^2.0.0, deprecation@^2.3.1: resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - detect-indent@^5.0.0, detect-indent@~5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" @@ -3480,7 +3352,7 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.4, escape-string-regexp@^1.0.5: +escape-string-regexp@^1.0.4, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= @@ -4318,11 +4190,6 @@ globals@^11.1.0, globals@^11.7.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== - globby@^11.0.0: version "11.0.1" resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357" @@ -4429,13 +4296,6 @@ hard-rejection@^2.1.0: resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - has-flag@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" @@ -4516,14 +4376,6 @@ hasha@^3.0.0: dependencies: is-stream "^1.0.1" -home-or-tmp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - hook-std@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/hook-std/-/hook-std-2.0.0.tgz#ff9aafdebb6a989a354f729bb6445cf4a3a7077c" @@ -4797,13 +4649,6 @@ into-stream@^5.0.0: from2 "^2.3.0" p-is-promise "^3.0.0" -invariant@^2.2.2: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" @@ -4964,13 +4809,6 @@ is-extglob@^2.1.0, is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= - dependencies: - number-is-nan "^1.0.0" - is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" @@ -5259,11 +5097,6 @@ js-string-escape@^1.0.1: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= - js-types@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/js-types/-/js-types-1.0.0.tgz#d242e6494ed572ad3c92809fc8bed7f7687cbf03" @@ -5282,11 +5115,6 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -5327,11 +5155,6 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= -json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= - json5@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" @@ -5815,7 +5638,7 @@ log-symbols@^2.0.0, log-symbols@^2.2.0: dependencies: chalk "^2.0.1" -loose-envify@^1.0.0, loose-envify@^1.1.0: +loose-envify@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -7095,7 +6918,7 @@ path-exists@^4.0.0: resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== -path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: +path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= @@ -7284,11 +7107,6 @@ pretty-quick@3.1.0: mri "^1.1.5" multimatch "^4.0.0" -private@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== - process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -7660,11 +7478,6 @@ regenerate@^1.4.0: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - regenerator-runtime@^0.13.4: version "0.13.7" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" @@ -7794,13 +7607,6 @@ repeat-string@^1.6.1: resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - request@^2.88.0: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" @@ -8265,13 +8071,6 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.4.15: - version "0.4.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== - dependencies: - source-map "^0.5.6" - source-map-support@^0.5.10, source-map-support@^0.5.16: version "0.5.16" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" @@ -8290,7 +8089,7 @@ source-map@0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== -source-map@^0.5.0, source-map@^0.5.6, source-map@^0.5.7: +source-map@^0.5.0, source-map@^0.5.6: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= @@ -8622,11 +8421,6 @@ supertap@^1.0.0: serialize-error "^2.1.0" strip-ansi "^4.0.0" -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - supports-color@^5.0.0, supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -8790,11 +8584,6 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"