From f2f61a1abbcb9751978a512c53b98bdf834474fa Mon Sep 17 00:00:00 2001 From: Travis Collins Date: Sun, 27 Dec 2015 18:19:55 -0800 Subject: [PATCH 01/64] Allow value definitions with commas in them. This makes value declarations slight more strict: there must now be only one declaration per @value (imports still work as before, and multiple values can be imported in a single @value). By doing this, it allows us to be more permissive of what the definitions can contain, thus allowing for support of things such as: - Multiple box-shadow shadows - Multiple transition specifications - Multiple media query conditions (OR'd) It does allow for a little bit of weirder usage in this, e.g. for specifying multiple values in a comma-separate rgba value: @value redAndGreen: 150, 150; .foo { background-color: rgba(redAndGreen, 0, 1); } I don't think that's a super-desirable usage, but I also don't think it really harms anything by being allowed, so I haven't attempted to mitigate it. Fixes #11. --- lib/index.js | 2 +- src/index.js | 2 +- test/index.js | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index 4b2f3da..f529109 100644 --- a/lib/index.js +++ b/lib/index.js @@ -17,7 +17,7 @@ var _icssReplaceSymbols = require('icss-replace-symbols'); var _icssReplaceSymbols2 = _interopRequireDefault(_icssReplaceSymbols); var matchImports = /^(.+?)\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/; -var matchValueDefinition = /(?:,\s+|^)([\w-]+):?\s+("[^"]*"|'[^']*'|\w+\([^\)]+\)|[^,]+)\s?/g; +var matchValueDefinition = /(?:\s+|^)([\w-]+):?\s+(.+?)\s*$/g; var matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/; var options = {}; var importIndex = 0; diff --git a/src/index.js b/src/index.js index 5b39ab0..f73d455 100644 --- a/src/index.js +++ b/src/index.js @@ -2,7 +2,7 @@ import postcss from 'postcss' import replaceSymbols, { replaceAll } from 'icss-replace-symbols' const matchImports = /^(.+?)\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/ -const matchValueDefinition = /(?:,\s+|^)([\w-]+):?\s+("[^"]*"|'[^']*'|\w+\([^\)]+\)|[^,]+)\s?/g +const matchValueDefinition = /(?:\s+|^)([\w-]+):?\s+(.+?)\s*$/g const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/ let options = {} let importIndex = 0 diff --git a/test/index.js b/test/index.js index 22a0abf..1e25525 100644 --- a/test/index.js +++ b/test/index.js @@ -110,4 +110,12 @@ describe('constants', () => { ':export {\n named: red;\n 3char: #0f0;\n 6char: #00ff00;\n rgba: rgba(34, 12, 64, 0.3);\n hsla: hsla(220, 13.0%, 18.0%, 1);\n}\n' + '.foo { color: red; background-color: #0f0; border-top-color: #00ff00; border-bottom-color: rgba(34, 12, 64, 0.3); outline-color: hsla(220, 13.0%, 18.0%, 1); }') }) + + it('should allow definitions with commas in them', () => { + test( + '@value coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14) ;\n' + + '.foo { box-shadow: coolShadow; }', + ':export {\n coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14);\n}\n' + + '.foo { box-shadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14); }') + }) }) From d64a46609d38279405ed8269d7af95b499506d0a Mon Sep 17 00:00:00 2001 From: Fatih Kalifa Date: Thu, 28 Jan 2016 15:58:06 +0700 Subject: [PATCH 02/64] Dependency update & remove lib directory --- .gitignore | 1 + .travis.yml | 3 +- lib/index.js | 136 --------------------------------------------------- package.json | 19 ++++--- 4 files changed, 16 insertions(+), 143 deletions(-) delete mode 100644 lib/index.js diff --git a/.gitignore b/.gitignore index 3c3629e..bf99566 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +lib/ diff --git a/.travis.yml b/.travis.yml index 8463c13..e3f74af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,8 @@ sudo: false language: node_js node_js: - "0.12" - - "4.0" + - "4" + - "5" script: npm run travis before_install: diff --git a/lib/index.js b/lib/index.js deleted file mode 100644 index 4b2f3da..0000000 --- a/lib/index.js +++ /dev/null @@ -1,136 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { - value: true -}); - -var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })(); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var _postcss = require('postcss'); - -var _postcss2 = _interopRequireDefault(_postcss); - -var _icssReplaceSymbols = require('icss-replace-symbols'); - -var _icssReplaceSymbols2 = _interopRequireDefault(_icssReplaceSymbols); - -var matchImports = /^(.+?)\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/; -var matchValueDefinition = /(?:,\s+|^)([\w-]+):?\s+("[^"]*"|'[^']*'|\w+\([^\)]+\)|[^,]+)\s?/g; -var matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/; -var options = {}; -var importIndex = 0; -var createImportedName = options && options.createImportedName || function (importName /*, path*/) { - return 'i__const_' + importName.replace(/\W/g, '_') + '_' + importIndex++; -}; - -exports['default'] = function (css) { - var importAliases = []; - var definitions = {}; - - var addDefinition = function addDefinition(atRule) { - var matches = undefined; - while (matches = matchValueDefinition.exec(atRule.params)) { - var _matches = matches; - - var _matches2 = _slicedToArray(_matches, 3); - - var /*match*/key = _matches2[1]; - var value = _matches2[2]; - - // Add to the definitions, knowing that values can refer to each other - definitions[key] = (0, _icssReplaceSymbols.replaceAll)(definitions, value); - atRule.remove(); - } - }; - - var addImport = function addImport(atRule) { - var matches = matchImports.exec(atRule.params); - if (matches) { - var _matches3 = _slicedToArray(matches, 3); - - var /*match*/aliases = _matches3[1]; - var path = _matches3[2]; - - // We can use constants for path names - if (definitions[path]) path = definitions[path]; - var imports = aliases.split(/\s*,\s*/).map(function (alias) { - var tokens = matchImport.exec(alias); - if (tokens) { - var _tokens = _slicedToArray(tokens, 3); - - var /*match*/theirName = _tokens[1]; - var _tokens$2 = _tokens[2]; - var myName = _tokens$2 === undefined ? theirName : _tokens$2; - - var importedName = createImportedName(myName); - definitions[myName] = importedName; - return { theirName: theirName, importedName: importedName }; - } else { - throw new Error('@import statement "' + alias + '" is invalid!'); - } - }); - importAliases.push({ path: path, imports: imports }); - atRule.remove(); - } - }; - - /* Look at all the @value statements and treat them as locals or as imports */ - css.walkAtRules('value', function (atRule) { - if (matchImports.exec(atRule.params)) { - addImport(atRule); - } else { - addDefinition(atRule); - } - }); - - /* We want to export anything defined by now, but don't add it to the CSS yet or - it well get picked up by the replacement stuff */ - var exportDeclarations = Object.keys(definitions).map(function (key) { - return _postcss2['default'].decl({ - value: definitions[key], - prop: key, - raws: { before: "\n " }, - _autoprefixerDisabled: true - }); - }); - - /* If we have no definitions, don't continue */ - if (!Object.keys(definitions).length) return; - - /* Perform replacements */ - (0, _icssReplaceSymbols2['default'])(css, definitions); - - /* Add export rules if any */ - if (exportDeclarations.length > 0) { - css.prepend(_postcss2['default'].rule({ - selector: ':export', - raws: { after: "\n" }, - nodes: exportDeclarations - })); - } - - /* Add import rules */ - importAliases.reverse().forEach(function (_ref) { - var path = _ref.path; - var imports = _ref.imports; - - css.prepend(_postcss2['default'].rule({ - selector: ':import(' + path + ')', - raws: { after: "\n" }, - nodes: imports.map(function (_ref2) { - var theirName = _ref2.theirName; - var importedName = _ref2.importedName; - return _postcss2['default'].decl({ - value: theirName, - prop: importedName, - raws: { before: "\n " }, - _autoprefixerDisabled: true - }); - }) - })); - }); -}; - -module.exports = exports['default']; \ No newline at end of file diff --git a/package.json b/package.json index c8fbce0..cf387db 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "lint": "standard src test", "build": "babel --out-dir lib src", "autotest": "chokidar src test -c 'npm test'", - "test": "mocha --compilers js:babel/register", + "test": "mocha --compilers js:babel-core/register", "posttest": "npm run lint && npm run build", "travis": "npm run test", "prepublish": "npm run build" @@ -28,13 +28,20 @@ }, "homepage": "https://github.com/css-modules/postcss-modules-constants#readme", "devDependencies": { - "babel": "^5.8.23", - "chokidar": "^1.2.0", - "mocha": "^2.3.3", - "standard": "^5.3.1" + "babel-cli": "^6.4.5", + "babel-core": "^6.4.5", + "babel-preset-es2015": "^6.3.13", + "chokidar": "^1.4.2", + "mocha": "^2.4.4", + "standard": "^5.4.1" }, "dependencies": { "icss-replace-symbols": "^1.0.2", - "postcss": "^5.0.10" + "postcss": "^5.0.14" + }, + "babel": { + "presets": [ + "es2015" + ] } } From c667c96adcfd8f640c5a4bb06ca4e8dbb384f591 Mon Sep 17 00:00:00 2001 From: Jerry Su Date: Fri, 18 Mar 2016 00:28:04 -0700 Subject: [PATCH 03/64] Add multi-line imports --- lib/index.js | 4 ++-- src/index.js | 4 ++-- test/index.js | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/lib/index.js b/lib/index.js index 4b2f3da..30a95c1 100644 --- a/lib/index.js +++ b/lib/index.js @@ -16,7 +16,7 @@ var _icssReplaceSymbols = require('icss-replace-symbols'); var _icssReplaceSymbols2 = _interopRequireDefault(_icssReplaceSymbols); -var matchImports = /^(.+?)\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/; +var matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/; var matchValueDefinition = /(?:,\s+|^)([\w-]+):?\s+("[^"]*"|'[^']*'|\w+\([^\)]+\)|[^,]+)\s?/g; var matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/; var options = {}; @@ -55,7 +55,7 @@ exports['default'] = function (css) { // We can use constants for path names if (definitions[path]) path = definitions[path]; - var imports = aliases.split(/\s*,\s*/).map(function (alias) { + var imports = aliases.replace(/^\(\s*([\s\S]+)\s*\)$/, '$1').split(/\s*,\s*/).map(function (alias) { var tokens = matchImport.exec(alias); if (tokens) { var _tokens = _slicedToArray(tokens, 3); diff --git a/src/index.js b/src/index.js index 5b39ab0..2163c51 100644 --- a/src/index.js +++ b/src/index.js @@ -1,7 +1,7 @@ import postcss from 'postcss' import replaceSymbols, { replaceAll } from 'icss-replace-symbols' -const matchImports = /^(.+?)\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/ +const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/ const matchValueDefinition = /(?:,\s+|^)([\w-]+):?\s+("[^"]*"|'[^']*'|\w+\([^\)]+\)|[^,]+)\s?/g const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/ let options = {} @@ -28,7 +28,7 @@ export default css => { let [/*match*/, aliases, path] = matches // We can use constants for path names if (definitions[path]) path = definitions[path] - let imports = aliases.split(/\s*,\s*/).map(alias => { + let imports = aliases.replace(/^\(\s*([\s\S]+)\s*\)$/, '$1').split(/\s*,\s*/).map(alias => { let tokens = matchImport.exec(alias) if (tokens) { let [/*match*/, theirName, myName = theirName] = tokens diff --git a/test/index.js b/test/index.js index 22a0abf..56420ed 100644 --- a/test/index.js +++ b/test/index.js @@ -110,4 +110,24 @@ describe('constants', () => { ':export {\n named: red;\n 3char: #0f0;\n 6char: #00ff00;\n rgba: rgba(34, 12, 64, 0.3);\n hsla: hsla(220, 13.0%, 18.0%, 1);\n}\n' + '.foo { color: red; background-color: #0f0; border-top-color: #00ff00; border-bottom-color: rgba(34, 12, 64, 0.3); outline-color: hsla(220, 13.0%, 18.0%, 1); }') }) + + it('should import multiple from a single file on multiple lines', () => { + test( + `@value ( + blue, + red +) from "./colors.css"; +.foo { color: red; } +.bar { color: blue }`, + `:import("./colors.css") { + i__const_blue_10: blue; + i__const_red_11: red; +} +:export { + blue: i__const_blue_10; + red: i__const_red_11; +} +.foo { color: i__const_red_11; } +.bar { color: i__const_blue_10 }`) + }) }) From 59f14b25afaa1fc646b9bbe0b9d93dccbbb282e7 Mon Sep 17 00:00:00 2001 From: Josh Johnston Date: Mon, 21 Mar 2016 17:22:27 +1100 Subject: [PATCH 04/64] emit warnings when multiple @value rules don't end in a semicolon --- src/index.js | 6 +++++- test/index.js | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 5b39ab0..fa285c3 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,7 @@ let options = {} let importIndex = 0 let createImportedName = options && options.createImportedName || ((importName/*, path*/) => `i__const_${importName.replace(/\W/g, '_')}_${importIndex++}`) -export default css => { +export default (css, result) => { let importAliases = [] let definitions = {} @@ -49,6 +49,10 @@ export default css => { if (matchImports.exec(atRule.params)) { addImport(atRule) } else { + if (atRule.params.indexOf('@value') !== -1) { + result.warn('Invalid value definition: ' + atRule.params) + } + addDefinition(atRule) } }) diff --git a/test/index.js b/test/index.js index 22a0abf..83f1914 100644 --- a/test/index.js +++ b/test/index.js @@ -19,6 +19,16 @@ describe('constants', () => { test('@value red blue;', ':export {\n red: blue\n}') }) + it('gives an error when there is no semicolon between lines', () => { + const input = '@value red blue\n@value green yellow' + let processor = postcss([constants]) + const result = processor.process(input) + const warnings = result.warnings() + + assert.equal(warnings.length, 1) + assert.equal(warnings[0].text, 'Invalid value definition: red blue\n@value green yellow') + }) + it('should export a more complex constant', () => { test('@value small (max-width: 599px);', ':export {\n small: (max-width: 599px)\n}') }) From 7d0bafe66cffd891be4fa0c17536bf4db5c7352a Mon Sep 17 00:00:00 2001 From: Glen Maddern Date: Mon, 21 Mar 2016 17:32:49 +1100 Subject: [PATCH 05/64] 1.1.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c8fbce0..aaa00f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postcss-modules-values", - "version": "1.1.1", + "version": "1.1.2", "description": "PostCSS plugin for CSS Modules to pass arbitrary constants between your module files", "main": "lib/index.js", "scripts": { From 539fb5d902dc589bf6304313474ca4b7fd90a1ee Mon Sep 17 00:00:00 2001 From: Chris Bracco Date: Tue, 26 Apr 2016 11:03:37 -0400 Subject: [PATCH 06/64] Update reasoning for colon omission with Sass --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b41f81c..d7a8ce6 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Pass arbitrary values between your module files } ``` -Note that the `:` in a `@value` definition is optional as to not break Sass. +**If you are using Sass** along with this PostCSS plugin, do not use the colon `:` in your `@value` definitions. It will cause Sass to crash. ### Justification From bc5e2b8056c8f165a4cdb687d14524edddc6ce6b Mon Sep 17 00:00:00 2001 From: Glen Maddern Date: Thu, 12 May 2016 10:50:23 +0200 Subject: [PATCH 07/64] stop using nodes key for created object --- lib/index.js | 48 +++++++++++++++++++++++++++--------------------- src/index.js | 39 +++++++++++++++++++++------------------ 2 files changed, 48 insertions(+), 39 deletions(-) diff --git a/lib/index.js b/lib/index.js index 4b2f3da..361009e 100644 --- a/lib/index.js +++ b/lib/index.js @@ -25,7 +25,7 @@ var createImportedName = options && options.createImportedName || function (impo return 'i__const_' + importName.replace(/\W/g, '_') + '_' + importIndex++; }; -exports['default'] = function (css) { +exports['default'] = function (css, result) { var importAliases = []; var definitions = {}; @@ -81,18 +81,21 @@ exports['default'] = function (css) { if (matchImports.exec(atRule.params)) { addImport(atRule); } else { + if (atRule.params.indexOf('@value') !== -1) { + result.warn('Invalid value definition: ' + atRule.params); + } + addDefinition(atRule); } }); /* We want to export anything defined by now, but don't add it to the CSS yet or - it well get picked up by the replacement stuff */ + it well get picked up by the replacement stuff */ var exportDeclarations = Object.keys(definitions).map(function (key) { return _postcss2['default'].decl({ value: definitions[key], prop: key, - raws: { before: "\n " }, - _autoprefixerDisabled: true + raws: { before: "\n " } }); }); @@ -104,11 +107,12 @@ exports['default'] = function (css) { /* Add export rules if any */ if (exportDeclarations.length > 0) { - css.prepend(_postcss2['default'].rule({ + var exportRule = _postcss2['default'].rule({ selector: ':export', - raws: { after: "\n" }, - nodes: exportDeclarations - })); + raws: { after: "\n" } + }); + exportRule.append(exportDeclarations); + css.prepend(exportRule); } /* Add import rules */ @@ -116,20 +120,22 @@ exports['default'] = function (css) { var path = _ref.path; var imports = _ref.imports; - css.prepend(_postcss2['default'].rule({ + var importRule = _postcss2['default'].rule({ selector: ':import(' + path + ')', - raws: { after: "\n" }, - nodes: imports.map(function (_ref2) { - var theirName = _ref2.theirName; - var importedName = _ref2.importedName; - return _postcss2['default'].decl({ - value: theirName, - prop: importedName, - raws: { before: "\n " }, - _autoprefixerDisabled: true - }); - }) - })); + raws: { after: "\n" } + }); + imports.forEach(function (_ref2) { + var theirName = _ref2.theirName; + var importedName = _ref2.importedName; + + importRule.append({ + value: theirName, + prop: importedName, + raws: { before: "\n " } + }); + }); + + css.prepend(importRule); }); }; diff --git a/src/index.js b/src/index.js index fa285c3..6e29e6b 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ import postcss from 'postcss' -import replaceSymbols, { replaceAll } from 'icss-replace-symbols' +import replaceSymbols, {replaceAll} from 'icss-replace-symbols' const matchImports = /^(.+?)\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/ const matchValueDefinition = /(?:,\s+|^)([\w-]+):?\s+("[^"]*"|'[^']*'|\w+\([^\)]+\)|[^,]+)\s?/g @@ -34,12 +34,12 @@ export default (css, result) => { let [/*match*/, theirName, myName = theirName] = tokens let importedName = createImportedName(myName) definitions[myName] = importedName - return {theirName, importedName} + return { theirName, importedName } } else { throw new Error(`@import statement "${alias}" is invalid!`) } }) - importAliases.push({path, imports}) + importAliases.push({ path, imports }) atRule.remove() } } @@ -58,12 +58,11 @@ export default (css, result) => { }) /* We want to export anything defined by now, but don't add it to the CSS yet or - it well get picked up by the replacement stuff */ + it well get picked up by the replacement stuff */ let exportDeclarations = Object.keys(definitions).map(key => postcss.decl({ value: definitions[key], prop: key, - raws: { before: "\n " }, - _autoprefixerDisabled: true + raws: { before: "\n " } })) /* If we have no definitions, don't continue */ @@ -74,24 +73,28 @@ export default (css, result) => { /* Add export rules if any */ if (exportDeclarations.length > 0) { - css.prepend(postcss.rule({ + let exportRule = postcss.rule({ selector: `:export`, - raws: { after: "\n" }, - nodes: exportDeclarations - })) + raws: { after: "\n" } + }) + exportRule.append(exportDeclarations) + css.prepend(exportRule) } /* Add import rules */ - importAliases.reverse().forEach(({path, imports}) => { - css.prepend(postcss.rule({ + importAliases.reverse().forEach(({ path, imports }) => { + let importRule = postcss.rule({ selector: `:import(${path})`, - raws: { after: "\n" }, - nodes: imports.map(({theirName, importedName}) => postcss.decl({ + raws: { after: "\n" } + }) + imports.forEach(({ theirName, importedName }) => { + importRule.append({ value: theirName, prop: importedName, - raws: { before: "\n " }, - _autoprefixerDisabled: true - })) - })) + raws: { before: "\n " } + }) + }) + + css.prepend(importRule) }) } From b9cfa007a0048857c23e1ef3635cfc7a333e55f3 Mon Sep 17 00:00:00 2001 From: Glen Maddern Date: Thu, 12 May 2016 10:50:45 +0200 Subject: [PATCH 08/64] 1.1.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aaa00f2..3b3fbd2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postcss-modules-values", - "version": "1.1.2", + "version": "1.1.3", "description": "PostCSS plugin for CSS Modules to pass arbitrary constants between your module files", "main": "lib/index.js", "scripts": { From 3bdf399515f7f6cbb740575cfa9fe935fdefcd23 Mon Sep 17 00:00:00 2001 From: Alexander Christiansson Date: Sun, 7 Aug 2016 16:53:41 +0200 Subject: [PATCH 09/64] Allow nested parentheses in values --- lib/index.js | 2 +- src/index.js | 2 +- test/index.js | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index 361009e..adc1e54 100644 --- a/lib/index.js +++ b/lib/index.js @@ -17,7 +17,7 @@ var _icssReplaceSymbols = require('icss-replace-symbols'); var _icssReplaceSymbols2 = _interopRequireDefault(_icssReplaceSymbols); var matchImports = /^(.+?)\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/; -var matchValueDefinition = /(?:,\s+|^)([\w-]+):?\s+("[^"]*"|'[^']*'|\w+\([^\)]+\)|[^,]+)\s?/g; +var matchValueDefinition = /(?:,\s+|^)([\w-]+):?\s+("[^"]*"|'[^']*'|\w+\(.+\)|[^,]+)\s?/g; var matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/; var options = {}; var importIndex = 0; diff --git a/src/index.js b/src/index.js index 6e29e6b..6ae9518 100644 --- a/src/index.js +++ b/src/index.js @@ -2,7 +2,7 @@ import postcss from 'postcss' import replaceSymbols, {replaceAll} from 'icss-replace-symbols' const matchImports = /^(.+?)\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/ -const matchValueDefinition = /(?:,\s+|^)([\w-]+):?\s+("[^"]*"|'[^']*'|\w+\([^\)]+\)|[^,]+)\s?/g +const matchValueDefinition = /(?:,\s+|^)([\w-]+):?\s+("[^"]*"|'[^']*'|\w+\(.+\)|[^,]+)\s?/g const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/ let options = {} let importIndex = 0 diff --git a/test/index.js b/test/index.js index 83f1914..97e4b67 100644 --- a/test/index.js +++ b/test/index.js @@ -120,4 +120,11 @@ describe('constants', () => { ':export {\n named: red;\n 3char: #0f0;\n 6char: #00ff00;\n rgba: rgba(34, 12, 64, 0.3);\n hsla: hsla(220, 13.0%, 18.0%, 1);\n}\n' + '.foo { color: red; background-color: #0f0; border-top-color: #00ff00; border-bottom-color: rgba(34, 12, 64, 0.3); outline-color: hsla(220, 13.0%, 18.0%, 1); }') }) + + it('should allow values with nested parantheses', () => { + test( + '@value aaa: color(red lightness(50%));', + ':export {\n aaa: color(red lightness(50%))\n}' + ) + }) }) From affb3e1f7ba0eb332672eb17f5976cd4366ec208 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Mon, 8 Aug 2016 18:22:26 +1000 Subject: [PATCH 10/64] chore(package): update mocha to version 3.0.2 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3b3fbd2..c814e7a 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "devDependencies": { "babel": "^5.8.23", "chokidar": "^1.2.0", - "mocha": "^2.3.3", + "mocha": "^3.0.2", "standard": "^5.3.1" }, "dependencies": { From 56eaff8bbce9403518912cfddabe853d522d14ec Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Tue, 9 Aug 2016 13:49:51 +1000 Subject: [PATCH 11/64] chore(package): update standard to version 7.1.2 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c814e7a..18ea365 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "babel": "^5.8.23", "chokidar": "^1.2.0", "mocha": "^3.0.2", - "standard": "^5.3.1" + "standard": "^7.1.2" }, "dependencies": { "icss-replace-symbols": "^1.0.2", From 5134ef42b2941614f30261e1ba3ee46fd6645ae6 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Tue, 9 Aug 2016 13:55:16 +1000 Subject: [PATCH 12/64] chore(package): update babel to version 6.5.2 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 18ea365..7b77d28 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ }, "homepage": "https://github.com/css-modules/postcss-modules-constants#readme", "devDependencies": { - "babel": "^5.8.23", + "babel": "^6.5.2", "chokidar": "^1.2.0", "mocha": "^3.0.2", "standard": "^7.1.2" From 75e065c123abe74ae648af4a2be9f92688488fd3 Mon Sep 17 00:00:00 2001 From: Glen Maddern Date: Mon, 15 Aug 2016 11:55:28 +1000 Subject: [PATCH 13/64] 1.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cac9c03..6d2b3ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postcss-modules-values", - "version": "1.1.3", + "version": "1.2.0", "description": "PostCSS plugin for CSS Modules to pass arbitrary constants between your module files", "main": "lib/index.js", "scripts": { From a67db1762e82e1f21b146866e66fc43bff99b06e Mon Sep 17 00:00:00 2001 From: Glen Maddern Date: Mon, 15 Aug 2016 12:45:22 +1000 Subject: [PATCH 14/64] dont ignore lib dir for npm, only git --- .npmignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..e69de29 From 3506ce59c1e4808746029b68b01e0e3184d8e618 Mon Sep 17 00:00:00 2001 From: Glen Maddern Date: Mon, 15 Aug 2016 12:45:30 +1000 Subject: [PATCH 15/64] 1.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6d2b3ca..01039cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postcss-modules-values", - "version": "1.2.0", + "version": "1.2.1", "description": "PostCSS plugin for CSS Modules to pass arbitrary constants between your module files", "main": "lib/index.js", "scripts": { From 76c1ed2900816d2712a5c08ff5a919bc97aedbf0 Mon Sep 17 00:00:00 2001 From: Glen Maddern Date: Mon, 15 Aug 2016 13:22:14 +1000 Subject: [PATCH 16/64] restored babel 5 exports --- package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.json b/package.json index 01039cc..1f4d6ef 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "devDependencies": { "babel-cli": "^6.5.2", "babel-core": "^6.5.2", + "babel-plugin-add-module-exports": "^0.2.1", "babel-preset-es2015": "^6.3.13", "chokidar": "^1.2.0", "mocha": "^3.0.2", @@ -42,6 +43,9 @@ "babel": { "presets": [ "es2015" + ], + "plugins": [ + "add-module-exports" ] } } From a153e6720eafa28f9e8317097aad8394a73cd001 Mon Sep 17 00:00:00 2001 From: Glen Maddern Date: Mon, 15 Aug 2016 13:22:18 +1000 Subject: [PATCH 17/64] 1.2.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1f4d6ef..7636604 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postcss-modules-values", - "version": "1.2.1", + "version": "1.2.2", "description": "PostCSS plugin for CSS Modules to pass arbitrary constants between your module files", "main": "lib/index.js", "scripts": { From 10974bc184ee3775d0c1a60df59eb6bec899c7de Mon Sep 17 00:00:00 2001 From: Glen Maddern Date: Mon, 15 Aug 2016 14:13:22 +1000 Subject: [PATCH 18/64] clarifying that this undocumented use-case isnt permitted --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d7a8ce6..2bd6860 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,11 @@ Pass arbitrary values between your module files ```css /* my-component.css */ -@value colors: "./colors.css"; +/* alias paths for other values or composition */ +@value colors: "./colors.css"; +/* import multiple from a single file */ @value primary, secondary from colors; +/* make local aliases to imported values */ @value small as bp-small, large as bp-large from "./breakpoints.css"; .header { @@ -50,6 +53,12 @@ Pass arbitrary values between your module files **If you are using Sass** along with this PostCSS plugin, do not use the colon `:` in your `@value` definitions. It will cause Sass to crash. +Note also you can _import_ multiple values at once but can only _define_ one value per line. + +```css +@value a: b, c: d; /* defines a as "b, c: d" */ +``` + ### Justification See [this PR](https://github.com/css-modules/css-modules-loader-core/pull/28) for more background From e6489c22e2a8c83b77d472e79b94a8bbc07c82a1 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Tue, 11 Oct 2016 11:03:17 +1100 Subject: [PATCH 19/64] chore(package): update standard to version 8.4.0 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7636604..3ae4c3c 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "babel-preset-es2015": "^6.3.13", "chokidar": "^1.2.0", "mocha": "^3.0.2", - "standard": "^7.1.2" + "standard": "^8.4.0" }, "dependencies": { "icss-replace-symbols": "^1.0.2", From e34f7caed91cff89d2930ffbf72bfcb55fb96013 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Sat, 20 May 2017 22:58:18 +0300 Subject: [PATCH 20/64] Upgrade postcss6 --- .travis.yml | 5 ++--- package.json | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e3f74af..7a4a137 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,8 @@ -sudo: false language: node_js node_js: - - "0.12" - "4" - - "5" + - "6" + - "node" script: npm run travis before_install: diff --git a/package.json b/package.json index 3ae4c3c..2ddd81f 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ }, "dependencies": { "icss-replace-symbols": "^1.0.2", - "postcss": "^5.0.14" + "postcss": "^6.0.1" }, "babel": { "presets": [ From b47db661674c22068713ec751386252446637f81 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Sat, 20 May 2017 22:59:55 +0300 Subject: [PATCH 21/64] Fix package.json links --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 2ddd81f..67f07de 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "postcss-modules-values", "version": "1.2.2", - "description": "PostCSS plugin for CSS Modules to pass arbitrary constants between your module files", + "description": "PostCSS plugin for CSS Modules to pass arbitrary values between your module files", "main": "lib/index.js", "scripts": { "lint": "standard src test", @@ -14,7 +14,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/css-modules/postcss-modules-constants.git" + "url": "git+https://github.com/css-modules/postcss-modules-values.git" }, "keywords": [ "css", @@ -24,9 +24,9 @@ "author": "Glen Maddern", "license": "ISC", "bugs": { - "url": "https://github.com/css-modules/postcss-modules-constants/issues" + "url": "https://github.com/css-modules/postcss-modules-values/issues" }, - "homepage": "https://github.com/css-modules/postcss-modules-constants#readme", + "homepage": "https://github.com/css-modules/postcss-modules-values#readme", "devDependencies": { "babel-cli": "^6.5.2", "babel-core": "^6.5.2", From 5e5a4ac0dcb22fea7cd0a4feba9aadc37a422a99 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Sat, 20 May 2017 23:01:40 +0300 Subject: [PATCH 22/64] Wrap plugin with postcss.plugin API --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index c84c221..3ca6195 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,7 @@ let options = {} let importIndex = 0 let createImportedName = options && options.createImportedName || ((importName/*, path*/) => `i__const_${importName.replace(/\W/g, '_')}_${importIndex++}`) -export default (css, result) => { +export default postcss.plugin('postcss-modules-values', () => (css, result) => { let importAliases = [] let definitions = {} @@ -97,4 +97,4 @@ export default (css, result) => { css.prepend(importRule) }) -} +}) From 0b9e58e3f44f270f2057ee5e8093d781ae3554af Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Sun, 21 May 2017 18:40:18 +0300 Subject: [PATCH 23/64] Add icss output mention in docs --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2bd6860..e454dfe 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,20 @@ # CSS Modules: Values -Pass arbitrary values between your module files +Pass arbitrary values between your module files, transforms + +```css +@value primary: #BF4040; +@value secondary: #1F4F7F; +``` + +into + +```css +:export { + primary: #BF4040; + secondary: #1F4F7F; +} +``` ### Usage From 79620e5df83dcf2d62a16b6e9a5d60cf2aa2e256 Mon Sep 17 00:00:00 2001 From: Glen Maddern Date: Mon, 22 May 2017 08:58:26 +1000 Subject: [PATCH 24/64] bumped icss-replace-symbols dep --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 67f07de..47c4a44 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "standard": "^8.4.0" }, "dependencies": { - "icss-replace-symbols": "^1.0.2", + "icss-replace-symbols": "^1.1.0", "postcss": "^6.0.1" }, "babel": { From 3d96fcb8bb0dd4bd9407ca4241a019034281570a Mon Sep 17 00:00:00 2001 From: Glen Maddern Date: Mon, 22 May 2017 08:58:30 +1000 Subject: [PATCH 25/64] 1.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 47c4a44..bc22c10 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postcss-modules-values", - "version": "1.2.2", + "version": "1.3.0", "description": "PostCSS plugin for CSS Modules to pass arbitrary values between your module files", "main": "lib/index.js", "scripts": { From ebd237483ad067ab527f38efc03d7572eca7930d Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Mon, 22 May 2017 16:18:49 +0300 Subject: [PATCH 26/64] Use yarn and test with jest --- .gitignore | 3 +- .npmignore | 0 .travis.yml | 4 - package.json | 41 +- src/index.js | 6 +- test/index.js | 158 --- test/test.js | 171 +++ yarn.lock | 3251 +++++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 3449 insertions(+), 185 deletions(-) delete mode 100644 .npmignore delete mode 100644 test/index.js create mode 100644 test/test.js create mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore index bf99566..7079b99 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules -lib/ +coverage +lib diff --git a/.npmignore b/.npmignore deleted file mode 100644 index e69de29..0000000 diff --git a/.travis.yml b/.travis.yml index 7a4a137..a1b29d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,3 @@ node_js: - "4" - "6" - "node" -script: npm run travis - -before_install: - - '[ "${TRAVIS_NODE_VERSION}" != "0.10" ] || npm install -g npm' diff --git a/package.json b/package.json index bc22c10..0c18b3f 100644 --- a/package.json +++ b/package.json @@ -3,14 +3,27 @@ "version": "1.3.0", "description": "PostCSS plugin for CSS Modules to pass arbitrary values between your module files", "main": "lib/index.js", + "files": [ + "lib" + ], "scripts": { - "lint": "standard src test", "build": "babel --out-dir lib src", - "autotest": "chokidar src test -c 'npm test'", - "test": "mocha --compilers js:babel-core/register", - "posttest": "npm run lint && npm run build", - "travis": "npm run test", - "prepublish": "npm run build" + "lint": "standard src test", + "test": "jest --coverage", + "posttest": "yarn run lint", + "prepublish": "yarn run build" + }, + "babel": { + "presets": [ + [ + "env", + { + "targets": { + "node": 4 + } + } + ] + ] }, "repository": { "type": "git", @@ -29,23 +42,13 @@ "homepage": "https://github.com/css-modules/postcss-modules-values#readme", "devDependencies": { "babel-cli": "^6.5.2", - "babel-core": "^6.5.2", - "babel-plugin-add-module-exports": "^0.2.1", - "babel-preset-es2015": "^6.3.13", - "chokidar": "^1.2.0", - "mocha": "^3.0.2", + "babel-jest": "^20.0.3", + "babel-preset-env": "^1.5.0", + "jest": "^20.0.3", "standard": "^8.4.0" }, "dependencies": { "icss-replace-symbols": "^1.1.0", "postcss": "^6.0.1" - }, - "babel": { - "presets": [ - "es2015" - ], - "plugins": [ - "add-module-exports" - ] } } diff --git a/src/index.js b/src/index.js index 3ca6195..20e40f7 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ -import postcss from 'postcss' -import replaceSymbols, {replaceAll} from 'icss-replace-symbols' +const postcss = require('postcss') +const {default: replaceSymbols, replaceAll} = require('icss-replace-symbols') const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/ const matchValueDefinition = /(?:\s+|^)([\w-]+):?\s+(.+?)\s*$/g @@ -8,7 +8,7 @@ let options = {} let importIndex = 0 let createImportedName = options && options.createImportedName || ((importName/*, path*/) => `i__const_${importName.replace(/\W/g, '_')}_${importIndex++}`) -export default postcss.plugin('postcss-modules-values', () => (css, result) => { +module.exports = postcss.plugin('postcss-modules-values', () => (css, result) => { let importAliases = [] let definitions = {} diff --git a/test/index.js b/test/index.js deleted file mode 100644 index 61555ac..0000000 --- a/test/index.js +++ /dev/null @@ -1,158 +0,0 @@ -/* global describe, it */ - -import postcss from 'postcss' -import assert from 'assert' - -import constants from '../src' - -const test = (input, expected) => { - let processor = postcss([constants]) - assert.equal(processor.process(input).css, expected) -} - -describe('constants', () => { - it('should pass through an empty string', () => { - test('', '') - }) - - it('should export a constant', () => { - test('@value red blue;', ':export {\n red: blue\n}') - }) - - it('gives an error when there is no semicolon between lines', () => { - const input = '@value red blue\n@value green yellow' - let processor = postcss([constants]) - const result = processor.process(input) - const warnings = result.warnings() - - assert.equal(warnings.length, 1) - assert.equal(warnings[0].text, 'Invalid value definition: red blue\n@value green yellow') - }) - - it('should export a more complex constant', () => { - test('@value small (max-width: 599px);', ':export {\n small: (max-width: 599px)\n}') - }) - - it('should replace constants within the file', () => { - test('@value blue red; .foo { color: blue; }', ':export {\n blue: red;\n}\n.foo { color: red; }') - }) - - it('should import and re-export a simple constant', () => { - test('@value red from "./colors.css";', ':import("./colors.css") {\n i__const_red_0: red\n}\n:export {\n red: i__const_red_0\n}') - }) - - it('should import a simple constant and replace usages', () => { - test('@value red from "./colors.css"; .foo { color: red; }', ':import("./colors.css") {\n i__const_red_1: red;\n}\n:export {\n red: i__const_red_1;\n}\n.foo { color: i__const_red_1; }') - }) - - it('should import and alias a constant and replace usages', () => { - test('@value blue as red from "./colors.css"; .foo { color: red; }', ':import("./colors.css") {\n i__const_red_2: blue;\n}\n:export {\n red: i__const_red_2;\n}\n.foo { color: i__const_red_2; }') - }) - - it('should import multiple from a single file', () => { - test( - `@value blue, red from "./colors.css"; -.foo { color: red; } -.bar { color: blue }`, - `:import("./colors.css") { - i__const_blue_3: blue; - i__const_red_4: red; -} -:export { - blue: i__const_blue_3; - red: i__const_red_4; -} -.foo { color: i__const_red_4; } -.bar { color: i__const_blue_3 }`) - }) - - it('should import from a definition', () => { - test( - '@value colors: "./colors.css"; @value red from colors;', - ':import("./colors.css") {\n i__const_red_5: red\n}\n' + - ':export {\n colors: "./colors.css";\n red: i__const_red_5\n}' - ) - }) - - it('should only allow values for paths if defined in the right order', () => { - test( - '@value red from colors; @value colors: "./colors.css";', - ':import(colors) {\n i__const_red_6: red\n}\n' + - ':export {\n red: i__const_red_6;\n colors: "./colors.css"\n}' - ) - }) - - it('should allow transitive values', () => { - test( - '@value aaa: red;\n@value bbb: aaa;\n.a { color: bbb; }', - ':export {\n aaa: red;\n bbb: red;\n}\n.a { color: red; }' - ) - }) - - it('should allow transitive values within calc', () => { - test( - '@value base: 10px;\n@value large: calc(base * 2);\n.a { margin: large; }', - ':export {\n base: 10px;\n large: calc(10px * 2);\n}\n.a { margin: calc(10px * 2); }' - ) - }) - - it('should preserve import order', () => { - test( - '@value a from "./a.css"; @value b from "./b.css";', - ':import("./a.css") {\n i__const_a_7: a\n}\n' + - ':import("./b.css") {\n i__const_b_8: b\n}\n' + - ':export {\n a: i__const_a_7;\n b: i__const_b_8\n}' - ) - }) - - it('should allow custom-property-style names', () => { - test( - '@value --red from "./colors.css"; .foo { color: --red; }', - ':import("./colors.css") {\n i__const___red_9: --red;\n}\n' + - ':export {\n --red: i__const___red_9;\n}\n' + - '.foo { color: i__const___red_9; }') - }) - - it('should allow all colour types', () => { - test( - '@value named: red; @value 3char #0f0; @value 6char #00ff00; @value rgba rgba(34, 12, 64, 0.3); @value hsla hsla(220, 13.0%, 18.0%, 1);\n' + - '.foo { color: named; background-color: 3char; border-top-color: 6char; border-bottom-color: rgba; outline-color: hsla; }', - ':export {\n named: red;\n 3char: #0f0;\n 6char: #00ff00;\n rgba: rgba(34, 12, 64, 0.3);\n hsla: hsla(220, 13.0%, 18.0%, 1);\n}\n' + - '.foo { color: red; background-color: #0f0; border-top-color: #00ff00; border-bottom-color: rgba(34, 12, 64, 0.3); outline-color: hsla(220, 13.0%, 18.0%, 1); }') - }) - - it('should import multiple from a single file on multiple lines', () => { - test( - `@value ( - blue, - red -) from "./colors.css"; -.foo { color: red; } -.bar { color: blue }`, - `:import("./colors.css") { - i__const_blue_10: blue; - i__const_red_11: red; -} -:export { - blue: i__const_blue_10; - red: i__const_red_11; -} -.foo { color: i__const_red_11; } -.bar { color: i__const_blue_10 }`) - }) - - it('should allow definitions with commas in them', () => { - test( - '@value coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14) ;\n' + - '.foo { box-shadow: coolShadow; }', - ':export {\n coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14);\n}\n' + - '.foo { box-shadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14); }') - }) - - it('should allow values with nested parantheses', () => { - test( - '@value aaa: color(red lightness(50%));', - ':export {\n aaa: color(red lightness(50%))\n}' - ) - }) -}) diff --git a/test/test.js b/test/test.js new file mode 100644 index 0000000..b149ab4 --- /dev/null +++ b/test/test.js @@ -0,0 +1,171 @@ +const postcss = require('postcss') +const plugin = require('../src') + +const run = (input) => postcss([plugin]).process(input) +const runCSS = (input) => run(input).then((result) => result.css) +const join = (...args) => args.join('\n') + +test('should pass through an empty string', () => + expect(runCSS('')).resolves.toEqual('') +) + +test('should export a constant', () => + expect(runCSS('@value red blue;@value red blue;')).resolves.toEqual(':export {\n red: blue\n}') +) + +test('gives an error when there is no semicolon between lines', () => + run('@value red blue\n@value green yellow').then((result) => { + const warnings = result.warnings() + + expect(warnings.length).toEqual(1) + expect(warnings[0].text).toEqual('Invalid value definition: red blue\n@value green yellow') + }) +) + +test('should export a more complex constant', () => + expect(runCSS('@value small (max-width: 599px);')).resolves.toEqual(':export {\n small: (max-width: 599px)\n}') +) + +test('should replace constants within the file', () => + expect(runCSS( + '@value blue red; .foo { color: blue; }' + )).resolves.toEqual( + ':export {\n blue: red;\n}\n.foo { color: red; }' + ) +) + +test('should import and re-export a simple constant', () => + expect(runCSS( + '@value red from "./colors.css";' + )).resolves.toEqual( + ':import("./colors.css") {\n i__const_red_0: red\n}\n:export {\n red: i__const_red_0\n}' + ) +) + +test('should import a simple constant and replace usages', () => + expect(runCSS( + '@value red from "./colors.css"; .foo { color: red; }' + )).resolves.toEqual(join( + ':import("./colors.css") {\n i__const_red_1: red;\n}', + ':export {\n red: i__const_red_1;\n}', + '.foo { color: i__const_red_1; }' + )) +) + +test('should import and alias a constant and replace usages', () => + expect(runCSS( + '@value blue as red from "./colors.css"; .foo { color: red; }' + )).resolves.toEqual(join( + ':import("./colors.css") {\n i__const_red_2: blue;\n}', + ':export {\n red: i__const_red_2;\n}', + '.foo { color: i__const_red_2; }' + )) +) + +test('should import multiple from a single file', () => + expect(runCSS(join( + '@value blue, red from "./colors.css";', + '.foo { color: red; }', + '.bar { color: blue }' + ))).resolves.toEqual(join( + ':import("./colors.css") {\n i__const_blue_3: blue;\n i__const_red_4: red;\n}', + ':export {\n blue: i__const_blue_3;\n red: i__const_red_4;\n}', + '.foo { color: i__const_red_4; }', + '.bar { color: i__const_blue_3 }' + )) +) + +test('should import from a definition', () => + expect(runCSS( + '@value colors: "./colors.css"; @value red from colors;' + )).resolves.toEqual(join( + ':import("./colors.css") {\n i__const_red_5: red\n}', + ':export {\n colors: "./colors.css";\n red: i__const_red_5\n}' + )) +) + +test('should only allow values for paths if defined in the right order', () => + expect(runCSS( + '@value red from colors; @value colors: "./colors.css";' + )).resolves.toEqual(join( + ':import(colors) {\n i__const_red_6: red\n}', + ':export {\n red: i__const_red_6;\n colors: "./colors.css"\n}' + )) +) + +test('should allow transitive values', () => + expect(runCSS( + '@value aaa: red;\n@value bbb: aaa;\n.a { color: bbb; }' + )).resolves.toEqual( + ':export {\n aaa: red;\n bbb: red;\n}\n.a { color: red; }' + ) +) + +test('should allow transitive values within calc', () => + expect(runCSS( + '@value base: 10px;\n@value large: calc(base * 2);\n.a { margin: large; }' + )).resolves.toEqual( + ':export {\n base: 10px;\n large: calc(10px * 2);\n}\n.a { margin: calc(10px * 2); }' + ) +) + +test('should preserve import order', () => + expect(runCSS( + '@value a from "./a.css"; @value b from "./b.css";' + )).resolves.toEqual(join( + ':import("./a.css") {\n i__const_a_7: a\n}', + ':import("./b.css") {\n i__const_b_8: b\n}', + ':export {\n a: i__const_a_7;\n b: i__const_b_8\n}' + )) +) + +test('should allow custom-property-style names', () => + expect(runCSS( + '@value --red from "./colors.css"; .foo { color: --red; }' + )).resolves.toEqual(join( + ':import("./colors.css") {\n i__const___red_9: --red;\n}', + ':export {\n --red: i__const___red_9;\n}', + '.foo { color: i__const___red_9; }' + )) +) + +test('should allow all colour types', () => + expect(runCSS(join( + '@value named: red; @value 3char #0f0; @value 6char #00ff00; @value rgba rgba(34, 12, 64, 0.3); @value hsla hsla(220, 13.0%, 18.0%, 1);', + '.foo { color: named; background-color: 3char; border-top-color: 6char; border-bottom-color: rgba; outline-color: hsla; }' + ))).resolves.toEqual(join( + ':export {\n named: red;\n 3char: #0f0;\n 6char: #00ff00;\n rgba: rgba(34, 12, 64, 0.3);\n hsla: hsla(220, 13.0%, 18.0%, 1);\n}', + '.foo { color: red; background-color: #0f0; border-top-color: #00ff00; border-bottom-color: rgba(34, 12, 64, 0.3); outline-color: hsla(220, 13.0%, 18.0%, 1); }' + )) +) + +test('should import multiple from a single file on multiple lines', () => + expect(runCSS(join( + '@value (\n blue,\n red\n) from "./colors.css";', + '.foo { color: red; }', + '.bar { color: blue }' + ))).resolves.toEqual(join( + ':import("./colors.css") {\n i__const_blue_10: blue;\n i__const_red_11: red;\n}', + ':export {\n blue: i__const_blue_10;\n red: i__const_red_11;\n}', + '.foo { color: i__const_red_11; }', + '.bar { color: i__const_blue_10 }' + )) +) + +test('should allow definitions with commas in them', () => + expect(runCSS(join( + '@value coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14) ;', + '.foo { box-shadow: coolShadow; }' + ))).resolves.toEqual(join( + ':export {\n coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14);\n}', + '.foo { box-shadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14); }' + )) +) + +test('should allow values with nested parantheses', () => + expect(runCSS( + '@value aaa: color(red lightness(50%));' + )).resolves.toEqual( + ':export {\n aaa: color(red lightness(50%))\n}' + ) +) diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..f09fd57 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,3251 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +abab@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" + +abbrev@1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" + +acorn-globals@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" + dependencies: + acorn "^4.0.4" + +acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + +acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + +acorn@^4.0.4: + version "4.0.11" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0" + +acorn@^5.0.1: + version "5.0.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" + +ajv-keywords@^1.0.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" + +ajv@^4.7.0, ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +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" + +ansi-regex@^2.0.0, ansi-regex@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +ansi-styles@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.0.0.tgz#5404e93a544c4fec7f048262977bebfe3155e0c1" + dependencies: + color-convert "^1.0.0" + +anymatch@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" + dependencies: + arrify "^1.0.0" + micromatch "^2.1.5" + +append-transform@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" + dependencies: + default-require-extensions "^1.0.0" + +aproba@^1.0.3: + version "1.1.1" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.1.tgz#95d3600f07710aa0e9298c726ad5ecf2eacbabab" + +are-we-there-yet@~1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.6" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1" + +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arrify@^1.0.0, arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +async-each@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" + +async@^1.4.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +async@^2.1.4: + version "2.4.1" + resolved "https://registry.yarnpkg.com/async/-/async-2.4.1.tgz#62a56b279c98a11d0987096a01cc3eeb8eb7bbd7" + dependencies: + lodash "^4.14.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +babel-cli@^6.5.2: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.24.1.tgz#207cd705bba61489b2ea41b5312341cf6aca2283" + dependencies: + babel-core "^6.24.1" + babel-polyfill "^6.23.0" + babel-register "^6.24.1" + babel-runtime "^6.22.0" + commander "^2.8.1" + convert-source-map "^1.1.0" + fs-readdir-recursive "^1.0.0" + glob "^7.0.0" + lodash "^4.2.0" + output-file-sync "^1.1.0" + path-is-absolute "^1.0.0" + slash "^1.0.0" + source-map "^0.5.0" + v8flags "^2.0.10" + optionalDependencies: + chokidar "^1.6.1" + +babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" + dependencies: + chalk "^1.1.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +babel-core@^6.0.0, babel-core@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.24.1.tgz#8c428564dce1e1f41fb337ec34f4c3b022b5ad83" + dependencies: + babel-code-frame "^6.22.0" + babel-generator "^6.24.1" + babel-helpers "^6.24.1" + babel-messages "^6.23.0" + babel-register "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + babylon "^6.11.0" + convert-source-map "^1.1.0" + debug "^2.1.1" + json5 "^0.5.0" + lodash "^4.2.0" + minimatch "^3.0.2" + path-is-absolute "^1.0.0" + private "^0.1.6" + slash "^1.0.0" + source-map "^0.5.0" + +babel-generator@^6.18.0, babel-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.24.1.tgz#e715f486c58ded25649d888944d52aa07c5d9497" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.2.0" + source-map "^0.5.0" + trim-right "^1.0.1" + +babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" + dependencies: + babel-helper-explode-assignable-expression "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-call-delegate@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-define-map@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.24.1.tgz#7a9747f258d8947d32d515f6aa1c7bd02204a080" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + lodash "^4.2.0" + +babel-helper-explode-assignable-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-function-name@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" + dependencies: + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-get-function-arity@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-hoist-variables@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-optimise-call-expression@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-helper-regex@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.24.1.tgz#d36e22fab1008d79d88648e32116868128456ce8" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + lodash "^4.2.0" + +babel-helper-remap-async-to-generator@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helper-replace-supers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" + dependencies: + babel-helper-optimise-call-expression "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-helpers@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-jest@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-20.0.3.tgz#e4a03b13dc10389e140fc645d09ffc4ced301671" + dependencies: + babel-core "^6.0.0" + babel-plugin-istanbul "^4.0.0" + babel-preset-jest "^20.0.3" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-check-es2015-constants@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-istanbul@^4.0.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.3.tgz#6ee6280410dcf59c7747518c3dfd98680958f102" + dependencies: + find-up "^2.1.0" + istanbul-lib-instrument "^1.7.1" + test-exclude "^4.1.0" + +babel-plugin-jest-hoist@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-20.0.3.tgz#afedc853bd3f8dc3548ea671fbe69d03cc2c1767" + +babel-plugin-syntax-async-functions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" + +babel-plugin-syntax-exponentiation-operator@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" + +babel-plugin-syntax-trailing-function-commas@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" + +babel-plugin-transform-async-to-generator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" + dependencies: + babel-helper-remap-async-to-generator "^6.24.1" + babel-plugin-syntax-async-functions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-arrow-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-block-scoping@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.24.1.tgz#76c295dc3a4741b1665adfd3167215dcff32a576" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + lodash "^4.2.0" + +babel-plugin-transform-es2015-classes@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" + dependencies: + babel-helper-define-map "^6.24.1" + babel-helper-function-name "^6.24.1" + babel-helper-optimise-call-expression "^6.24.1" + babel-helper-replace-supers "^6.24.1" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-computed-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-destructuring@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-duplicate-keys@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-for-of@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-function-name@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz#d3e310b40ef664a36622200097c6d440298f2bfe" + dependencies: + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-modules-systemjs@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" + dependencies: + babel-helper-hoist-variables "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-modules-umd@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + +babel-plugin-transform-es2015-object-super@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" + dependencies: + babel-helper-replace-supers "^6.24.1" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-parameters@^6.23.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" + dependencies: + babel-helper-call-delegate "^6.24.1" + babel-helper-get-function-arity "^6.24.1" + babel-runtime "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-shorthand-properties@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-spread@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-sticky-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-plugin-transform-es2015-template-literals@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-typeof-symbol@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" + dependencies: + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-unicode-regex@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" + dependencies: + babel-helper-regex "^6.24.1" + babel-runtime "^6.22.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-exponentiation-operator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" + dependencies: + babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" + babel-plugin-syntax-exponentiation-operator "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-regenerator@^6.22.0: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz#b8da305ad43c3c99b4848e4fe4037b770d23c418" + dependencies: + regenerator-transform "0.9.11" + +babel-plugin-transform-strict-mode@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.24.1" + +babel-polyfill@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d" + dependencies: + babel-runtime "^6.22.0" + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + +babel-preset-env@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.5.0.tgz#6e5452f7c8742afe3b9a917883ccf3f7a4f340c5" + dependencies: + babel-plugin-check-es2015-constants "^6.22.0" + babel-plugin-syntax-trailing-function-commas "^6.22.0" + babel-plugin-transform-async-to-generator "^6.22.0" + babel-plugin-transform-es2015-arrow-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" + babel-plugin-transform-es2015-block-scoping "^6.23.0" + babel-plugin-transform-es2015-classes "^6.23.0" + babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-destructuring "^6.23.0" + babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-for-of "^6.23.0" + babel-plugin-transform-es2015-function-name "^6.22.0" + babel-plugin-transform-es2015-literals "^6.22.0" + babel-plugin-transform-es2015-modules-amd "^6.22.0" + babel-plugin-transform-es2015-modules-commonjs "^6.23.0" + babel-plugin-transform-es2015-modules-systemjs "^6.23.0" + babel-plugin-transform-es2015-modules-umd "^6.23.0" + babel-plugin-transform-es2015-object-super "^6.22.0" + babel-plugin-transform-es2015-parameters "^6.23.0" + babel-plugin-transform-es2015-shorthand-properties "^6.22.0" + babel-plugin-transform-es2015-spread "^6.22.0" + babel-plugin-transform-es2015-sticky-regex "^6.22.0" + babel-plugin-transform-es2015-template-literals "^6.22.0" + babel-plugin-transform-es2015-typeof-symbol "^6.23.0" + babel-plugin-transform-es2015-unicode-regex "^6.22.0" + babel-plugin-transform-exponentiation-operator "^6.22.0" + babel-plugin-transform-regenerator "^6.22.0" + browserslist "^2.1.2" + invariant "^2.2.2" + semver "^5.3.0" + +babel-preset-jest@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-20.0.3.tgz#cbacaadecb5d689ca1e1de1360ebfc66862c178a" + dependencies: + babel-plugin-jest-hoist "^20.0.3" + +babel-register@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.1.tgz#7e10e13a2f71065bdfad5a1787ba45bca6ded75f" + dependencies: + babel-core "^6.24.1" + babel-runtime "^6.22.0" + core-js "^2.4.0" + home-or-tmp "^2.0.0" + lodash "^4.2.0" + mkdirp "^0.5.1" + source-map-support "^0.4.2" + +babel-runtime@^6.18.0, babel-runtime@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + +babel-template@^6.16.0, babel-template@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" + babylon "^6.11.0" + lodash "^4.2.0" + +babel-traverse@^6.18.0, babel-traverse@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.24.1.tgz#ab36673fd356f9a0948659e7b338d5feadb31695" + dependencies: + babel-code-frame "^6.22.0" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.24.1" + babylon "^6.15.0" + debug "^2.2.0" + globals "^9.0.0" + invariant "^2.2.0" + lodash "^4.2.0" + +babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1: + version "6.24.1" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.24.1.tgz#a136879dc15b3606bda0d90c1fc74304c2ff0975" + dependencies: + babel-runtime "^6.22.0" + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^1.0.1" + +babylon@^6.11.0, babylon@^6.13.0, babylon@^6.15.0: + version "6.17.1" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.1.tgz#17f14fddf361b695981fe679385e4f1c01ebd86f" + +balanced-match@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +binary-extensions@^1.0.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" + dependencies: + balanced-match "^0.4.1" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +browser-resolve@^1.11.2: + version "1.11.2" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" + dependencies: + resolve "1.1.7" + +browserslist@^2.1.2: + version "2.1.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.1.4.tgz#cc526af4a1312b7d2e05653e56d0c8ab70c0e053" + dependencies: + caniuse-lite "^1.0.30000670" + electron-to-chromium "^1.3.11" + +bser@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" + dependencies: + node-int64 "^0.4.0" + +bser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + dependencies: + node-int64 "^0.4.0" + +buffer-shims@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + +callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +caniuse-lite@^1.0.30000670: + version "1.0.30000670" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000670.tgz#c94f7dbf0b68eaadc46d3d203f46e82e7801135e" + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + 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" + +chokidar@^1.6.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" + dependencies: + anymatch "^1.3.0" + async-each "^1.0.0" + glob-parent "^2.0.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^2.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + optionalDependencies: + fsevents "^1.0.0" + +ci-info@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" + +circular-json@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" + +cli-cursor@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" + dependencies: + restore-cursor "^1.0.1" + +cli-width@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +color-convert@^1.0.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + +commander@^2.8.1: + version "2.9.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" + dependencies: + graceful-readlink ">= 1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@^1.4.6: + version "1.6.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +content-type-parser@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" + +convert-source-map@^1.1.0, convert-source-map@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" + +core-js@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": + version "0.3.2" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" + +"cssstyle@>= 0.2.37 < 0.3.0": + version "0.2.37" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + dependencies: + cssom "0.3.x" + +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" + dependencies: + es5-ext "^0.10.9" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +debug-log@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" + +debug@^2.1.1, debug@^2.2.0, debug@^2.6.3: + version "2.6.8" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" + dependencies: + ms "2.0.0" + +decamelize@^1.0.0, decamelize@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-extend@~0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +default-require-extensions@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" + dependencies: + strip-bom "^2.0.0" + +deglob@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/deglob/-/deglob-2.1.0.tgz#4d44abe16ef32c779b4972bd141a80325029a14a" + dependencies: + find-root "^1.0.0" + glob "^7.0.5" + ignore "^3.0.9" + pkg-config "^1.1.0" + run-parallel "^1.1.2" + uniq "^1.0.1" + +del@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +diff@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" + +doctrine@^1.2.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +electron-to-chromium@^1.3.11: + version "1.3.11" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.11.tgz#744761df1d67b492b322ce9aa0aba5393260eb61" + +"errno@>=0.1.1 <0.2.0-0": + version "0.1.4" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" + dependencies: + prr "~0.0.0" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.20" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.20.tgz#72a9b4fd5832797ba1bb65dceb2e25c04241c492" + dependencies: + es6-iterator "2" + es6-symbol "~3.1" + +es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-symbol "^3.1" + +es6-map@^0.1.3: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" + +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" + +es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" + dependencies: + d "1" + es5-ext "~0.10.14" + +es6-weak-map@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" + dependencies: + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" + +escape-string-regexp@^1.0.2, 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" + +escodegen@^1.6.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-config-standard-jsx@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard-jsx/-/eslint-config-standard-jsx-3.2.0.tgz#c240e26ed919a11a42aa4de8059472b38268d620" + +eslint-config-standard@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-6.2.1.tgz#d3a68aafc7191639e7ee441e7348739026354292" + +eslint-plugin-promise@~3.4.0: + version "3.4.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.4.2.tgz#1be2793eafe2d18b5b123b8136c269f804fe7122" + +eslint-plugin-react@~6.7.1: + version "6.7.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.7.1.tgz#1af96aea545856825157d97c1b50d5a8fb64a5a7" + dependencies: + doctrine "^1.2.2" + jsx-ast-utils "^1.3.3" + +eslint-plugin-standard@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-2.0.1.tgz#3589699ff9c917f2c25f76a916687f641c369ff3" + +eslint@~3.10.2: + version "3.10.2" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.10.2.tgz#c9a10e8bf6e9d65651204778c503341f1eac3ce7" + dependencies: + babel-code-frame "^6.16.0" + chalk "^1.1.3" + concat-stream "^1.4.6" + debug "^2.1.1" + doctrine "^1.2.2" + escope "^3.6.0" + espree "^3.3.1" + estraverse "^4.2.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + glob "^7.0.3" + globals "^9.2.0" + ignore "^3.2.0" + imurmurhash "^0.1.4" + inquirer "^0.12.0" + is-my-json-valid "^2.10.0" + is-resolvable "^1.0.0" + js-yaml "^3.5.1" + json-stable-stringify "^1.0.0" + levn "^0.3.0" + lodash "^4.0.0" + mkdirp "^0.5.0" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.1" + pluralize "^1.2.1" + progress "^1.1.8" + require-uncached "^1.0.2" + shelljs "^0.7.5" + strip-bom "^3.0.0" + strip-json-comments "~1.0.1" + table "^3.7.8" + text-table "~0.2.0" + user-home "^2.0.0" + +espree@^3.3.1: + version "3.4.3" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.3.tgz#2910b5ccd49ce893c2ffffaab4fd8b3a31b82374" + dependencies: + acorn "^5.0.1" + acorn-jsx "^3.0.0" + +esprima@^2.7.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + +esrecurse@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" + dependencies: + estraverse "~4.1.0" + object-assign "^4.0.1" + +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + +estraverse@^4.1.1, estraverse@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + +estraverse@~4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + dependencies: + d "1" + es5-ext "~0.10.14" + +exec-sh@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10" + dependencies: + merge "^1.1.3" + +exit-hook@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +extend@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + +fb-watchman@^1.8.0: + version "1.9.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.2.tgz#a24cf47827f82d38fb59a69ad70b76e3b6ae7383" + dependencies: + bser "1.0.2" + +fb-watchman@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + dependencies: + bser "^2.0.0" + +figures@^1.3.5: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fileset@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + dependencies: + glob "^7.0.3" + minimatch "^3.0.3" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +find-root@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.0.0.tgz#962ff211aab25c6520feeeb8d6287f8f6e95807a" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + dependencies: + locate-path "^2.0.0" + +flat-cache@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" + dependencies: + circular-json "^0.3.1" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +fs-readdir-recursive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz#8cd1745c8b4f8a29c8caec392476921ba195f560" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fsevents@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.1.tgz#f19fd28f43eeaf761680e519a203c4d0b3d31aff" + dependencies: + nan "^2.3.0" + node-pre-gyp "^0.6.29" + +fstream-ignore@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +gauge@~2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wide-align "^1.1.0" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +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-stdin@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^9.0.0, globals@^9.2.0: + version "9.17.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.17.0.tgz#0c0ca696d9b9bb694d2e5470bd37777caad50286" + +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +growly@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + +handlebars@^4.0.3: + 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" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +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" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.1" + +hosted-git-info@^2.1.4: + version "2.4.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.2.tgz#0076b9f46a270506ddbaaea56496897460612a67" + +html-encoding-sniffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da" + dependencies: + whatwg-encoding "^1.0.1" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +iconv-lite@0.4.13: + version "0.4.13" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" + +icss-replace-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" + +ignore@^3.0.9, ignore@^3.2.0: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +inquirer@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" + dependencies: + ansi-escapes "^1.1.0" + ansi-regex "^2.0.0" + chalk "^1.0.0" + cli-cursor "^1.0.1" + cli-width "^2.0.0" + figures "^1.3.5" + lodash "^4.3.0" + readline2 "^1.0.1" + run-async "^0.1.0" + rx-lite "^3.1.2" + string-width "^1.0.1" + strip-ansi "^3.0.0" + through "^2.3.6" + +interpret@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" + +invariant@^2.2.0, invariant@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + 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" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +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" + dependencies: + binary-extensions "^1.0.0" + +is-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-ci@^1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" + dependencies: + ci-info "^1.0.0" + +is-dotfile@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + 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" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-my-json-valid@^2.10.0: + version "2.16.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-number@^2.0.2, is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + dependencies: + path-is-inside "^1.0.1" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-resolvable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" + dependencies: + tryit "^1.0.1" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +istanbul-api@^1.1.1: + version "1.1.8" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.8.tgz#a844e55c6f9aeee292e7f42942196f60b23dc93e" + dependencies: + async "^2.1.4" + fileset "^2.0.2" + istanbul-lib-coverage "^1.1.0" + istanbul-lib-hook "^1.0.6" + istanbul-lib-instrument "^1.7.1" + istanbul-lib-report "^1.1.0" + istanbul-lib-source-maps "^1.2.0" + istanbul-reports "^1.1.0" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" + +istanbul-lib-coverage@^1.0.1, istanbul-lib-coverage@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.0.tgz#caca19decaef3525b5d6331d701f3f3b7ad48528" + +istanbul-lib-hook@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.0.6.tgz#c0866d1e81cf2d5319249510131fc16dee49231f" + dependencies: + append-transform "^0.4.0" + +istanbul-lib-instrument@^1.4.2, istanbul-lib-instrument@^1.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.1.tgz#169e31bc62c778851a99439dd99c3cc12184d360" + dependencies: + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.13.0" + istanbul-lib-coverage "^1.1.0" + semver "^5.3.0" + +istanbul-lib-report@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.0.tgz#444c4ecca9afa93cf584f56b10f195bf768c0770" + dependencies: + istanbul-lib-coverage "^1.1.0" + mkdirp "^0.5.1" + path-parse "^1.0.5" + supports-color "^3.1.2" + +istanbul-lib-source-maps@^1.1.0, istanbul-lib-source-maps@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.0.tgz#8c7706d497e26feeb6af3e0c28fd5b0669598d0e" + dependencies: + debug "^2.6.3" + istanbul-lib-coverage "^1.1.0" + mkdirp "^0.5.1" + rimraf "^2.6.1" + source-map "^0.5.3" + +istanbul-reports@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.0.tgz#1ef3b795889219cfb5fad16365f6ce108d5f8c66" + dependencies: + handlebars "^4.0.3" + +jest-changed-files@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-20.0.3.tgz#9394d5cc65c438406149bef1bf4d52b68e03e3f8" + +jest-cli@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-20.0.3.tgz#fe88ddbb7a9f3a16d0ed55339a0a2424f7f0d361" + dependencies: + ansi-escapes "^1.4.0" + callsites "^2.0.0" + chalk "^1.1.3" + graceful-fs "^4.1.11" + is-ci "^1.0.10" + istanbul-api "^1.1.1" + istanbul-lib-coverage "^1.0.1" + istanbul-lib-instrument "^1.4.2" + istanbul-lib-source-maps "^1.1.0" + jest-changed-files "^20.0.3" + jest-config "^20.0.3" + jest-docblock "^20.0.3" + jest-environment-jsdom "^20.0.3" + jest-haste-map "^20.0.3" + jest-jasmine2 "^20.0.3" + jest-message-util "^20.0.3" + jest-regex-util "^20.0.3" + jest-resolve-dependencies "^20.0.3" + jest-runtime "^20.0.3" + jest-snapshot "^20.0.3" + jest-util "^20.0.3" + micromatch "^2.3.11" + node-notifier "^5.0.2" + pify "^2.3.0" + slash "^1.0.0" + string-length "^1.0.1" + throat "^3.0.0" + which "^1.2.12" + worker-farm "^1.3.1" + yargs "^7.0.2" + +jest-config@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-20.0.3.tgz#a934f27eea764915801cdda26f6f8eec2ac79266" + dependencies: + chalk "^1.1.3" + glob "^7.1.1" + jest-environment-jsdom "^20.0.3" + jest-environment-node "^20.0.3" + jest-jasmine2 "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-regex-util "^20.0.3" + jest-resolve "^20.0.3" + jest-validate "^20.0.3" + pretty-format "^20.0.3" + +jest-diff@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-20.0.3.tgz#81f288fd9e675f0fb23c75f1c2b19445fe586617" + dependencies: + chalk "^1.1.3" + diff "^3.2.0" + jest-matcher-utils "^20.0.3" + pretty-format "^20.0.3" + +jest-docblock@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-20.0.3.tgz#17bea984342cc33d83c50fbe1545ea0efaa44712" + +jest-environment-jsdom@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-20.0.3.tgz#048a8ac12ee225f7190417713834bb999787de99" + dependencies: + jest-mock "^20.0.3" + jest-util "^20.0.3" + jsdom "^9.12.0" + +jest-environment-node@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-20.0.3.tgz#d488bc4612af2c246e986e8ae7671a099163d403" + dependencies: + jest-mock "^20.0.3" + jest-util "^20.0.3" + +jest-haste-map@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.0.3.tgz#6377d537eaf34eb5f75121a691cae3fde82ba971" + dependencies: + fb-watchman "^2.0.0" + graceful-fs "^4.1.11" + jest-docblock "^20.0.3" + micromatch "^2.3.11" + sane "~1.6.0" + worker-farm "^1.3.1" + +jest-jasmine2@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-20.0.3.tgz#18c4e9d029da7ed1ae727c55300064d1a0542974" + dependencies: + chalk "^1.1.3" + graceful-fs "^4.1.11" + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-matchers "^20.0.3" + jest-message-util "^20.0.3" + jest-snapshot "^20.0.3" + once "^1.4.0" + p-map "^1.1.1" + +jest-matcher-utils@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz#b3a6b8e37ca577803b0832a98b164f44b7815612" + dependencies: + chalk "^1.1.3" + pretty-format "^20.0.3" + +jest-matchers@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-20.0.3.tgz#ca69db1c32db5a6f707fa5e0401abb55700dfd60" + dependencies: + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-message-util "^20.0.3" + jest-regex-util "^20.0.3" + +jest-message-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-20.0.3.tgz#6aec2844306fcb0e6e74d5796c1006d96fdd831c" + dependencies: + chalk "^1.1.3" + micromatch "^2.3.11" + slash "^1.0.0" + +jest-mock@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-20.0.3.tgz#8bc070e90414aa155c11a8d64c869a0d5c71da59" + +jest-regex-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-20.0.3.tgz#85bbab5d133e44625b19faf8c6aa5122d085d762" + +jest-resolve-dependencies@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-20.0.3.tgz#6e14a7b717af0f2cb3667c549de40af017b1723a" + dependencies: + jest-regex-util "^20.0.3" + +jest-resolve@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-20.0.3.tgz#375307aa40f78532d40ff8b17d5300b1519f8dd4" + dependencies: + browser-resolve "^1.11.2" + is-builtin-module "^1.0.0" + resolve "^1.3.2" + +jest-runtime@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-20.0.3.tgz#dddd22bbc429e26e6a96d1acd46ca55714b09252" + dependencies: + babel-core "^6.0.0" + babel-jest "^20.0.3" + babel-plugin-istanbul "^4.0.0" + chalk "^1.1.3" + convert-source-map "^1.4.0" + graceful-fs "^4.1.11" + jest-config "^20.0.3" + jest-haste-map "^20.0.3" + jest-regex-util "^20.0.3" + jest-resolve "^20.0.3" + jest-util "^20.0.3" + json-stable-stringify "^1.0.1" + micromatch "^2.3.11" + strip-bom "3.0.0" + yargs "^7.0.2" + +jest-snapshot@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-20.0.3.tgz#5b847e1adb1a4d90852a7f9f125086e187c76566" + dependencies: + chalk "^1.1.3" + jest-diff "^20.0.3" + jest-matcher-utils "^20.0.3" + jest-util "^20.0.3" + natural-compare "^1.4.0" + pretty-format "^20.0.3" + +jest-util@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-20.0.3.tgz#0c07f7d80d82f4e5a67c6f8b9c3fe7f65cfd32ad" + dependencies: + chalk "^1.1.3" + graceful-fs "^4.1.11" + jest-message-util "^20.0.3" + jest-mock "^20.0.3" + jest-validate "^20.0.3" + leven "^2.1.0" + mkdirp "^0.5.1" + +jest-validate@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-20.0.3.tgz#d0cfd1de4f579f298484925c280f8f1d94ec3cab" + dependencies: + chalk "^1.1.3" + jest-matcher-utils "^20.0.3" + leven "^2.1.0" + pretty-format "^20.0.3" + +jest@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jest/-/jest-20.0.3.tgz#e4fd054c4f1170a116a00761da4cfdb73f1cdc33" + dependencies: + jest-cli "^20.0.3" + +jodid25519@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" + dependencies: + jsbn "~0.1.0" + +js-tokens@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" + +js-yaml@^3.5.1, js-yaml@^3.7.0: + version "3.8.4" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" + dependencies: + argparse "^1.0.7" + esprima "^3.1.1" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jsdom@^9.12.0: + version "9.12.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" + dependencies: + abab "^1.0.3" + acorn "^4.0.4" + acorn-globals "^3.1.0" + array-equal "^1.0.0" + content-type-parser "^1.0.1" + cssom ">= 0.3.2 < 0.4.0" + cssstyle ">= 0.2.37 < 0.3.0" + escodegen "^1.6.1" + html-encoding-sniffer "^1.0.1" + nwmatcher ">= 1.3.9 < 2.0.0" + parse5 "^1.5.1" + request "^2.79.0" + sax "^1.2.1" + symbol-tree "^3.2.1" + tough-cookie "^2.3.2" + webidl-conversions "^4.0.0" + whatwg-encoding "^1.0.1" + whatwg-url "^4.3.0" + xml-name-validator "^2.0.1" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +json5@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsonpointer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + +jsprim@^1.2.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" + dependencies: + assert-plus "1.0.0" + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + +jsx-ast-utils@^1.3.3: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +leven@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash@^4.0.0, lodash@^4.14.0, lodash@^4.2.0, lodash@^4.3.0: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +makeerror@1.0.x: + version "1.0.11" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + dependencies: + tmpl "1.0.x" + +merge@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + +micromatch@^2.1.5, micromatch@^2.3.11: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +mime-db@~1.27.0: + version "1.27.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" + +mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.15" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" + dependencies: + mime-db "~1.27.0" + +minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.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: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +mute-stream@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" + +nan@^2.3.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + +node-notifier@^5.0.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.1.2.tgz#2fa9e12605fa10009d44549d6fcd8a63dde0e4ff" + dependencies: + growly "^1.3.0" + semver "^5.3.0" + shellwords "^0.1.0" + which "^1.2.12" + +node-pre-gyp@^0.6.29: + version "0.6.34" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.34.tgz#94ad1c798a11d7fc67381b50d47f8cc18d9799f7" + dependencies: + mkdirp "^0.5.1" + nopt "^4.0.1" + npmlog "^4.0.2" + rc "^1.1.7" + request "^2.81.0" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^2.2.1" + tar-pack "^3.4.0" + +nopt@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + dependencies: + abbrev "1" + osenv "^0.1.4" + +normalize-package-data@^2.3.2: + version "2.3.8" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.8.tgz#d819eda2a9dedbd1ffa563ea4071d936782295bb" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +npmlog@^4.0.2: + version "4.1.0" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.0.tgz#dc59bee85f64f00ed424efb2af0783df25d1c0b5" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.3" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +"nwmatcher@>= 1.3.9 < 2.0.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.0.tgz#b4389362170e7ef9798c3c7716d80ebc0106fccf" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +once@^1.3.0, once@^1.3.3, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +onetime@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +optionator@^0.8.1, optionator@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +osenv@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.4.tgz#42fe6d5953df06c8064be6f176c3d05aaaa34644" + dependencies: + os-homedir "^1.0.0" + os-tmpdir "^1.0.0" + +output-file-sync@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" + dependencies: + graceful-fs "^4.1.4" + mkdirp "^0.5.1" + object-assign "^4.1.0" + +p-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + dependencies: + p-limit "^1.1.0" + +p-map@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.1.1.tgz#05f5e4ae97a068371bc2a5cc86bfbdbc19c4ae7a" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + +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" + +path-is-inside@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + +pify@^2.0.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +pkg-config@^1.0.1, pkg-config@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pkg-config/-/pkg-config-1.1.1.tgz#557ef22d73da3c8837107766c52eadabde298fe4" + dependencies: + debug-log "^1.0.0" + find-root "^1.0.0" + xtend "^4.0.1" + +pluralize@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" + +postcss@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.1.tgz#000dbd1f8eef217aa368b9a212c5fc40b2a8f3f2" + dependencies: + chalk "^1.1.3" + source-map "^0.5.6" + supports-color "^3.2.3" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-format@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-20.0.3.tgz#020e350a560a1fe1a98dc3beb6ccffb386de8b14" + dependencies: + ansi-regex "^2.1.1" + ansi-styles "^3.0.0" + +private@^0.1.6: + version "0.1.7" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +progress@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + +prr@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" + +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qs@~6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +randomatic@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" + dependencies: + is-number "^2.0.2" + kind-of "^3.0.2" + +rc@^1.1.7: + version "1.2.1" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.2.2: + version "2.2.9" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8" + dependencies: + buffer-shims "~1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~1.0.0" + util-deprecate "~1.0.1" + +readdirp@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + dependencies: + graceful-fs "^4.1.2" + minimatch "^3.0.2" + readable-stream "^2.0.2" + set-immediate-shim "^1.0.1" + +readline2@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + mute-stream "0.0.5" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + dependencies: + resolve "^1.1.6" + +regenerate@^1.2.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" + +regenerator-runtime@^0.10.0: + version "0.10.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" + +regenerator-transform@0.9.11: + version "0.9.11" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.11.tgz#3a7d067520cb7b7176769eb5ff868691befe1283" + dependencies: + babel-runtime "^6.18.0" + babel-types "^6.19.0" + private "^0.1.6" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +regexpu-core@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +regjsgen@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" + +regjsparser@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + dependencies: + jsesc "~0.5.0" + +remove-trailing-separator@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +request@^2.79.0, request@^2.81.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +require-uncached@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + +resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + +resolve@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + +resolve@^1.1.6, resolve@^1.3.2: + version "1.3.3" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" + dependencies: + path-parse "^1.0.5" + +restore-cursor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" + dependencies: + exit-hook "^1.0.0" + onetime "^1.0.0" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" + dependencies: + glob "^7.0.5" + +run-async@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" + dependencies: + once "^1.3.0" + +run-parallel@^1.1.2: + version "1.1.6" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.6.tgz#29003c9a2163e01e2d2dfc90575f2c6c1d61a039" + +rx-lite@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" + +safe-buffer@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" + +sane@~1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/sane/-/sane-1.6.0.tgz#9610c452307a135d29c1fdfe2547034180c46775" + dependencies: + anymatch "^1.3.0" + exec-sh "^0.2.0" + fb-watchman "^1.8.0" + minimatch "^3.0.2" + minimist "^1.1.1" + walker "~1.0.5" + watch "~0.10.0" + +sax@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +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" + +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +shelljs@^0.7.5: + version "0.7.7" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +shellwords@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +slash@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + +slice-ansi@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +source-map-support@^0.4.2: + version "0.4.15" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1" + dependencies: + source-map "^0.5.6" + +source-map@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + dependencies: + amdefine ">=0.0.4" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.0.tgz#ff2a3e4fd04497555fed97b39a0fd82fafb3a33c" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jodid25519 "^1.0.0" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +standard-engine@~5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/standard-engine/-/standard-engine-5.2.0.tgz#400660ae5acce8afd4db60ff2214a9190ad790a3" + dependencies: + deglob "^2.0.0" + find-root "^1.0.0" + get-stdin "^5.0.1" + home-or-tmp "^2.0.0" + minimist "^1.1.0" + pkg-config "^1.0.1" + +standard@^8.4.0: + version "8.6.0" + resolved "https://registry.yarnpkg.com/standard/-/standard-8.6.0.tgz#635132be7bfb567c2921005f30f9e350e4752aad" + dependencies: + eslint "~3.10.2" + eslint-config-standard "6.2.1" + eslint-config-standard-jsx "3.2.0" + eslint-plugin-promise "~3.4.0" + eslint-plugin-react "~6.7.1" + eslint-plugin-standard "~2.0.1" + standard-engine "~5.2.0" + +string-length@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" + dependencies: + strip-ansi "^3.0.0" + +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" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^3.0.0" + +string_decoder@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.1.tgz#62e200f039955a6810d8df0a33ffc0f013662d98" + dependencies: + safe-buffer "^5.0.1" + +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-bom@3.0.0, strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-json-comments@~1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" + +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" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.1.2, supports-color@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + +symbol-tree@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" + +table@^3.7.8: + version "3.8.3" + resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" + dependencies: + ajv "^4.7.0" + ajv-keywords "^1.0.0" + chalk "^1.1.1" + lodash "^4.0.0" + slice-ansi "0.0.4" + string-width "^2.0.0" + +tar-pack@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" + dependencies: + debug "^2.2.0" + fstream "^1.0.10" + fstream-ignore "^1.0.5" + once "^1.3.3" + readable-stream "^2.1.4" + rimraf "^2.5.1" + tar "^2.2.1" + uid-number "^0.0.6" + +tar@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + +test-exclude@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.0.tgz#04ca70b7390dd38c98d4a003a173806ca7991c91" + dependencies: + arrify "^1.0.1" + micromatch "^2.3.11" + object-assign "^4.1.0" + read-pkg-up "^1.0.1" + require-main-filename "^1.0.1" + +text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +throat@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-3.0.0.tgz#e7c64c867cbb3845f10877642f7b60055b8ec0d6" + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +tmpl@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + +to-fast-properties@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +tough-cookie@^2.3.2, tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +tryit@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +uglify-js@^2.6: + version "2.8.27" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.27.tgz#47787f912b0f242e5b984343be8e35e95f694c9c" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +uid-number@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + +user-home@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" + +user-home@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" + dependencies: + os-homedir "^1.0.0" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +uuid@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" + +v8flags@^2.0.10: + version "2.1.1" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" + dependencies: + user-home "^1.1.1" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + +walker@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + dependencies: + makeerror "1.0.x" + +watch@~0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + +webidl-conversions@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.1.tgz#8015a17ab83e7e1b311638486ace81da6ce206a0" + +whatwg-encoding@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz#3c6c451a198ee7aec55b1ec61d0920c67801a5f4" + dependencies: + iconv-lite "0.4.13" + +whatwg-url@^4.3.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.8.0.tgz#d2981aa9148c1e00a41c5a6131166ab4683bbcc0" + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which@^1.2.12: + version "1.2.14" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" + dependencies: + isexe "^2.0.0" + +wide-align@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + dependencies: + string-width "^1.0.2" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + +worker-farm@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.3.1.tgz#4333112bb49b17aa050b87895ca6b2cacf40e5ff" + dependencies: + errno ">=0.1.1 <0.2.0-0" + xtend ">=4.0.0 <4.1.0-0" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + +xml-name-validator@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" + +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yargs-parser@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" + dependencies: + camelcase "^3.0.0" + +yargs@^7.0.2: + version "7.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^5.0.0" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" From 179871d42a3e8700b2bbce1ea16db152a2e9f4ff Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Mon, 22 May 2017 21:03:49 +0300 Subject: [PATCH 27/64] Add curlies --- test/test.js | 114 +++++++++++++++++++++++++-------------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/test/test.js b/test/test.js index b149ab4..3badfee 100644 --- a/test/test.js +++ b/test/test.js @@ -5,65 +5,65 @@ const run = (input) => postcss([plugin]).process(input) const runCSS = (input) => run(input).then((result) => result.css) const join = (...args) => args.join('\n') -test('should pass through an empty string', () => - expect(runCSS('')).resolves.toEqual('') -) +test('should pass through an empty string', () => { + return expect(runCSS('')).resolves.toEqual('') +}) -test('should export a constant', () => - expect(runCSS('@value red blue;@value red blue;')).resolves.toEqual(':export {\n red: blue\n}') -) +test('should export a constant', () => { + return expect(runCSS('@value red blue;@value red blue;')).resolves.toEqual(':export {\n red: blue\n}') +}) -test('gives an error when there is no semicolon between lines', () => - run('@value red blue\n@value green yellow').then((result) => { +test('gives an error when there is no semicolon between lines', () => { + return run('@value red blue\n@value green yellow').then((result) => { const warnings = result.warnings() expect(warnings.length).toEqual(1) expect(warnings[0].text).toEqual('Invalid value definition: red blue\n@value green yellow') }) -) +}) -test('should export a more complex constant', () => - expect(runCSS('@value small (max-width: 599px);')).resolves.toEqual(':export {\n small: (max-width: 599px)\n}') -) +test('should export a more complex constant', () => { + return expect(runCSS('@value small (max-width: 599px);')).resolves.toEqual(':export {\n small: (max-width: 599px)\n}') +}) -test('should replace constants within the file', () => - expect(runCSS( +test('should replace constants within the file', () => { + return expect(runCSS( '@value blue red; .foo { color: blue; }' )).resolves.toEqual( ':export {\n blue: red;\n}\n.foo { color: red; }' ) -) +}) -test('should import and re-export a simple constant', () => - expect(runCSS( +test('should import and re-export a simple constant', () => { + return expect(runCSS( '@value red from "./colors.css";' )).resolves.toEqual( ':import("./colors.css") {\n i__const_red_0: red\n}\n:export {\n red: i__const_red_0\n}' ) -) +}) -test('should import a simple constant and replace usages', () => - expect(runCSS( +test('should import a simple constant and replace usages', () => { + return expect(runCSS( '@value red from "./colors.css"; .foo { color: red; }' )).resolves.toEqual(join( ':import("./colors.css") {\n i__const_red_1: red;\n}', ':export {\n red: i__const_red_1;\n}', '.foo { color: i__const_red_1; }' )) -) +}) -test('should import and alias a constant and replace usages', () => - expect(runCSS( +test('should import and alias a constant and replace usages', () => { + return expect(runCSS( '@value blue as red from "./colors.css"; .foo { color: red; }' )).resolves.toEqual(join( ':import("./colors.css") {\n i__const_red_2: blue;\n}', ':export {\n red: i__const_red_2;\n}', '.foo { color: i__const_red_2; }' )) -) +}) -test('should import multiple from a single file', () => - expect(runCSS(join( +test('should import multiple from a single file', () => { + return expect(runCSS(join( '@value blue, red from "./colors.css";', '.foo { color: red; }', '.bar { color: blue }' @@ -73,74 +73,74 @@ test('should import multiple from a single file', () => '.foo { color: i__const_red_4; }', '.bar { color: i__const_blue_3 }' )) -) +}) -test('should import from a definition', () => - expect(runCSS( +test('should import from a definition', () => { + return expect(runCSS( '@value colors: "./colors.css"; @value red from colors;' )).resolves.toEqual(join( ':import("./colors.css") {\n i__const_red_5: red\n}', ':export {\n colors: "./colors.css";\n red: i__const_red_5\n}' )) -) +}) -test('should only allow values for paths if defined in the right order', () => - expect(runCSS( +test('should only allow values for paths if defined in the right order', () => { + return expect(runCSS( '@value red from colors; @value colors: "./colors.css";' )).resolves.toEqual(join( ':import(colors) {\n i__const_red_6: red\n}', ':export {\n red: i__const_red_6;\n colors: "./colors.css"\n}' )) -) +}) -test('should allow transitive values', () => - expect(runCSS( +test('should allow transitive values', () => { + return expect(runCSS( '@value aaa: red;\n@value bbb: aaa;\n.a { color: bbb; }' )).resolves.toEqual( ':export {\n aaa: red;\n bbb: red;\n}\n.a { color: red; }' ) -) +}) -test('should allow transitive values within calc', () => - expect(runCSS( +test('should allow transitive values within calc', () => { + return expect(runCSS( '@value base: 10px;\n@value large: calc(base * 2);\n.a { margin: large; }' )).resolves.toEqual( ':export {\n base: 10px;\n large: calc(10px * 2);\n}\n.a { margin: calc(10px * 2); }' ) -) +}) -test('should preserve import order', () => - expect(runCSS( +test('should preserve import order', () => { + return expect(runCSS( '@value a from "./a.css"; @value b from "./b.css";' )).resolves.toEqual(join( ':import("./a.css") {\n i__const_a_7: a\n}', ':import("./b.css") {\n i__const_b_8: b\n}', ':export {\n a: i__const_a_7;\n b: i__const_b_8\n}' )) -) +}) -test('should allow custom-property-style names', () => - expect(runCSS( +test('should allow custom-property-style names', () => { + return expect(runCSS( '@value --red from "./colors.css"; .foo { color: --red; }' )).resolves.toEqual(join( ':import("./colors.css") {\n i__const___red_9: --red;\n}', ':export {\n --red: i__const___red_9;\n}', '.foo { color: i__const___red_9; }' )) -) +}) -test('should allow all colour types', () => - expect(runCSS(join( +test('should allow all colour types', () => { + return expect(runCSS(join( '@value named: red; @value 3char #0f0; @value 6char #00ff00; @value rgba rgba(34, 12, 64, 0.3); @value hsla hsla(220, 13.0%, 18.0%, 1);', '.foo { color: named; background-color: 3char; border-top-color: 6char; border-bottom-color: rgba; outline-color: hsla; }' ))).resolves.toEqual(join( ':export {\n named: red;\n 3char: #0f0;\n 6char: #00ff00;\n rgba: rgba(34, 12, 64, 0.3);\n hsla: hsla(220, 13.0%, 18.0%, 1);\n}', '.foo { color: red; background-color: #0f0; border-top-color: #00ff00; border-bottom-color: rgba(34, 12, 64, 0.3); outline-color: hsla(220, 13.0%, 18.0%, 1); }' )) -) +}) -test('should import multiple from a single file on multiple lines', () => - expect(runCSS(join( +test('should import multiple from a single file on multiple lines', () => { + return expect(runCSS(join( '@value (\n blue,\n red\n) from "./colors.css";', '.foo { color: red; }', '.bar { color: blue }' @@ -150,22 +150,22 @@ test('should import multiple from a single file on multiple lines', () => '.foo { color: i__const_red_11; }', '.bar { color: i__const_blue_10 }' )) -) +}) -test('should allow definitions with commas in them', () => - expect(runCSS(join( +test('should allow definitions with commas in them', () => { + return expect(runCSS(join( '@value coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14) ;', '.foo { box-shadow: coolShadow; }' ))).resolves.toEqual(join( ':export {\n coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14);\n}', '.foo { box-shadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14); }' )) -) +}) -test('should allow values with nested parantheses', () => - expect(runCSS( +test('should allow values with nested parantheses', () => { + return expect(runCSS( '@value aaa: color(red lightness(50%));' )).resolves.toEqual( ':export {\n aaa: color(red lightness(50%))\n}' ) -) +}) From cd1874f5d13373d3b0c81958bbbd5729647be78a Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Tue, 23 May 2017 00:24:52 +0300 Subject: [PATCH 28/64] Add prettier --- package.json | 16 +- src/index.js | 61 ++-- test/test.js | 389 ++++++++++++++++------- yarn.lock | 855 ++++++++++++++++++++------------------------------- 4 files changed, 663 insertions(+), 658 deletions(-) diff --git a/package.json b/package.json index 0c18b3f..ac4ef21 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,15 @@ ], "scripts": { "build": "babel --out-dir lib src", - "lint": "standard src test", "test": "jest --coverage", - "posttest": "yarn run lint", - "prepublish": "yarn run build" + "precommit": "lint-staged", + "prepublish": "yarn run test && yarn run build" + }, + "lint-staged": { + "*.js": [ + "prettier --single-quote --no-semi --write", + "git add" + ] }, "babel": { "presets": [ @@ -44,8 +49,11 @@ "babel-cli": "^6.5.2", "babel-jest": "^20.0.3", "babel-preset-env": "^1.5.0", + "husky": "^0.13.3", "jest": "^20.0.3", - "standard": "^8.4.0" + "lint-staged": "^3.4.2", + "prettier": "^1.3.1", + "strip-indent": "^2.0.0" }, "dependencies": { "icss-replace-symbols": "^1.1.0", diff --git a/src/index.js b/src/index.js index 20e40f7..74b5680 100644 --- a/src/index.js +++ b/src/index.js @@ -1,21 +1,27 @@ const postcss = require('postcss') -const {default: replaceSymbols, replaceAll} = require('icss-replace-symbols') +const { default: replaceSymbols, replaceAll } = require('icss-replace-symbols') const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/ const matchValueDefinition = /(?:\s+|^)([\w-]+):?\s+(.+?)\s*$/g const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/ let options = {} let importIndex = 0 -let createImportedName = options && options.createImportedName || ((importName/*, path*/) => `i__const_${importName.replace(/\W/g, '_')}_${importIndex++}`) +let createImportedName = + (options && options.createImportedName) || + ((importName /*, path*/) => + `i__const_${importName.replace(/\W/g, '_')}_${importIndex++}`) -module.exports = postcss.plugin('postcss-modules-values', () => (css, result) => { +module.exports = postcss.plugin('postcss-modules-values', () => ( + css, + result +) => { let importAliases = [] let definitions = {} const addDefinition = atRule => { let matches - while (matches = matchValueDefinition.exec(atRule.params)) { - let [/*match*/, key, value] = matches + while ((matches = matchValueDefinition.exec(atRule.params))) { + let [, key, value] = matches // Add to the definitions, knowing that values can refer to each other definitions[key] = replaceAll(definitions, value) atRule.remove() @@ -25,20 +31,23 @@ module.exports = postcss.plugin('postcss-modules-values', () => (css, result) => const addImport = atRule => { let matches = matchImports.exec(atRule.params) if (matches) { - let [/*match*/, aliases, path] = matches + let [, aliases, path] = matches // We can use constants for path names if (definitions[path]) path = definitions[path] - let imports = aliases.replace(/^\(\s*([\s\S]+)\s*\)$/, '$1').split(/\s*,\s*/).map(alias => { - let tokens = matchImport.exec(alias) - if (tokens) { - let [/*match*/, theirName, myName = theirName] = tokens - let importedName = createImportedName(myName) - definitions[myName] = importedName - return { theirName, importedName } - } else { - throw new Error(`@import statement "${alias}" is invalid!`) - } - }) + let imports = aliases + .replace(/^\(\s*([\s\S]+)\s*\)$/, '$1') + .split(/\s*,\s*/) + .map(alias => { + let tokens = matchImport.exec(alias) + if (tokens) { + let [, /*match*/ theirName, myName = theirName] = tokens + let importedName = createImportedName(myName) + definitions[myName] = importedName + return { theirName, importedName } + } else { + throw new Error(`@import statement "${alias}" is invalid!`) + } + }) importAliases.push({ path, imports }) atRule.remove() } @@ -59,11 +68,13 @@ module.exports = postcss.plugin('postcss-modules-values', () => (css, result) => /* We want to export anything defined by now, but don't add it to the CSS yet or it well get picked up by the replacement stuff */ - let exportDeclarations = Object.keys(definitions).map(key => postcss.decl({ - value: definitions[key], - prop: key, - raws: { before: "\n " } - })) + let exportDeclarations = Object.keys(definitions).map(key => + postcss.decl({ + value: definitions[key], + prop: key, + raws: { before: '\n ' } + }) + ) /* If we have no definitions, don't continue */ if (!Object.keys(definitions).length) return @@ -75,7 +86,7 @@ module.exports = postcss.plugin('postcss-modules-values', () => (css, result) => if (exportDeclarations.length > 0) { let exportRule = postcss.rule({ selector: `:export`, - raws: { after: "\n" } + raws: { after: '\n' } }) exportRule.append(exportDeclarations) css.prepend(exportRule) @@ -85,13 +96,13 @@ module.exports = postcss.plugin('postcss-modules-values', () => (css, result) => importAliases.reverse().forEach(({ path, imports }) => { let importRule = postcss.rule({ selector: `:import(${path})`, - raws: { after: "\n" } + raws: { after: '\n' } }) imports.forEach(({ theirName, importedName }) => { importRule.append({ value: theirName, prop: importedName, - raws: { before: "\n " } + raws: { before: '\n ' } }) }) diff --git a/test/test.js b/test/test.js index 3badfee..4bb7507 100644 --- a/test/test.js +++ b/test/test.js @@ -1,171 +1,350 @@ const postcss = require('postcss') +const stripIndent = require('strip-indent') const plugin = require('../src') -const run = (input) => postcss([plugin]).process(input) -const runCSS = (input) => run(input).then((result) => result.css) -const join = (...args) => args.join('\n') +const strip = input => stripIndent(input).replace(/^\n/, '') +const run = input => postcss([plugin]).process(strip(input)) +const runCSS = input => run(input).then(result => result.css) +const runWarnings = input => + run(input) + .then(result => result.warnings()) + .then(warnings => warnings.map(warning => warning.text)) test('should pass through an empty string', () => { return expect(runCSS('')).resolves.toEqual('') }) test('should export a constant', () => { - return expect(runCSS('@value red blue;@value red blue;')).resolves.toEqual(':export {\n red: blue\n}') + return expect( + runCSS(` + @value red blue;@value red blue; + `) + ).resolves.toEqual( + strip(` + :export { + red: blue + } + `) + ) }) test('gives an error when there is no semicolon between lines', () => { - return run('@value red blue\n@value green yellow').then((result) => { - const warnings = result.warnings() - - expect(warnings.length).toEqual(1) - expect(warnings[0].text).toEqual('Invalid value definition: red blue\n@value green yellow') - }) + return expect( + runWarnings(` + @value red blue + @value green yellow + `) + ).resolves.toEqual([ + 'Invalid value definition: red blue\n@value green yellow' + ]) }) test('should export a more complex constant', () => { - return expect(runCSS('@value small (max-width: 599px);')).resolves.toEqual(':export {\n small: (max-width: 599px)\n}') + return expect( + runCSS(` + @value small (max-width: 599px); + `) + ).resolves.toEqual( + strip(` + :export { + small: (max-width: 599px) + } + `) + ) }) test('should replace constants within the file', () => { - return expect(runCSS( - '@value blue red; .foo { color: blue; }' - )).resolves.toEqual( - ':export {\n blue: red;\n}\n.foo { color: red; }' + return expect( + runCSS(` + @value blue red; .foo { color: blue; } + `) + ).resolves.toEqual( + strip(` + :export { + blue: red; + } + .foo { color: red; } + `) ) }) test('should import and re-export a simple constant', () => { - return expect(runCSS( - '@value red from "./colors.css";' - )).resolves.toEqual( - ':import("./colors.css") {\n i__const_red_0: red\n}\n:export {\n red: i__const_red_0\n}' + return expect( + runCSS(` + @value red from "./colors.css"; + `) + ).resolves.toEqual( + strip(` + :import("./colors.css") { + i__const_red_0: red + } + :export { + red: i__const_red_0 + } + `) ) }) test('should import a simple constant and replace usages', () => { - return expect(runCSS( - '@value red from "./colors.css"; .foo { color: red; }' - )).resolves.toEqual(join( - ':import("./colors.css") {\n i__const_red_1: red;\n}', - ':export {\n red: i__const_red_1;\n}', - '.foo { color: i__const_red_1; }' - )) + return expect( + runCSS(` + @value red from "./colors.css"; + .foo { color: red; } + `) + ).resolves.toEqual( + strip(` + :import("./colors.css") { + i__const_red_1: red; + } + :export { + red: i__const_red_1; + } + .foo { color: i__const_red_1; } + `) + ) }) test('should import and alias a constant and replace usages', () => { - return expect(runCSS( - '@value blue as red from "./colors.css"; .foo { color: red; }' - )).resolves.toEqual(join( - ':import("./colors.css") {\n i__const_red_2: blue;\n}', - ':export {\n red: i__const_red_2;\n}', - '.foo { color: i__const_red_2; }' - )) + return expect( + runCSS(` + @value blue as red from "./colors.css"; + .foo { color: red; } + `) + ).resolves.toEqual( + strip(` + :import("./colors.css") { + i__const_red_2: blue; + } + :export { + red: i__const_red_2; + } + .foo { color: i__const_red_2; } + `) + ) }) test('should import multiple from a single file', () => { - return expect(runCSS(join( - '@value blue, red from "./colors.css";', - '.foo { color: red; }', - '.bar { color: blue }' - ))).resolves.toEqual(join( - ':import("./colors.css") {\n i__const_blue_3: blue;\n i__const_red_4: red;\n}', - ':export {\n blue: i__const_blue_3;\n red: i__const_red_4;\n}', - '.foo { color: i__const_red_4; }', - '.bar { color: i__const_blue_3 }' - )) + return expect( + runCSS(` + @value blue, red from "./colors.css"; + .foo { color: red; } + .bar { color: blue } + `) + ).resolves.toEqual( + strip(` + :import("./colors.css") { + i__const_blue_3: blue; + i__const_red_4: red; + } + :export { + blue: i__const_blue_3; + red: i__const_red_4; + } + .foo { color: i__const_red_4; } + .bar { color: i__const_blue_3 } + `) + ) }) test('should import from a definition', () => { - return expect(runCSS( - '@value colors: "./colors.css"; @value red from colors;' - )).resolves.toEqual(join( - ':import("./colors.css") {\n i__const_red_5: red\n}', - ':export {\n colors: "./colors.css";\n red: i__const_red_5\n}' - )) + return expect( + runCSS(` + @value colors: "./colors.css"; @value red from colors; + `) + ).resolves.toEqual( + strip(` + :import("./colors.css") { + i__const_red_5: red + } + :export { + colors: "./colors.css"; + red: i__const_red_5 + } + `) + ) }) test('should only allow values for paths if defined in the right order', () => { - return expect(runCSS( - '@value red from colors; @value colors: "./colors.css";' - )).resolves.toEqual(join( - ':import(colors) {\n i__const_red_6: red\n}', - ':export {\n red: i__const_red_6;\n colors: "./colors.css"\n}' - )) + return expect( + runCSS(` + @value red from colors; @value colors: "./colors.css"; + `) + ).resolves.toEqual( + strip(` + :import(colors) { + i__const_red_6: red + } + :export { + red: i__const_red_6; + colors: "./colors.css" + } + `) + ) }) test('should allow transitive values', () => { - return expect(runCSS( - '@value aaa: red;\n@value bbb: aaa;\n.a { color: bbb; }' - )).resolves.toEqual( - ':export {\n aaa: red;\n bbb: red;\n}\n.a { color: red; }' + return expect( + runCSS(` + @value aaa: red; + @value bbb: aaa; + .a { color: bbb; } + `) + ).resolves.toEqual( + strip(` + :export { + aaa: red; + bbb: red; + } + .a { color: red; } + `) ) }) test('should allow transitive values within calc', () => { - return expect(runCSS( - '@value base: 10px;\n@value large: calc(base * 2);\n.a { margin: large; }' - )).resolves.toEqual( - ':export {\n base: 10px;\n large: calc(10px * 2);\n}\n.a { margin: calc(10px * 2); }' + return expect( + runCSS(` + @value base: 10px; + @value large: calc(base * 2); + .a { margin: large; } + `) + ).resolves.toEqual( + strip(` + :export { + base: 10px; + large: calc(10px * 2); + } + .a { margin: calc(10px * 2); } + `) ) }) test('should preserve import order', () => { - return expect(runCSS( - '@value a from "./a.css"; @value b from "./b.css";' - )).resolves.toEqual(join( - ':import("./a.css") {\n i__const_a_7: a\n}', - ':import("./b.css") {\n i__const_b_8: b\n}', - ':export {\n a: i__const_a_7;\n b: i__const_b_8\n}' - )) + return expect( + runCSS(` + @value a from "./a.css"; @value b from "./b.css"; + `) + ).resolves.toEqual( + strip(` + :import("./a.css") { + i__const_a_7: a + } + :import("./b.css") { + i__const_b_8: b + } + :export { + a: i__const_a_7; + b: i__const_b_8 + } + `) + ) }) test('should allow custom-property-style names', () => { - return expect(runCSS( - '@value --red from "./colors.css"; .foo { color: --red; }' - )).resolves.toEqual(join( - ':import("./colors.css") {\n i__const___red_9: --red;\n}', - ':export {\n --red: i__const___red_9;\n}', - '.foo { color: i__const___red_9; }' - )) + return expect( + runCSS(` + @value --red from "./colors.css"; .foo { color: --red; } + `) + ).resolves.toEqual( + strip(` + :import("./colors.css") { + i__const___red_9: --red; + } + :export { + --red: i__const___red_9; + } + .foo { color: i__const___red_9; } + `) + ) }) test('should allow all colour types', () => { - return expect(runCSS(join( - '@value named: red; @value 3char #0f0; @value 6char #00ff00; @value rgba rgba(34, 12, 64, 0.3); @value hsla hsla(220, 13.0%, 18.0%, 1);', - '.foo { color: named; background-color: 3char; border-top-color: 6char; border-bottom-color: rgba; outline-color: hsla; }' - ))).resolves.toEqual(join( - ':export {\n named: red;\n 3char: #0f0;\n 6char: #00ff00;\n rgba: rgba(34, 12, 64, 0.3);\n hsla: hsla(220, 13.0%, 18.0%, 1);\n}', - '.foo { color: red; background-color: #0f0; border-top-color: #00ff00; border-bottom-color: rgba(34, 12, 64, 0.3); outline-color: hsla(220, 13.0%, 18.0%, 1); }' - )) + return expect( + runCSS(` + @value named: red; + @value 3char #0f0; + @value 6char #00ff00; + @value rgba rgba(34, 12, 64, 0.3); + @value hsla hsla(220, 13.0%, 18.0%, 1); + .foo { + color: named; + background-color: 3char; + border-top-color: 6char; + border-bottom-color: rgba; + outline-color: hsla; + } + `) + ).resolves.toEqual( + strip(` + :export { + named: red; + 3char: #0f0; + 6char: #00ff00; + rgba: rgba(34, 12, 64, 0.3); + hsla: hsla(220, 13.0%, 18.0%, 1); + } + .foo { + color: red; + background-color: #0f0; + border-top-color: #00ff00; + border-bottom-color: rgba(34, 12, 64, 0.3); + outline-color: hsla(220, 13.0%, 18.0%, 1); + } + `) + ) }) test('should import multiple from a single file on multiple lines', () => { - return expect(runCSS(join( - '@value (\n blue,\n red\n) from "./colors.css";', - '.foo { color: red; }', - '.bar { color: blue }' - ))).resolves.toEqual(join( - ':import("./colors.css") {\n i__const_blue_10: blue;\n i__const_red_11: red;\n}', - ':export {\n blue: i__const_blue_10;\n red: i__const_red_11;\n}', - '.foo { color: i__const_red_11; }', - '.bar { color: i__const_blue_10 }' - )) + return expect( + runCSS(` + @value ( + blue, + red + ) from "./colors.css"; + .foo { color: red; } + .bar { color: blue } + `) + ).resolves.toEqual( + strip(` + :import("./colors.css") { + i__const_blue_10: blue; + i__const_red_11: red; + } + :export { + blue: i__const_blue_10; + red: i__const_red_11; + } + .foo { color: i__const_red_11; } + .bar { color: i__const_blue_10 } + `) + ) }) test('should allow definitions with commas in them', () => { - return expect(runCSS(join( - '@value coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14) ;', - '.foo { box-shadow: coolShadow; }' - ))).resolves.toEqual(join( - ':export {\n coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14);\n}', - '.foo { box-shadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14); }' - )) + return expect( + runCSS(` + @value coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14) ; + .foo { box-shadow: coolShadow; } + `) + ).resolves.toEqual( + strip(` + :export { + coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14); + } + .foo { box-shadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14); } + `) + ) }) test('should allow values with nested parantheses', () => { - return expect(runCSS( - '@value aaa: color(red lightness(50%));' - )).resolves.toEqual( - ':export {\n aaa: color(red lightness(50%))\n}' + return expect( + runCSS(` + @value aaa: color(red lightness(50%)); + `) + ).resolves.toEqual( + strip(` + :export { + aaa: color(red lightness(50%)) + } + `) ) }) diff --git a/yarn.lock b/yarn.lock index f09fd57..bb92687 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16,29 +16,11 @@ acorn-globals@^3.1.0: dependencies: acorn "^4.0.4" -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" - dependencies: - acorn "^3.0.4" - -acorn@^3.0.4: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" - acorn@^4.0.4: version "4.0.11" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0" -acorn@^5.0.1: - version "5.0.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" - -ajv-keywords@^1.0.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" - -ajv@^4.7.0, ajv@^4.9.1: +ajv@^4.9.1: version "4.11.8" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" dependencies: @@ -57,7 +39,7 @@ amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" -ansi-escapes@^1.1.0, ansi-escapes@^1.4.0: +ansi-escapes@^1.0.0, ansi-escapes@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" @@ -82,6 +64,10 @@ anymatch@^1.3.0: arrify "^1.0.0" micromatch "^2.1.5" +app-root-path@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46" + append-transform@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" @@ -119,16 +105,6 @@ array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" -array-union@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" - dependencies: - array-uniq "^1.0.1" - -array-uniq@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" - array-unique@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" @@ -149,6 +125,10 @@ assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" +ast-types@0.9.8: + version "0.9.8" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.8.tgz#6cb6a40beba31f49f20928e28439fc14a3dab078" + async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" @@ -196,7 +176,7 @@ babel-cli@^6.5.2: optionalDependencies: chokidar "^1.6.1" -babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: +babel-code-frame@6.22.0, babel-code-frame@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" dependencies: @@ -684,6 +664,10 @@ babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1: lodash "^4.2.0" to-fast-properties "^1.0.1" +babylon@7.0.0-beta.8: + version "7.0.0-beta.8" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.8.tgz#2bdc5ae366041442c27e068cce6f0d7c06ea9949" + babylon@^6.11.0, babylon@^6.13.0, babylon@^6.15.0: version "6.17.1" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.1.tgz#17f14fddf361b695981fe679385e4f1c01ebd86f" @@ -762,16 +746,6 @@ builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" -caller-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" - dependencies: - callsites "^0.2.0" - -callsites@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" - callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" @@ -799,7 +773,7 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@1.1.3, chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -828,19 +802,22 @@ ci-info@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" -circular-json@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" - -cli-cursor@^1.0.1: +cli-cursor@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" dependencies: restore-cursor "^1.0.1" -cli-width@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" +cli-spinners@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c" + +cli-truncate@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" + dependencies: + slice-ansi "0.0.4" + string-width "^1.0.1" cliui@^2.1.0: version "2.1.0" @@ -882,7 +859,7 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" -commander@^2.8.1: +commander@^2.8.1, commander@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" dependencies: @@ -892,14 +869,6 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.4.6: - version "1.6.0" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" - dependencies: - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" @@ -920,6 +889,27 @@ core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +cosmiconfig@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-1.1.0.tgz#0dea0f9804efdfb929fbb1b188e25553ea053d37" + dependencies: + graceful-fs "^4.1.2" + js-yaml "^3.4.3" + minimist "^1.2.0" + object-assign "^4.0.1" + os-homedir "^1.0.1" + parse-json "^2.2.0" + pinkie-promise "^2.0.0" + require-from-string "^1.1.0" + +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" @@ -936,21 +926,15 @@ cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": dependencies: cssom "0.3.x" -d@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" - dependencies: - es5-ext "^0.10.9" - dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" dependencies: assert-plus "^1.0.0" -debug-log@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" +date-fns@^1.27.2: + version "1.28.5" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.28.5.tgz#257cfc45d322df45ef5658665967ee841cd73faf" debug@^2.1.1, debug@^2.2.0, debug@^2.6.3: version "2.6.8" @@ -976,29 +960,6 @@ default-require-extensions@^1.0.0: dependencies: strip-bom "^2.0.0" -deglob@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/deglob/-/deglob-2.1.0.tgz#4d44abe16ef32c779b4972bd141a80325029a14a" - dependencies: - find-root "^1.0.0" - glob "^7.0.5" - ignore "^3.0.9" - pkg-config "^1.1.0" - run-parallel "^1.1.2" - uniq "^1.0.1" - -del@^2.0.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" - dependencies: - globby "^5.0.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - rimraf "^2.2.8" - delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -1017,13 +978,6 @@ diff@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" -doctrine@^1.2.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" - dependencies: - esutils "^2.0.2" - isarray "^1.0.0" - ecc-jsbn@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" @@ -1034,6 +988,10 @@ electron-to-chromium@^1.3.11: version "1.3.11" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.11.tgz#744761df1d67b492b322ce9aa0aba5393260eb61" +elegant-spinner@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" + "errno@>=0.1.1 <0.2.0-0": version "0.1.4" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" @@ -1046,58 +1004,6 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" -es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: - version "0.10.20" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.20.tgz#72a9b4fd5832797ba1bb65dceb2e25c04241c492" - dependencies: - es6-iterator "2" - es6-symbol "~3.1" - -es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" - dependencies: - d "1" - es5-ext "^0.10.14" - es6-symbol "^3.1" - -es6-map@^0.1.3: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-set "~0.1.5" - es6-symbol "~3.1.1" - event-emitter "~0.3.5" - -es6-set@~0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-symbol "3.1.1" - event-emitter "~0.3.5" - -es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" - dependencies: - d "1" - es5-ext "~0.10.14" - -es6-weak-map@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" - dependencies: - d "1" - es5-ext "^0.10.14" - es6-iterator "^2.0.1" - es6-symbol "^3.1.1" - escape-string-regexp@^1.0.2, 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" @@ -1113,84 +1019,6 @@ escodegen@^1.6.1: optionalDependencies: source-map "~0.2.0" -escope@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" - dependencies: - es6-map "^0.1.3" - es6-weak-map "^2.0.1" - esrecurse "^4.1.0" - estraverse "^4.1.1" - -eslint-config-standard-jsx@3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/eslint-config-standard-jsx/-/eslint-config-standard-jsx-3.2.0.tgz#c240e26ed919a11a42aa4de8059472b38268d620" - -eslint-config-standard@6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-6.2.1.tgz#d3a68aafc7191639e7ee441e7348739026354292" - -eslint-plugin-promise@~3.4.0: - version "3.4.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.4.2.tgz#1be2793eafe2d18b5b123b8136c269f804fe7122" - -eslint-plugin-react@~6.7.1: - version "6.7.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.7.1.tgz#1af96aea545856825157d97c1b50d5a8fb64a5a7" - dependencies: - doctrine "^1.2.2" - jsx-ast-utils "^1.3.3" - -eslint-plugin-standard@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-2.0.1.tgz#3589699ff9c917f2c25f76a916687f641c369ff3" - -eslint@~3.10.2: - version "3.10.2" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.10.2.tgz#c9a10e8bf6e9d65651204778c503341f1eac3ce7" - dependencies: - babel-code-frame "^6.16.0" - chalk "^1.1.3" - concat-stream "^1.4.6" - debug "^2.1.1" - doctrine "^1.2.2" - escope "^3.6.0" - espree "^3.3.1" - estraverse "^4.2.0" - esutils "^2.0.2" - file-entry-cache "^2.0.0" - glob "^7.0.3" - globals "^9.2.0" - ignore "^3.2.0" - imurmurhash "^0.1.4" - inquirer "^0.12.0" - is-my-json-valid "^2.10.0" - is-resolvable "^1.0.0" - js-yaml "^3.5.1" - json-stable-stringify "^1.0.0" - levn "^0.3.0" - lodash "^4.0.0" - mkdirp "^0.5.0" - natural-compare "^1.4.0" - optionator "^0.8.2" - path-is-inside "^1.0.1" - pluralize "^1.2.1" - progress "^1.1.8" - require-uncached "^1.0.2" - shelljs "^0.7.5" - strip-bom "^3.0.0" - strip-json-comments "~1.0.1" - table "^3.7.8" - text-table "~0.2.0" - user-home "^2.0.0" - -espree@^3.3.1: - version "3.4.3" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.3.tgz#2910b5ccd49ce893c2ffffaab4fd8b3a31b82374" - dependencies: - acorn "^5.0.1" - acorn-jsx "^3.0.0" - esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" @@ -1199,42 +1027,32 @@ esprima@^3.1.1: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" -esrecurse@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" - dependencies: - estraverse "~4.1.0" - object-assign "^4.0.1" - estraverse@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" -estraverse@^4.1.1, estraverse@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" - -estraverse@~4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" - -esutils@^2.0.2: +esutils@2.0.2, esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" -event-emitter@~0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" - dependencies: - d "1" - es5-ext "~0.10.14" - exec-sh@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10" dependencies: merge "^1.1.3" +execa@^0.6.0: + version "0.6.3" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.6.3.tgz#57b69a594f081759c69e5370f0d17b9cb11658fe" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + exit-hook@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" @@ -1281,20 +1099,13 @@ fb-watchman@^2.0.0: dependencies: bser "^2.0.0" -figures@^1.3.5: +figures@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" dependencies: escape-string-regexp "^1.0.5" object-assign "^4.1.0" -file-entry-cache@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" - dependencies: - flat-cache "^1.2.1" - object-assign "^4.0.1" - filename-regex@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" @@ -1316,9 +1127,9 @@ fill-range@^2.1.0: repeat-element "^1.1.2" repeat-string "^1.5.2" -find-root@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.0.0.tgz#962ff211aab25c6520feeeb8d6287f8f6e95807a" +find-parent-dir@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" find-up@^1.0.0: version "1.1.2" @@ -1333,14 +1144,9 @@ find-up@^2.1.0: dependencies: locate-path "^2.0.0" -flat-cache@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" - dependencies: - circular-json "^0.3.1" - del "^2.0.2" - graceful-fs "^4.1.2" - write "^0.2.1" +flow-parser@0.45.0: + version "0.45.0" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.45.0.tgz#aa29d4ae27f06aa02817772bba0fcbefef7e62f0" for-in@^1.0.1: version "1.0.2" @@ -1409,24 +1215,18 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" -generate-function@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" - -generate-object-property@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" - dependencies: - is-property "^1.0.0" - 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-stdin@^5.0.1: +get-stdin@5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" @@ -1446,6 +1246,17 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" +glob@7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" @@ -1457,21 +1268,10 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^9.0.0, globals@^9.2.0: +globals@^9.0.0: version "9.17.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.17.0.tgz#0c0ca696d9b9bb694d2e5470bd37777caad50286" -globby@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" - dependencies: - array-union "^1.0.1" - arrify "^1.0.0" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" - graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" @@ -1557,6 +1357,15 @@ http-signature@~1.1.0: jsprim "^1.2.2" sshpk "^1.7.0" +husky@^0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/husky/-/husky-0.13.3.tgz#bc2066080badc8b8fe3516e881f5bc68a57052ff" + dependencies: + chalk "^1.1.3" + find-parent-dir "^0.3.0" + is-ci "^1.0.9" + normalize-path "^1.0.0" + iconv-lite@0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" @@ -1565,13 +1374,15 @@ icss-replace-symbols@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" -ignore@^3.0.9, ignore@^3.2.0: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" +indent-string@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.1.0.tgz#08ff4334603388399b329e6b9538dc7a3cf5de7d" inflight@^1.0.4: version "1.0.6" @@ -1580,7 +1391,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: +inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -1588,28 +1399,6 @@ ini@~1.3.0: version "1.3.4" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" -inquirer@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" - dependencies: - ansi-escapes "^1.1.0" - ansi-regex "^2.0.0" - chalk "^1.0.0" - cli-cursor "^1.0.1" - cli-width "^2.0.0" - figures "^1.3.5" - lodash "^4.3.0" - readline2 "^1.0.1" - run-async "^0.1.0" - rx-lite "^3.1.2" - string-width "^1.0.1" - strip-ansi "^3.0.0" - through "^2.3.6" - -interpret@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" - invariant@^2.2.0, invariant@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" @@ -1640,7 +1429,7 @@ is-builtin-module@^1.0.0: dependencies: builtin-modules "^1.0.0" -is-ci@^1.0.10: +is-ci@^1.0.10, is-ci@^1.0.9: version "1.0.10" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" dependencies: @@ -1676,47 +1465,18 @@ is-fullwidth-code-point@^1.0.0: dependencies: number-is-nan "^1.0.0" -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - is-glob@^2.0.0, is-glob@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" dependencies: is-extglob "^1.0.0" -is-my-json-valid@^2.10.0: - version "2.16.0" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" - dependencies: - generate-function "^2.0.0" - generate-object-property "^1.1.0" - jsonpointer "^4.0.0" - xtend "^4.0.0" - is-number@^2.0.2, is-number@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" dependencies: kind-of "^3.0.2" -is-path-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" - -is-path-in-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" - dependencies: - is-path-inside "^1.0.0" - -is-path-inside@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" - dependencies: - path-is-inside "^1.0.1" - is-posix-bracket@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" @@ -1725,15 +1485,13 @@ is-primitive@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" -is-property@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" -is-resolvable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" - dependencies: - tryit "^1.0.1" +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" is-typedarray@~1.0.0: version "1.0.0" @@ -1743,7 +1501,7 @@ is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: +isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -1931,6 +1689,13 @@ jest-jasmine2@^20.0.3: once "^1.4.0" p-map "^1.1.1" +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" + dependencies: + chalk "^1.1.3" + pretty-format "^19.0.0" + jest-matcher-utils@^20.0.3: version "20.0.3" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz#b3a6b8e37ca577803b0832a98b164f44b7815612" @@ -2020,6 +1785,15 @@ jest-util@^20.0.3: leven "^2.1.0" mkdirp "^0.5.1" +jest-validate@19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-19.0.0.tgz#8c6318a20ecfeaba0ba5378bfbb8277abded4173" + dependencies: + chalk "^1.1.1" + jest-matcher-utils "^19.0.0" + leven "^2.0.0" + pretty-format "^19.0.0" + jest-validate@^20.0.3: version "20.0.3" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-20.0.3.tgz#d0cfd1de4f579f298484925c280f8f1d94ec3cab" @@ -2045,7 +1819,7 @@ js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" -js-yaml@^3.5.1, js-yaml@^3.7.0: +js-yaml@^3.4.3, js-yaml@^3.7.0: version "3.8.4" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" dependencies: @@ -2092,7 +1866,7 @@ json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" -json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: +json-stable-stringify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" dependencies: @@ -2110,10 +1884,6 @@ jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" -jsonpointer@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" - jsprim@^1.2.2: version "1.4.0" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" @@ -2123,10 +1893,6 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.3.6" -jsx-ast-utils@^1.3.3: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" - kind-of@^3.0.2: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -2143,17 +1909,76 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" -leven@^2.1.0: +leven@^2.0.0, leven@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" -levn@^0.3.0, levn@~0.3.0: +levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" dependencies: prelude-ls "~1.1.2" type-check "~0.3.2" +lint-staged@^3.4.2: + version "3.4.2" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-3.4.2.tgz#9cd1c0e4e477326c2696802a8377c22f92d65e79" + dependencies: + app-root-path "^2.0.0" + cosmiconfig "^1.1.0" + execa "^0.6.0" + listr "^0.12.0" + minimatch "^3.0.0" + npm-which "^3.0.1" + staged-git-files "0.0.4" + +listr-silent-renderer@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" + +listr-update-renderer@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.2.0.tgz#ca80e1779b4e70266807e8eed1ad6abe398550f9" + dependencies: + chalk "^1.1.3" + cli-truncate "^0.2.1" + elegant-spinner "^1.0.1" + figures "^1.7.0" + indent-string "^3.0.0" + log-symbols "^1.0.2" + log-update "^1.0.2" + strip-ansi "^3.0.1" + +listr-verbose-renderer@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.0.tgz#44dc01bb0c34a03c572154d4d08cde9b1dc5620f" + dependencies: + chalk "^1.1.3" + cli-cursor "^1.0.2" + date-fns "^1.27.2" + figures "^1.7.0" + +listr@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/listr/-/listr-0.12.0.tgz#6bce2c0f5603fa49580ea17cd6a00cc0e5fa451a" + dependencies: + chalk "^1.1.3" + cli-truncate "^0.2.1" + figures "^1.7.0" + indent-string "^2.1.0" + is-promise "^2.1.0" + is-stream "^1.1.0" + listr-silent-renderer "^1.1.1" + listr-update-renderer "^0.2.0" + listr-verbose-renderer "^0.4.0" + log-symbols "^1.0.2" + log-update "^1.0.2" + ora "^0.2.3" + p-map "^1.1.1" + rxjs "^5.0.0-beta.11" + stream-to-observable "^0.1.0" + strip-ansi "^3.0.1" + load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -2171,10 +1996,23 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" -lodash@^4.0.0, lodash@^4.14.0, lodash@^4.2.0, lodash@^4.3.0: +lodash@^4.14.0, lodash@^4.2.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" +log-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" + dependencies: + chalk "^1.0.0" + +log-update@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1" + dependencies: + ansi-escapes "^1.0.0" + cli-cursor "^1.0.2" + longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" @@ -2185,6 +2023,13 @@ loose-envify@^1.0.0: dependencies: js-tokens "^3.0.0" +lru-cache@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" + dependencies: + pseudomap "^1.0.1" + yallist "^2.0.0" + makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" @@ -2233,11 +2078,11 @@ 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.1, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: +"mkdirp@>=0.5 0", mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -2247,10 +2092,6 @@ ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" -mute-stream@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" - nan@^2.3.0: version "2.6.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" @@ -2302,12 +2143,36 @@ normalize-package-data@^2.3.2: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" +normalize-path@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379" + normalize-path@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" dependencies: remove-trailing-separator "^1.0.1" +npm-path@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.3.tgz#15cff4e1c89a38da77f56f6055b24f975dfb2bbe" + dependencies: + which "^1.2.10" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + dependencies: + path-key "^2.0.0" + +npm-which@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/npm-which/-/npm-which-3.0.1.tgz#9225f26ec3a285c209cae67c3b11a6b4ab7140aa" + dependencies: + commander "^2.9.0" + npm-path "^2.0.2" + which "^1.2.10" + npmlog@^4.0.2: version "4.1.0" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.0.tgz#dc59bee85f64f00ed424efb2af0783df25d1c0b5" @@ -2357,7 +2222,7 @@ optimist@^0.6.1: minimist "~0.0.1" wordwrap "~0.0.2" -optionator@^0.8.1, optionator@^0.8.2: +optionator@^0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" dependencies: @@ -2368,7 +2233,16 @@ optionator@^0.8.1, optionator@^0.8.2: type-check "~0.3.2" wordwrap "~1.0.0" -os-homedir@^1.0.0: +ora@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4" + dependencies: + chalk "^1.1.1" + cli-cursor "^1.0.2" + cli-spinners "^0.1.2" + object-assign "^4.0.1" + +os-homedir@^1.0.0, os-homedir@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -2397,6 +2271,10 @@ output-file-sync@^1.1.0: mkdirp "^0.5.1" object-assign "^4.1.0" +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + p-limit@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc" @@ -2444,9 +2322,9 @@ 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" -path-is-inside@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" path-parse@^1.0.5: version "1.0.5" @@ -2478,18 +2356,6 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" -pkg-config@^1.0.1, pkg-config@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/pkg-config/-/pkg-config-1.1.1.tgz#557ef22d73da3c8837107766c52eadabde298fe4" - dependencies: - debug-log "^1.0.0" - find-root "^1.0.0" - xtend "^4.0.1" - -pluralize@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" - postcss@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.1.tgz#000dbd1f8eef217aa368b9a212c5fc40b2a8f3f2" @@ -2506,6 +2372,27 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" +prettier@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.3.1.tgz#fa0ea84b45ac0ba6de6a1e4cecdcff900d563151" + dependencies: + ast-types "0.9.8" + babel-code-frame "6.22.0" + babylon "7.0.0-beta.8" + chalk "1.1.3" + esutils "2.0.2" + flow-parser "0.45.0" + get-stdin "5.0.1" + glob "7.1.1" + jest-validate "19.0.0" + minimist "1.2.0" + +pretty-format@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-19.0.0.tgz#56530d32acb98a3fa4851c4e2b9d37b420684c84" + dependencies: + ansi-styles "^3.0.0" + pretty-format@^20.0.3: version "20.0.3" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-20.0.3.tgz#020e350a560a1fe1a98dc3beb6ccffb386de8b14" @@ -2521,14 +2408,14 @@ process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" -progress@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" - prr@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" +pseudomap@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" @@ -2568,7 +2455,7 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.2.2: +readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.4: version "2.2.9" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8" dependencies: @@ -2589,20 +2476,6 @@ readdirp@^2.0.0: readable-stream "^2.0.2" set-immediate-shim "^1.0.1" -readline2@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - mute-stream "0.0.5" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - dependencies: - resolve "^1.1.6" - regenerate@^1.2.1: version "1.3.2" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" @@ -2693,26 +2566,19 @@ require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" -require-uncached@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" - dependencies: - caller-path "^0.1.0" - resolve-from "^1.0.0" - -resolve-from@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" - resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.1.6, resolve@^1.3.2: +resolve@^1.3.2: version "1.3.3" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" dependencies: @@ -2731,25 +2597,17 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1: +rimraf@2, rimraf@^2.5.1, rimraf@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: glob "^7.0.5" -run-async@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" +rxjs@^5.0.0-beta.11: + version "5.4.0" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.0.tgz#a7db14ab157f9d7aac6a56e655e7a3860d39bf26" dependencies: - once "^1.3.0" - -run-parallel@^1.1.2: - version "1.1.6" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.6.tgz#29003c9a2163e01e2d2dfc90575f2c6c1d61a039" - -rx-lite@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" + symbol-observable "^1.0.1" safe-buffer@^5.0.1: version "5.0.1" @@ -2783,13 +2641,15 @@ set-immediate-shim@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" -shelljs@^0.7.5: - version "0.7.7" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" shellwords@^0.1.0: version "0.1.0" @@ -2868,28 +2728,13 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" -standard-engine@~5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/standard-engine/-/standard-engine-5.2.0.tgz#400660ae5acce8afd4db60ff2214a9190ad790a3" - dependencies: - deglob "^2.0.0" - find-root "^1.0.0" - get-stdin "^5.0.1" - home-or-tmp "^2.0.0" - minimist "^1.1.0" - pkg-config "^1.0.1" +staged-git-files@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-0.0.4.tgz#d797e1b551ca7a639dec0237dc6eb4bb9be17d35" -standard@^8.4.0: - version "8.6.0" - resolved "https://registry.yarnpkg.com/standard/-/standard-8.6.0.tgz#635132be7bfb567c2921005f30f9e350e4752aad" - dependencies: - eslint "~3.10.2" - eslint-config-standard "6.2.1" - eslint-config-standard-jsx "3.2.0" - eslint-plugin-promise "~3.4.0" - eslint-plugin-react "~6.7.1" - eslint-plugin-standard "~2.0.1" - standard-engine "~5.2.0" +stream-to-observable@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/stream-to-observable/-/stream-to-observable-0.1.0.tgz#45bf1d9f2d7dc09bed81f1c307c430e68b84cffe" string-length@^1.0.1: version "1.0.1" @@ -2905,13 +2750,6 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -string-width@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^3.0.0" - string_decoder@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.1.tgz#62e200f039955a6810d8df0a33ffc0f013662d98" @@ -2928,7 +2766,7 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" -strip-bom@3.0.0, strip-bom@^3.0.0: +strip-bom@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -2938,9 +2776,13 @@ strip-bom@^2.0.0: dependencies: is-utf8 "^0.2.0" -strip-json-comments@~1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" strip-json-comments@~2.0.1: version "2.0.1" @@ -2956,21 +2798,14 @@ supports-color@^3.1.2, supports-color@^3.2.3: dependencies: has-flag "^1.0.0" +symbol-observable@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" + symbol-tree@^3.2.1: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" -table@^3.7.8: - version "3.8.3" - resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" - dependencies: - ajv "^4.7.0" - ajv-keywords "^1.0.0" - chalk "^1.1.1" - lodash "^4.0.0" - slice-ansi "0.0.4" - string-width "^2.0.0" - tar-pack@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" @@ -3002,18 +2837,10 @@ test-exclude@^4.1.0: read-pkg-up "^1.0.1" require-main-filename "^1.0.1" -text-table@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - throat@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/throat/-/throat-3.0.0.tgz#e7c64c867cbb3845f10877642f7b60055b8ec0d6" -through@^2.3.6: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" @@ -3036,10 +2863,6 @@ trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" -tryit@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" - tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -3056,10 +2879,6 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - uglify-js@^2.6: version "2.8.27" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.27.tgz#47787f912b0f242e5b984343be8e35e95f694c9c" @@ -3077,20 +2896,10 @@ uid-number@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - user-home@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" -user-home@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" - dependencies: - os-homedir "^1.0.0" - util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -3153,7 +2962,7 @@ which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" -which@^1.2.12: +which@^1.2.10, which@^1.2.12, which@^1.2.9: version "1.2.14" resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" dependencies: @@ -3199,17 +3008,11 @@ wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" -write@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" - dependencies: - mkdirp "^0.5.1" - xml-name-validator@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" -"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1: +"xtend@>=4.0.0 <4.1.0-0": version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -3217,6 +3020,10 @@ y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" +yallist@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + yargs-parser@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" From f97aea1ce084218d0b7994e92cb1db1400fd634a Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Tue, 23 May 2017 01:28:18 +0300 Subject: [PATCH 29/64] Remove dead options --- src/index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/index.js b/src/index.js index 74b5680..d2d9ce5 100644 --- a/src/index.js +++ b/src/index.js @@ -4,12 +4,10 @@ const { default: replaceSymbols, replaceAll } = require('icss-replace-symbols') const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/ const matchValueDefinition = /(?:\s+|^)([\w-]+):?\s+(.+?)\s*$/g const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/ -let options = {} + let importIndex = 0 -let createImportedName = - (options && options.createImportedName) || - ((importName /*, path*/) => - `i__const_${importName.replace(/\W/g, '_')}_${importIndex++}`) +const createImportedName = importName => + `i__const_${importName.replace(/\W/g, '_')}_${importIndex++}` module.exports = postcss.plugin('postcss-modules-values', () => ( css, From d9f46c24be3a2f083b8e656d32d803eb541fb9db Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Tue, 23 May 2017 02:16:28 +0300 Subject: [PATCH 30/64] Extract imports and exports rules creators --- src/index.js | 85 ++++++++++++++++++++++++++++------------------------ 1 file changed, 46 insertions(+), 39 deletions(-) diff --git a/src/index.js b/src/index.js index d2d9ce5..2ebd59c 100644 --- a/src/index.js +++ b/src/index.js @@ -5,6 +5,42 @@ const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/ const matchValueDefinition = /(?:\s+|^)([\w-]+):?\s+(.+?)\s*$/g const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/ +const addImportsRules = (css, imports) => { + const rules = imports.map(({ path, aliases }) => { + const declarations = Object.keys(aliases).map(key => + postcss.decl({ + prop: key, + value: aliases[key], + raws: { before: '\n ' } + }) + ) + return postcss + .rule({ + selector: `:import(${path})`, + raws: { after: '\n' } + }) + .append(declarations) + }) + css.prepend(rules) +} + +const addExportsRule = (css, exports) => { + const declarations = Object.keys(exports).map(key => + postcss.decl({ + prop: key, + value: exports[key], + raws: { before: '\n ' } + }) + ) + const rule = postcss + .rule({ + selector: `:export`, + raws: { after: '\n' } + }) + .append(declarations) + css.prepend(rule) +} + let importIndex = 0 const createImportedName = importName => `i__const_${importName.replace(/\W/g, '_')}_${importIndex++}` @@ -29,10 +65,10 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( const addImport = atRule => { let matches = matchImports.exec(atRule.params) if (matches) { - let [, aliases, path] = matches + let [, aliasesString, path] = matches // We can use constants for path names if (definitions[path]) path = definitions[path] - let imports = aliases + let aliases = aliasesString .replace(/^\(\s*([\s\S]+)\s*\)$/, '$1') .split(/\s*,\s*/) .map(alias => { @@ -46,7 +82,11 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( throw new Error(`@import statement "${alias}" is invalid!`) } }) - importAliases.push({ path, imports }) + .reduce((acc, { theirName, importedName }) => { + acc[importedName] = theirName + return acc + }, {}) + importAliases.push({ path, aliases }) atRule.remove() } } @@ -64,46 +104,13 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( } }) - /* We want to export anything defined by now, but don't add it to the CSS yet or - it well get picked up by the replacement stuff */ - let exportDeclarations = Object.keys(definitions).map(key => - postcss.decl({ - value: definitions[key], - prop: key, - raws: { before: '\n ' } - }) - ) - /* If we have no definitions, don't continue */ - if (!Object.keys(definitions).length) return + if (Object.keys(definitions).length === 0) return /* Perform replacements */ replaceSymbols(css, definitions) - /* Add export rules if any */ - if (exportDeclarations.length > 0) { - let exportRule = postcss.rule({ - selector: `:export`, - raws: { after: '\n' } - }) - exportRule.append(exportDeclarations) - css.prepend(exportRule) - } + addExportsRule(css, definitions) - /* Add import rules */ - importAliases.reverse().forEach(({ path, imports }) => { - let importRule = postcss.rule({ - selector: `:import(${path})`, - raws: { after: '\n' } - }) - imports.forEach(({ theirName, importedName }) => { - importRule.append({ - value: theirName, - prop: importedName, - raws: { before: '\n ' } - }) - }) - - css.prepend(importRule) - }) + addImportsRules(css, importAliases) }) From 32e2c484b539b19dc3c39c780ef9edd77160bb87 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Tue, 23 May 2017 17:20:10 +0300 Subject: [PATCH 31/64] Purify icss utils --- src/icss.js | 40 ++++++++++++++++++++++++++++++++++++++++ src/index.js | 43 +++---------------------------------------- 2 files changed, 43 insertions(+), 40 deletions(-) create mode 100644 src/icss.js diff --git a/src/icss.js b/src/icss.js new file mode 100644 index 0000000..982ff3b --- /dev/null +++ b/src/icss.js @@ -0,0 +1,40 @@ +const postcss = require('postcss') + +const genICSSImportsRules = imports => { + return imports.map(({ path, aliases }) => { + const declarations = Object.keys(aliases).map(key => + postcss.decl({ + prop: key, + value: aliases[key], + raws: { before: '\n ' } + }) + ) + return postcss + .rule({ + selector: `:import(${path})`, + raws: { after: '\n' } + }) + .append(declarations) + }) +} + +const genICSSExportsRule = exports => { + const declarations = Object.keys(exports).map(key => + postcss.decl({ + prop: key, + value: exports[key], + raws: { before: '\n ' } + }) + ) + return postcss + .rule({ + selector: `:export`, + raws: { after: '\n' } + }) + .append(declarations) +} + +export const genICSSRules = (imports, exports) => [ + ...genICSSImportsRules(imports), + genICSSExportsRule(exports) +] diff --git a/src/index.js b/src/index.js index 2ebd59c..af0dae3 100644 --- a/src/index.js +++ b/src/index.js @@ -1,46 +1,11 @@ const postcss = require('postcss') const { default: replaceSymbols, replaceAll } = require('icss-replace-symbols') +const { genICSSRules } = require('./icss.js') const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/ const matchValueDefinition = /(?:\s+|^)([\w-]+):?\s+(.+?)\s*$/g const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/ -const addImportsRules = (css, imports) => { - const rules = imports.map(({ path, aliases }) => { - const declarations = Object.keys(aliases).map(key => - postcss.decl({ - prop: key, - value: aliases[key], - raws: { before: '\n ' } - }) - ) - return postcss - .rule({ - selector: `:import(${path})`, - raws: { after: '\n' } - }) - .append(declarations) - }) - css.prepend(rules) -} - -const addExportsRule = (css, exports) => { - const declarations = Object.keys(exports).map(key => - postcss.decl({ - prop: key, - value: exports[key], - raws: { before: '\n ' } - }) - ) - const rule = postcss - .rule({ - selector: `:export`, - raws: { after: '\n' } - }) - .append(declarations) - css.prepend(rule) -} - let importIndex = 0 const createImportedName = importName => `i__const_${importName.replace(/\W/g, '_')}_${importIndex++}` @@ -74,7 +39,7 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( .map(alias => { let tokens = matchImport.exec(alias) if (tokens) { - let [, /*match*/ theirName, myName = theirName] = tokens + let [, theirName, myName = theirName] = tokens let importedName = createImportedName(myName) definitions[myName] = importedName return { theirName, importedName } @@ -110,7 +75,5 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( /* Perform replacements */ replaceSymbols(css, definitions) - addExportsRule(css, definitions) - - addImportsRules(css, importAliases) + css.prepend(genICSSRules(importAliases, definitions)) }) From ce736f6be3c3320f93e24822b69bae46fac4e693 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Tue, 23 May 2017 18:03:39 +0300 Subject: [PATCH 32/64] Enforce double-underscored aliases according icss spec --- src/index.js | 6 +++-- test/test.js | 62 ++++++++++++++++++++++++++-------------------------- 2 files changed, 35 insertions(+), 33 deletions(-) diff --git a/src/index.js b/src/index.js index af0dae3..5cd21bb 100644 --- a/src/index.js +++ b/src/index.js @@ -6,9 +6,11 @@ const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/ const matchValueDefinition = /(?:\s+|^)([\w-]+):?\s+(.+?)\s*$/g const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/ +const getAliasName = (name, index) => + `__value_${name.replace(/\W/g, '_')}_${index}` + let importIndex = 0 -const createImportedName = importName => - `i__const_${importName.replace(/\W/g, '_')}_${importIndex++}` +const createImportedName = importName => getAliasName(importName, importIndex++) module.exports = postcss.plugin('postcss-modules-values', () => ( css, diff --git a/test/test.js b/test/test.js index 4bb7507..637ea99 100644 --- a/test/test.js +++ b/test/test.js @@ -76,10 +76,10 @@ test('should import and re-export a simple constant', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - i__const_red_0: red + __value_red_0: red } :export { - red: i__const_red_0 + red: __value_red_0 } `) ) @@ -94,12 +94,12 @@ test('should import a simple constant and replace usages', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - i__const_red_1: red; + __value_red_1: red; } :export { - red: i__const_red_1; + red: __value_red_1; } - .foo { color: i__const_red_1; } + .foo { color: __value_red_1; } `) ) }) @@ -113,12 +113,12 @@ test('should import and alias a constant and replace usages', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - i__const_red_2: blue; + __value_red_2: blue; } :export { - red: i__const_red_2; + red: __value_red_2; } - .foo { color: i__const_red_2; } + .foo { color: __value_red_2; } `) ) }) @@ -133,15 +133,15 @@ test('should import multiple from a single file', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - i__const_blue_3: blue; - i__const_red_4: red; + __value_blue_3: blue; + __value_red_4: red; } :export { - blue: i__const_blue_3; - red: i__const_red_4; + blue: __value_blue_3; + red: __value_red_4; } - .foo { color: i__const_red_4; } - .bar { color: i__const_blue_3 } + .foo { color: __value_red_4; } + .bar { color: __value_blue_3 } `) ) }) @@ -154,11 +154,11 @@ test('should import from a definition', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - i__const_red_5: red + __value_red_5: red } :export { colors: "./colors.css"; - red: i__const_red_5 + red: __value_red_5 } `) ) @@ -172,10 +172,10 @@ test('should only allow values for paths if defined in the right order', () => { ).resolves.toEqual( strip(` :import(colors) { - i__const_red_6: red + __value_red_6: red } :export { - red: i__const_red_6; + red: __value_red_6; colors: "./colors.css" } `) @@ -226,14 +226,14 @@ test('should preserve import order', () => { ).resolves.toEqual( strip(` :import("./a.css") { - i__const_a_7: a + __value_a_7: a } :import("./b.css") { - i__const_b_8: b + __value_b_8: b } :export { - a: i__const_a_7; - b: i__const_b_8 + a: __value_a_7; + b: __value_b_8 } `) ) @@ -247,12 +247,12 @@ test('should allow custom-property-style names', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - i__const___red_9: --red; + __value___red_9: --red; } :export { - --red: i__const___red_9; + --red: __value___red_9; } - .foo { color: i__const___red_9; } + .foo { color: __value___red_9; } `) ) }) @@ -306,15 +306,15 @@ test('should import multiple from a single file on multiple lines', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - i__const_blue_10: blue; - i__const_red_11: red; + __value_blue_10: blue; + __value_red_11: red; } :export { - blue: i__const_blue_10; - red: i__const_red_11; + blue: __value_blue_10; + red: __value_red_11; } - .foo { color: i__const_red_11; } - .bar { color: i__const_blue_10 } + .foo { color: __value_red_11; } + .bar { color: __value_blue_10 } `) ) }) From b88d76b3603ce9a75ece2925c35b96c3e68dc963 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Tue, 23 May 2017 23:59:42 +0300 Subject: [PATCH 33/64] Ensure :imports and :exports --- src/icss.js | 37 +++++++++++++++++++++- src/index.js | 27 +++++++++------- test/test.js | 87 +++++++++++++++++++++++++++++++++------------------- 3 files changed, 108 insertions(+), 43 deletions(-) diff --git a/src/icss.js b/src/icss.js index 982ff3b..5cd422f 100644 --- a/src/icss.js +++ b/src/icss.js @@ -1,7 +1,42 @@ const postcss = require('postcss') +const importPattern = /^:import\(("[^"]*"|'[^']*'|[\w-]+)\)$/ + +const exportPattern = /^:export$/ + +const getDeclsObject = rule => { + const object = {} + rule.walkDecls(decl => { + object[decl.prop] = decl.value + }) + return object +} + +export const extractICSSImports = css => { + const imports = {} + css.walkRules(rule => { + const matches = importPattern.exec(rule.selector) + if (matches) { + const path = matches[1] + imports[path] = Object.assign({}, imports[path], getDeclsObject(rule)) + rule.remove() + } + }) + return imports +} + +export const extractICSSExports = css => { + const exports = {} + css.walkRules(exportPattern, rule => { + Object.assign(exports, getDeclsObject(rule)) + rule.remove() + }) + return exports +} + const genICSSImportsRules = imports => { - return imports.map(({ path, aliases }) => { + return Object.keys(imports).map(path => { + const aliases = imports[path] const declarations = Object.keys(aliases).map(key => postcss.decl({ prop: key, diff --git a/src/index.js b/src/index.js index 5cd21bb..f2b7a11 100644 --- a/src/index.js +++ b/src/index.js @@ -1,13 +1,18 @@ const postcss = require('postcss') const { default: replaceSymbols, replaceAll } = require('icss-replace-symbols') -const { genICSSRules } = require('./icss.js') +const { + extractICSSImports, + extractICSSExports, + genICSSRules +} = require('./icss.js') const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/ const matchValueDefinition = /(?:\s+|^)([\w-]+):?\s+(.+?)\s*$/g const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/ +// 'i' prefix to prevent postcss parsing "_" as css hook const getAliasName = (name, index) => - `__value_${name.replace(/\W/g, '_')}_${index}` + `i__value_${name.replace(/\W/g, '_')}_${index}` let importIndex = 0 const createImportedName = importName => getAliasName(importName, importIndex++) @@ -16,15 +21,15 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( css, result ) => { - let importAliases = [] - let definitions = {} + const imports = extractICSSImports(css) + const exports = extractICSSExports(css) const addDefinition = atRule => { let matches while ((matches = matchValueDefinition.exec(atRule.params))) { let [, key, value] = matches // Add to the definitions, knowing that values can refer to each other - definitions[key] = replaceAll(definitions, value) + exports[key] = replaceAll(exports, value) atRule.remove() } } @@ -34,7 +39,7 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( if (matches) { let [, aliasesString, path] = matches // We can use constants for path names - if (definitions[path]) path = definitions[path] + if (exports[path]) path = exports[path] let aliases = aliasesString .replace(/^\(\s*([\s\S]+)\s*\)$/, '$1') .split(/\s*,\s*/) @@ -43,7 +48,7 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( if (tokens) { let [, theirName, myName = theirName] = tokens let importedName = createImportedName(myName) - definitions[myName] = importedName + exports[myName] = importedName return { theirName, importedName } } else { throw new Error(`@import statement "${alias}" is invalid!`) @@ -53,7 +58,7 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( acc[importedName] = theirName return acc }, {}) - importAliases.push({ path, aliases }) + imports[path] = Object.assign({}, imports[path], aliases) atRule.remove() } } @@ -72,10 +77,10 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( }) /* If we have no definitions, don't continue */ - if (Object.keys(definitions).length === 0) return + if (Object.keys(exports).length === 0) return /* Perform replacements */ - replaceSymbols(css, definitions) + replaceSymbols(css, exports) - css.prepend(genICSSRules(importAliases, definitions)) + css.prepend(genICSSRules(imports, exports)) }) diff --git a/test/test.js b/test/test.js index 637ea99..035e0cc 100644 --- a/test/test.js +++ b/test/test.js @@ -76,10 +76,10 @@ test('should import and re-export a simple constant', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - __value_red_0: red + i__value_red_0: red } :export { - red: __value_red_0 + red: i__value_red_0 } `) ) @@ -94,12 +94,12 @@ test('should import a simple constant and replace usages', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - __value_red_1: red; + i__value_red_1: red; } :export { - red: __value_red_1; + red: i__value_red_1; } - .foo { color: __value_red_1; } + .foo { color: i__value_red_1; } `) ) }) @@ -113,12 +113,12 @@ test('should import and alias a constant and replace usages', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - __value_red_2: blue; + i__value_red_2: blue; } :export { - red: __value_red_2; + red: i__value_red_2; } - .foo { color: __value_red_2; } + .foo { color: i__value_red_2; } `) ) }) @@ -133,15 +133,15 @@ test('should import multiple from a single file', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - __value_blue_3: blue; - __value_red_4: red; + i__value_blue_3: blue; + i__value_red_4: red; } :export { - blue: __value_blue_3; - red: __value_red_4; + blue: i__value_blue_3; + red: i__value_red_4; } - .foo { color: __value_red_4; } - .bar { color: __value_blue_3 } + .foo { color: i__value_red_4; } + .bar { color: i__value_blue_3 } `) ) }) @@ -154,11 +154,11 @@ test('should import from a definition', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - __value_red_5: red + i__value_red_5: red } :export { colors: "./colors.css"; - red: __value_red_5 + red: i__value_red_5 } `) ) @@ -172,10 +172,10 @@ test('should only allow values for paths if defined in the right order', () => { ).resolves.toEqual( strip(` :import(colors) { - __value_red_6: red + i__value_red_6: red } :export { - red: __value_red_6; + red: i__value_red_6; colors: "./colors.css" } `) @@ -226,14 +226,14 @@ test('should preserve import order', () => { ).resolves.toEqual( strip(` :import("./a.css") { - __value_a_7: a + i__value_a_7: a } :import("./b.css") { - __value_b_8: b + i__value_b_8: b } :export { - a: __value_a_7; - b: __value_b_8 + a: i__value_a_7; + b: i__value_b_8 } `) ) @@ -247,12 +247,12 @@ test('should allow custom-property-style names', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - __value___red_9: --red; + i__value___red_9: --red; } :export { - --red: __value___red_9; + --red: i__value___red_9; } - .foo { color: __value___red_9; } + .foo { color: i__value___red_9; } `) ) }) @@ -306,15 +306,15 @@ test('should import multiple from a single file on multiple lines', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - __value_blue_10: blue; - __value_red_11: red; + i__value_blue_10: blue; + i__value_red_11: red; } :export { - blue: __value_blue_10; - red: __value_red_11; + blue: i__value_blue_10; + red: i__value_red_11; } - .foo { color: __value_red_11; } - .bar { color: __value_blue_10 } + .foo { color: i__value_red_11; } + .bar { color: i__value_blue_10 } `) ) }) @@ -348,3 +348,28 @@ test('should allow values with nested parantheses', () => { `) ) }) + +test('reuse existing :import with same name and :export', () => { + return expect( + runCSS(` + :import('./colors.css') { + i__some_import: blue; + } + :export { + b: i__c; + } + @value a from './colors.css'; + `) + ).resolves.toEqual( + strip(` + :import('./colors.css') { + i__some_import: blue; + i__value_a_12: a + } + :export { + b: i__c; + a: i__value_a_12 + } + `) + ) +}) From b5d8dbbe7421c32c22b5ed5929a927e26fbf2794 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Wed, 24 May 2017 00:25:45 +0300 Subject: [PATCH 34/64] Prevent imported names collision --- src/index.js | 12 ++++++++++-- test/test.js | 21 +++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index f2b7a11..364d572 100644 --- a/src/index.js +++ b/src/index.js @@ -15,7 +15,6 @@ const getAliasName = (name, index) => `i__value_${name.replace(/\W/g, '_')}_${index}` let importIndex = 0 -const createImportedName = importName => getAliasName(importName, importIndex++) module.exports = postcss.plugin('postcss-modules-values', () => ( css, @@ -23,6 +22,15 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( ) => { const imports = extractICSSImports(css) const exports = extractICSSExports(css) + const createImportedName = (path, name) => { + const importedName = getAliasName(name, importIndex) + if (imports[path] && imports[path][importedName]) { + importIndex += 1 + return createImportedName(path, name) + } + importIndex += 1 + return importedName + } const addDefinition = atRule => { let matches @@ -47,7 +55,7 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( let tokens = matchImport.exec(alias) if (tokens) { let [, theirName, myName = theirName] = tokens - let importedName = createImportedName(myName) + let importedName = createImportedName(path, myName) exports[myName] = importedName return { theirName, importedName } } else { diff --git a/test/test.js b/test/test.js index 035e0cc..eed18ba 100644 --- a/test/test.js +++ b/test/test.js @@ -373,3 +373,24 @@ test('reuse existing :import with same name and :export', () => { `) ) }) + +test('prevent imported names collision', () => { + return expect( + runCSS(` + :import(colors) { + i__value_a_13: a; + } + @value a from colors; + `) + ).resolves.toEqual( + strip(` + :import(colors) { + i__value_a_13: a; + i__value_a_14: a + } + :export { + a: i__value_a_14 + } + `) + ) +}) From 8aa385348b04f794f991be181bca31bb406f7394 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Wed, 24 May 2017 00:30:12 +0300 Subject: [PATCH 35/64] Init imported name index locally --- src/index.js | 3 +-- test/test.js | 70 ++++++++++++++++++++++++++-------------------------- 2 files changed, 36 insertions(+), 37 deletions(-) diff --git a/src/index.js b/src/index.js index 364d572..183550b 100644 --- a/src/index.js +++ b/src/index.js @@ -14,14 +14,13 @@ const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/ const getAliasName = (name, index) => `i__value_${name.replace(/\W/g, '_')}_${index}` -let importIndex = 0 - module.exports = postcss.plugin('postcss-modules-values', () => ( css, result ) => { const imports = extractICSSImports(css) const exports = extractICSSExports(css) + let importIndex = 0 const createImportedName = (path, name) => { const importedName = getAliasName(name, importIndex) if (imports[path] && imports[path][importedName]) { diff --git a/test/test.js b/test/test.js index eed18ba..aa5654a 100644 --- a/test/test.js +++ b/test/test.js @@ -94,12 +94,12 @@ test('should import a simple constant and replace usages', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - i__value_red_1: red; + i__value_red_0: red; } :export { - red: i__value_red_1; + red: i__value_red_0; } - .foo { color: i__value_red_1; } + .foo { color: i__value_red_0; } `) ) }) @@ -113,12 +113,12 @@ test('should import and alias a constant and replace usages', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - i__value_red_2: blue; + i__value_red_0: blue; } :export { - red: i__value_red_2; + red: i__value_red_0; } - .foo { color: i__value_red_2; } + .foo { color: i__value_red_0; } `) ) }) @@ -133,15 +133,15 @@ test('should import multiple from a single file', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - i__value_blue_3: blue; - i__value_red_4: red; + i__value_blue_0: blue; + i__value_red_1: red; } :export { - blue: i__value_blue_3; - red: i__value_red_4; + blue: i__value_blue_0; + red: i__value_red_1; } - .foo { color: i__value_red_4; } - .bar { color: i__value_blue_3 } + .foo { color: i__value_red_1; } + .bar { color: i__value_blue_0 } `) ) }) @@ -154,11 +154,11 @@ test('should import from a definition', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - i__value_red_5: red + i__value_red_0: red } :export { colors: "./colors.css"; - red: i__value_red_5 + red: i__value_red_0 } `) ) @@ -172,10 +172,10 @@ test('should only allow values for paths if defined in the right order', () => { ).resolves.toEqual( strip(` :import(colors) { - i__value_red_6: red + i__value_red_0: red } :export { - red: i__value_red_6; + red: i__value_red_0; colors: "./colors.css" } `) @@ -226,14 +226,14 @@ test('should preserve import order', () => { ).resolves.toEqual( strip(` :import("./a.css") { - i__value_a_7: a + i__value_a_0: a } :import("./b.css") { - i__value_b_8: b + i__value_b_1: b } :export { - a: i__value_a_7; - b: i__value_b_8 + a: i__value_a_0; + b: i__value_b_1 } `) ) @@ -247,12 +247,12 @@ test('should allow custom-property-style names', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - i__value___red_9: --red; + i__value___red_0: --red; } :export { - --red: i__value___red_9; + --red: i__value___red_0; } - .foo { color: i__value___red_9; } + .foo { color: i__value___red_0; } `) ) }) @@ -306,15 +306,15 @@ test('should import multiple from a single file on multiple lines', () => { ).resolves.toEqual( strip(` :import("./colors.css") { - i__value_blue_10: blue; - i__value_red_11: red; + i__value_blue_0: blue; + i__value_red_1: red; } :export { - blue: i__value_blue_10; - red: i__value_red_11; + blue: i__value_blue_0; + red: i__value_red_1; } - .foo { color: i__value_red_11; } - .bar { color: i__value_blue_10 } + .foo { color: i__value_red_1; } + .bar { color: i__value_blue_0 } `) ) }) @@ -364,11 +364,11 @@ test('reuse existing :import with same name and :export', () => { strip(` :import('./colors.css') { i__some_import: blue; - i__value_a_12: a + i__value_a_0: a } :export { b: i__c; - a: i__value_a_12 + a: i__value_a_0 } `) ) @@ -378,18 +378,18 @@ test('prevent imported names collision', () => { return expect( runCSS(` :import(colors) { - i__value_a_13: a; + i__value_a_0: a; } @value a from colors; `) ).resolves.toEqual( strip(` :import(colors) { - i__value_a_13: a; - i__value_a_14: a + i__value_a_0: a; + i__value_a_1: a } :export { - a: i__value_a_14 + a: i__value_a_1 } `) ) From bb501ee08dfff864744b5ee08abb67234709935d Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Wed, 24 May 2017 00:51:48 +0300 Subject: [PATCH 36/64] Combine extracters and prevent deep iteration --- src/icss.js | 43 +++++++++++++++++++++---------------------- src/index.js | 11 +++-------- 2 files changed, 24 insertions(+), 30 deletions(-) diff --git a/src/icss.js b/src/icss.js index 5cd422f..d63f0b9 100644 --- a/src/icss.js +++ b/src/icss.js @@ -12,29 +12,28 @@ const getDeclsObject = rule => { return object } -export const extractICSSImports = css => { +export const extractICSS = css => { const imports = {} - css.walkRules(rule => { - const matches = importPattern.exec(rule.selector) - if (matches) { - const path = matches[1] - imports[path] = Object.assign({}, imports[path], getDeclsObject(rule)) - rule.remove() - } - }) - return imports -} - -export const extractICSSExports = css => { const exports = {} - css.walkRules(exportPattern, rule => { - Object.assign(exports, getDeclsObject(rule)) - rule.remove() + css.each(node => { + if (node.type === 'rule') { + const matches = importPattern.exec(node.selector) + if (matches) { + const path = matches[1] + const aliases = Object.assign({}, imports[path], getDeclsObject(node)) + imports[path] = aliases + node.remove() + } + if (exportPattern.test(node.selector)) { + Object.assign(exports, getDeclsObject(node)) + node.remove() + } + } }) - return exports + return { imports, exports } } -const genICSSImportsRules = imports => { +const createICSSImportsRules = imports => { return Object.keys(imports).map(path => { const aliases = imports[path] const declarations = Object.keys(aliases).map(key => @@ -53,7 +52,7 @@ const genICSSImportsRules = imports => { }) } -const genICSSExportsRule = exports => { +const createICSSExportsRule = exports => { const declarations = Object.keys(exports).map(key => postcss.decl({ prop: key, @@ -69,7 +68,7 @@ const genICSSExportsRule = exports => { .append(declarations) } -export const genICSSRules = (imports, exports) => [ - ...genICSSImportsRules(imports), - genICSSExportsRule(exports) +export const createICSSRules = (imports, exports) => [ + ...createICSSImportsRules(imports), + createICSSExportsRule(exports) ] diff --git a/src/index.js b/src/index.js index 183550b..19b5911 100644 --- a/src/index.js +++ b/src/index.js @@ -1,10 +1,6 @@ const postcss = require('postcss') const { default: replaceSymbols, replaceAll } = require('icss-replace-symbols') -const { - extractICSSImports, - extractICSSExports, - genICSSRules -} = require('./icss.js') +const { extractICSS, createICSSRules } = require('./icss.js') const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/ const matchValueDefinition = /(?:\s+|^)([\w-]+):?\s+(.+?)\s*$/g @@ -18,8 +14,7 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( css, result ) => { - const imports = extractICSSImports(css) - const exports = extractICSSExports(css) + const { imports, exports } = extractICSS(css) let importIndex = 0 const createImportedName = (path, name) => { const importedName = getAliasName(name, importIndex) @@ -89,5 +84,5 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( /* Perform replacements */ replaceSymbols(css, exports) - css.prepend(genICSSRules(imports, exports)) + css.prepend(createICSSRules(imports, exports)) }) From e901c0d1c3b00ab8e8b914b77992fa6d4042870a Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Wed, 24 May 2017 21:27:25 +0300 Subject: [PATCH 37/64] Add icss-utils --- package.json | 2 +- src/icss.js | 74 ---------------------------------------------------- src/index.js | 28 +++++++++++--------- yarn.lock | 8 +++--- 4 files changed, 22 insertions(+), 90 deletions(-) delete mode 100644 src/icss.js diff --git a/package.json b/package.json index ac4ef21..c68b6f2 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "strip-indent": "^2.0.0" }, "dependencies": { - "icss-replace-symbols": "^1.1.0", + "icss-utils": "^2.0.0", "postcss": "^6.0.1" } } diff --git a/src/icss.js b/src/icss.js deleted file mode 100644 index d63f0b9..0000000 --- a/src/icss.js +++ /dev/null @@ -1,74 +0,0 @@ -const postcss = require('postcss') - -const importPattern = /^:import\(("[^"]*"|'[^']*'|[\w-]+)\)$/ - -const exportPattern = /^:export$/ - -const getDeclsObject = rule => { - const object = {} - rule.walkDecls(decl => { - object[decl.prop] = decl.value - }) - return object -} - -export const extractICSS = css => { - const imports = {} - const exports = {} - css.each(node => { - if (node.type === 'rule') { - const matches = importPattern.exec(node.selector) - if (matches) { - const path = matches[1] - const aliases = Object.assign({}, imports[path], getDeclsObject(node)) - imports[path] = aliases - node.remove() - } - if (exportPattern.test(node.selector)) { - Object.assign(exports, getDeclsObject(node)) - node.remove() - } - } - }) - return { imports, exports } -} - -const createICSSImportsRules = imports => { - return Object.keys(imports).map(path => { - const aliases = imports[path] - const declarations = Object.keys(aliases).map(key => - postcss.decl({ - prop: key, - value: aliases[key], - raws: { before: '\n ' } - }) - ) - return postcss - .rule({ - selector: `:import(${path})`, - raws: { after: '\n' } - }) - .append(declarations) - }) -} - -const createICSSExportsRule = exports => { - const declarations = Object.keys(exports).map(key => - postcss.decl({ - prop: key, - value: exports[key], - raws: { before: '\n ' } - }) - ) - return postcss - .rule({ - selector: `:export`, - raws: { after: '\n' } - }) - .append(declarations) -} - -export const createICSSRules = (imports, exports) => [ - ...createICSSImportsRules(imports), - createICSSExportsRule(exports) -] diff --git a/src/index.js b/src/index.js index 19b5911..fbfe063 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,10 @@ -const postcss = require('postcss') -const { default: replaceSymbols, replaceAll } = require('icss-replace-symbols') -const { extractICSS, createICSSRules } = require('./icss.js') +import postcss from 'postcss' +import { + replaceSymbols, + replaceValueSymbols, + extractICSS, + createICSSRules +} from 'icss-utils' const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/ const matchValueDefinition = /(?:\s+|^)([\w-]+):?\s+(.+?)\s*$/g @@ -14,11 +18,11 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( css, result ) => { - const { imports, exports } = extractICSS(css) + const { icssImports, icssExports } = extractICSS(css) let importIndex = 0 const createImportedName = (path, name) => { const importedName = getAliasName(name, importIndex) - if (imports[path] && imports[path][importedName]) { + if (icssImports[path] && icssImports[path][importedName]) { importIndex += 1 return createImportedName(path, name) } @@ -31,7 +35,7 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( while ((matches = matchValueDefinition.exec(atRule.params))) { let [, key, value] = matches // Add to the definitions, knowing that values can refer to each other - exports[key] = replaceAll(exports, value) + icssExports[key] = replaceValueSymbols(value, icssExports) atRule.remove() } } @@ -41,7 +45,7 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( if (matches) { let [, aliasesString, path] = matches // We can use constants for path names - if (exports[path]) path = exports[path] + if (icssExports[path]) path = icssExports[path] let aliases = aliasesString .replace(/^\(\s*([\s\S]+)\s*\)$/, '$1') .split(/\s*,\s*/) @@ -50,7 +54,7 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( if (tokens) { let [, theirName, myName = theirName] = tokens let importedName = createImportedName(path, myName) - exports[myName] = importedName + icssExports[myName] = importedName return { theirName, importedName } } else { throw new Error(`@import statement "${alias}" is invalid!`) @@ -60,7 +64,7 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( acc[importedName] = theirName return acc }, {}) - imports[path] = Object.assign({}, imports[path], aliases) + icssImports[path] = Object.assign({}, icssImports[path], aliases) atRule.remove() } } @@ -79,10 +83,10 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( }) /* If we have no definitions, don't continue */ - if (Object.keys(exports).length === 0) return + if (Object.keys(icssExports).length === 0) return /* Perform replacements */ - replaceSymbols(css, exports) + replaceSymbols(css, icssExports) - css.prepend(createICSSRules(imports, exports)) + css.prepend(createICSSRules(icssImports, icssExports)) }) diff --git a/yarn.lock b/yarn.lock index bb92687..929966c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1370,9 +1370,11 @@ iconv-lite@0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" -icss-replace-symbols@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" +icss-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-2.0.0.tgz#9eb8432af871adc003e4ac7a574d24169398317d" + dependencies: + postcss "^6.0.1" indent-string@^2.1.0: version "2.1.0" From b760f05bc989c136f4e3d90b6f9b3b94c769ef61 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Wed, 24 May 2017 21:39:06 +0300 Subject: [PATCH 38/64] Remove noisy comments --- src/index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/index.js b/src/index.js index fbfe063..d839301 100644 --- a/src/index.js +++ b/src/index.js @@ -82,10 +82,8 @@ module.exports = postcss.plugin('postcss-modules-values', () => ( } }) - /* If we have no definitions, don't continue */ if (Object.keys(icssExports).length === 0) return - /* Perform replacements */ replaceSymbols(css, icssExports) css.prepend(createICSSRules(icssImports, icssExports)) From a852824449109124d94fa9d28e8401a9c5f8f4cc Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Thu, 15 Jun 2017 21:54:01 +0300 Subject: [PATCH 39/64] Remove path replacements --- package.json | 27 ++- src/index.js | 100 +++++---- test/test.js | 266 +++++++++++------------ yarn.lock | 602 +++++++++++++++++++++++++++++++++++++++------------ 4 files changed, 659 insertions(+), 336 deletions(-) diff --git a/package.json b/package.json index c68b6f2..093e4a1 100644 --- a/package.json +++ b/package.json @@ -14,10 +14,20 @@ }, "lint-staged": { "*.js": [ - "prettier --single-quote --no-semi --write", + "prettier --write", + "eslint", "git add" ] }, + "eslintConfig": { + "parserOptions": { + "sourceType": "module" + }, + "env": { + "es6": true + }, + "extends": "eslint:recommended" + }, "babel": { "presets": [ [ @@ -48,15 +58,16 @@ "devDependencies": { "babel-cli": "^6.5.2", "babel-jest": "^20.0.3", - "babel-preset-env": "^1.5.0", - "husky": "^0.13.3", - "jest": "^20.0.3", - "lint-staged": "^3.4.2", - "prettier": "^1.3.1", + "babel-preset-env": "^1.5.2", + "eslint": "^4.0.0", + "husky": "^0.13.4", + "jest": "^20.0.4", + "lint-staged": "^3.6.1", + "prettier": "^1.4.4", "strip-indent": "^2.0.0" }, "dependencies": { - "icss-utils": "^2.0.0", - "postcss": "^6.0.1" + "icss-utils": "^3.0.1", + "postcss": "^6.0.2" } } diff --git a/src/index.js b/src/index.js index d839301..3af2578 100644 --- a/src/index.js +++ b/src/index.js @@ -1,90 +1,88 @@ -import postcss from 'postcss' +/* eslint-env node */ +import postcss from "postcss"; import { replaceSymbols, replaceValueSymbols, extractICSS, createICSSRules -} from 'icss-utils' +} from "icss-utils"; -const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/ -const matchValueDefinition = /(?:\s+|^)([\w-]+):?\s+(.+?)\s*$/g -const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/ +const plugin = "postcss-modules-values"; + +const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/; +const matchValueDefinition = /(?:\s+|^)([\w-]+):?\s+(.+?)\s*$/g; +const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/; // 'i' prefix to prevent postcss parsing "_" as css hook const getAliasName = (name, index) => - `i__value_${name.replace(/\W/g, '_')}_${index}` + `__value__${name.replace(/\W/g, "_")}__${index}`; -module.exports = postcss.plugin('postcss-modules-values', () => ( - css, - result -) => { - const { icssImports, icssExports } = extractICSS(css) - let importIndex = 0 +module.exports = postcss.plugin(plugin, () => (css, result) => { + const { icssImports, icssExports } = extractICSS(css); + let importIndex = 0; const createImportedName = (path, name) => { - const importedName = getAliasName(name, importIndex) + const importedName = getAliasName(name, importIndex); if (icssImports[path] && icssImports[path][importedName]) { - importIndex += 1 - return createImportedName(path, name) + importIndex += 1; + return createImportedName(path, name); } - importIndex += 1 - return importedName - } + importIndex += 1; + return importedName; + }; const addDefinition = atRule => { - let matches + let matches; while ((matches = matchValueDefinition.exec(atRule.params))) { - let [, key, value] = matches + let [, key, value] = matches; // Add to the definitions, knowing that values can refer to each other - icssExports[key] = replaceValueSymbols(value, icssExports) - atRule.remove() + icssExports[key] = replaceValueSymbols(value, icssExports); + atRule.remove(); } - } + }; const addImport = atRule => { - let matches = matchImports.exec(atRule.params) + let matches = matchImports.exec(atRule.params); if (matches) { - let [, aliasesString, path] = matches - // We can use constants for path names - if (icssExports[path]) path = icssExports[path] + const aliasesString = matches[1]; + let path = matches[2]; + path = path[0] === "'" || path[0] === '"' ? path.slice(1, -1) : path; let aliases = aliasesString - .replace(/^\(\s*([\s\S]+)\s*\)$/, '$1') + .replace(/^\(\s*([\s\S]+)\s*\)$/, "$1") .split(/\s*,\s*/) .map(alias => { - let tokens = matchImport.exec(alias) + let tokens = matchImport.exec(alias); if (tokens) { - let [, theirName, myName = theirName] = tokens - let importedName = createImportedName(path, myName) - icssExports[myName] = importedName - return { theirName, importedName } + let [, theirName, myName = theirName] = tokens; + let importedName = createImportedName(path, myName); + icssExports[myName] = importedName; + return { theirName, importedName }; } else { - throw new Error(`@import statement "${alias}" is invalid!`) + throw new Error(`@import statement "${alias}" is invalid!`); } }) .reduce((acc, { theirName, importedName }) => { - acc[importedName] = theirName - return acc - }, {}) - icssImports[path] = Object.assign({}, icssImports[path], aliases) - atRule.remove() + acc[importedName] = theirName; + return acc; + }, {}); + icssImports[path] = Object.assign({}, icssImports[path], aliases); + atRule.remove(); } - } + }; /* Look at all the @value statements and treat them as locals or as imports */ - css.walkAtRules('value', atRule => { + css.walkAtRules("value", atRule => { if (matchImports.exec(atRule.params)) { - addImport(atRule) + addImport(atRule); } else { - if (atRule.params.indexOf('@value') !== -1) { - result.warn('Invalid value definition: ' + atRule.params) + if (atRule.params.indexOf("@value") !== -1) { + result.warn("Invalid value definition: " + atRule.params); } - addDefinition(atRule) + addDefinition(atRule); } - }) - - if (Object.keys(icssExports).length === 0) return + }); - replaceSymbols(css, icssExports) + replaceSymbols(css, icssExports); - css.prepend(createICSSRules(icssImports, icssExports)) -}) + css.prepend(createICSSRules(icssImports, icssExports)); +}); diff --git a/test/test.js b/test/test.js index aa5654a..c7fbf8f 100644 --- a/test/test.js +++ b/test/test.js @@ -1,20 +1,22 @@ -const postcss = require('postcss') -const stripIndent = require('strip-indent') -const plugin = require('../src') +/* eslint-env jest */ +const postcss = require("postcss"); +const stripIndent = require("strip-indent"); +const plugin = require("../src"); -const strip = input => stripIndent(input).replace(/^\n/, '') -const run = input => postcss([plugin]).process(strip(input)) -const runCSS = input => run(input).then(result => result.css) +const strip = input => stripIndent(input).trim(); +const compile = input => postcss([plugin]).process(strip(input)); +const runCSS = input => compile(input).then(result => result.css); const runWarnings = input => - run(input) + compile(input) .then(result => result.warnings()) - .then(warnings => warnings.map(warning => warning.text)) + .then(warnings => warnings.map(warning => warning.text)); -test('should pass through an empty string', () => { - return expect(runCSS('')).resolves.toEqual('') -}) +const run = ({ fixture, expected }) => + compile(fixture).then(result => { + expect(result.css.trim()).toEqual(strip(expected)); + }); -test('should export a constant', () => { +test("should export a constant", () => { return expect( runCSS(` @value red blue;@value red blue; @@ -25,21 +27,21 @@ test('should export a constant', () => { red: blue } `) - ) -}) + ); +}); -test('gives an error when there is no semicolon between lines', () => { +test("gives an error when there is no semicolon between lines", () => { return expect( runWarnings(` @value red blue @value green yellow `) ).resolves.toEqual([ - 'Invalid value definition: red blue\n@value green yellow' - ]) -}) + "Invalid value definition: red blue\n@value green yellow" + ]); +}); -test('should export a more complex constant', () => { +test("should export a more complex constant", () => { return expect( runCSS(` @value small (max-width: 599px); @@ -50,10 +52,10 @@ test('should export a more complex constant', () => { small: (max-width: 599px) } `) - ) -}) + ); +}); -test('should replace constants within the file', () => { +test("should replace constants within the file", () => { return expect( runCSS(` @value blue red; .foo { color: blue; } @@ -65,27 +67,27 @@ test('should replace constants within the file', () => { } .foo { color: red; } `) - ) -}) + ); +}); -test('should import and re-export a simple constant', () => { +test("should import and re-export a simple constant", () => { return expect( runCSS(` @value red from "./colors.css"; `) ).resolves.toEqual( strip(` - :import("./colors.css") { - i__value_red_0: red + :import('./colors.css') { + __value__red__0: red } :export { - red: i__value_red_0 + red: __value__red__0 } `) - ) -}) + ); +}); -test('should import a simple constant and replace usages', () => { +test("should import a simple constant and replace usages", () => { return expect( runCSS(` @value red from "./colors.css"; @@ -93,18 +95,18 @@ test('should import a simple constant and replace usages', () => { `) ).resolves.toEqual( strip(` - :import("./colors.css") { - i__value_red_0: red; + :import('./colors.css') { + __value__red__0: red; } :export { - red: i__value_red_0; + red: __value__red__0; } - .foo { color: i__value_red_0; } + .foo { color: __value__red__0; } `) - ) -}) + ); +}); -test('should import and alias a constant and replace usages', () => { +test("should import and alias a constant and replace usages", () => { return expect( runCSS(` @value blue as red from "./colors.css"; @@ -112,18 +114,18 @@ test('should import and alias a constant and replace usages', () => { `) ).resolves.toEqual( strip(` - :import("./colors.css") { - i__value_red_0: blue; + :import('./colors.css') { + __value__red__0: blue; } :export { - red: i__value_red_0; + red: __value__red__0; } - .foo { color: i__value_red_0; } + .foo { color: __value__red__0; } `) - ) -}) + ); +}); -test('should import multiple from a single file', () => { +test("should import multiple from a single file", () => { return expect( runCSS(` @value blue, red from "./colors.css"; @@ -132,57 +134,39 @@ test('should import multiple from a single file', () => { `) ).resolves.toEqual( strip(` - :import("./colors.css") { - i__value_blue_0: blue; - i__value_red_1: red; + :import('./colors.css') { + __value__blue__0: blue; + __value__red__1: red; } :export { - blue: i__value_blue_0; - red: i__value_red_1; + blue: __value__blue__0; + red: __value__red__1; } - .foo { color: i__value_red_1; } - .bar { color: i__value_blue_0 } + .foo { color: __value__red__1; } + .bar { color: __value__blue__0 } `) - ) -}) + ); +}); -test('should import from a definition', () => { +test("not import from a definition", () => { return expect( runCSS(` @value colors: "./colors.css"; @value red from colors; `) ).resolves.toEqual( strip(` - :import("./colors.css") { - i__value_red_0: red + :import('colors') { + __value__red__0: red } :export { colors: "./colors.css"; - red: i__value_red_0 - } - `) - ) -}) - -test('should only allow values for paths if defined in the right order', () => { - return expect( - runCSS(` - @value red from colors; @value colors: "./colors.css"; - `) - ).resolves.toEqual( - strip(` - :import(colors) { - i__value_red_0: red - } - :export { - red: i__value_red_0; - colors: "./colors.css" + red: __value__red__0 } `) - ) -}) + ); +}); -test('should allow transitive values', () => { +test("should allow transitive values", () => { return expect( runCSS(` @value aaa: red; @@ -197,10 +181,10 @@ test('should allow transitive values', () => { } .a { color: red; } `) - ) -}) + ); +}); -test('should allow transitive values within calc', () => { +test("should allow transitive values within calc", () => { return expect( runCSS(` @value base: 10px; @@ -215,49 +199,49 @@ test('should allow transitive values within calc', () => { } .a { margin: calc(10px * 2); } `) - ) -}) + ); +}); -test('should preserve import order', () => { +test("should preserve import order", () => { return expect( runCSS(` @value a from "./a.css"; @value b from "./b.css"; `) ).resolves.toEqual( strip(` - :import("./a.css") { - i__value_a_0: a + :import('./a.css') { + __value__a__0: a } - :import("./b.css") { - i__value_b_1: b + :import('./b.css') { + __value__b__1: b } :export { - a: i__value_a_0; - b: i__value_b_1 + a: __value__a__0; + b: __value__b__1 } `) - ) -}) + ); +}); -test('should allow custom-property-style names', () => { +test("should allow custom-property-style names", () => { return expect( runCSS(` @value --red from "./colors.css"; .foo { color: --red; } `) ).resolves.toEqual( strip(` - :import("./colors.css") { - i__value___red_0: --red; + :import('./colors.css') { + __value____red__0: --red; } :export { - --red: i__value___red_0; + --red: __value____red__0; } - .foo { color: i__value___red_0; } + .foo { color: __value____red__0; } `) - ) -}) + ); +}); -test('should allow all colour types', () => { +test("should allow all colour types", () => { return expect( runCSS(` @value named: red; @@ -290,10 +274,10 @@ test('should allow all colour types', () => { outline-color: hsla(220, 13.0%, 18.0%, 1); } `) - ) -}) + ); +}); -test('should import multiple from a single file on multiple lines', () => { +test("should import multiple from a single file on multiple lines", () => { return expect( runCSS(` @value ( @@ -305,21 +289,21 @@ test('should import multiple from a single file on multiple lines', () => { `) ).resolves.toEqual( strip(` - :import("./colors.css") { - i__value_blue_0: blue; - i__value_red_1: red; + :import('./colors.css') { + __value__blue__0: blue; + __value__red__1: red; } :export { - blue: i__value_blue_0; - red: i__value_red_1; + blue: __value__blue__0; + red: __value__red__1; } - .foo { color: i__value_red_1; } - .bar { color: i__value_blue_0 } + .foo { color: __value__red__1; } + .bar { color: __value__blue__0 } `) - ) -}) + ); +}); -test('should allow definitions with commas in them', () => { +test("should allow definitions with commas in them", () => { return expect( runCSS(` @value coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14) ; @@ -332,10 +316,10 @@ test('should allow definitions with commas in them', () => { } .foo { box-shadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14); } `) - ) -}) + ); +}); -test('should allow values with nested parantheses', () => { +test("should allow values with nested parantheses", () => { return expect( runCSS(` @value aaa: color(red lightness(50%)); @@ -346,10 +330,10 @@ test('should allow values with nested parantheses', () => { aaa: color(red lightness(50%)) } `) - ) -}) + ); +}); -test('reuse existing :import with same name and :export', () => { +test("reuse existing :import with same name and :export", () => { return expect( runCSS(` :import('./colors.css') { @@ -364,33 +348,27 @@ test('reuse existing :import with same name and :export', () => { strip(` :import('./colors.css') { i__some_import: blue; - i__value_a_0: a + __value__a__0: a } :export { b: i__c; - a: i__value_a_0 + a: __value__a__0 } `) - ) -}) + ); +}); -test('prevent imported names collision', () => { - return expect( - runCSS(` - :import(colors) { - i__value_a_0: a; - } - @value a from colors; - `) - ).resolves.toEqual( - strip(` - :import(colors) { - i__value_a_0: a; - i__value_a_1: a - } - :export { - a: i__value_a_1 - } - `) - ) -}) +test("save :import and :export statements", () => { + const input = ` + :import('path') { + __imported: value + } + :export { + local: __imported + } + `; + return run({ + fixture: input, + expected: input + }); +}); diff --git a/yarn.lock b/yarn.lock index 929966c..0d21dfa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16,11 +16,29 @@ acorn-globals@^3.1.0: dependencies: acorn "^4.0.4" +acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + +acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + acorn@^4.0.4: version "4.0.11" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0" -ajv@^4.9.1: +acorn@^5.0.1: + version "5.0.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" + +ajv-keywords@^1.0.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" + +ajv@^4.7.0, ajv@^4.9.1: version "4.11.8" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" dependencies: @@ -43,6 +61,10 @@ ansi-escapes@^1.0.0, ansi-escapes@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" +ansi-escapes@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b" + ansi-regex@^2.0.0, ansi-regex@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" @@ -105,6 +127,16 @@ array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + array-unique@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" @@ -125,10 +157,6 @@ assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" -ast-types@0.9.8: - version "0.9.8" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.8.tgz#6cb6a40beba31f49f20928e28439fc14a3dab078" - async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" @@ -176,7 +204,7 @@ babel-cli@^6.5.2: optionalDependencies: chokidar "^1.6.1" -babel-code-frame@6.22.0, babel-code-frame@^6.22.0: +babel-code-frame@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" dependencies: @@ -571,9 +599,9 @@ babel-polyfill@^6.23.0: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-preset-env@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.5.0.tgz#6e5452f7c8742afe3b9a917883ccf3f7a4f340c5" +babel-preset-env@^1.5.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.5.2.tgz#cd4ae90a6e94b709f97374b33e5f8b983556adef" dependencies: babel-plugin-check-es2015-constants "^6.22.0" babel-plugin-syntax-trailing-function-commas "^6.22.0" @@ -664,10 +692,6 @@ babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1: lodash "^4.2.0" to-fast-properties "^1.0.1" -babylon@7.0.0-beta.8: - version "7.0.0-beta.8" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.8.tgz#2bdc5ae366041442c27e068cce6f0d7c06ea9949" - babylon@^6.11.0, babylon@^6.13.0, babylon@^6.15.0: version "6.17.1" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.1.tgz#17f14fddf361b695981fe679385e4f1c01ebd86f" @@ -746,6 +770,16 @@ builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" +caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + +callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" @@ -773,7 +807,7 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chalk@1.1.3, chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -802,12 +836,22 @@ ci-info@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" +circular-json@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" + cli-cursor@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" dependencies: restore-cursor "^1.0.1" +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + dependencies: + restore-cursor "^2.0.0" + cli-spinners@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c" @@ -819,6 +863,10 @@ cli-truncate@^0.2.1: slice-ansi "0.0.4" string-width "^1.0.1" +cli-width@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" + cliui@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" @@ -869,6 +917,14 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" +concat-stream@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" @@ -936,7 +992,7 @@ date-fns@^1.27.2: version "1.28.5" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.28.5.tgz#257cfc45d322df45ef5658665967ee841cd73faf" -debug@^2.1.1, debug@^2.2.0, debug@^2.6.3: +debug@^2.1.1, debug@^2.2.0, debug@^2.6.3, debug@^2.6.8: version "2.6.8" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" dependencies: @@ -960,6 +1016,18 @@ default-require-extensions@^1.0.0: dependencies: strip-bom "^2.0.0" +del@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" @@ -978,6 +1046,13 @@ diff@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" +doctrine@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + ecc-jsbn@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" @@ -1019,6 +1094,57 @@ escodegen@^1.6.1: optionalDependencies: source-map "~0.2.0" +eslint-scope@^3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.0.0.tgz#7277c01437fdf41dccd168d5aa0e49b75ca1f260" + dependencies: + babel-code-frame "^6.22.0" + chalk "^1.1.3" + concat-stream "^1.6.0" + debug "^2.6.8" + doctrine "^2.0.0" + eslint-scope "^3.7.1" + espree "^3.4.3" + esquery "^1.0.0" + estraverse "^4.2.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + glob "^7.1.2" + globals "^9.17.0" + ignore "^3.3.3" + imurmurhash "^0.1.4" + inquirer "^3.0.6" + is-my-json-valid "^2.16.0" + is-resolvable "^1.0.0" + js-yaml "^3.8.4" + json-stable-stringify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + pluralize "^4.0.0" + progress "^2.0.0" + require-uncached "^1.0.3" + strip-json-comments "~2.0.1" + table "^4.0.1" + text-table "~0.2.0" + +espree@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.3.tgz#2910b5ccd49ce893c2ffffaab4fd8b3a31b82374" + dependencies: + acorn "^5.0.1" + acorn-jsx "^3.0.0" + esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" @@ -1027,11 +1153,32 @@ esprima@^3.1.1: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" +esquery@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" + dependencies: + estraverse "^4.0.0" + +esrecurse@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" + dependencies: + estraverse "~4.1.0" + object-assign "^4.0.1" + estraverse@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" -esutils@2.0.2, esutils@^2.0.2: +estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + +estraverse@~4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" + +esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" @@ -1041,9 +1188,9 @@ exec-sh@^0.2.0: dependencies: merge "^1.1.3" -execa@^0.6.0: - version "0.6.3" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.6.3.tgz#57b69a594f081759c69e5370f0d17b9cb11658fe" +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" dependencies: cross-spawn "^5.0.1" get-stream "^3.0.0" @@ -1073,6 +1220,14 @@ extend@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" +external-editor@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.4.tgz#1ed9199da9cbfe2ef2f7a31b2fde8b0d12368972" + dependencies: + iconv-lite "^0.4.17" + jschardet "^1.4.2" + tmp "^0.0.31" + extglob@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" @@ -1106,6 +1261,19 @@ figures@^1.7.0: escape-string-regexp "^1.0.5" object-assign "^4.1.0" +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + filename-regex@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" @@ -1144,9 +1312,14 @@ find-up@^2.1.0: dependencies: locate-path "^2.0.0" -flow-parser@0.45.0: - version "0.45.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.45.0.tgz#aa29d4ae27f06aa02817772bba0fcbefef7e62f0" +flat-cache@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" + dependencies: + circular-json "^0.3.1" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" for-in@^1.0.1: version "1.0.2" @@ -1215,14 +1388,20 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + 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-stdin@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" - get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -1246,18 +1425,7 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob@7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -1268,10 +1436,21 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^9.0.0: +globals@^9.0.0, globals@^9.17.0: version "9.17.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.17.0.tgz#0c0ca696d9b9bb694d2e5470bd37777caad50286" +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.4: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" @@ -1357,9 +1536,9 @@ http-signature@~1.1.0: jsprim "^1.2.2" sshpk "^1.7.0" -husky@^0.13.3: - version "0.13.3" - resolved "https://registry.yarnpkg.com/husky/-/husky-0.13.3.tgz#bc2066080badc8b8fe3516e881f5bc68a57052ff" +husky@^0.13.4: + version "0.13.4" + resolved "https://registry.yarnpkg.com/husky/-/husky-0.13.4.tgz#48785c5028de3452a51c48c12c4f94b2124a1407" dependencies: chalk "^1.1.3" find-parent-dir "^0.3.0" @@ -1370,11 +1549,23 @@ iconv-lite@0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" -icss-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-2.0.0.tgz#9eb8432af871adc003e4ac7a574d24169398317d" +iconv-lite@^0.4.17: + version "0.4.18" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2" + +icss-utils@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-3.0.1.tgz#ee70d3ae8cac38c6be5ed91e851b27eed343ad0f" dependencies: - postcss "^6.0.1" + postcss "^6.0.2" + +ignore@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" indent-string@^2.1.0: version "2.1.0" @@ -1393,7 +1584,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -1401,6 +1592,25 @@ ini@~1.3.0: version "1.3.4" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" +inquirer@^3.0.6: + version "3.1.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.1.0.tgz#e05400d48b94937c2d3caa7038663ba9189aab01" + dependencies: + ansi-escapes "^2.0.0" + chalk "^1.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.4" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.0.0" + strip-ansi "^3.0.0" + through "^2.3.6" + invariant@^2.2.0, invariant@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" @@ -1467,18 +1677,47 @@ is-fullwidth-code-point@^1.0.0: dependencies: number-is-nan "^1.0.0" +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + is-glob@^2.0.0, is-glob@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" dependencies: is-extglob "^1.0.0" +is-my-json-valid@^2.16.0: + version "2.16.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + is-number@^2.0.2, is-number@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" dependencies: kind-of "^3.0.2" +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + dependencies: + path-is-inside "^1.0.1" + is-posix-bracket@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" @@ -1491,6 +1730,16 @@ is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-resolvable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" + dependencies: + tryit "^1.0.1" + is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -1503,7 +1752,7 @@ is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" -isarray@1.0.0, isarray@~1.0.0: +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -1588,9 +1837,9 @@ jest-changed-files@^20.0.3: version "20.0.3" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-20.0.3.tgz#9394d5cc65c438406149bef1bf4d52b68e03e3f8" -jest-cli@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-20.0.3.tgz#fe88ddbb7a9f3a16d0ed55339a0a2424f7f0d361" +jest-cli@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-20.0.4.tgz#e532b19d88ae5bc6c417e8b0593a6fe954b1dc93" dependencies: ansi-escapes "^1.4.0" callsites "^2.0.0" @@ -1602,15 +1851,15 @@ jest-cli@^20.0.3: istanbul-lib-instrument "^1.4.2" istanbul-lib-source-maps "^1.1.0" jest-changed-files "^20.0.3" - jest-config "^20.0.3" + jest-config "^20.0.4" jest-docblock "^20.0.3" jest-environment-jsdom "^20.0.3" - jest-haste-map "^20.0.3" - jest-jasmine2 "^20.0.3" + jest-haste-map "^20.0.4" + jest-jasmine2 "^20.0.4" jest-message-util "^20.0.3" jest-regex-util "^20.0.3" jest-resolve-dependencies "^20.0.3" - jest-runtime "^20.0.3" + jest-runtime "^20.0.4" jest-snapshot "^20.0.3" jest-util "^20.0.3" micromatch "^2.3.11" @@ -1623,18 +1872,18 @@ jest-cli@^20.0.3: worker-farm "^1.3.1" yargs "^7.0.2" -jest-config@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-20.0.3.tgz#a934f27eea764915801cdda26f6f8eec2ac79266" +jest-config@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-20.0.4.tgz#e37930ab2217c913605eff13e7bd763ec48faeea" dependencies: chalk "^1.1.3" glob "^7.1.1" jest-environment-jsdom "^20.0.3" jest-environment-node "^20.0.3" - jest-jasmine2 "^20.0.3" + jest-jasmine2 "^20.0.4" jest-matcher-utils "^20.0.3" jest-regex-util "^20.0.3" - jest-resolve "^20.0.3" + jest-resolve "^20.0.4" jest-validate "^20.0.3" pretty-format "^20.0.3" @@ -1666,9 +1915,9 @@ jest-environment-node@^20.0.3: jest-mock "^20.0.3" jest-util "^20.0.3" -jest-haste-map@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.0.3.tgz#6377d537eaf34eb5f75121a691cae3fde82ba971" +jest-haste-map@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-20.0.4.tgz#653eb55c889ce3c021f7b94693f20a4159badf03" dependencies: fb-watchman "^2.0.0" graceful-fs "^4.1.11" @@ -1677,9 +1926,9 @@ jest-haste-map@^20.0.3: sane "~1.6.0" worker-farm "^1.3.1" -jest-jasmine2@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-20.0.3.tgz#18c4e9d029da7ed1ae727c55300064d1a0542974" +jest-jasmine2@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-20.0.4.tgz#fcc5b1411780d911d042902ef1859e852e60d5e1" dependencies: chalk "^1.1.3" graceful-fs "^4.1.11" @@ -1691,13 +1940,6 @@ jest-jasmine2@^20.0.3: once "^1.4.0" p-map "^1.1.1" -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" - dependencies: - chalk "^1.1.3" - pretty-format "^19.0.0" - jest-matcher-utils@^20.0.3: version "20.0.3" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-20.0.3.tgz#b3a6b8e37ca577803b0832a98b164f44b7815612" @@ -1736,17 +1978,17 @@ jest-resolve-dependencies@^20.0.3: dependencies: jest-regex-util "^20.0.3" -jest-resolve@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-20.0.3.tgz#375307aa40f78532d40ff8b17d5300b1519f8dd4" +jest-resolve@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-20.0.4.tgz#9448b3e8b6bafc15479444c6499045b7ffe597a5" dependencies: browser-resolve "^1.11.2" is-builtin-module "^1.0.0" resolve "^1.3.2" -jest-runtime@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-20.0.3.tgz#dddd22bbc429e26e6a96d1acd46ca55714b09252" +jest-runtime@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-20.0.4.tgz#a2c802219c4203f754df1404e490186169d124d8" dependencies: babel-core "^6.0.0" babel-jest "^20.0.3" @@ -1754,10 +1996,10 @@ jest-runtime@^20.0.3: chalk "^1.1.3" convert-source-map "^1.4.0" graceful-fs "^4.1.11" - jest-config "^20.0.3" - jest-haste-map "^20.0.3" + jest-config "^20.0.4" + jest-haste-map "^20.0.4" jest-regex-util "^20.0.3" - jest-resolve "^20.0.3" + jest-resolve "^20.0.4" jest-util "^20.0.3" json-stable-stringify "^1.0.1" micromatch "^2.3.11" @@ -1787,15 +2029,6 @@ jest-util@^20.0.3: leven "^2.1.0" mkdirp "^0.5.1" -jest-validate@19.0.0: - version "19.0.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-19.0.0.tgz#8c6318a20ecfeaba0ba5378bfbb8277abded4173" - dependencies: - chalk "^1.1.1" - jest-matcher-utils "^19.0.0" - leven "^2.0.0" - pretty-format "^19.0.0" - jest-validate@^20.0.3: version "20.0.3" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-20.0.3.tgz#d0cfd1de4f579f298484925c280f8f1d94ec3cab" @@ -1805,11 +2038,11 @@ jest-validate@^20.0.3: leven "^2.1.0" pretty-format "^20.0.3" -jest@^20.0.3: - version "20.0.3" - resolved "https://registry.yarnpkg.com/jest/-/jest-20.0.3.tgz#e4fd054c4f1170a116a00761da4cfdb73f1cdc33" +jest@^20.0.4: + version "20.0.4" + resolved "https://registry.yarnpkg.com/jest/-/jest-20.0.4.tgz#3dd260c2989d6dad678b1e9cc4d91944f6d602ac" dependencies: - jest-cli "^20.0.3" + jest-cli "^20.0.4" jodid25519@^1.0.0: version "1.0.2" @@ -1821,7 +2054,7 @@ js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" -js-yaml@^3.4.3, js-yaml@^3.7.0: +js-yaml@^3.4.3, js-yaml@^3.7.0, js-yaml@^3.8.4: version "3.8.4" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6" dependencies: @@ -1832,6 +2065,10 @@ jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" +jschardet@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.4.2.tgz#2aa107f142af4121d145659d44f50830961e699a" + jsdom@^9.12.0: version "9.12.0" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" @@ -1886,6 +2123,10 @@ jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" +jsonpointer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + jsprim@^1.2.2: version "1.4.0" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" @@ -1911,27 +2152,29 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" -leven@^2.0.0, leven@^2.1.0: +leven@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" -levn@~0.3.0: +levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" dependencies: prelude-ls "~1.1.2" type-check "~0.3.2" -lint-staged@^3.4.2: - version "3.4.2" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-3.4.2.tgz#9cd1c0e4e477326c2696802a8377c22f92d65e79" +lint-staged@^3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-3.6.1.tgz#24423c8b7bd99d96e15acd1ac8cb392a78e58582" dependencies: app-root-path "^2.0.0" cosmiconfig "^1.1.0" - execa "^0.6.0" + execa "^0.7.0" listr "^0.12.0" + lodash.chunk "^4.2.0" minimatch "^3.0.0" npm-which "^3.0.1" + p-map "^1.1.1" staged-git-files "0.0.4" listr-silent-renderer@^1.1.1: @@ -1998,7 +2241,11 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" -lodash@^4.14.0, lodash@^4.2.0: +lodash.chunk@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.chunk/-/lodash.chunk-4.2.0.tgz#66e5ce1f76ed27b4303d8c6512e8d1216e8106bc" + +lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -2070,6 +2317,10 @@ mime-types@^2.1.12, mime-types@~2.1.7: dependencies: mime-db "~1.27.0" +mimic-fn@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" + minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -2080,7 +2331,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.2.0, minimist@^1.1.1, minimist@^1.2.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" @@ -2094,6 +2345,10 @@ ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + nan@^2.3.0: version "2.6.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45" @@ -2217,6 +2472,12 @@ onetime@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + dependencies: + mimic-fn "^1.0.0" + optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" @@ -2224,7 +2485,7 @@ optimist@^0.6.1: minimist "~0.0.1" wordwrap "~0.0.2" -optionator@^0.8.1: +optionator@^0.8.1, optionator@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" dependencies: @@ -2254,7 +2515,7 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1: +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -2324,6 +2585,10 @@ 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" +path-is-inside@^1.0.1, path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + path-key@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" @@ -2358,9 +2623,13 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" -postcss@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.1.tgz#000dbd1f8eef217aa368b9a212c5fc40b2a8f3f2" +pluralize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-4.0.0.tgz#59b708c1c0190a2f692f1c7618c446b052fd1762" + +postcss@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.2.tgz#5c4fea589f0ac3b00caa75b1cbc3a284195b7e5d" dependencies: chalk "^1.1.3" source-map "^0.5.6" @@ -2374,26 +2643,9 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.3.1.tgz#fa0ea84b45ac0ba6de6a1e4cecdcff900d563151" - dependencies: - ast-types "0.9.8" - babel-code-frame "6.22.0" - babylon "7.0.0-beta.8" - chalk "1.1.3" - esutils "2.0.2" - flow-parser "0.45.0" - get-stdin "5.0.1" - glob "7.1.1" - jest-validate "19.0.0" - minimist "1.2.0" - -pretty-format@^19.0.0: - version "19.0.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-19.0.0.tgz#56530d32acb98a3fa4851c4e2b9d37b420684c84" - dependencies: - ansi-styles "^3.0.0" +prettier@^1.4.4: + version "1.4.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.4.4.tgz#a8d1447b14c9bf67e6d420dcadd10fb9a4fad65a" pretty-format@^20.0.3: version "20.0.3" @@ -2410,6 +2662,10 @@ process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" +progress@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" + prr@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" @@ -2457,7 +2713,7 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.4: +readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.2.2: version "2.2.9" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8" dependencies: @@ -2576,6 +2832,17 @@ require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" +require-uncached@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + +resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" @@ -2593,18 +2860,41 @@ restore-cursor@^1.0.1: exit-hook "^1.0.0" onetime "^1.0.0" +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + right-align@^0.1.1: version "0.1.3" resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.5.1, rimraf@^2.6.1: +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: glob "^7.0.5" +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + dependencies: + is-promise "^2.1.0" + +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + dependencies: + rx-lite "*" + +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" + rxjs@^5.0.0-beta.11: version "5.4.0" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.0.tgz#a7db14ab157f9d7aac6a56e655e7a3860d39bf26" @@ -2657,7 +2947,7 @@ shellwords@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" -signal-exit@^3.0.0: +signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -2752,6 +3042,13 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" +string-width@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^3.0.0" + string_decoder@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.1.tgz#62e200f039955a6810d8df0a33ffc0f013662d98" @@ -2808,6 +3105,17 @@ symbol-tree@^3.2.1: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" +table@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.1.tgz#a8116c133fac2c61f4a420ab6cdf5c4d61f0e435" + dependencies: + ajv "^4.7.0" + ajv-keywords "^1.0.0" + chalk "^1.1.1" + lodash "^4.0.0" + slice-ansi "0.0.4" + string-width "^2.0.0" + tar-pack@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.0.tgz#23be2d7f671a8339376cbdb0b8fe3fdebf317984" @@ -2839,10 +3147,24 @@ test-exclude@^4.1.0: read-pkg-up "^1.0.1" require-main-filename "^1.0.1" +text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + throat@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/throat/-/throat-3.0.0.tgz#e7c64c867cbb3845f10877642f7b60055b8ec0d6" +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +tmp@^0.0.31: + version "0.0.31" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" + dependencies: + os-tmpdir "~1.0.1" + tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" @@ -2865,6 +3187,10 @@ trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" +tryit@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -2881,6 +3207,10 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + uglify-js@^2.6: version "2.8.27" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.27.tgz#47787f912b0f242e5b984343be8e35e95f694c9c" @@ -3010,11 +3340,17 @@ wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" +write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + xml-name-validator@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" -"xtend@>=4.0.0 <4.1.0-0": +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" From d624ca4f2574656f717ff84bb91d0db13db12aef Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Thu, 15 Jun 2017 21:56:22 +0300 Subject: [PATCH 40/64] Remove postcss hack --- src/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/index.js b/src/index.js index 3af2578..b640ce3 100644 --- a/src/index.js +++ b/src/index.js @@ -13,7 +13,6 @@ const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/; const matchValueDefinition = /(?:\s+|^)([\w-]+):?\s+(.+?)\s*$/g; const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/; -// 'i' prefix to prevent postcss parsing "_" as css hook const getAliasName = (name, index) => `__value__${name.replace(/\W/g, "_")}__${index}`; From 56340ce039222b89e3a517ea24c7021bafff3fdb Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Sun, 18 Jun 2017 20:00:13 +0300 Subject: [PATCH 41/64] Refactor tests --- test/test.js | 279 ++++++++++++++++++++++++--------------------------- 1 file changed, 131 insertions(+), 148 deletions(-) diff --git a/test/test.js b/test/test.js index c7fbf8f..d98ea06 100644 --- a/test/test.js +++ b/test/test.js @@ -4,97 +4,92 @@ const stripIndent = require("strip-indent"); const plugin = require("../src"); const strip = input => stripIndent(input).trim(); + const compile = input => postcss([plugin]).process(strip(input)); -const runCSS = input => compile(input).then(result => result.css); -const runWarnings = input => - compile(input) - .then(result => result.warnings()) - .then(warnings => warnings.map(warning => warning.text)); -const run = ({ fixture, expected }) => +const getWarnings = result => result.warnings().map(warning => warning.text); + +const run = ({ fixture, expected, warnings = [] }) => compile(fixture).then(result => { - expect(result.css.trim()).toEqual(strip(expected)); + expect(getWarnings(result)).toEqual(warnings); + if (expected) { + expect(result.css.trim()).toEqual(strip(expected)); + } }); -test("should export a constant", () => { - return expect( - runCSS(` +test("export a constant", () => { + return run({ + fixture: ` @value red blue;@value red blue; - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :export { red: blue } - `) - ); + ` + }); }); -test("gives an error when there is no semicolon between lines", () => { - return expect( - runWarnings(` +test("warn when there is no semicolon between lines", () => { + return run({ + fixture: ` @value red blue @value green yellow - `) - ).resolves.toEqual([ - "Invalid value definition: red blue\n@value green yellow" - ]); + `, + warnings: ["Invalid value definition: red blue\n@value green yellow"] + }); }); -test("should export a more complex constant", () => { - return expect( - runCSS(` +test("export a more complex constant", () => { + return run({ + fixture: ` @value small (max-width: 599px); - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :export { small: (max-width: 599px) } - `) - ); + ` + }); }); -test("should replace constants within the file", () => { - return expect( - runCSS(` +test("replace constants within the file", () => { + return run({ + fixture: ` @value blue red; .foo { color: blue; } - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :export { blue: red; } .foo { color: red; } - `) - ); + ` + }); }); -test("should import and re-export a simple constant", () => { - return expect( - runCSS(` +test("import and re-export a simple constant", () => { + return run({ + fixture: ` @value red from "./colors.css"; - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :import('./colors.css') { __value__red__0: red } :export { red: __value__red__0 } - `) - ); + ` + }); }); -test("should import a simple constant and replace usages", () => { - return expect( - runCSS(` +test("import a simple constant and replace usages", () => { + return run({ + fixture: ` @value red from "./colors.css"; .foo { color: red; } - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :import('./colors.css') { __value__red__0: red; } @@ -102,18 +97,17 @@ test("should import a simple constant and replace usages", () => { red: __value__red__0; } .foo { color: __value__red__0; } - `) - ); + ` + }); }); -test("should import and alias a constant and replace usages", () => { - return expect( - runCSS(` +test("import and alias a constant and replace usages", () => { + return run({ + fixture: ` @value blue as red from "./colors.css"; .foo { color: red; } - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :import('./colors.css') { __value__red__0: blue; } @@ -121,19 +115,18 @@ test("should import and alias a constant and replace usages", () => { red: __value__red__0; } .foo { color: __value__red__0; } - `) - ); + ` + }); }); -test("should import multiple from a single file", () => { - return expect( - runCSS(` +test("import multiple from a single file", () => { + return run({ + fixture: ` @value blue, red from "./colors.css"; .foo { color: red; } .bar { color: blue } - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :import('./colors.css') { __value__blue__0: blue; __value__red__1: red; @@ -144,17 +137,16 @@ test("should import multiple from a single file", () => { } .foo { color: __value__red__1; } .bar { color: __value__blue__0 } - `) - ); + ` + }); }); test("not import from a definition", () => { - return expect( - runCSS(` + return run({ + fixture: ` @value colors: "./colors.css"; @value red from colors; - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :import('colors') { __value__red__0: red } @@ -162,53 +154,50 @@ test("not import from a definition", () => { colors: "./colors.css"; red: __value__red__0 } - `) - ); + ` + }); }); -test("should allow transitive values", () => { - return expect( - runCSS(` +test("allow transitive values", () => { + return run({ + fixture: ` @value aaa: red; @value bbb: aaa; .a { color: bbb; } - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :export { aaa: red; bbb: red; } .a { color: red; } - `) - ); + ` + }); }); -test("should allow transitive values within calc", () => { - return expect( - runCSS(` +test("allow transitive values within calc", () => { + return run({ + fixture: ` @value base: 10px; @value large: calc(base * 2); .a { margin: large; } - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :export { base: 10px; large: calc(10px * 2); } .a { margin: calc(10px * 2); } - `) - ); + ` + }); }); -test("should preserve import order", () => { - return expect( - runCSS(` +test("preserve import order", () => { + return run({ + fixture: ` @value a from "./a.css"; @value b from "./b.css"; - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :import('./a.css') { __value__a__0: a } @@ -219,17 +208,16 @@ test("should preserve import order", () => { a: __value__a__0; b: __value__b__1 } - `) - ); + ` + }); }); -test("should allow custom-property-style names", () => { - return expect( - runCSS(` +test("allow custom-property-style names", () => { + return run({ + fixture: ` @value --red from "./colors.css"; .foo { color: --red; } - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :import('./colors.css') { __value____red__0: --red; } @@ -237,13 +225,13 @@ test("should allow custom-property-style names", () => { --red: __value____red__0; } .foo { color: __value____red__0; } - `) - ); + ` + }); }); -test("should allow all colour types", () => { - return expect( - runCSS(` +test("allow all colour types", () => { + return run({ + fixture: ` @value named: red; @value 3char #0f0; @value 6char #00ff00; @@ -256,9 +244,8 @@ test("should allow all colour types", () => { border-bottom-color: rgba; outline-color: hsla; } - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :export { named: red; 3char: #0f0; @@ -273,22 +260,21 @@ test("should allow all colour types", () => { border-bottom-color: rgba(34, 12, 64, 0.3); outline-color: hsla(220, 13.0%, 18.0%, 1); } - `) - ); + ` + }); }); -test("should import multiple from a single file on multiple lines", () => { - return expect( - runCSS(` +test("import multiple from a single file on multiple lines", () => { + return run({ + fixture: ` @value ( blue, red ) from "./colors.css"; .foo { color: red; } .bar { color: blue } - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :import('./colors.css') { __value__blue__0: blue; __value__red__1: red; @@ -299,43 +285,41 @@ test("should import multiple from a single file on multiple lines", () => { } .foo { color: __value__red__1; } .bar { color: __value__blue__0 } - `) - ); + ` + }); }); -test("should allow definitions with commas in them", () => { - return expect( - runCSS(` +test("allow definitions with commas in them", () => { + return run({ + fixture: ` @value coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14) ; .foo { box-shadow: coolShadow; } - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :export { coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14); } .foo { box-shadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14); } - `) - ); + ` + }); }); -test("should allow values with nested parantheses", () => { - return expect( - runCSS(` +test("allow values with nested parantheses", () => { + return run({ + fixture: ` @value aaa: color(red lightness(50%)); - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :export { aaa: color(red lightness(50%)) } - `) - ); + ` + }); }); test("reuse existing :import with same name and :export", () => { - return expect( - runCSS(` + return run({ + fixture: ` :import('./colors.css') { i__some_import: blue; } @@ -343,9 +327,8 @@ test("reuse existing :import with same name and :export", () => { b: i__c; } @value a from './colors.css'; - `) - ).resolves.toEqual( - strip(` + `, + expected: ` :import('./colors.css') { i__some_import: blue; __value__a__0: a @@ -354,8 +337,8 @@ test("reuse existing :import with same name and :export", () => { b: i__c; a: __value__a__0 } - `) - ); + ` + }); }); test("save :import and :export statements", () => { From 662642452d4d5cbf404cd549dd874d25eb286773 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Sun, 18 Jun 2017 20:05:34 +0300 Subject: [PATCH 42/64] Modulsify test --- test/test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test.js b/test/test.js index d98ea06..e6b6fd7 100644 --- a/test/test.js +++ b/test/test.js @@ -1,7 +1,7 @@ /* eslint-env jest */ -const postcss = require("postcss"); -const stripIndent = require("strip-indent"); -const plugin = require("../src"); +import postcss from "postcss"; +import stripIndent from "strip-indent"; +import plugin from "../src"; const strip = input => stripIndent(input).trim(); From d95bd38c874f8552881d425314c0ba32f2f99ed4 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Mon, 19 Jun 2017 10:11:03 +0300 Subject: [PATCH 43/64] Rewrite value parser --- package.json | 4 +- src/index.js | 178 ++++++++++++++++++++++++++++++++++++--------------- test/test.js | 165 +++++++++++++++++++++-------------------------- yarn.lock | 4 ++ 4 files changed, 205 insertions(+), 146 deletions(-) diff --git a/package.json b/package.json index 093e4a1..90322de 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,8 @@ }, "dependencies": { "icss-utils": "^3.0.1", - "postcss": "^6.0.2" + "lodash": "^4.17.4", + "postcss": "^6.0.2", + "postcss-value-parser": "^3.3.0" } } diff --git a/src/index.js b/src/index.js index b640ce3..c3b673f 100644 --- a/src/index.js +++ b/src/index.js @@ -1,84 +1,156 @@ /* eslint-env node */ import postcss from "postcss"; +import valueParser from "postcss-value-parser"; import { replaceSymbols, replaceValueSymbols, extractICSS, createICSSRules } from "icss-utils"; +import findLastIndex from "lodash/findLastIndex"; +import dropWhile from "lodash/dropWhile"; +import dropRightWhile from "lodash/dropRightWhile"; +import fromPairs from "lodash/fromPairs"; const plugin = "postcss-modules-values"; -const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/; -const matchValueDefinition = /(?:\s+|^)([\w-]+):?\s+(.+?)\s*$/g; -const matchImport = /^([\w-]+)(?:\s+as\s+([\w-]+))?/; +const chunkBy = (collection, iteratee) => + collection.reduce( + (acc, item) => + iteratee(item) + ? [...acc, []] + : [...acc.slice(0, -1), [...acc[acc.length - 1], item]], + [[]] + ); + +const isWord = node => node.type === "word"; + +const isDiv = node => node.type === "div"; + +const isSpace = node => node.type === "space"; + +const isNotSpace = node => !isSpace(node); + +const isFromWord = node => isWord(node) && node.value === "from"; + +const isAsWord = node => isWord(node) && node.value === "as"; + +const isComma = node => isDiv(node) && node.value === ","; + +const isColon = node => isDiv(node) && node.value === ":"; + +const isInitializer = node => isColon(node) || isSpace(node); + +const trimNodes = nodes => dropWhile(dropRightWhile(nodes, isSpace), isSpace); + +const getPathValue = nodes => + nodes.length === 1 && nodes[0].type === "string" ? nodes[0].value : null; + +const ensurePairsList = valuesNodes => + valuesNodes.length === 1 && valuesNodes[0].type === "function" + ? valuesNodes[0].nodes + : valuesNodes; + +const getAliasesPairs = valuesNodes => + chunkBy(ensurePairsList(valuesNodes), isComma).map(pairNodes => { + const nodes = pairNodes.filter(isNotSpace); + if (nodes.length === 1 && isWord(nodes[0])) { + return [nodes[0].value, nodes[0].value]; + } + if ( + nodes.length === 3 && + isWord(nodes[0]) && + isAsWord(nodes[1]) && + isWord(nodes[2]) + ) { + return [nodes[0].value, nodes[2].value]; + } + return null; + }); + +const parse = value => { + const parsed = valueParser(value).nodes; + const fromIndex = findLastIndex(parsed, isFromWord); + if (fromIndex === -1) { + if (parsed.length > 2 && isWord(parsed[0]) && isInitializer(parsed[1])) { + return { + type: "value", + name: parsed[0].value, + value: valueParser.stringify(trimNodes(parsed.slice(2))) + }; + } + return null; + } + const pairs = getAliasesPairs(trimNodes(parsed.slice(0, fromIndex))); + const path = getPathValue(trimNodes(parsed.slice(fromIndex + 1))); + if (pairs.every(Boolean) && path) { + return { + type: "import", + pairs, + path + }; + } + return null; +}; const getAliasName = (name, index) => `__value__${name.replace(/\W/g, "_")}__${index}`; +// TODO forbig '.' and '#' in names + module.exports = postcss.plugin(plugin, () => (css, result) => { const { icssImports, icssExports } = extractICSS(css); let importIndex = 0; const createImportedName = (path, name) => { const importedName = getAliasName(name, importIndex); - if (icssImports[path] && icssImports[path][importedName]) { - importIndex += 1; - return createImportedName(path, name); - } importIndex += 1; return importedName; }; - const addDefinition = atRule => { - let matches; - while ((matches = matchValueDefinition.exec(atRule.params))) { - let [, key, value] = matches; - // Add to the definitions, knowing that values can refer to each other - icssExports[key] = replaceValueSymbols(value, icssExports); - atRule.remove(); - } - }; - - const addImport = atRule => { - let matches = matchImports.exec(atRule.params); - if (matches) { - const aliasesString = matches[1]; - let path = matches[2]; - path = path[0] === "'" || path[0] === '"' ? path.slice(1, -1) : path; - let aliases = aliasesString - .replace(/^\(\s*([\s\S]+)\s*\)$/, "$1") - .split(/\s*,\s*/) - .map(alias => { - let tokens = matchImport.exec(alias); - if (tokens) { - let [, theirName, myName = theirName] = tokens; - let importedName = createImportedName(path, myName); - icssExports[myName] = importedName; - return { theirName, importedName }; - } else { - throw new Error(`@import statement "${alias}" is invalid!`); - } - }) - .reduce((acc, { theirName, importedName }) => { - acc[importedName] = theirName; - return acc; - }, {}); - icssImports[path] = Object.assign({}, icssImports[path], aliases); - atRule.remove(); - } - }; - - /* Look at all the @value statements and treat them as locals or as imports */ css.walkAtRules("value", atRule => { - if (matchImports.exec(atRule.params)) { - addImport(atRule); + if (atRule.params.indexOf("@value") !== -1) { + result.warn(`Invalid value definition "${atRule.params}"`, { + node: atRule + }); } else { - if (atRule.params.indexOf("@value") !== -1) { - result.warn("Invalid value definition: " + atRule.params); + const parsed = parse(atRule.params); + if (parsed) { + if (parsed.type === "value") { + if (icssExports[parsed.name]) { + result.warn(`"${parsed.name}" value already declared`, { + node: atRule + }); + } + icssExports[parsed.name] = replaceValueSymbols( + parsed.value, + icssExports + ); + } + if (parsed.type === "import") { + const pairs = parsed.pairs.map(([key, value]) => { + let importedName = createImportedName(parsed.path, value); + if (icssExports[value]) { + result.warn(`"${value}" value already declared`, { + node: atRule + }); + } + icssExports[value] = importedName; + return [importedName, key]; + }); + const aliases = fromPairs(pairs); + icssImports[parsed.path] = Object.assign( + {}, + icssImports[parsed.path], + aliases + ); + } + } else { + result.warn(`Invalid value definition "${atRule.params}"`, { + node: atRule + }); } - - addDefinition(atRule); } + atRule.remove(); }); replaceSymbols(css, icssExports); diff --git a/test/test.js b/test/test.js index e6b6fd7..3ad37aa 100644 --- a/test/test.js +++ b/test/test.js @@ -17,14 +17,16 @@ const run = ({ fixture, expected, warnings = [] }) => } }); -test("export a constant", () => { +test("export value", () => { return run({ fixture: ` - @value red blue;@value red blue; + @value red 1px solid #f00; + @value blue: 1px solid #00f; `, expected: ` :export { - red: blue + red: 1px solid #f00; + blue: 1px solid #00f } ` }); @@ -36,41 +38,34 @@ test("warn when there is no semicolon between lines", () => { @value red blue @value green yellow `, - warnings: ["Invalid value definition: red blue\n@value green yellow"] + warnings: [`Invalid value definition "red blue\n@value green yellow"`] }); }); -test("export a more complex constant", () => { +test("replace values within the file", () => { return run({ fixture: ` - @value small (max-width: 599px); - `, - expected: ` - :export { - small: (max-width: 599px) + @value blue red; + @media blue { + .blue { color: blue } } - ` - }); -}); - -test("replace constants within the file", () => { - return run({ - fixture: ` - @value blue red; .foo { color: blue; } `, expected: ` :export { - blue: red; + blue: red + } + @media red { + .red { color: red } } - .foo { color: red; } ` }); }); -test("import and re-export a simple constant", () => { +test("import external values", () => { return run({ fixture: ` @value red from "./colors.css"; + .foo { color: red } `, expected: ` :import('./colors.css') { @@ -79,82 +74,80 @@ test("import and re-export a simple constant", () => { :export { red: __value__red__0 } + .foo { color: __value__red__0 } ` }); }); -test("import a simple constant and replace usages", () => { +test("import multiple external values", () => { return run({ fixture: ` - @value red from "./colors.css"; - .foo { color: red; } + @value red, blue from 'path1'; + @value green, yellow from 'path2'; `, expected: ` - :import('./colors.css') { + :import('path1') { __value__red__0: red; + __value__blue__1: blue } - :export { - red: __value__red__0; - } - .foo { color: __value__red__0; } - ` - }); -}); - -test("import and alias a constant and replace usages", () => { - return run({ - fixture: ` - @value blue as red from "./colors.css"; - .foo { color: red; } - `, - expected: ` - :import('./colors.css') { - __value__red__0: blue; + :import('path2') { + __value__green__2: green; + __value__yellow__3: yellow } :export { red: __value__red__0; + blue: __value__blue__1; + green: __value__green__2; + yellow: __value__yellow__3 } - .foo { color: __value__red__0; } ` }); }); -test("import multiple from a single file", () => { +test("import external values with aliases", () => { return run({ fixture: ` - @value blue, red from "./colors.css"; - .foo { color: red; } - .bar { color: blue } + @value red as red1, blue as blue1 from 'path'; + .foo { color: red1; background: blue } `, expected: ` - :import('./colors.css') { - __value__blue__0: blue; - __value__red__1: red; + :import('path') { + __value__red1__0: red; + __value__blue1__1: blue } :export { - blue: __value__blue__0; - red: __value__red__1; + red1: __value__red1__0; + blue1: __value__blue1__1 } - .foo { color: __value__red__1; } - .bar { color: __value__blue__0 } + .foo { color: __value__red1__0; background: blue } ` }); }); -test("not import from a definition", () => { +test("warn on unexpected value defintion or import", () => { return run({ fixture: ` - @value colors: "./colors.css"; @value red from colors; + @value red; + @value red: ; + @value red from; + @value red blue from 'path'; + @value red from global; + @value red from 'path' token; + @value red as 'blue' from 'path'; + @value 'red' as blue from 'path'; + @value red 'as' blue from 'path'; `, - expected: ` - :import('colors') { - __value__red__0: red - } - :export { - colors: "./colors.css"; - red: __value__red__0 - } - ` + warnings: [ + `Invalid value definition "red"`, + `Invalid value definition "red:"`, + `Invalid value definition "red from"`, + `Invalid value definition "red blue from 'path'"`, + `Invalid value definition "red from global"`, + `Invalid value definition "red from 'path' token"`, + `Invalid value definition "red as 'blue' from 'path'"`, + `Invalid value definition "'red' as blue from 'path'"`, + `Invalid value definition "red 'as' blue from 'path'"` + ] }); }); @@ -192,26 +185,6 @@ test("allow transitive values within calc", () => { }); }); -test("preserve import order", () => { - return run({ - fixture: ` - @value a from "./a.css"; @value b from "./b.css"; - `, - expected: ` - :import('./a.css') { - __value__a__0: a - } - :import('./b.css') { - __value__b__1: b - } - :export { - a: __value__a__0; - b: __value__b__1 - } - ` - }); -}); - test("allow custom-property-style names", () => { return run({ fixture: ` @@ -264,18 +237,18 @@ test("allow all colour types", () => { }); }); -test("import multiple from a single file on multiple lines", () => { +test("import multiple values grouped with parentheses on multiple lines", () => { return run({ fixture: ` @value ( blue, red - ) from "./colors.css"; + ) from "path"; .foo { color: red; } .bar { color: blue } `, expected: ` - :import('./colors.css') { + :import('path') { __value__blue__0: blue; __value__red__1: red; } @@ -304,16 +277,24 @@ test("allow definitions with commas in them", () => { }); }); -test("allow values with nested parantheses", () => { +test("warn if value already declared and override result", () => { return run({ fixture: ` - @value aaa: color(red lightness(50%)); + @value red: blue; + @value red: green; + @value red from 'path'; + .foo { color: red } `, expected: ` + :import('path') { + __value__red__0: red + } :export { - aaa: color(red lightness(50%)) + red: __value__red__0 } - ` + .foo { color: __value__red__0 } + `, + warnings: [`"red" value already declared`, `"red" value already declared`] }); }); diff --git a/yarn.lock b/yarn.lock index 0d21dfa..d5af68f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2627,6 +2627,10 @@ pluralize@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-4.0.0.tgz#59b708c1c0190a2f692f1c7618c446b052fd1762" +postcss-value-parser@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" + postcss@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.2.tgz#5c4fea589f0ac3b00caa75b1cbc3a284195b7e5d" From 56d01e022ca3799eda3c8eee68e91019201c1ce0 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Mon, 19 Jun 2017 20:25:43 +0300 Subject: [PATCH 44/64] Improve parentheses handling --- src/index.js | 8 ++++--- test/test.js | 60 +++++++++++++++++++++++++++------------------------- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/src/index.js b/src/index.js index c3b673f..bdde6a8 100644 --- a/src/index.js +++ b/src/index.js @@ -46,13 +46,15 @@ const trimNodes = nodes => dropWhile(dropRightWhile(nodes, isSpace), isSpace); const getPathValue = nodes => nodes.length === 1 && nodes[0].type === "string" ? nodes[0].value : null; -const ensurePairsList = valuesNodes => - valuesNodes.length === 1 && valuesNodes[0].type === "function" +const expandValuesParentheses = valuesNodes => + valuesNodes.length === 1 && + valuesNodes[0].type === "function" && + valuesNodes[0].value === "" ? valuesNodes[0].nodes : valuesNodes; const getAliasesPairs = valuesNodes => - chunkBy(ensurePairsList(valuesNodes), isComma).map(pairNodes => { + chunkBy(expandValuesParentheses(valuesNodes), isComma).map(pairNodes => { const nodes = pairNodes.filter(isNotSpace); if (nodes.length === 1 && isWord(nodes[0])) { return [nodes[0].value, nodes[0].value]; diff --git a/test/test.js b/test/test.js index 3ad37aa..39e962e 100644 --- a/test/test.js +++ b/test/test.js @@ -12,9 +12,7 @@ const getWarnings = result => result.warnings().map(warning => warning.text); const run = ({ fixture, expected, warnings = [] }) => compile(fixture).then(result => { expect(getWarnings(result)).toEqual(warnings); - if (expected) { - expect(result.css.trim()).toEqual(strip(expected)); - } + expect(result.css.trim()).toEqual(strip(expected)); }); test("export value", () => { @@ -38,6 +36,7 @@ test("warn when there is no semicolon between lines", () => { @value red blue @value green yellow `, + expected: "", warnings: [`Invalid value definition "red blue\n@value green yellow"`] }); }); @@ -124,6 +123,31 @@ test("import external values with aliases", () => { }); }); +test("import multiple values grouped with parentheses on multiple lines", () => { + return run({ + fixture: ` + @value ( + blue, + red + ) from "path"; + .foo { color: red; } + .bar { color: blue } + `, + expected: ` + :import('path') { + __value__blue__0: blue; + __value__red__1: red; + } + :export { + blue: __value__blue__0; + red: __value__red__1; + } + .foo { color: __value__red__1; } + .bar { color: __value__blue__0 } + ` + }); +}); + test("warn on unexpected value defintion or import", () => { return run({ fixture: ` @@ -136,7 +160,9 @@ test("warn on unexpected value defintion or import", () => { @value red as 'blue' from 'path'; @value 'red' as blue from 'path'; @value red 'as' blue from 'path'; + @value fn(red, blue) from 'path'; `, + expected: "", warnings: [ `Invalid value definition "red"`, `Invalid value definition "red:"`, @@ -146,7 +172,8 @@ test("warn on unexpected value defintion or import", () => { `Invalid value definition "red from 'path' token"`, `Invalid value definition "red as 'blue' from 'path'"`, `Invalid value definition "'red' as blue from 'path'"`, - `Invalid value definition "red 'as' blue from 'path'"` + `Invalid value definition "red 'as' blue from 'path'"`, + `Invalid value definition "fn(red, blue) from 'path'"` ] }); }); @@ -237,31 +264,6 @@ test("allow all colour types", () => { }); }); -test("import multiple values grouped with parentheses on multiple lines", () => { - return run({ - fixture: ` - @value ( - blue, - red - ) from "path"; - .foo { color: red; } - .bar { color: blue } - `, - expected: ` - :import('path') { - __value__blue__0: blue; - __value__red__1: red; - } - :export { - blue: __value__blue__0; - red: __value__red__1; - } - .foo { color: __value__red__1; } - .bar { color: __value__blue__0 } - ` - }); -}); - test("allow definitions with commas in them", () => { return run({ fixture: ` From 05e9e0371d6ce98b203cdc52c31339a58bddf38c Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Tue, 20 Jun 2017 00:10:08 +0300 Subject: [PATCH 45/64] Warn and dot or hash --- src/index.js | 88 +++++++++++++++++++++++++++++----------------------- test/test.js | 25 +++++++++++++++ 2 files changed, 74 insertions(+), 39 deletions(-) diff --git a/src/index.js b/src/index.js index bdde6a8..3625bac 100644 --- a/src/index.js +++ b/src/index.js @@ -46,12 +46,10 @@ const trimNodes = nodes => dropWhile(dropRightWhile(nodes, isSpace), isSpace); const getPathValue = nodes => nodes.length === 1 && nodes[0].type === "string" ? nodes[0].value : null; -const expandValuesParentheses = valuesNodes => - valuesNodes.length === 1 && - valuesNodes[0].type === "function" && - valuesNodes[0].value === "" - ? valuesNodes[0].nodes - : valuesNodes; +const expandValuesParentheses = nodes => + nodes.length === 1 && nodes[0].type === "function" && nodes[0].value === "" + ? nodes[0].nodes + : nodes; const getAliasesPairs = valuesNodes => chunkBy(expandValuesParentheses(valuesNodes), isComma).map(pairNodes => { @@ -95,19 +93,14 @@ const parse = value => { return null; }; -const getAliasName = (name, index) => - `__value__${name.replace(/\W/g, "_")}__${index}`; +const isForbidden = name => name.includes(".") || name.includes("#"); -// TODO forbig '.' and '#' in names +const createGenerator = (i = 0) => name => + `__value__${name.replace(/\W/g, "_")}__${i++}`; module.exports = postcss.plugin(plugin, () => (css, result) => { const { icssImports, icssExports } = extractICSS(css); - let importIndex = 0; - const createImportedName = (path, name) => { - const importedName = getAliasName(name, importIndex); - importIndex += 1; - return importedName; - }; + const getAliasName = createGenerator(); css.walkAtRules("value", atRule => { if (atRule.params.indexOf("@value") !== -1) { @@ -118,33 +111,50 @@ module.exports = postcss.plugin(plugin, () => (css, result) => { const parsed = parse(atRule.params); if (parsed) { if (parsed.type === "value") { - if (icssExports[parsed.name]) { - result.warn(`"${parsed.name}" value already declared`, { - node: atRule - }); - } - icssExports[parsed.name] = replaceValueSymbols( - parsed.value, - icssExports - ); - } - if (parsed.type === "import") { - const pairs = parsed.pairs.map(([key, value]) => { - let importedName = createImportedName(parsed.path, value); - if (icssExports[value]) { - result.warn(`"${value}" value already declared`, { + const { name, value } = parsed; + if (isForbidden(name)) { + result.warn( + `Dot and hash symbols are not allowed in value "${name}"`, + { node: atRule } + ); + } else { + if (icssExports[name]) { + result.warn(`"${name}" value already declared`, { node: atRule }); } - icssExports[value] = importedName; - return [importedName, key]; - }); - const aliases = fromPairs(pairs); - icssImports[parsed.path] = Object.assign( - {}, - icssImports[parsed.path], - aliases - ); + icssExports[name] = replaceValueSymbols(value, icssExports); + } + } + if (parsed.type === "import") { + const pairs = parsed.pairs + .filter(([, local]) => { + if (isForbidden(local)) { + result.warn( + `Dot and hash symbols are not allowed in value "${local}"` + ); + return false; + } + return true; + }) + .map(([imported, local]) => { + const alias = getAliasName(local); + if (icssExports[local]) { + result.warn(`"${local}" value already declared`, { + node: atRule + }); + } + icssExports[local] = alias; + return [alias, imported]; + }); + if (pairs.length) { + const aliases = fromPairs(pairs); + icssImports[parsed.path] = Object.assign( + {}, + icssImports[parsed.path], + aliases + ); + } } } else { result.warn(`Invalid value definition "${atRule.params}"`, { diff --git a/test/test.js b/test/test.js index 39e962e..7ee9d69 100644 --- a/test/test.js +++ b/test/test.js @@ -338,3 +338,28 @@ test("save :import and :export statements", () => { expected: input }); }); + +test("warn on using dot or hash in value name", () => { + return run({ + fixture: ` + @value colors.red #f00; + @value colors#blue #00f; + @value .red from 'path'; + @value #blue from 'path'; + .foo { color: colors.red; background: colors#blue } + .red {} + #blue {} + `, + expected: ` + .foo { color: colors.red; background: colors#blue } + .red {} + #blue {} + `, + warnings: [ + `Dot and hash symbols are not allowed in value "colors.red"`, + `Dot and hash symbols are not allowed in value "colors#blue"`, + `Dot and hash symbols are not allowed in value ".red"`, + `Dot and hash symbols are not allowed in value "#blue"` + ] + }); +}); From d8c324dfeb6d8355af595536bfdbd94504c00ceb Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Tue, 20 Jun 2017 00:24:35 +0300 Subject: [PATCH 46/64] Dry code --- src/index.js | 81 +++++++++++++++++++++------------------------------- test/test.js | 10 +++++++ 2 files changed, 42 insertions(+), 49 deletions(-) diff --git a/src/index.js b/src/index.js index 3625bac..81dc470 100644 --- a/src/index.js +++ b/src/index.js @@ -101,68 +101,51 @@ const createGenerator = (i = 0) => name => module.exports = postcss.plugin(plugin, () => (css, result) => { const { icssImports, icssExports } = extractICSS(css); const getAliasName = createGenerator(); + const addExports = (node, name, value) => { + if (isForbidden(name)) { + result.warn(`Dot and hash symbols are not allowed in value "${name}"`, { + node + }); + } else { + if (icssExports[name]) { + result.warn(`"${name}" value already declared`, { node }); + } + } + icssExports[name] = replaceValueSymbols(value, icssExports); + }; - css.walkAtRules("value", atRule => { - if (atRule.params.indexOf("@value") !== -1) { - result.warn(`Invalid value definition "${atRule.params}"`, { - node: atRule + css.walkAtRules("value", atrule => { + if (atrule.params.indexOf("@value") !== -1) { + result.warn(`Invalid value definition "${atrule.params}"`, { + node: atrule }); } else { - const parsed = parse(atRule.params); + const parsed = parse(atrule.params); if (parsed) { if (parsed.type === "value") { const { name, value } = parsed; - if (isForbidden(name)) { - result.warn( - `Dot and hash symbols are not allowed in value "${name}"`, - { node: atRule } - ); - } else { - if (icssExports[name]) { - result.warn(`"${name}" value already declared`, { - node: atRule - }); - } - icssExports[name] = replaceValueSymbols(value, icssExports); - } + addExports(atrule, name, value); } if (parsed.type === "import") { - const pairs = parsed.pairs - .filter(([, local]) => { - if (isForbidden(local)) { - result.warn( - `Dot and hash symbols are not allowed in value "${local}"` - ); - return false; - } - return true; - }) - .map(([imported, local]) => { - const alias = getAliasName(local); - if (icssExports[local]) { - result.warn(`"${local}" value already declared`, { - node: atRule - }); - } - icssExports[local] = alias; - return [alias, imported]; - }); - if (pairs.length) { - const aliases = fromPairs(pairs); - icssImports[parsed.path] = Object.assign( - {}, - icssImports[parsed.path], - aliases - ); - } + const pairs = parsed.pairs.map(([imported, local]) => { + const alias = getAliasName(local); + addExports(atrule, local, alias); + return [alias, imported]; + }); + const aliases = fromPairs(pairs); + icssImports[parsed.path] = Object.assign( + {}, + icssImports[parsed.path], + aliases + ); } } else { - result.warn(`Invalid value definition "${atRule.params}"`, { - node: atRule + result.warn(`Invalid value definition "${atrule.params}"`, { + node: atrule }); } } - atRule.remove(); + atrule.remove(); }); replaceSymbols(css, icssExports); diff --git a/test/test.js b/test/test.js index 7ee9d69..b796b38 100644 --- a/test/test.js +++ b/test/test.js @@ -351,6 +351,16 @@ test("warn on using dot or hash in value name", () => { #blue {} `, expected: ` + :import('path') { + __value___red__0: .red; + __value___blue__1: #blue + } + :export { + colors.red: #f00; + colors#blue: #00f; + .red: __value___red__0; + #blue: __value___blue__1 + } .foo { color: colors.red; background: colors#blue } .red {} #blue {} From 99158238171a701f336478f78eef11b702965a01 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Tue, 20 Jun 2017 10:27:37 +0300 Subject: [PATCH 47/64] Refactor docs --- README.md | 126 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 71 insertions(+), 55 deletions(-) diff --git a/README.md b/README.md index e454dfe..75f2d28 100644 --- a/README.md +++ b/README.md @@ -1,91 +1,107 @@ -# CSS Modules: Values +# postcss-icss-values [![Build Status][travis-img]][travis] -Pass arbitrary values between your module files, transforms +[PostCSS]: https://github.com/postcss/postcss +[travis-img]: https://travis-ci.org/css-modules/postcss-icss-selectors.svg +[travis]: https://travis-ci.org/css-modules/postcss-icss-selectors -```css -@value primary: #BF4040; -@value secondary: #1F4F7F; -``` +PostCSS plugin for css modules to pass arbitrary values between your module files. -into +## Usage -```css -:export { - primary: #BF4040; - secondary: #1F4F7F; -} +```js +postcss([ require('postcss-icss-values') ]) ``` -### Usage +See [PostCSS] docs for examples for your environment. + +### Export value ```css /* colors.css */ + @value primary: #BF4040; -@value secondary: #1F4F7F; +/* or without colon for preprocessors */ +@value secondary #1F4F7F; -.text-primary { - color: primary; +.panel { + background: primary; } -.text-secondary { - color: secondary; +/* transforms to */ + +:export { + primary: #BF4040; + secondary: #1F4F7F +} + +.panel { + background: #BF4040; } ``` +**If you are using Sass** along with this PostCSS plugin, do not use the colon `:` in your `@value` definitions. It will cause Sass to crash. + +Note also you can _import_ multiple values at once but can only _define_ one value per line. + ```css -/* breakpoints.css */ -@value small: (max-width: 599px); -@value medium: (min-width: 600px) and (max-width: 959px); -@value large: (min-width: 960px); +@value a: b, c: d; /* defines a as "b, c: d" */ ``` +### Importing value + ```css -/* my-component.css */ -/* alias paths for other values or composition */ -@value colors: "./colors.css"; -/* import multiple from a single file */ -@value primary, secondary from colors; -/* make local aliases to imported values */ -@value small as bp-small, large as bp-large from "./breakpoints.css"; - -.header { - composes: text-primary from colors; - box-shadow: 0 0 10px secondary; +@value primary, secondary from './colors.css'; + +.panel { + background: secondary; } -@media bp-small { - .header { - box-shadow: 0 0 4px secondary; - } +/* transforms to similar exports */ + +:import('./colors.css') { + __value__primary__0: primary; + __value__secondary__1: secondary } -@media bp-large { - .header { - box-shadow: 0 0 20px secondary; - } +:export { + primary: __value__primary__0; /* this long names will be mapped to imports by your loader */ + secondary: __value__secondary__1 } -``` -**If you are using Sass** along with this PostCSS plugin, do not use the colon `:` in your `@value` definitions. It will cause Sass to crash. +.panel { + background: __value__secondary__1; +} +``` -Note also you can _import_ multiple values at once but can only _define_ one value per line. +### Importing value in JS ```css -@value a: b, c: d; /* defines a as "b, c: d" */ +import { primary } from './colors.css'; +// will have similar effect +console.log(primary); // -> #BF4040 ``` -### Justification +### Aliases -See [this PR](https://github.com/css-modules/css-modules-loader-core/pull/28) for more background +Do not conflict between names you are able to import values with aliases -## License +```css +@value small as bp-small, large as bp-large from './breakpoints.css'; +@value ( + small as t-small, + large as t-large +) from './typo.css'; + +@media bp-small { + .foo { + font-size: t-small; + } +} +``` -ISC +## Justification -## With thanks +See [this PR](https://github.com/css-modules/css-modules-loader-core/pull/28) for more background -- Mark Dalgleish -- Tobias Koppers -- Josh Johnston +## License ---- -Glen Maddern, 2015. +MIT © Glen Maddern and Bogdan Chadkin, 2015 From b8ba0c3cc97fa46bf29fc72703783f8e566711a3 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Tue, 20 Jun 2017 10:43:18 +0300 Subject: [PATCH 48/64] Fix travis links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 75f2d28..3670b46 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # postcss-icss-values [![Build Status][travis-img]][travis] [PostCSS]: https://github.com/postcss/postcss -[travis-img]: https://travis-ci.org/css-modules/postcss-icss-selectors.svg -[travis]: https://travis-ci.org/css-modules/postcss-icss-selectors +[travis-img]: https://travis-ci.org/css-modules/postcss-icss-values.svg +[travis]: https://travis-ci.org/css-modules/postcss-icss-values PostCSS plugin for css modules to pass arbitrary values between your module files. From c04b57b912bfd23387a9e58317e6042f77b4f783 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Wed, 21 Jun 2017 01:05:24 +0300 Subject: [PATCH 49/64] Add messages --- README.md | 13 ++++++++ src/index.js | 26 +++++++++++----- test/test.js | 85 ++++++++++++++++++++++++++++++++++++++++++---------- 3 files changed, 102 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 3670b46..a859587 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,19 @@ Do not conflict between names you are able to import values with aliases } ``` +### Messages + +postcss-icss-values passes `result.messages` for each declared or imported value + +```json +{ + plugin: 'postcss-icss-values', + type: 'icss-value', + name: string, // exported identifier + value: string // generated imported identifier or value +} +``` + ## Justification See [this PR](https://github.com/css-modules/css-modules-loader-core/pull/28) for more background diff --git a/src/index.js b/src/index.js index 81dc470..25c4456 100644 --- a/src/index.js +++ b/src/index.js @@ -98,20 +98,28 @@ const isForbidden = name => name.includes(".") || name.includes("#"); const createGenerator = (i = 0) => name => `__value__${name.replace(/\W/g, "_")}__${i++}`; +const getMessages = exports => + Object.keys(exports).map(name => ({ + plugin: "postcss-icss-values", + type: "icss-value", + name, + value: exports[name] + })); + module.exports = postcss.plugin(plugin, () => (css, result) => { const { icssImports, icssExports } = extractICSS(css); + const valuesExports = {}; const getAliasName = createGenerator(); const addExports = (node, name, value) => { if (isForbidden(name)) { result.warn(`Dot and hash symbols are not allowed in value "${name}"`, { node }); - } else { - if (icssExports[name]) { - result.warn(`"${name}" value already declared`, { node }); - } } - icssExports[name] = replaceValueSymbols(value, icssExports); + if (valuesExports[name]) { + result.warn(`"${name}" value already declared`, { node }); + } + valuesExports[name] = replaceValueSymbols(value, valuesExports); }; css.walkAtRules("value", atrule => { @@ -148,7 +156,11 @@ module.exports = postcss.plugin(plugin, () => (css, result) => { atrule.remove(); }); - replaceSymbols(css, icssExports); + replaceSymbols(css, valuesExports); + + css.prepend( + createICSSRules(icssImports, Object.assign({}, icssExports, valuesExports)) + ); - css.prepend(createICSSRules(icssImports, icssExports)); + result.messages.push(...getMessages(valuesExports)); }); diff --git a/test/test.js b/test/test.js index b796b38..e5cff05 100644 --- a/test/test.js +++ b/test/test.js @@ -9,12 +9,23 @@ const compile = input => postcss([plugin]).process(strip(input)); const getWarnings = result => result.warnings().map(warning => warning.text); -const run = ({ fixture, expected, warnings = [] }) => +const getMessages = result => + result.messages.filter(msg => msg.type !== "warning"); + +const run = ({ fixture, expected, warnings = [], messages = [] }) => compile(fixture).then(result => { - expect(getWarnings(result)).toEqual(warnings); expect(result.css.trim()).toEqual(strip(expected)); + expect(getWarnings(result)).toEqual(warnings); + expect(getMessages(result)).toEqual(messages); }); +const getMsg = (name, value) => ({ + plugin: "postcss-icss-values", + type: "icss-value", + name, + value +}); + test("export value", () => { return run({ fixture: ` @@ -26,7 +37,11 @@ test("export value", () => { red: 1px solid #f00; blue: 1px solid #00f } - ` + `, + messages: [ + getMsg("red", "1px solid #f00"), + getMsg("blue", "1px solid #00f") + ] }); }); @@ -56,7 +71,8 @@ test("replace values within the file", () => { @media red { .red { color: red } } - ` + `, + messages: [getMsg("blue", "red")] }); }); @@ -74,7 +90,8 @@ test("import external values", () => { red: __value__red__0 } .foo { color: __value__red__0 } - ` + `, + messages: [getMsg("red", "__value__red__0")] }); }); @@ -99,7 +116,13 @@ test("import multiple external values", () => { green: __value__green__2; yellow: __value__yellow__3 } - ` + `, + messages: [ + getMsg("red", "__value__red__0"), + getMsg("blue", "__value__blue__1"), + getMsg("green", "__value__green__2"), + getMsg("yellow", "__value__yellow__3") + ] }); }); @@ -119,7 +142,11 @@ test("import external values with aliases", () => { blue1: __value__blue1__1 } .foo { color: __value__red1__0; background: blue } - ` + `, + messages: [ + getMsg("red1", "__value__red1__0"), + getMsg("blue1", "__value__blue1__1") + ] }); }); @@ -144,7 +171,11 @@ test("import multiple values grouped with parentheses on multiple lines", () => } .foo { color: __value__red__1; } .bar { color: __value__blue__0 } - ` + `, + messages: [ + getMsg("blue", "__value__blue__0"), + getMsg("red", "__value__red__1") + ] }); }); @@ -191,7 +222,8 @@ test("allow transitive values", () => { bbb: red; } .a { color: red; } - ` + `, + messages: [getMsg("aaa", "red"), getMsg("bbb", "red")] }); }); @@ -208,7 +240,8 @@ test("allow transitive values within calc", () => { large: calc(10px * 2); } .a { margin: calc(10px * 2); } - ` + `, + messages: [getMsg("base", "10px"), getMsg("large", "calc(10px * 2)")] }); }); @@ -225,7 +258,8 @@ test("allow custom-property-style names", () => { --red: __value____red__0; } .foo { color: __value____red__0; } - ` + `, + messages: [getMsg("--red", "__value____red__0")] }); }); @@ -260,7 +294,14 @@ test("allow all colour types", () => { border-bottom-color: rgba(34, 12, 64, 0.3); outline-color: hsla(220, 13.0%, 18.0%, 1); } - ` + `, + messages: [ + getMsg("named", "red"), + getMsg("3char", "#0f0"), + getMsg("6char", "#00ff00"), + getMsg("rgba", "rgba(34, 12, 64, 0.3)"), + getMsg("hsla", "hsla(220, 13.0%, 18.0%, 1)") + ] }); }); @@ -275,7 +316,13 @@ test("allow definitions with commas in them", () => { coolShadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14); } .foo { box-shadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14); } - ` + `, + messages: [ + getMsg( + "coolShadow", + "0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14)" + ) + ] }); }); @@ -296,7 +343,8 @@ test("warn if value already declared and override result", () => { } .foo { color: __value__red__0 } `, - warnings: [`"red" value already declared`, `"red" value already declared`] + warnings: [`"red" value already declared`, `"red" value already declared`], + messages: [getMsg("red", "__value__red__0")] }); }); @@ -320,7 +368,8 @@ test("reuse existing :import with same name and :export", () => { b: i__c; a: __value__a__0 } - ` + `, + messages: [getMsg("a", "__value__a__0")] }); }); @@ -370,6 +419,12 @@ test("warn on using dot or hash in value name", () => { `Dot and hash symbols are not allowed in value "colors#blue"`, `Dot and hash symbols are not allowed in value ".red"`, `Dot and hash symbols are not allowed in value "#blue"` + ], + messages: [ + getMsg("colors.red", "#f00"), + getMsg("colors#blue", "#00f"), + getMsg(".red", "__value___red__0"), + getMsg("#blue", "__value___blue__1") ] }); }); From fa1a7d8b31abcd9930e38ddb9e810e65e0c7a65f Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Wed, 21 Jun 2017 01:44:02 +0300 Subject: [PATCH 50/64] Add icss-scoped contract --- src/index.js | 16 +++++++++++++++- test/test.js | 42 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index 25c4456..3ee2eda 100644 --- a/src/index.js +++ b/src/index.js @@ -98,6 +98,13 @@ const isForbidden = name => name.includes(".") || name.includes("#"); const createGenerator = (i = 0) => name => `__value__${name.replace(/\W/g, "_")}__${i++}`; +const getScopedAliases = (messages, values) => + fromPairs( + messages + .filter(msg => msg.type === "icss-scoped") + .map(msg => [msg.value, values[msg.name]]) + ); + const getMessages = exports => Object.keys(exports).map(name => ({ plugin: "postcss-icss-values", @@ -156,7 +163,14 @@ module.exports = postcss.plugin(plugin, () => (css, result) => { atrule.remove(); }); - replaceSymbols(css, valuesExports); + replaceSymbols( + css, + Object.assign( + {}, + valuesExports, + getScopedAliases(result.messages, valuesExports) + ) + ); css.prepend( createICSSRules(icssImports, Object.assign({}, icssExports, valuesExports)) diff --git a/test/test.js b/test/test.js index e5cff05..1b262e5 100644 --- a/test/test.js +++ b/test/test.js @@ -5,15 +5,25 @@ import plugin from "../src"; const strip = input => stripIndent(input).trim(); -const compile = input => postcss([plugin]).process(strip(input)); +const messagesPlugin = messages => (css, result) => + result.messages.push(...messages); + +const compile = (input, messages) => + postcss([messagesPlugin(messages), plugin]).process(strip(input)); const getWarnings = result => result.warnings().map(warning => warning.text); const getMessages = result => result.messages.filter(msg => msg.type !== "warning"); -const run = ({ fixture, expected, warnings = [], messages = [] }) => - compile(fixture).then(result => { +const run = ({ + fixture, + expected, + warnings = [], + inputMessages = [], + messages = [] +}) => + compile(fixture, inputMessages).then(result => { expect(result.css.trim()).toEqual(strip(expected)); expect(getWarnings(result)).toEqual(warnings); expect(getMessages(result)).toEqual(messages); @@ -428,3 +438,29 @@ test("warn on using dot or hash in value name", () => { ] }); }); + +test("icss-scoped contract", () => { + const inputMessages = [ + { type: "icss-scoped", name: "a", value: "__scope__a" } + ]; + return run({ + fixture: ` + :export { + a: __scope__a + } + @value a from 'path'; + .__scope__a {} + `, + inputMessages, + expected: ` + :import('path') { + __value__a__0: a + } + :export { + a: __value__a__0 + } + .__value__a__0 {} + `, + messages: [...inputMessages, getMsg("a", "__value__a__0")] + }); +}); From 00433ca24fb3ef0bae02c0272f956b69fb2a348d Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Wed, 21 Jun 2017 01:46:01 +0300 Subject: [PATCH 51/64] Tweak package --- package.json | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 90322de..ebdfd37 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "postcss-modules-values", + "name": "postcss-icss-values", "version": "1.3.0", "description": "PostCSS plugin for CSS Modules to pass arbitrary values between your module files", "main": "lib/index.js", @@ -40,21 +40,14 @@ ] ] }, - "repository": { - "type": "git", - "url": "git+https://github.com/css-modules/postcss-modules-values.git" - }, + "repository": "css-modules/postcss-icss-values", "keywords": [ "css", "modules", "postcss" ], - "author": "Glen Maddern", - "license": "ISC", - "bugs": { - "url": "https://github.com/css-modules/postcss-modules-values/issues" - }, - "homepage": "https://github.com/css-modules/postcss-modules-values#readme", + "author": "Glen Maddern and Bogdan Chadkin", + "license": "MIT", "devDependencies": { "babel-cli": "^6.5.2", "babel-jest": "^20.0.3", From bb02222cf37485d60ae289516dbecccd24db946a Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Wed, 21 Jun 2017 01:53:49 +0300 Subject: [PATCH 52/64] 2.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ebdfd37..eb7e312 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postcss-icss-values", - "version": "1.3.0", + "version": "2.0.0", "description": "PostCSS plugin for CSS Modules to pass arbitrary values between your module files", "main": "lib/index.js", "files": [ From 1ce9b861ccb32fcef346bb0b0764f6627757cde8 Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Wed, 21 Jun 2017 02:30:46 +0300 Subject: [PATCH 53/64] Fix icss-scoped contract with composed exports --- src/index.js | 15 +++++++-------- test/test.js | 6 ++++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/index.js b/src/index.js index 3ee2eda..f576777 100644 --- a/src/index.js +++ b/src/index.js @@ -163,14 +163,13 @@ module.exports = postcss.plugin(plugin, () => (css, result) => { atrule.remove(); }); - replaceSymbols( - css, - Object.assign( - {}, - valuesExports, - getScopedAliases(result.messages, valuesExports) - ) - ); + const scopedAliases = getScopedAliases(result.messages, valuesExports); + + replaceSymbols(css, Object.assign({}, valuesExports, scopedAliases)); + + Object.keys(icssExports).forEach(key => { + icssExports[key] = replaceValueSymbols(icssExports[key], scopedAliases); + }); css.prepend( createICSSRules(icssImports, Object.assign({}, icssExports, valuesExports)) diff --git a/test/test.js b/test/test.js index 1b262e5..7407972 100644 --- a/test/test.js +++ b/test/test.js @@ -446,7 +446,8 @@ test("icss-scoped contract", () => { return run({ fixture: ` :export { - a: __scope__a + a: __scope__a; + b: b __scope__a } @value a from 'path'; .__scope__a {} @@ -457,7 +458,8 @@ test("icss-scoped contract", () => { __value__a__0: a } :export { - a: __value__a__0 + a: __value__a__0; + b: b __value__a__0 } .__value__a__0 {} `, From d86e86782bc802ea1cb8515ab8d53ef59511bc1f Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Wed, 21 Jun 2017 02:30:55 +0300 Subject: [PATCH 54/64] 2.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index eb7e312..d60f184 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postcss-icss-values", - "version": "2.0.0", + "version": "2.0.1", "description": "PostCSS plugin for CSS Modules to pass arbitrary values between your module files", "main": "lib/index.js", "files": [ From c43d23cb9731839fc6301bf141e59adee27273b6 Mon Sep 17 00:00:00 2001 From: Joscha Feth Date: Fri, 23 Jun 2017 22:33:52 +0200 Subject: [PATCH 55/64] fix(index): forgotten plugin rename (#106) --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index f576777..4d9aec6 100644 --- a/src/index.js +++ b/src/index.js @@ -12,7 +12,7 @@ import dropWhile from "lodash/dropWhile"; import dropRightWhile from "lodash/dropRightWhile"; import fromPairs from "lodash/fromPairs"; -const plugin = "postcss-modules-values"; +const plugin = "postcss-icss-values"; const chunkBy = (collection, iteratee) => collection.reduce( From 27c48339aa838991e1793649520788a654e449f2 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Wed, 27 Jun 2018 13:43:13 +0100 Subject: [PATCH 56/64] Fix grammar --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a859587..23d0e7e 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ console.log(primary); // -> #BF4040 ### Aliases -Do not conflict between names you are able to import values with aliases +To avoid conflict between names you are able to import values with aliases ```css @value small as bp-small, large as bp-large from './breakpoints.css'; From 586be6b3b44bc306a98218512c0add1ae4ea2971 Mon Sep 17 00:00:00 2001 From: Patrick Silva Date: Tue, 30 Oct 2018 11:14:05 +0100 Subject: [PATCH 57/64] fix(package): add license file --- LICENSE | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..14f20e4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2015 Glen Maddern and Bogdan Chadkin + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From 4eb2ef1eadec1828fc583deaf9f83c9bebfed0d8 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Tue, 30 Oct 2018 13:57:17 +0300 Subject: [PATCH 58/64] chore(release): 2.0.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d60f184..660fafa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postcss-icss-values", - "version": "2.0.1", + "version": "2.0.2", "description": "PostCSS plugin for CSS Modules to pass arbitrary values between your module files", "main": "lib/index.js", "files": [ From 5e6a76f3bc06e30c000bbc6bd7e0b3de6ab87b73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Jan 2023 15:21:49 +0300 Subject: [PATCH 59/64] Bump debug from 2.6.8 to 2.6.9 (#140) Bumps [debug](https://github.com/debug-js/debug) from 2.6.8 to 2.6.9. - [Release notes](https://github.com/debug-js/debug/releases) - [Changelog](https://github.com/debug-js/debug/blob/2.6.9/CHANGELOG.md) - [Commits](https://github.com/debug-js/debug/compare/2.6.8...2.6.9) --- updated-dependencies: - dependency-name: debug dependency-type: indirect ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index d5af68f..b7bd7ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -993,8 +993,8 @@ date-fns@^1.27.2: resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.28.5.tgz#257cfc45d322df45ef5658665967ee841cd73faf" debug@^2.1.1, debug@^2.2.0, debug@^2.6.3, debug@^2.6.8: - version "2.6.8" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: ms "2.0.0" From d019507b5d08ed2c18aa6e0310437bf476deed5d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Jan 2023 15:38:29 +0300 Subject: [PATCH 60/64] Bump is-my-json-valid from 2.16.0 to 2.20.6 (#141) Bumps [is-my-json-valid](https://github.com/mafintosh/is-my-json-valid) from 2.16.0 to 2.20.6. - [Release notes](https://github.com/mafintosh/is-my-json-valid/releases) - [Commits](https://github.com/mafintosh/is-my-json-valid/compare/v2.16.0...v2.20.6) --- updated-dependencies: - dependency-name: is-my-json-valid dependency-type: indirect ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/yarn.lock b/yarn.lock index b7bd7ef..93c369b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1389,8 +1389,10 @@ gauge@~2.7.3: wide-align "^1.1.0" generate-function@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + version "2.3.1" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.3.1.tgz#f069617690c10c868e73b8465746764f97c3479f" + dependencies: + is-property "^1.0.2" generate-object-property@^1.1.0: version "1.2.0" @@ -1687,13 +1689,18 @@ is-glob@^2.0.0, is-glob@^2.0.1: dependencies: is-extglob "^1.0.0" +is-my-ip-valid@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-my-ip-valid/-/is-my-ip-valid-1.0.1.tgz#f7220d1146257c98672e6fba097a9f3f2d348442" + is-my-json-valid@^2.16.0: - version "2.16.0" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" + version "2.20.6" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.20.6.tgz#a9d89e56a36493c77bda1440d69ae0dc46a08387" dependencies: generate-function "^2.0.0" generate-object-property "^1.1.0" - jsonpointer "^4.0.0" + is-my-ip-valid "^1.0.0" + jsonpointer "^5.0.0" xtend "^4.0.0" is-number@^2.0.2, is-number@^2.1.0: @@ -1730,7 +1737,7 @@ is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" -is-property@^1.0.0: +is-property@^1.0.0, is-property@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" @@ -2123,9 +2130,9 @@ jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" -jsonpointer@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" +jsonpointer@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-5.0.1.tgz#2110e0af0900fd37467b5907ecd13a7884a1b559" jsprim@^1.2.2: version "1.4.0" @@ -3355,8 +3362,8 @@ xml-name-validator@^2.0.1: resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" "xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" y18n@^3.2.1: version "3.2.1" From 70699fdd8a7d85ba97f98ebc23c789fb05baf3d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Jan 2023 15:38:56 +0300 Subject: [PATCH 61/64] Bump postcss from 6.0.2 to 7.0.36 (#142) Bumps [postcss](https://github.com/postcss/postcss) from 6.0.2 to 7.0.36. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/6.0.2...7.0.36) --- updated-dependencies: - dependency-name: postcss dependency-type: direct:production ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 660fafa..afc189e 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "dependencies": { "icss-utils": "^3.0.1", "lodash": "^4.17.4", - "postcss": "^6.0.2", + "postcss": "^7.0.36", "postcss-value-parser": "^3.3.0" } } diff --git a/yarn.lock b/yarn.lock index 93c369b..9b8647a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -79,6 +79,12 @@ ansi-styles@^3.0.0: dependencies: color-convert "^1.0.0" +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + dependencies: + color-convert "^1.9.0" + anymatch@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" @@ -817,6 +823,14 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" +chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + chokidar@^1.6.1: version "1.7.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" @@ -897,6 +911,16 @@ color-convert@^1.0.0: dependencies: color-name "^1.1.1" +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + dependencies: + color-name "1.1.3" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + color-name@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d" @@ -1496,6 +1520,10 @@ has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -2646,6 +2674,14 @@ postcss@^6.0.2: source-map "^0.5.6" supports-color "^3.2.3" +postcss@^7.0.36: + version "7.0.36" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.36.tgz#056f8cffa939662a8f5905950c07d5285644dfcb" + dependencies: + chalk "^2.4.2" + source-map "^0.6.1" + supports-color "^6.1.0" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -2992,6 +3028,10 @@ source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" +source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + source-map@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" @@ -3108,6 +3148,18 @@ supports-color@^3.1.2, supports-color@^3.2.3: dependencies: has-flag "^1.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" + dependencies: + has-flag "^3.0.0" + +supports-color@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + dependencies: + has-flag "^3.0.0" + symbol-observable@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" From d079cbab405dedc998c5963b169ec18d894686a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Jan 2023 15:39:10 +0300 Subject: [PATCH 62/64] Bump minimatch from 3.0.4 to 3.1.2 (#143) Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. - [Release notes](https://github.com/isaacs/minimatch/releases) - [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md) - [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2) --- updated-dependencies: - dependency-name: minimatch dependency-type: indirect ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9b8647a..5ee8a3b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -702,9 +702,9 @@ babylon@^6.11.0, babylon@^6.13.0, babylon@^6.15.0: version "6.17.1" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.1.tgz#17f14fddf361b695981fe679385e4f1c01ebd86f" -balanced-match@^0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" bcrypt-pbkdf@^1.0.0: version "1.0.1" @@ -729,10 +729,10 @@ boom@2.x.x: hoek "2.x.x" brace-expansion@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" dependencies: - balanced-match "^0.4.1" + balanced-match "^1.0.0" concat-map "0.0.1" braces@^1.8.2: @@ -2357,8 +2357,8 @@ mimic-fn@^1.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" dependencies: brace-expansion "^1.1.7" From 2597e645632c2d138ccc087f9af855982439c195 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Jan 2023 15:43:22 +0300 Subject: [PATCH 63/64] Bump ini from 1.3.4 to 1.3.8 (#144) Bumps [ini](https://github.com/npm/ini) from 1.3.4 to 1.3.8. - [Release notes](https://github.com/npm/ini/releases) - [Changelog](https://github.com/npm/ini/blob/main/CHANGELOG.md) - [Commits](https://github.com/npm/ini/compare/v1.3.4...v1.3.8) --- updated-dependencies: - dependency-name: ini dependency-type: indirect ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5ee8a3b..877dd9e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1619,8 +1619,8 @@ inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" ini@~1.3.0: - version "1.3.4" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" inquirer@^3.0.6: version "3.1.0" From acdf34a62cc2537a9507b1e9fd34db486e5cb0f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Jan 2023 15:43:57 +0300 Subject: [PATCH 64/64] Bump lodash from 4.17.4 to 4.17.21 (#133) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.4 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.4...4.17.21) Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index 877dd9e..233e553 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2281,8 +2281,8 @@ lodash.chunk@^4.2.0: resolved "https://registry.yarnpkg.com/lodash.chunk/-/lodash.chunk-4.2.0.tgz#66e5ce1f76ed27b4303d8c6512e8d1216e8106bc" lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" log-symbols@^1.0.2: version "1.0.2"