From 18118aeaef63e51a3e3beff54fa5e023fc7ee917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Mon, 28 Mar 2016 16:21:45 +0200 Subject: [PATCH 01/66] accumulate generated css styles for imported/required css files Fixes #5 Replaces #6 It is helpful to release a library that uses css-modules. To combine all css files in a single file, give its name: ``` { "plugins": [ [ "css-modules-transform", { "extractCss": "./dist/stylesheets/combined.css" } ] ] } ``` To extract all files in a single directory, give an object: ``` { "plugins": [ [ "css-modules-transform", { "extractCss": { dir: "./dist/stylesheets/", relativeRoot: "./src/", filename: "[path]/[name].css" } } ] ] } ``` --- README.md | 53 ++++- package.json | 6 +- src/index.js | 125 ++++++++-- test/fixtures/exctractcss.include.js | 1 + test/fixtures/exctractcss.main.expected.js | 3 + test/fixtures/exctractcss.main.js | 2 + .../fixtures/extractcss.combined.expected.css | 6 + test/fixtures/extractcss.parent.expected.css | 3 + test/fixtures/extractcss.styles.expected.css | 3 + test/fixtures/import.expected.js | 2 +- test/index.spec.js | 222 ++++++++++++++++-- 11 files changed, 383 insertions(+), 43 deletions(-) create mode 100644 test/fixtures/exctractcss.include.js create mode 100644 test/fixtures/exctractcss.main.expected.js create mode 100644 test/fixtures/exctractcss.main.js create mode 100644 test/fixtures/extractcss.combined.expected.css create mode 100644 test/fixtures/extractcss.parent.expected.css create mode 100644 test/fixtures/extractcss.styles.expected.css diff --git a/README.md b/README.md index f622674..5e062aa 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,7 @@ npm install --save-dev babel-plugin-css-modules-transform "npm-module-name", "./path/to/module-exporting-a-function.js" ], + "extractCss": "./dist/stylesheets/combined.css" } ] ] @@ -116,6 +117,54 @@ and then add any relevant extensions to your plugin config: ``` +## Extract CSS Files + +When you publish a library, you might want to ship compiled css files as well to +help integration in other projects. + +An more complete alternative is to use +[babel-plugin-webpack-loaders](https://github.com/istarkov/babel-plugin-webpack-loaders) +but be aware that a new webpack instance is run for each css file, this has a +huge overhead. If you do not use fancy stuff, you might consider using +[babel-plugin-css-modules-transform](https://github.com/michalkvasnicak/babel-plugin-css-modules-transform) +instead. + + +To combine all css files in a single file, give its name: + +``` +{ + "plugins": [ + [ + "css-modules-transform", { + "extractCss": "./dist/stylesheets/combined.css" + } + ] + ] +} +``` + +To extract all files in a single directory, give an object: + +``` +{ + "plugins": [ + [ + "css-modules-transform", { + "extractCss": { + dir: "./dist/stylesheets/", + relativeRoot: "./src/", + filename: "[path]/[name].css" + } + } + ] + ] +} +``` + +Note that `relativeRoot` is used to resolve relative directory names, available +as `[path]` in `filename` pattern. + ## Using a `babel-register` Make sure you set `ignore` option of `babel-register` to ignore all files used by css-modules-require-hook to process your css files. @@ -124,7 +173,7 @@ Make sure you set `ignore` option of `babel-register` to ignore all files used b ```js require('babel-register')({ - ignore: /processCss\.js$/ // regex matching all files used by css-modules-require-hook to process your css files + ignore: /processCss\.js$/ // regex matching all files used by css-modules-require-hook to process your css files }) ``` @@ -134,7 +183,7 @@ Create a js file with content ```js require('babel-register')({ - ignore: /processCss\.js$/ // regex matching all files used by css-modules-require-hook to process your css files + ignore: /processCss\.js$/ // regex matching all files used by css-modules-require-hook to process your css files }) ``` diff --git a/package.json b/package.json index a075f17..4438718 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ }, "homepage": "https://github.com/michalkvasnicak/babel-plugin-css-modules-transform#readme", "dependencies": { - "css-modules-require-hook": "^3.0.0" + "css-modules-require-hook": "^3.0.0", + "mkdirp": "^0.5.1" }, "devDependencies": { "babel-cli": "^6.1.18", @@ -49,7 +50,8 @@ "postcss-modules-extract-imports": "^1.x", "postcss-modules-local-by-default": "^1.x", "postcss-modules-scope": "^1.x", - "postcss-modules-values": "^1.x" + "postcss-modules-values": "^1.x", + "rimraf": "^2.5.4" }, "engines": { "node": ">=4.0.0" diff --git a/src/index.js b/src/index.js index ce0ccd6..3544f08 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,22 @@ -import { resolve, dirname, isAbsolute } from 'path'; +import { resolve, dirname, basename, extname, isAbsolute, join, relative } from 'path'; + +import mkdirp from 'mkdirp'; +// * +import { writeFileSync, appendFileSync } from 'fs'; +/* / +const writeFileSync = (file, content) => { + console.log(`Will save ${file}\n${content.replace(/^/gm, ' ')}`); +}; +// */ + +const writeCssFile = (filename, content) => { + mkdirp.sync(dirname(filename)); + writeFileSync(filename, content); +}; +const appendCssFile = (filename, content) => { + mkdirp.sync(dirname(filename)); + appendFileSync(filename, content); +}; const simpleRequires = [ 'createImportedName', @@ -52,17 +70,78 @@ export default function transformCssModules({ types: t }) { return { visitor: { - Program(path, { opts }) { + Program(path, state) { if (initialized) { return; } - const currentConfig = { ...defaultOptions, ...opts }; + const currentConfig = { ...defaultOptions, ...state.opts }; + // this is not a css-require-ook config + delete currentConfig.extractCss; // match file extensions, speeds up transform by creating one // RegExp ahead of execution time matchExtensions = matcher(currentConfig.extensions); + // Add a space in current state for css filenames + state.$$css = { + styles: new Map() + }; + + const extractCssFile = (filepath, css) => { + const { extractCss = null } = state.opts; + if (!extractCss) return null; + + // this is the case where a single extractCss is requested + if (typeof(extractCss) === 'string') { + // If this is the first file, then we should replace + // old content + if (state.$$css.styles.size === 1) { + return writeCssFile(extractCss, css); + } + // this should output in a single file. + // Let's append the new file content. + return appendCssFile(extractCss, css); + } + + // This is the case where each css file is written in + // its own file. + const { + dir = 'dist', + filename = '[name].css', + relativeRoot = '' + } = extractCss; + + // Make css file narmpe relative to relativeRoot + const relativePath = relative( + resolve(process.cwd(), relativeRoot), + filepath + ); + const destination = join( + resolve(process.cwd(), dir), + filename + ) + .replace(/\[name]/, basename(filepath, extname(filepath))) + .replace(/\[path]/, relativePath); + + writeCssFile(destination, css); + }; + + const pushStylesCreator = (toWrap) => (css, filepath) => { + let processed; + if (typeof toWrap === 'function') { + processed = toWrap(css, filepath); + } + if (typeof processed !== 'string') processed = css; + + if (!state.$$css.styles.has(filepath)) { + state.$$css.styles.set(filepath, processed); + extractCssFile(filepath, processed); + } + + return processed; + }; + // check if there are simple requires and if they are functions simpleRequires.forEach(key => { if (typeof currentConfig[key] !== 'string') { @@ -108,6 +187,9 @@ export default function transformCssModules({ types: t }) { } }); + // wrap or define processCss function that collect generated css + currentConfig.processCss = pushStylesCreator(currentConfig.processCss); + complexRequires.forEach(key => { if (!currentConfig.hasOwnProperty(key)) { return; @@ -142,6 +224,18 @@ export default function transformCssModules({ types: t }) { initialized = true; }, + ImportDeclaration(path, { file }) { + // this method is called between enter and exit, so we can map css to our state + // it is then replaced with require call which will be handled in seconds pass by CallExpression + // CallExpression will then replace it or remove depending on parent node (if is Program or not) + const { value } = path.node.source; + + if (matchExtensions.test(value)) { + const requiringFile = file.opts.filename; + requireCssFile(requiringFile, value); + } + }, + CallExpression(path, { file }) { const { callee: { name: calleeName }, arguments: args } = path.node; @@ -152,25 +246,24 @@ export default function transformCssModules({ types: t }) { const [{ value: stylesheetPath }] = args; if (matchExtensions.test(stylesheetPath)) { - // if parent expression is variable declarator, replace right side with tokens - if (!t.isVariableDeclarator(path.parent)) { - throw new Error( - `You can't import css file ${stylesheetPath} to a module scope.` - ); - } - const requiringFile = file.opts.filename; const tokens = requireCssFile(requiringFile, stylesheetPath); - /* eslint-disable new-cap */ - path.replaceWith(t.ObjectExpression( + // if parent expression is not a Program, replace expression with tokens + // Otherwise remove require from file, we just want to get generated css for our output + if (!t.isExpressionStatement(path.parent)) { + /* eslint-disable new-cap */ + path.replaceWith(t.ObjectExpression( Object.keys(tokens).map( token => t.ObjectProperty( - t.StringLiteral(token), - t.StringLiteral(tokens[token]) + t.StringLiteral(token), + t.StringLiteral(tokens[token]) + ) ) - ) - )); + )); + } else { + path.remove(); + } } } } diff --git a/test/fixtures/exctractcss.include.js b/test/fixtures/exctractcss.include.js new file mode 100644 index 0000000..7944933 --- /dev/null +++ b/test/fixtures/exctractcss.include.js @@ -0,0 +1 @@ +require('../styles.css'); diff --git a/test/fixtures/exctractcss.main.expected.js b/test/fixtures/exctractcss.main.expected.js new file mode 100644 index 0000000..1e36ade --- /dev/null +++ b/test/fixtures/exctractcss.main.expected.js @@ -0,0 +1,3 @@ +'use strict'; + +require('./exctractcss.include.js'); diff --git a/test/fixtures/exctractcss.main.js b/test/fixtures/exctractcss.main.js new file mode 100644 index 0000000..7e78b02 --- /dev/null +++ b/test/fixtures/exctractcss.main.js @@ -0,0 +1,2 @@ +require('./exctractcss.include.js'); +require('../parent.css'); diff --git a/test/fixtures/extractcss.combined.expected.css b/test/fixtures/extractcss.combined.expected.css new file mode 100644 index 0000000..dc3c29d --- /dev/null +++ b/test/fixtures/extractcss.combined.expected.css @@ -0,0 +1,6 @@ +.parent__block___33Sxl { + display: block; +} +.styles__className___385m0 { + color: red; +} diff --git a/test/fixtures/extractcss.parent.expected.css b/test/fixtures/extractcss.parent.expected.css new file mode 100644 index 0000000..d5d6cc7 --- /dev/null +++ b/test/fixtures/extractcss.parent.expected.css @@ -0,0 +1,3 @@ +.parent__block___33Sxl { + display: block; +} diff --git a/test/fixtures/extractcss.styles.expected.css b/test/fixtures/extractcss.styles.expected.css new file mode 100644 index 0000000..ef8049c --- /dev/null +++ b/test/fixtures/extractcss.styles.expected.css @@ -0,0 +1,3 @@ +.styles__className___385m0 { + color: red; +} diff --git a/test/fixtures/import.expected.js b/test/fixtures/import.expected.js index c235411..c2d60df 100644 --- a/test/fixtures/import.expected.js +++ b/test/fixtures/import.expected.js @@ -6,4 +6,4 @@ var _styles = { var _styles2 = _interopRequireDefault(_styles); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } \ No newline at end of file +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } diff --git a/test/index.spec.js b/test/index.spec.js index b3b8e49..0ead100 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -1,14 +1,15 @@ import { expect } from 'chai'; -import { resolve, join } from 'path'; +import { resolve, join, relative } from 'path'; import { readFileSync } from 'fs'; import gulpUtil from 'gulp-util'; -import gulpBabel from 'gulp-babel'; +import rimraf from 'rimraf'; describe('babel-plugin-css-modules-transform', () => { function transform(path, configuration = {}) { // remove css modules transform plugin (simulates clean processes) delete require.cache[resolve(__dirname, '../src/index.js')]; const babel = require('babel-core'); + if (configuration && !('devMode' in configuration)) configuration.devMode = true; return babel.transformFileSync(resolve(__dirname, path), { plugins: [ @@ -24,6 +25,27 @@ describe('babel-plugin-css-modules-transform', () => { }); } + function createBabelStream(configuration = {}) { + // remove css modules transform plugin (simulates clean processes) + delete require.cache[resolve(__dirname, '../src/index.js')]; + const gulpBabel = require('gulp-babel'); + // set css-modules-require-hook in dev to clear cache + if (configuration && !('devMode' in configuration)) configuration.devMode = true; + + return gulpBabel({ + plugins: [ + 'transform-strict-mode', + 'transform-es2015-parameters', + 'transform-es2015-destructuring', + 'transform-es2015-modules-commonjs', + 'transform-object-rest-spread', + 'transform-es2015-spread', + 'transform-export-extensions', + ['../../src/index.js', configuration] + ] + }); + } + function readExpected(path) { // We trim the contents of the file so that we don't have // to deal with newline issues, since some text editors @@ -33,14 +55,18 @@ describe('babel-plugin-css-modules-transform', () => { return readFileSync(resolve(__dirname, path), 'utf8').trim(); } - it('should throw if we are requiring css module to module scope', () => { - expect(() => transform('fixtures/global.require.js')).to.throw( - /^.+: You can't import css file .+ to a module scope\.$/ - ); + beforeEach((done) => { + rimraf(`${__dirname}/output/`, done); + }); - expect(() => transform('fixtures/global.import.js')).to.throw( - /^.+: You can't import css file .+ to a module scope\.$/ - ); + after((done) => { + rimraf(`${__dirname}/output/`, done); + }); + + it('should not throw if we are requiring css module to module scope', () => { + expect(() => transform('fixtures/global.require.js')).to.not.throw(); + + expect(() => transform('fixtures/global.import.js')).to.not.throw(); }); it('should throw if generateScopeName is not exporting a function', () => { @@ -113,18 +139,7 @@ describe('babel-plugin-css-modules-transform', () => { }); it('should replace require call with hash of class name => css class name via gulp', (cb) => { - const stream = gulpBabel({ - plugins: [ - 'transform-strict-mode', - 'transform-es2015-parameters', - 'transform-es2015-destructuring', - 'transform-es2015-modules-commonjs', - 'transform-object-rest-spread', - 'transform-es2015-spread', - 'transform-export-extensions', - ['../../src/index.js', {}] - ] - }); + const stream = createBabelStream({}); stream.on('data', (file) => { expect(file.contents.toString()).to.be.equal(readExpected('fixtures/import.expected.js')); @@ -135,7 +150,7 @@ describe('babel-plugin-css-modules-transform', () => { stream.write(new gulpUtil.File({ cwd: __dirname, base: join(__dirname, 'fixtures'), - path: join(__dirname, 'fixtures/require.js'), + path: join(__dirname, 'fixtures/import.js'), contents: readFileSync(join(__dirname, 'fixtures/import.js')) })); @@ -145,4 +160,167 @@ describe('babel-plugin-css-modules-transform', () => { it('should accept file extensions as an array', () => { expect(transform('fixtures/extensions.js', {extensions: ['.scss', '.css']}).code).to.be.equal(readExpected('fixtures/extensions.expected.js')); }); + + it('should write a multiple css files using import', () => { + expect(transform('fixtures/import.js', { + extractCss: { + dir: `${__dirname}/output/`, + filename: '[name].css', + relativeRoot: `${__dirname}` + } + }).code).to.be.equal(readExpected('fixtures/import.expected.js')); + + expect(readExpected(`${__dirname}/output/parent.css`)) + .to.be.equal(readExpected('fixtures/extractcss.parent.expected.css')); + expect(readExpected(`${__dirname}/output/styles.css`)) + .to.be.equal(readExpected('fixtures/extractcss.styles.expected.css')); + }); + + it('should write a multiple css files using require', () => { + expect(transform('fixtures/require.js', { + extractCss: { + dir: `${__dirname}/output/`, + filename: '[name].css', + relativeRoot: `${__dirname}` + } + }).code).to.be.equal(readExpected('fixtures/require.expected.js')); + + expect(readExpected(`${__dirname}/output/parent.css`)) + .to.be.equal(readExpected('fixtures/extractcss.parent.expected.css')); + expect(readExpected(`${__dirname}/output/styles.css`)) + .to.be.equal(readExpected('fixtures/extractcss.styles.expected.css')); + }); + + it('should write a single css file using import', () => { + expect(transform('fixtures/import.js', { + extractCss: `${__dirname}/output/combined.css` + }).code).to.be.equal(readExpected('fixtures/import.expected.js')); + + expect(readExpected(`${__dirname}/output/combined.css`)) + .to.be.equal(readExpected('fixtures/extractcss.combined.expected.css')); + }); + + it('should write a single css file using require', () => { + expect(transform('fixtures/require.js', { + extractCss: `${__dirname}/output/combined.css` + }).code).to.be.equal(readExpected('fixtures/require.expected.js')); + + expect(readExpected(`${__dirname}/output/combined.css`)) + .to.be.equal(readExpected('fixtures/extractcss.combined.expected.css')); + }); + + it('should extract styles with a single input file via gulp', (cb) => { + const stream = createBabelStream({ + extractCss: `${__dirname}/output/combined.css` + }); + + stream.on('data', (file) => { + expect(file.contents.toString()).to.be.equal(readExpected('fixtures/exctractcss.main.expected.js')); + }); + + stream.on('end', (err) => { + if (err) return cb(err); + expect(readExpected(`${__dirname}/output/combined.css`)) + .to.be.equal(readExpected('fixtures/extractcss.parent.expected.css')); + + return cb(); + }); + + stream.write(new gulpUtil.File({ + cwd: __dirname, + base: join(__dirname, 'fixtures'), + path: join(__dirname, 'fixtures/exctractcss.main.js'), + contents: readFileSync(join(__dirname, 'fixtures/exctractcss.main.js')) + })); + + stream.end(); + }); + + it('should extract multiple files via gulp', (cb) => { + const stream = createBabelStream({ + extractCss: { + dir: `${__dirname}/output/`, + filename: '[name].css', + relativeRoot: `${__dirname}` + } + }); + + // it seems that a data function is required + stream.on('data', () => {}); + + stream.on('end', (err) => { + if (err) return cb(err); + + expect(readExpected(`${__dirname}/output/parent.css`)) + .to.be.equal(readExpected('fixtures/extractcss.parent.expected.css')); + expect(readExpected(`${__dirname}/output/styles.css`)) + .to.be.equal(readExpected('fixtures/extractcss.styles.expected.css')); + + return cb(); + }); + + stream.write(new gulpUtil.File({ + cwd: __dirname, + base: join(__dirname, 'fixtures'), + path: join(__dirname, 'fixtures/exctractcss.main.js'), + contents: readFileSync(join(__dirname, 'fixtures/exctractcss.main.js')) + })); + + stream.write(new gulpUtil.File({ + cwd: __dirname, + base: join(__dirname, 'fixtures'), + path: join(__dirname, 'fixtures/exctractcss.include.js'), + contents: readFileSync(join(__dirname, 'fixtures/exctractcss.include.js')) + })); + + stream.end(); + }); + + it('should extract combined files via gulp', (cb) => { + const stream = createBabelStream({ + extractCss: `${__dirname}/output/combined.css` + }); + + // it seems that a data function is required + stream.on('data', () => {}); + + stream.on('end', (err) => { + if (err) return cb(err); + + expect(readExpected(`${__dirname}/output/combined.css`)) + .to.be.equal(readExpected('fixtures/extractcss.combined.expected.css')); + return cb(); + }); + + stream.write(new gulpUtil.File({ + cwd: __dirname, + base: join(__dirname, 'fixtures'), + path: join(__dirname, 'fixtures/exctractcss.main.js'), + contents: readFileSync(join(__dirname, 'fixtures/exctractcss.main.js')) + })); + + stream.write(new gulpUtil.File({ + cwd: __dirname, + base: join(__dirname, 'fixtures'), + path: join(__dirname, 'fixtures/exctractcss.include.js'), + contents: readFileSync(join(__dirname, 'fixtures/exctractcss.include.js')) + })); + + stream.end(); + }); + + it('should call custom preprocess', () => { + const called = []; + expect(transform('fixtures/require.js', { + extractCss: `${__dirname}/output/combined.css`, + processCss(css, filename) { + called.push(relative(__dirname, filename)); + return css; + } + }).code).to.be.equal(readExpected('fixtures/require.expected.js')); + expect(called).to.be.deep.equal([ + 'parent.css', + 'styles.css' + ]); + }); }); From abbe610387b326c24551cfdf5efb3c386159b473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Tue, 2 Aug 2016 10:05:13 +0200 Subject: [PATCH 02/66] update nodejs on circleci --- circle.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/circle.yml b/circle.yml index 9c75833..ee1c24b 100644 --- a/circle.yml +++ b/circle.yml @@ -1,5 +1,3 @@ machine: - pre: - - "sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20" - - "sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20" - - "nvm install v4.1.1 && nvm alias default v4.1.1" + node: + version: 6.1.0 From 514a25e3f3bb541970c24bb7b1a06418d7867e3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Tue, 2 Aug 2016 10:05:36 +0200 Subject: [PATCH 03/66] upgrade css-modules-require-hook, closes #14 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4438718..810eacc 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ }, "homepage": "https://github.com/michalkvasnicak/babel-plugin-css-modules-transform#readme", "dependencies": { - "css-modules-require-hook": "^3.0.0", + "css-modules-require-hook": "^4.0.1", "mkdirp": "^0.5.1" }, "devDependencies": { From 2c8aca8eb73f788b2bc65262f778f6e92e1c20ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Tue, 2 Aug 2016 10:09:00 +0200 Subject: [PATCH 04/66] Version 0.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 810eacc..6561c44 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "0.1.1", + "version": "0.2.0", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { From ac11d2ff3a4d66999c52278663adfc3af226ef1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Sat, 20 Aug 2016 13:37:54 +0200 Subject: [PATCH 05/66] bump version of css-modules-require-hook, closes #18 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6561c44..ff1542d 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ }, "homepage": "https://github.com/michalkvasnicak/babel-plugin-css-modules-transform#readme", "dependencies": { - "css-modules-require-hook": "^4.0.1", + "css-modules-require-hook": "^4.0.2", "mkdirp": "^0.5.1" }, "devDependencies": { From 14df2d0c3d3f53ccbb336ef32af9a7b690646459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Sat, 20 Aug 2016 13:38:16 +0200 Subject: [PATCH 06/66] Version 0.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ff1542d..5888d29 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "0.2.0", + "version": "0.2.1", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { From 5430f51db65437703215e571ed3cdd6e22040c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Fri, 2 Sep 2016 11:28:39 +0200 Subject: [PATCH 07/66] add utility functions --- src/index.js | 101 +++--------------- src/utils/index.js | 7 ++ src/utils/isBoolean.js | 9 ++ src/utils/isFunction.js | 9 ++ src/utils/isModulePath.js | 26 +++++ src/utils/isPlainObject.js | 13 +++ src/utils/isRegExp.js | 9 ++ src/utils/isString.js | 9 ++ src/utils/requireLocalFileOrNodeModule.js | 19 ++++ test/utils/isBoolean.spec.js | 14 +++ test/utils/isFunction.spec.js | 13 +++ test/utils/isModulePath.spec.js | 17 +++ test/utils/isPlainObject.spec.js | 14 +++ test/utils/isRegExp.spec.js | 16 +++ test/utils/isString.spec.js | 17 +++ .../requireLocalFileOrNodeModule.spec.js | 10 ++ 16 files changed, 214 insertions(+), 89 deletions(-) create mode 100644 src/utils/index.js create mode 100644 src/utils/isBoolean.js create mode 100644 src/utils/isFunction.js create mode 100644 src/utils/isModulePath.js create mode 100644 src/utils/isPlainObject.js create mode 100644 src/utils/isRegExp.js create mode 100644 src/utils/isString.js create mode 100644 src/utils/requireLocalFileOrNodeModule.js create mode 100644 test/utils/isBoolean.spec.js create mode 100644 test/utils/isFunction.spec.js create mode 100644 test/utils/isModulePath.spec.js create mode 100644 test/utils/isPlainObject.spec.js create mode 100644 test/utils/isRegExp.spec.js create mode 100644 test/utils/isString.spec.js create mode 100644 test/utils/requireLocalFileOrNodeModule.spec.js diff --git a/src/index.js b/src/index.js index 3544f08..2992bd7 100644 --- a/src/index.js +++ b/src/index.js @@ -1,13 +1,9 @@ import { resolve, dirname, basename, extname, isAbsolute, join, relative } from 'path'; - -import mkdirp from 'mkdirp'; -// * import { writeFileSync, appendFileSync } from 'fs'; -/* / -const writeFileSync = (file, content) => { - console.log(`Will save ${file}\n${content.replace(/^/gm, ' ')}`); -}; -// */ +import mkdirp from 'mkdirp'; + +// options resolvers +import * as requireHooksOptions from './options_resolvers'; const writeCssFile = (filename, content) => { mkdirp.sync(dirname(filename)); @@ -18,18 +14,6 @@ const appendCssFile = (filename, content) => { appendFileSync(filename, content); }; -const simpleRequires = [ - 'createImportedName', - 'generateScopedName', - 'processCss', - 'preprocessCss' -]; - -const complexRequires = [ - 'append', - 'prepend' -]; - const defaultOptions = { generateScopedName: '[name]__[local]___[hash:base64:5]' }; @@ -63,6 +47,7 @@ export default function transformCssModules({ types: t }) { let initialized = false; let matchExtensions = /\.css$/i; + function matcher(extensions = ['.css']) { const extensionsPatern = extensions.join('|').replace(/\./g, '\\\.'); return new RegExp(`(${extensionsPatern})$`, 'i'); @@ -129,9 +114,11 @@ export default function transformCssModules({ types: t }) { const pushStylesCreator = (toWrap) => (css, filepath) => { let processed; + if (typeof toWrap === 'function') { processed = toWrap(css, filepath); } + if (typeof processed !== 'string') processed = css; if (!state.$$css.styles.has(filepath)) { @@ -142,83 +129,19 @@ export default function transformCssModules({ types: t }) { return processed; }; - // check if there are simple requires and if they are functions - simpleRequires.forEach(key => { - if (typeof currentConfig[key] !== 'string') { - return; - } - - const modulePath = resolve(process.cwd(), currentConfig[key]); - - // this one can be require or string - if (key === 'generateScopedName') { - try { - // if it is existing file, require it, otherwise use value - currentConfig[key] = require(modulePath); - } catch (e) { - try { - currentConfig[key] = require(currentConfig[key]); - } catch (_e) { - // do nothing, because it is not a valid path - } - } - - if (typeof currentConfig[key] !== 'function' && typeof currentConfig[key] !== 'string') { - throw new Error(`Configuration '${key}' is not a string or function.`); - } - + // resolve options + Object.keys(requireHooksOptions).forEach(key => { + // skip undefined options + if (currentConfig[key] === undefined) { return; } - if (currentConfig.hasOwnProperty(key)) { - try { - currentConfig[key] = require(modulePath); - } catch (e) { - try { - currentConfig[key] = require(currentConfig[key]); - } catch (_e) { - // do nothing because it is not a valid path - } - } - - if (typeof currentConfig[key] !== 'function') { - throw new Error(`Module '${modulePath}' does not exist or is not a function.`); - } - } + currentConfig[key] = requireHooksOptions[key](currentConfig[key], currentConfig); }); // wrap or define processCss function that collect generated css currentConfig.processCss = pushStylesCreator(currentConfig.processCss); - complexRequires.forEach(key => { - if (!currentConfig.hasOwnProperty(key)) { - return; - } - - if (!Array.isArray(currentConfig[key])) { - throw new Error(`Configuration '${key}' has to be an array.`); - } - - currentConfig[key].forEach((plugin, index) => { - // first try to load it using npm - try { - currentConfig[key][index] = require(plugin); - } catch (e) { - try { - currentConfig[key][index] = require(resolve(process.cwd(), plugin)); - } catch (_e) { - // do nothing - } - } - - if (typeof currentConfig[key][index] !== 'function') { - throw new Error(`Configuration '${key}' has to be valid path to a module at index ${index} or it does not export a function.`); - } - - currentConfig[key][index] = currentConfig[key][index](); - }); - }); - require('css-modules-require-hook')(currentConfig); initialized = true; diff --git a/src/utils/index.js b/src/utils/index.js new file mode 100644 index 0000000..40c7af0 --- /dev/null +++ b/src/utils/index.js @@ -0,0 +1,7 @@ +export { default as isBoolean } from './isBoolean'; +export { default as isFunction } from './isFunction'; +export { default as isModulePath } from './isModulePath'; +export { default as isPlainObject } from './isPlainObject'; +export { default as isRegExp } from './isRegExp'; +export { default as isString } from './isString'; +export { default as requireLocalFileOrNodeModule } from './requireLocalFileOrNodeModule'; diff --git a/src/utils/isBoolean.js b/src/utils/isBoolean.js new file mode 100644 index 0000000..fe30540 --- /dev/null +++ b/src/utils/isBoolean.js @@ -0,0 +1,9 @@ +/** + * Is provided value a boolean? + * + * @param {*} value + * @returns {boolean} + */ +export default function isBoolean(value) { + return value === true || value === false; +} diff --git a/src/utils/isFunction.js b/src/utils/isFunction.js new file mode 100644 index 0000000..e792f7a --- /dev/null +++ b/src/utils/isFunction.js @@ -0,0 +1,9 @@ +/** + * Is provided object a function? + * + * @param {*} object + * @returns {boolean} + */ +export default function isFunction(object) { + return typeof object === 'function'; +} diff --git a/src/utils/isModulePath.js b/src/utils/isModulePath.js new file mode 100644 index 0000000..1f35621 --- /dev/null +++ b/src/utils/isModulePath.js @@ -0,0 +1,26 @@ +import { resolve as resolvePath } from 'path'; +import isString from './isString'; + +/** + * Is given path a valid file or node module path? + * + * @param {String} path + * @returns {boolean} + */ +export default function isModulePath(path) { + if (!isString(path) || path === '') { + return false; + } + + try { + require.resolve(resolvePath(process.cwd(), path)); + return true; + } catch (e) { + try { + require.resolve(path); + return true; + } catch (_e) { + return false; + } + } +} diff --git a/src/utils/isPlainObject.js b/src/utils/isPlainObject.js new file mode 100644 index 0000000..85b5701 --- /dev/null +++ b/src/utils/isPlainObject.js @@ -0,0 +1,13 @@ +/** + * Is provided value an plain object? + * + * @param {*} object + * @returns {boolean} + */ +export default function isPlainObject(object) { + if (object === null || object === undefined) { + return false; + } + + return object.toString() === '[object Object]'; +} diff --git a/src/utils/isRegExp.js b/src/utils/isRegExp.js new file mode 100644 index 0000000..031a52a --- /dev/null +++ b/src/utils/isRegExp.js @@ -0,0 +1,9 @@ +/** + * Is Provided object an RegExp? + * + * @param {*} object + * @returns {boolean} + */ +export default function isRegExp(object) { + return object instanceof RegExp; +} diff --git a/src/utils/isString.js b/src/utils/isString.js new file mode 100644 index 0000000..05da6f6 --- /dev/null +++ b/src/utils/isString.js @@ -0,0 +1,9 @@ +/** + * Is provided object a string? + * + * @param {*} object + * @returns {boolean} + */ +export default function isString(object) { + return typeof object === 'string'; +} diff --git a/src/utils/requireLocalFileOrNodeModule.js b/src/utils/requireLocalFileOrNodeModule.js new file mode 100644 index 0000000..c421272 --- /dev/null +++ b/src/utils/requireLocalFileOrNodeModule.js @@ -0,0 +1,19 @@ +import { resolve as resolvePath } from 'path'; + +/** + * Require local file or node modules + * + * @param {String} path + * @returns {*} + */ +export default function requireLocalFileOrNodeModule(path) { + const localFile = resolvePath(process.cwd(), path); + + try { + // first try to require local file + return require(localFile); + } catch (e) { + // try to require node_module + return require(path); + } +} diff --git a/test/utils/isBoolean.spec.js b/test/utils/isBoolean.spec.js new file mode 100644 index 0000000..47f441d --- /dev/null +++ b/test/utils/isBoolean.spec.js @@ -0,0 +1,14 @@ +import { expect } from 'chai'; + +import isBoolean from '../../src/utils/isBoolean'; + +describe('utils/isBoolean', () => { + it('should return true for valid values', () => { + expect(isBoolean(null)).to.be.equal(false); + expect(isBoolean('')).to.be.equal(false); + expect(isBoolean(1)).to.be.equal(false); + expect(isBoolean(false)).to.be.equal(true); + expect(isBoolean(true)).to.be.equal(true); + expect(isBoolean(() => {})).to.be.equal(false); + }); +}); diff --git a/test/utils/isFunction.spec.js b/test/utils/isFunction.spec.js new file mode 100644 index 0000000..e1aca0a --- /dev/null +++ b/test/utils/isFunction.spec.js @@ -0,0 +1,13 @@ +import { expect } from 'chai'; + +import isFunction from '../../src/utils/isFunction'; + +describe('utils/isFunction', () => { + it('should return true for function', () => { + expect(isFunction(null)).to.be.equal(false); + expect(isFunction('')).to.be.equal(false); + expect(isFunction(1)).to.be.equal(false); + expect(isFunction(false)).to.be.equal(false); + expect(isFunction(() => {})).to.be.equal(true); + }); +}); diff --git a/test/utils/isModulePath.spec.js b/test/utils/isModulePath.spec.js new file mode 100644 index 0000000..73065d1 --- /dev/null +++ b/test/utils/isModulePath.spec.js @@ -0,0 +1,17 @@ +import { expect } from 'chai'; + +import isModulePath from '../../src/utils/isModulePath'; + +describe('utils/isModulePath', () => { + it('should return true for valid paths', () => { + expect(isModulePath('mkdirp')).to.be.equal(true); + expect(isModulePath('not-global-existing')).to.be.equal(false); + expect(isModulePath('./test/utils/isModulePath.spec.js')).to.be.equal(true); + expect(isModulePath('./test/utils/nonexisting')).to.be.equal(false); + expect(isModulePath('')).to.be.equal(false); + expect(isModulePath(1)).to.be.equal(false); + expect(isModulePath(false)).to.be.equal(false); + expect(isModulePath(() => {})).to.be.equal(false); + expect(isModulePath({})).to.be.equal(false); + }); +}); diff --git a/test/utils/isPlainObject.spec.js b/test/utils/isPlainObject.spec.js new file mode 100644 index 0000000..02ac7a1 --- /dev/null +++ b/test/utils/isPlainObject.spec.js @@ -0,0 +1,14 @@ +import { expect } from 'chai'; + +import isPlainObject from '../../src/utils/isPlainObject'; + +describe('utils/isPlainObject', () => { + it('should return true for an object', () => { + expect(isPlainObject(null)).to.be.equal(false); + expect(isPlainObject('')).to.be.equal(false); + expect(isPlainObject(1)).to.be.equal(false); + expect(isPlainObject(false)).to.be.equal(false); + expect(isPlainObject(() => {})).to.be.equal(false); + expect(isPlainObject({})).to.be.equal(true); + }); +}); diff --git a/test/utils/isRegExp.spec.js b/test/utils/isRegExp.spec.js new file mode 100644 index 0000000..1bce2ff --- /dev/null +++ b/test/utils/isRegExp.spec.js @@ -0,0 +1,16 @@ +import { expect } from 'chai'; + +import isRegExp from '../../src/utils/isRegExp'; + +describe('utils/isRegExp', () => { + it('should return true for a RegExp', () => { + expect(isRegExp(null)).to.be.equal(false); + expect(isRegExp('')).to.be.equal(false); + expect(isRegExp(1)).to.be.equal(false); + expect(isRegExp(false)).to.be.equal(false); + expect(isRegExp(() => {})).to.be.equal(false); + expect(isRegExp({})).to.be.equal(false); + expect(isRegExp(/a/)).to.be.equal(true); + expect(isRegExp(new RegExp('a'))).to.be.equal(true); + }); +}); diff --git a/test/utils/isString.spec.js b/test/utils/isString.spec.js new file mode 100644 index 0000000..2a09ae4 --- /dev/null +++ b/test/utils/isString.spec.js @@ -0,0 +1,17 @@ +import { expect } from 'chai'; + +import isString from '../../src/utils/isString'; + +describe('utils/isString', () => { + it('should return true for a string', () => { + expect(isString(null)).to.be.equal(false); + expect(isString('')).to.be.equal(true); + expect(isString('a')).to.be.equal(true); + expect(isString(1)).to.be.equal(false); + expect(isString(false)).to.be.equal(false); + expect(isString(() => {})).to.be.equal(false); + expect(isString({})).to.be.equal(false); + expect(isString(/a/)).to.be.equal(false); + expect(isString(new RegExp('a'))).to.be.equal(false); + }); +}); diff --git a/test/utils/requireLocalFileOrNodeModule.spec.js b/test/utils/requireLocalFileOrNodeModule.spec.js new file mode 100644 index 0000000..2177d33 --- /dev/null +++ b/test/utils/requireLocalFileOrNodeModule.spec.js @@ -0,0 +1,10 @@ +import { expect } from 'chai'; + +import requireLocalFileOrNodeModule from '../../src/utils/requireLocalFileOrNodeModule'; + +describe('utils/requireLocalFileOrNodeModule', () => { + it('should return exported value from file', () => { + expect(requireLocalFileOrNodeModule('mkdirp')).to.be.a('function'); + expect(requireLocalFileOrNodeModule('./src/utils/requireLocalFileOrNodeModule')).to.be.a('object'); + }); +}); From e1a94d934db44d2263deae1b5fb6fe83ba462ace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Fri, 2 Sep 2016 12:47:00 +0200 Subject: [PATCH 08/66] add options resolvers, fixes #10 --- src/options_resolvers/append.js | 29 ++++++++++++++++ src/options_resolvers/camelCase.js | 15 ++++++++ src/options_resolvers/createImportedName.js | 23 +++++++++++++ src/options_resolvers/devMode.js | 15 ++++++++ src/options_resolvers/extensions.js | 21 ++++++++++++ src/options_resolvers/generateScopedName.js | 24 +++++++++++++ src/options_resolvers/ignore.js | 25 ++++++++++++++ src/options_resolvers/index.js | 13 +++++++ src/options_resolvers/mode.js | 15 ++++++++ src/options_resolvers/prepend.js | 29 ++++++++++++++++ src/options_resolvers/preprocessCss.js | 24 +++++++++++++ src/options_resolvers/processCss.js | 24 +++++++++++++ src/options_resolvers/processOpts.js | 24 +++++++++++++ src/options_resolvers/rootDir.js | 21 ++++++++++++ src/options_resolvers/use.js | 29 ++++++++++++++++ test/fixtures/require.ignored.expected.js | 3 ++ test/options_resolvers/append.spec.js | 17 ++++++++++ test/options_resolvers/camelCase.spec.js | 13 +++++++ test/options_resolvers/devMode.spec.js | 13 +++++++ test/options_resolvers/extensions.spec.js | 17 ++++++++++ .../generateScopedName.spec.js | 17 ++++++++++ test/options_resolvers/ignore.spec.js | 25 ++++++++++++++ test/options_resolvers/mode.spec.js | 13 +++++++ test/options_resolvers/prepend.spec.js | 17 ++++++++++ test/options_resolvers/preprocessCss.spec.js | 11 ++++++ test/options_resolvers/processCss.spec.js | 11 ++++++ test/options_resolvers/processOpts.spec.js | 20 +++++++++++ test/options_resolvers/rootDir.spec.js | 22 ++++++++++++ test/options_resolvers/use.spec.js | 34 +++++++++++++++++++ 29 files changed, 564 insertions(+) create mode 100644 src/options_resolvers/append.js create mode 100644 src/options_resolvers/camelCase.js create mode 100644 src/options_resolvers/createImportedName.js create mode 100644 src/options_resolvers/devMode.js create mode 100644 src/options_resolvers/extensions.js create mode 100644 src/options_resolvers/generateScopedName.js create mode 100644 src/options_resolvers/ignore.js create mode 100644 src/options_resolvers/index.js create mode 100644 src/options_resolvers/mode.js create mode 100644 src/options_resolvers/prepend.js create mode 100644 src/options_resolvers/preprocessCss.js create mode 100644 src/options_resolvers/processCss.js create mode 100644 src/options_resolvers/processOpts.js create mode 100644 src/options_resolvers/rootDir.js create mode 100644 src/options_resolvers/use.js create mode 100644 test/fixtures/require.ignored.expected.js create mode 100644 test/options_resolvers/append.spec.js create mode 100644 test/options_resolvers/camelCase.spec.js create mode 100644 test/options_resolvers/devMode.spec.js create mode 100644 test/options_resolvers/extensions.spec.js create mode 100644 test/options_resolvers/generateScopedName.spec.js create mode 100644 test/options_resolvers/ignore.spec.js create mode 100644 test/options_resolvers/mode.spec.js create mode 100644 test/options_resolvers/prepend.spec.js create mode 100644 test/options_resolvers/preprocessCss.spec.js create mode 100644 test/options_resolvers/processCss.spec.js create mode 100644 test/options_resolvers/processOpts.spec.js create mode 100644 test/options_resolvers/rootDir.spec.js create mode 100644 test/options_resolvers/use.spec.js diff --git a/src/options_resolvers/append.js b/src/options_resolvers/append.js new file mode 100644 index 0000000..7d93057 --- /dev/null +++ b/src/options_resolvers/append.js @@ -0,0 +1,29 @@ +import { isFunction, isModulePath, requireLocalFileOrNodeModule } from '../utils'; + +/** + * Resolves append option for css-modules-require-hook + * + * @param {*} value + * @returns {Function} + */ +export default function append(value/* , currentConfig */) { + if (Array.isArray(value)) { + return value.map((option, index) => { + if (isFunction(option)) { + return option(); + } else if (isModulePath(option)) { + const requiredOption = requireLocalFileOrNodeModule(option); + + if (!isFunction(requiredOption)) { + throw new Error(`Configuration 'append[${index}]' module is not exporting a function`); + } + + return requiredOption(); + } + + throw new Error(`Configuration 'append[${index}]' is not a function or a valid module path`); + }); + } + + throw new Error(`Configuration 'append' is not an array`); +} diff --git a/src/options_resolvers/camelCase.js b/src/options_resolvers/camelCase.js new file mode 100644 index 0000000..7d6afa7 --- /dev/null +++ b/src/options_resolvers/camelCase.js @@ -0,0 +1,15 @@ +import { isBoolean } from '../utils'; + +/** + * Resolves camelCase option for css-modules-require-hook + * + * @param {*} value + * @returns {boolean} + */ +export default function camelCase(value/* , currentConfig */) { + if (!isBoolean(value)) { + throw new Error(`Configuration 'camelCase' is not a boolean`); + } + + return value; +} diff --git a/src/options_resolvers/createImportedName.js b/src/options_resolvers/createImportedName.js new file mode 100644 index 0000000..5afb311 --- /dev/null +++ b/src/options_resolvers/createImportedName.js @@ -0,0 +1,23 @@ +import { isFunction, isModulePath, requireLocalFileOrNodeModule } from '../utils'; + +/** + * Resolves createImportedName css-modules-require-hook option + * + * @param {String|Function} value + * @returns {Function} + */ +export default function createImportedName(value/* , currentConfig */) { + if (isFunction(value)) { + return value; + } else if (isModulePath(value)) { + const requiredOption = requireLocalFileOrNodeModule(value); + + if (!isFunction(requiredOption)) { + throw new Error(`Configuration file for 'createImportedName' is not exporting a function`); + } + + return requiredOption; + } + + throw new Error(`Configuration 'createImportedName' is not a function nor a valid module path`); +} diff --git a/src/options_resolvers/devMode.js b/src/options_resolvers/devMode.js new file mode 100644 index 0000000..13984c6 --- /dev/null +++ b/src/options_resolvers/devMode.js @@ -0,0 +1,15 @@ +import { isBoolean } from '../utils'; + +/** + * Resolves devMode option for css-modules-require-hook + * + * @param {*} value + * @returns {boolean} + */ +export default function devMode(value/* , currentConfig */) { + if (!isBoolean(value)) { + throw new Error(`Configuration 'devMode' is not a boolean`); + } + + return value; +} diff --git a/src/options_resolvers/extensions.js b/src/options_resolvers/extensions.js new file mode 100644 index 0000000..796ae68 --- /dev/null +++ b/src/options_resolvers/extensions.js @@ -0,0 +1,21 @@ +import { isString } from '../utils'; + +/** + * Resolves extensions for css-modules-require-hook + * + * @param {*} value + * @returns {Array.} + */ +export default function extensions(value/* , currentConfig */) { + if (Array.isArray(value)) { + return value.map((extension, index) => { + if (!isString(extension)) { + throw new Error(`Configuration 'extensions[${index}]' is not a string`); + } + + return extension; + }); + } + + throw new Error(`Configuration 'extensions' is not an array`); +} diff --git a/src/options_resolvers/generateScopedName.js b/src/options_resolvers/generateScopedName.js new file mode 100644 index 0000000..b4224f3 --- /dev/null +++ b/src/options_resolvers/generateScopedName.js @@ -0,0 +1,24 @@ +import { isModulePath, isFunction, isString, requireLocalFileOrNodeModule } from '../utils'; + +/** + * Resolves generateScopedName option for css-modules-require-hook + * + * @param {String|Function} value + * + * @returns {String|Function} + */ +export default function generateScopedName(value/* ,currentConfig */) { + if (isModulePath(value)) { + const requiredModule = requireLocalFileOrNodeModule(value); + + if (isString(requiredModule) || isFunction(requiredModule)) { + return requiredModule; + } + + throw new Error(`Configuration file for 'generateScopedName' is not exporting a string nor a function`); + } else if (isString(value) || isFunction(value)) { + return value; + } else { + throw new Error(`Configuration 'generateScopedName' is not a function, string nor valid path to module`); + } +} diff --git a/src/options_resolvers/ignore.js b/src/options_resolvers/ignore.js new file mode 100644 index 0000000..6883985 --- /dev/null +++ b/src/options_resolvers/ignore.js @@ -0,0 +1,25 @@ +import { isFunction, isModulePath, isRegExp, isString, requireLocalFileOrNodeModule } from '../utils'; + +/** + * Resolves ignore option for css-modules-require-hook + * + * @param {*} value + * @returns {Function|String|RegExp} + */ +export default function ignore(value/* , currentConfig */) { + if (isFunction(value) || isRegExp(value)) { + return value; + } else if (isModulePath(value)) { + const requiredOption = requireLocalFileOrNodeModule(value); + + if (isFunction(requiredOption) || isString(requiredOption) || isRegExp(requiredOption)) { + return requiredOption; + } + + throw new Error(`Configuration file for 'generateScopedName' is not exporting a string nor a function`); + } else if (isString(value)) { + return value; + } else { + throw new Error(`Configuration 'ignore' is not a function, string, RegExp nor valid path to module`); + } +} diff --git a/src/options_resolvers/index.js b/src/options_resolvers/index.js new file mode 100644 index 0000000..958de2c --- /dev/null +++ b/src/options_resolvers/index.js @@ -0,0 +1,13 @@ +export { default as append } from './append'; +export { default as camelCase } from './camelCase'; +export { default as createImportedName } from './createImportedName'; +export { default as devMode } from './devMode'; +export { default as generateScopedName } from './generateScopedName'; +export { default as ignore } from './ignore'; +export { default as mode } from './mode'; +export { default as prepend } from './prepend'; +export { default as preprocessCss } from './preprocessCss'; +export { default as processCss } from './processCss'; +export { default as processOpts } from './processOpts'; +export { default as rootDir } from './rootDir'; +export { default as use } from './use'; diff --git a/src/options_resolvers/mode.js b/src/options_resolvers/mode.js new file mode 100644 index 0000000..02c0953 --- /dev/null +++ b/src/options_resolvers/mode.js @@ -0,0 +1,15 @@ +import { isString } from '../utils'; + +/** + * Resolves mode option for css-modules-require-hook + * + * @param {*} value + * @returns {boolean} + */ +export default function mode(value/* , currentConfig */) { + if (!isString(value)) { + throw new Error(`Configuration 'mode' is not a string`); + } + + return value; +} diff --git a/src/options_resolvers/prepend.js b/src/options_resolvers/prepend.js new file mode 100644 index 0000000..a8bc60d --- /dev/null +++ b/src/options_resolvers/prepend.js @@ -0,0 +1,29 @@ +import { isFunction, isModulePath, requireLocalFileOrNodeModule } from '../utils'; + +/** + * Resolves prepend option for css-modules-require-hook + * + * @param {*} value + * @returns {Function} + */ +export default function prepend(value/* , currentConfig */) { + if (Array.isArray(value)) { + return value.map((option, index) => { + if (isFunction(option)) { + return option(); + } else if (isModulePath(option)) { + const requiredOption = requireLocalFileOrNodeModule(option); + + if (!isFunction(requiredOption)) { + throw new Error(`Configuration 'prepend[${index}]' module is not exporting a function`); + } + + return requiredOption(); + } + + throw new Error(`Configuration 'prepend[${index}]' is not a function or a valid module path`); + }); + } + + throw new Error(`Configuration 'prepend' is not an array`); +} diff --git a/src/options_resolvers/preprocessCss.js b/src/options_resolvers/preprocessCss.js new file mode 100644 index 0000000..170cac7 --- /dev/null +++ b/src/options_resolvers/preprocessCss.js @@ -0,0 +1,24 @@ +import { isModulePath, isFunction, requireLocalFileOrNodeModule } from '../utils'; + +/** + * Resolves preprocessCss option for css-modules-require-hook + * + * @param {String|Function} value + * + * @returns {String|Function} + */ +export default function preprocessCss(value/* ,currentConfig */) { + if (isModulePath(value)) { + const requiredModule = requireLocalFileOrNodeModule(value); + + if (isFunction(requiredModule)) { + return requiredModule; + } + + throw new Error(`Configuration file for 'preprocessCss' is not exporting a function`); + } else if (isFunction(value)) { + return value; + } else { + throw new Error(`Configuration 'preprocessCss' is not a function nor a valid path to module`); + } +} diff --git a/src/options_resolvers/processCss.js b/src/options_resolvers/processCss.js new file mode 100644 index 0000000..e5783ad --- /dev/null +++ b/src/options_resolvers/processCss.js @@ -0,0 +1,24 @@ +import { isModulePath, isFunction, requireLocalFileOrNodeModule } from '../utils'; + +/** + * Resolves processCss option for css-modules-require-hook + * + * @param {String|Function} value + * + * @returns {String|Function} + */ +export default function processCss(value/* ,currentConfig */) { + if (isModulePath(value)) { + const requiredModule = requireLocalFileOrNodeModule(value); + + if (isFunction(requiredModule)) { + return requiredModule; + } + + throw new Error(`Configuration file for 'processCss' is not exporting a function`); + } else if (isFunction(value)) { + return value; + } else { + throw new Error(`Configuration 'processCss' is not a function nor a valid path to module`); + } +} diff --git a/src/options_resolvers/processOpts.js b/src/options_resolvers/processOpts.js new file mode 100644 index 0000000..f1baa71 --- /dev/null +++ b/src/options_resolvers/processOpts.js @@ -0,0 +1,24 @@ +import { isModulePath, isPlainObject, requireLocalFileOrNodeModule } from '../utils'; + +/** + * Resolves processOpts option for css-modules-require-hook + * + * @param {String|Function} value + * + * @returns {String|Function} + */ +export default function processOpts(value/* ,currentConfig */) { + if (isModulePath(value)) { + const requiredModule = requireLocalFileOrNodeModule(value); + + if (isPlainObject(requiredModule)) { + return requiredModule; + } + + throw new Error(`Configuration file for 'processOpts' is not exporting a plain object`); + } else if (isPlainObject(value)) { + return value; + } else { + throw new Error(`Configuration 'processOpts' is not a plain object nor a valid path to module`); + } +} diff --git a/src/options_resolvers/rootDir.js b/src/options_resolvers/rootDir.js new file mode 100644 index 0000000..0507a69 --- /dev/null +++ b/src/options_resolvers/rootDir.js @@ -0,0 +1,21 @@ +import { isAbsolute } from 'path'; +import { statSync } from 'fs'; +import { isString } from '../utils'; + +/** + * Resolves mode option for css-modules-require-hook + * + * @param {*} value + * @returns {boolean} + */ +export default function rootDir(value/* , currentConfig */) { + if (!isString(value)) { + throw new Error(`Configuration 'rootDir' is not a string`); + } + + if (!isAbsolute(value) || !statSync(value).isDirectory()) { + throw new Error(`Configuration 'rootDir' is not containg a valid absolute path`); + } + + return value; +} diff --git a/src/options_resolvers/use.js b/src/options_resolvers/use.js new file mode 100644 index 0000000..c6bff25 --- /dev/null +++ b/src/options_resolvers/use.js @@ -0,0 +1,29 @@ +import { isFunction, isModulePath, requireLocalFileOrNodeModule } from '../utils'; + +/** + * Resolves use option for css-modules-require-hook + * + * @param {*} value + * @returns {Function} + */ +export default function use(value/* , currentConfig */) { + if (Array.isArray(value)) { + return value.map((option, index) => { + if (isFunction(option)) { + return option(); + } else if (isModulePath(option)) { + const requiredOption = requireLocalFileOrNodeModule(option); + + if (!isFunction(requiredOption)) { + throw new Error(`Configuration 'use[${index}]' module is not exporting a function`); + } + + return requiredOption(); + } + + throw new Error(`Configuration 'use[${index}]' is not a function or a valid module path`); + }); + } + + throw new Error(`Configuration 'use' is not an array`); +} diff --git a/test/fixtures/require.ignored.expected.js b/test/fixtures/require.ignored.expected.js new file mode 100644 index 0000000..4e9922c --- /dev/null +++ b/test/fixtures/require.ignored.expected.js @@ -0,0 +1,3 @@ +'use strict'; + +var styles = {}; diff --git a/test/options_resolvers/append.spec.js b/test/options_resolvers/append.spec.js new file mode 100644 index 0000000..3c9132b --- /dev/null +++ b/test/options_resolvers/append.spec.js @@ -0,0 +1,17 @@ +import { expect } from 'chai'; + +import append from '../../src/options_resolvers/append'; + +describe('options_resolvers/append', () => { + it('should throw if append is not an array', () => { + expect( + () => append({}) + ).to.throw(); + }); + + it('should throw if append does not contain functions', () => { + expect( + () => append(['test/fixtures/append.module.js']) + ).to.throw(); + }); +}); diff --git a/test/options_resolvers/camelCase.spec.js b/test/options_resolvers/camelCase.spec.js new file mode 100644 index 0000000..c6416f8 --- /dev/null +++ b/test/options_resolvers/camelCase.spec.js @@ -0,0 +1,13 @@ +import { expect } from 'chai'; + +import camelCase from '../../src/options_resolvers/camelCase'; + +describe('options_resolvers/camelCase', () => { + it('should throw if camelCase value is not a boolean', () => { + expect( + () => camelCase(null) + ).to.throw(); + + expect(camelCase(true)).to.be.equal(true); + }); +}); diff --git a/test/options_resolvers/devMode.spec.js b/test/options_resolvers/devMode.spec.js new file mode 100644 index 0000000..46154a1 --- /dev/null +++ b/test/options_resolvers/devMode.spec.js @@ -0,0 +1,13 @@ +import { expect } from 'chai'; + +import devMode from '../../src/options_resolvers/devMode'; + +describe('options_resolvers/devMode', () => { + it('should throw if devMode value is not a boolean', () => { + expect( + () => devMode(null) + ).to.throw(); + + expect(devMode(true)).to.be.equal(true); + }); +}); diff --git a/test/options_resolvers/extensions.spec.js b/test/options_resolvers/extensions.spec.js new file mode 100644 index 0000000..242dc50 --- /dev/null +++ b/test/options_resolvers/extensions.spec.js @@ -0,0 +1,17 @@ +import { expect } from 'chai'; + +import extensions from '../../src/options_resolvers/extensions'; + +describe('options_resolvers/extensions', () => { + it('should throw if extensions is not an array', () => { + expect( + () => extensions({}) + ).to.throw(); + }); + + it('should throw if append does not strings', () => { + expect( + () => extensions([true]) + ).to.throw(); + }); +}); diff --git a/test/options_resolvers/generateScopedName.spec.js b/test/options_resolvers/generateScopedName.spec.js new file mode 100644 index 0000000..94cbf27 --- /dev/null +++ b/test/options_resolvers/generateScopedName.spec.js @@ -0,0 +1,17 @@ +import { expect } from 'chai'; + +import generateScopedName from '../../src/options_resolvers/generateScopedName'; + +describe('options_resolvers/generateScopedName', () => { + it('should throw if generateScopeName is not exporting a function', () => { + expect( + () => generateScopedName('test/fixtures/generateScopedName.module.js') + ).to.throw(); + }); + + it('should not throw if generateScopeName is exporting a function', () => { + expect( + () => generateScopedName('test/fixtures/generateScopedName.function.module.js') + ).to.not.throw(); + }); +}); diff --git a/test/options_resolvers/ignore.spec.js b/test/options_resolvers/ignore.spec.js new file mode 100644 index 0000000..025f7f1 --- /dev/null +++ b/test/options_resolvers/ignore.spec.js @@ -0,0 +1,25 @@ +import { expect } from 'chai'; + +import ignore from '../../src/options_resolvers/ignore'; + +describe('options_resolvers/ignore', () => { + it('should throw if ignore value is not a function, string or RegExp', () => { + expect( + () => ignore(null) + ).to.throw(); + }); + + it('should return string', () => { + expect(ignore('string')).to.be.equal('string'); + }); + + it('should return function', () => { + const func = () => {}; + + expect(ignore(func)).to.be.equal(func); + }); + + it('should return function on module require', () => { + expect(ignore('./test/fixtures/generateScopedName.function.module.js')).to.be.a('function'); + }); +}); diff --git a/test/options_resolvers/mode.spec.js b/test/options_resolvers/mode.spec.js new file mode 100644 index 0000000..c7296df --- /dev/null +++ b/test/options_resolvers/mode.spec.js @@ -0,0 +1,13 @@ +import { expect } from 'chai'; + +import mode from '../../src/options_resolvers/mode'; + +describe('options_resolvers/mode', () => { + it('should throw if mode value is not a string', () => { + expect( + () => mode(null) + ).to.throw(); + + expect(mode('mode')).to.be.equal('mode'); + }); +}); diff --git a/test/options_resolvers/prepend.spec.js b/test/options_resolvers/prepend.spec.js new file mode 100644 index 0000000..cb6a1fa --- /dev/null +++ b/test/options_resolvers/prepend.spec.js @@ -0,0 +1,17 @@ +import { expect } from 'chai'; + +import prepend from '../../src/options_resolvers/prepend'; + +describe('options_resolvers/prepend', () => { + it('should throw if prepend is not an array', () => { + expect( + () => prepend({}) + ).to.throw(); + }); + + it('should throw if prepend does not contain functions', () => { + expect( + () => prepend(['test/fixtures/append.module.js']) + ).to.throw(); + }); +}); diff --git a/test/options_resolvers/preprocessCss.spec.js b/test/options_resolvers/preprocessCss.spec.js new file mode 100644 index 0000000..026aa8b --- /dev/null +++ b/test/options_resolvers/preprocessCss.spec.js @@ -0,0 +1,11 @@ +import { expect } from 'chai'; + +import preprocessCss from '../../src/options_resolvers/preprocessCss'; + +describe('options_resolvers/preprocessCss', () => { + it('should throw if processCss is not a function', () => { + expect( + () => preprocessCss('test/fixtures/preprocessCss.module.js') + ).to.throw(); + }); +}); diff --git a/test/options_resolvers/processCss.spec.js b/test/options_resolvers/processCss.spec.js new file mode 100644 index 0000000..c3a8537 --- /dev/null +++ b/test/options_resolvers/processCss.spec.js @@ -0,0 +1,11 @@ +import { expect } from 'chai'; + +import processCss from '../../src/options_resolvers/processCss'; + +describe('options_resolvers/processCss', () => { + it('should throw if processCss is not a function', () => { + expect( + () => processCss('test/fixtures/processCss.module.js') + ).to.throw(); + }); +}); diff --git a/test/options_resolvers/processOpts.spec.js b/test/options_resolvers/processOpts.spec.js new file mode 100644 index 0000000..f53df1b --- /dev/null +++ b/test/options_resolvers/processOpts.spec.js @@ -0,0 +1,20 @@ +import { expect } from 'chai'; + +import processOpts from '../../src/options_resolvers/processOpts'; + +describe('options_resolvers/processOpts', () => { + it('should throw if processOpts is not an object or valid module path exporting object', () => { + expect( + () => processOpts('test/fixtures/generateScopedName.function.module.js') + ).to.throw(); + + expect( + () => processOpts(null) + ).to.throw(); + }); + + it('should return object', () => { + expect(processOpts({})).to.be.deep.equal({}); + expect(processOpts('test/fixtures/processCss.module.js')).to.be.deep.equal({}); + }); +}); diff --git a/test/options_resolvers/rootDir.spec.js b/test/options_resolvers/rootDir.spec.js new file mode 100644 index 0000000..1017fd2 --- /dev/null +++ b/test/options_resolvers/rootDir.spec.js @@ -0,0 +1,22 @@ +import { expect } from 'chai'; + +import rootDir from '../../src/options_resolvers/rootDir'; + +describe('options_resolvers/rootDir', () => { + it('should throw if rootDir is not an absolute directory or does not exist', () => { + expect( + () => rootDir('') + ).to.throw(); + + expect(() => rootDir('/test/this/not/exists')).to.throw(); + expect(() => rootDir('./')).to.throw(); + }); + + it('should throw if rootDir is a file path', () => { + expect(() => rootDir(__filename)).to.throw(); + }); + + it('should return rootDir if is valid', () => { + expect(rootDir(__dirname)).to.be.equal(__dirname); + }); +}); diff --git a/test/options_resolvers/use.spec.js b/test/options_resolvers/use.spec.js new file mode 100644 index 0000000..0db1a93 --- /dev/null +++ b/test/options_resolvers/use.spec.js @@ -0,0 +1,34 @@ +import { expect } from 'chai'; + +import use from '../../src/options_resolvers/use'; + +describe('options_resolvers/use', () => { + it('should throw if use is not an array', () => { + expect( + () => use('test/fixtures/processCss.module.js') + ).to.throw(); + }); + + it('should throw if array is not containing functions or module paths', () => { + expect( + () => use([null]) + ).to.throw(); + + expect( + () => use(['unknown-module']) + ).to.throw(); + }); + + it('should return result of called function', () => { + let called = false; + + const caller = () => { + called = true; + + return 'result'; + }; + + expect(use([caller])).to.be.deep.equal(['result']); + expect(called).to.be.equal(true); + }); +}); From 575a2a081f8132e5585edd9513d4ad7793963508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Fri, 2 Sep 2016 12:48:00 +0200 Subject: [PATCH 09/66] refactor plugin main file, extract options resolvers and utils to standalone libs --- src/index.js | 12 +++++-- test/index.spec.js | 80 +++++++++------------------------------------- 2 files changed, 24 insertions(+), 68 deletions(-) diff --git a/src/index.js b/src/index.js index 2992bd7..c62e64b 100644 --- a/src/index.js +++ b/src/index.js @@ -40,7 +40,13 @@ export default function transformCssModules({ types: t }) { const from = resolveModulePath(filepath); filePathOrModuleName = resolve(from, filePathOrModuleName); } - return require(filePathOrModuleName); + + // css-modules-require-hooks throws if file is ignored + try { + return require(filePathOrModuleName); + } catch (e) { + return {}; // return empty object, this simulates result of ignored stylesheet file + } } // is css modules require hook initialized? @@ -49,8 +55,8 @@ export default function transformCssModules({ types: t }) { let matchExtensions = /\.css$/i; function matcher(extensions = ['.css']) { - const extensionsPatern = extensions.join('|').replace(/\./g, '\\\.'); - return new RegExp(`(${extensionsPatern})$`, 'i'); + const extensionsPattern = extensions.join('|').replace(/\./g, '\\\.'); + return new RegExp(`(${extensionsPattern})$`, 'i'); } return { diff --git a/test/index.spec.js b/test/index.spec.js index 0ead100..836c5f1 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -63,76 +63,19 @@ describe('babel-plugin-css-modules-transform', () => { rimraf(`${__dirname}/output/`, done); }); + it('should ignore files', () => { + // run this as first case because css-modules-require-hook will be cached with given options + expect(transform('fixtures/require.js', { + ignore: /\.css$/ + }).code).to.be.equal(readExpected('fixtures/require.ignored.expected.js')); + }); + it('should not throw if we are requiring css module to module scope', () => { expect(() => transform('fixtures/global.require.js')).to.not.throw(); expect(() => transform('fixtures/global.import.js')).to.not.throw(); }); - it('should throw if generateScopeName is not exporting a function', () => { - expect( - () => transform('fixtures/require.js', { generateScopedName: 'test/fixtures/generateScopedName.module.js' }) - ).to.throw( - /^.+: Configuration '.+' is not a string or function\.$/ - ); - }); - - it('should not throw if generateScopeName is exporting a function', () => { - expect( - () => transform('fixtures/require.js', { generateScopedName: 'test/fixtures/generateScopedName.function.module.js' }) - ).to.not.throw( - /^.+: Configuration '.+' is not a string or function\.$/ - ); - }); - - it('should throw if processCss is not a function', () => { - expect( - () => transform('fixtures/require.js', { processCss: 'test/fixtures/processCss.module.js' }) - ).to.throw( - /^.+: Module '.+' does not exist or is not a function\.$/ - ); - }); - - it('should throw if preprocessCss is not a function', () => { - expect( - () => transform('fixtures/require.js', { preprocessCss: 'test/fixtures/preprocessCss.module.js' }) - ).to.throw( - /^.+: Module '.+' does not exist or is not a function\.$/ - ); - }); - - it('should throw if append is not an array', () => { - expect( - () => transform('fixtures/require.js', { append: {} }) - ).to.throw( - /^.+: Configuration '.+' has to be an array\.$/ - ); - }); - - it('should throw if prepend is not an array', () => { - expect( - () => transform('fixtures/require.js', { prepend: {} }) - ).to.throw( - /^.+: Configuration '.+' has to be an array\.$/ - ); - }); - - it('should throw if append does not contain functions', () => { - expect( - () => transform('fixtures/require.js', { append: ['test/fixtures/append.module.js'] }) - ).to.throw( - /^.+: Configuration '.+' has to be valid path to a module at index 0 or it does not export a function\.$/ - ); - }); - - it('should throw if prepend does not contain functions', () => { - expect( - () => transform('fixtures/require.js', { prepend: ['test/fixtures/append.module.js'] }) - ).to.throw( - /^.+: Configuration '.+' has to be valid path to a module at index 0 or it does not export a function\.$/ - ); - }); - it('should replace require call with hash of class name => css class name', () => { expect(transform('fixtures/require.js').code).to.be.equal(readExpected('fixtures/require.expected.js')); expect(transform('fixtures/import.js').code).to.be.equal(readExpected('fixtures/import.expected.js')); @@ -158,7 +101,14 @@ describe('babel-plugin-css-modules-transform', () => { }); it('should accept file extensions as an array', () => { - expect(transform('fixtures/extensions.js', {extensions: ['.scss', '.css']}).code).to.be.equal(readExpected('fixtures/extensions.expected.js')); + expect( + transform( + 'fixtures/extensions.js', + { + extensions: ['.scss', '.css'] + } + ).code + ).to.be.equal(readExpected('fixtures/extensions.expected.js')); }); it('should write a multiple css files using import', () => { From 88e2e61b5fc6518f483d1c81af81d4e229603730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Fri, 2 Sep 2016 12:52:51 +0200 Subject: [PATCH 10/66] update README to reflect all possible options --- README.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5e062aa..7b24694 100644 --- a/README.md +++ b/README.md @@ -53,23 +53,32 @@ npm install --save-dev babel-plugin-css-modules-transform **With custom options [css-modules-require-hook options](https://github.com/css-modules/css-modules-require-hook#tuning-options)** -```json +```js { "plugins": [ [ "css-modules-transform", { + "append": [ + "npm-module-name", + "./path/to/module-exporting-a-function.js" + ], + "camelCase": false, + "createImportedName": "npm-module-name", + "createImportedName": "./path/to/module-exporting-a-function.js", + "devMode": false, + "extensions": [".css", ".scss", ".less"], // list extensions to process; defaults to .css "generateScopedName": "[name]__[local]___[hash:base64:5]", // in case you don't want to use a function "generateScopedName": "./path/to/module-exporting-a-function.js", // in case you want to use a function "generateScopedName": "npm-module-name", + "ignore": "*css", + "ignore": "./path/to/module-exporting-a-function-or-regexp.js", "preprocessCss": "./path/to/module-exporting-a-function.js", "preprocessCss": "npm-module-name", "processCss": "./path/to/module-exporting-a-function.js", "processCss": "npm-module-name", - "extensions": [".css", ".scss", ".less"], // list extensions to process; defaults to .css - "append": [ - "npm-module-name", - "./path/to/module-exporting-a-function.js" - ], + "processOpts": "npm-module-name", + "processOpts": "./path/to/module/exporting-a-plain-object.js", + "mode": "string", "prepend": [ "npm-module-name", "./path/to/module-exporting-a-function.js" From d936f01a052d0155055961f9a137d391f9036635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Fri, 2 Sep 2016 12:58:20 +0200 Subject: [PATCH 11/66] Version 1.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5888d29..e5d0645 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "0.2.1", + "version": "1.0.0", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { From ad832f608dc5e56cfeb275390b19c0554cb091b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Fri, 2 Sep 2016 13:42:36 +0200 Subject: [PATCH 12/66] add disclaimer to include node_modules to babel ignore option --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7b24694..65dac70 100644 --- a/README.md +++ b/README.md @@ -179,10 +179,11 @@ as `[path]` in `filename` pattern. Make sure you set `ignore` option of `babel-register` to ignore all files used by css-modules-require-hook to process your css files. **Require `babel-register` only once otherwise it will fail** +**Be aware, you need to explicitly ignore `node_modules` if you set `ignore` option** ```js require('babel-register')({ - ignore: /processCss\.js$/ // regex matching all files used by css-modules-require-hook to process your css files + ignore: /(processCss\.js|node_modules)/ // regex matching all files used by css-modules-require-hook to process your css files }) ``` @@ -190,9 +191,11 @@ require('babel-register')({ Create a js file with content +**Be aware, you need to explicitly ignore `node_modules` if you set `ignore` option** + ```js require('babel-register')({ - ignore: /processCss\.js$/ // regex matching all files used by css-modules-require-hook to process your css files + ignore: /(processCss\.js|node_modules)/ // regex matching all files used by css-modules-require-hook to process your css files }) ``` From 108976ff9e1119f3a433b25e54fa884976cc3bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Sat, 17 Sep 2016 14:54:55 +0200 Subject: [PATCH 13/66] :bug: fix path variable in extractCss.filename option, update README, closes #25 --- README.md | 6 +- src/index.js | 55 ++------------- src/utils/extractCssFile.js | 69 +++++++++++++++++++ src/utils/index.js | 2 + src/utils/writeCssFile.js | 20 ++++++ test/css/child.css | 3 + test/fixtures/extensions.expected.js | 2 +- .../fixtures/extractcss.combined.expected.css | 3 + .../extractcss.css.child.expected.css | 3 + .../extractcss.parent-combined.expected.css | 6 ++ test/fixtures/import.expected.js | 2 +- test/fixtures/require.expected.js | 4 +- test/index.spec.js | 20 +++++- test/parent.css | 1 + 14 files changed, 137 insertions(+), 59 deletions(-) create mode 100644 src/utils/extractCssFile.js create mode 100644 src/utils/writeCssFile.js create mode 100644 test/css/child.css create mode 100644 test/fixtures/extractcss.css.child.expected.css create mode 100644 test/fixtures/extractcss.parent-combined.expected.css diff --git a/README.md b/README.md index 65dac70..0d991c6 100644 --- a/README.md +++ b/README.md @@ -161,9 +161,9 @@ To extract all files in a single directory, give an object: [ "css-modules-transform", { "extractCss": { - dir: "./dist/stylesheets/", - relativeRoot: "./src/", - filename: "[path]/[name].css" + "dir": "./dist/stylesheets/", + "relativeRoot": "./src/", + "filename": "[path]/[name].css" } } ] diff --git a/src/index.js b/src/index.js index c62e64b..bc43d6b 100644 --- a/src/index.js +++ b/src/index.js @@ -1,18 +1,10 @@ -import { resolve, dirname, basename, extname, isAbsolute, join, relative } from 'path'; -import { writeFileSync, appendFileSync } from 'fs'; -import mkdirp from 'mkdirp'; +import { resolve, dirname, isAbsolute } from 'path'; // options resolvers import * as requireHooksOptions from './options_resolvers'; -const writeCssFile = (filename, content) => { - mkdirp.sync(dirname(filename)); - writeFileSync(filename, content); -}; -const appendCssFile = (filename, content) => { - mkdirp.sync(dirname(filename)); - appendFileSync(filename, content); -}; +// utils. +import { extractCssFile } from './utils'; const defaultOptions = { generateScopedName: '[name]__[local]___[hash:base64:5]' @@ -79,45 +71,6 @@ export default function transformCssModules({ types: t }) { styles: new Map() }; - const extractCssFile = (filepath, css) => { - const { extractCss = null } = state.opts; - if (!extractCss) return null; - - // this is the case where a single extractCss is requested - if (typeof(extractCss) === 'string') { - // If this is the first file, then we should replace - // old content - if (state.$$css.styles.size === 1) { - return writeCssFile(extractCss, css); - } - // this should output in a single file. - // Let's append the new file content. - return appendCssFile(extractCss, css); - } - - // This is the case where each css file is written in - // its own file. - const { - dir = 'dist', - filename = '[name].css', - relativeRoot = '' - } = extractCss; - - // Make css file narmpe relative to relativeRoot - const relativePath = relative( - resolve(process.cwd(), relativeRoot), - filepath - ); - const destination = join( - resolve(process.cwd(), dir), - filename - ) - .replace(/\[name]/, basename(filepath, extname(filepath))) - .replace(/\[path]/, relativePath); - - writeCssFile(destination, css); - }; - const pushStylesCreator = (toWrap) => (css, filepath) => { let processed; @@ -129,7 +82,7 @@ export default function transformCssModules({ types: t }) { if (!state.$$css.styles.has(filepath)) { state.$$css.styles.set(filepath, processed); - extractCssFile(filepath, processed); + extractCssFile(process.cwd(), filepath, processed, state); } return processed; diff --git a/src/utils/extractCssFile.js b/src/utils/extractCssFile.js new file mode 100644 index 0000000..bb2c381 --- /dev/null +++ b/src/utils/extractCssFile.js @@ -0,0 +1,69 @@ +import writeCssFile from './writeCssFile'; +import { basename, dirname, extname, join, relative, resolve } from 'path'; + +export const PATH_VARIABLES = ['[path]', '[name]']; + +/** + * Extracts CSS to file + * + * @param {String} cwd + * @param {String} filepath + * @param {String} css + * @param {Object} state + * @returns {null} + */ +export default function extractCssFile(cwd, filepath, css, state) { + const { extractCss = null } = state.opts; + + if (!extractCss) { + return null; + } + + // this is the case where a single extractCss is requested + if (typeof(extractCss) === 'string') { + // check if extractCss contains some from pattern variables, if yes throw! + PATH_VARIABLES.forEach(VARIABLE => { + if (extractCss.indexOf(VARIABLE) !== -1) { + throw new Error('extractCss cannot contain variables'); + } + }); + + // If this is the first file, then we should replace + // old content + if (state.$$css.styles.size === 1) { + return writeCssFile(extractCss, css); + } + + // this should output in a single file. + // Let's append the new file content. + return writeCssFile(extractCss, css, true); + } + + // This is the case where each css file is written in + // its own file. + const { + dir = 'dist', + filename = '[name].css', + relativeRoot = '' + } = extractCss; + + // check if filename contains at least [name] variable + if (filename.indexOf('[name]') === -1) { + throw new Error('[name] variable has to be used in extractCss.filename option'); + } + + // Make css file name relative to relativeRoot + const relativePath = relative( + resolve(cwd, relativeRoot), + filepath + ); + + const destination = join( + resolve(cwd, dir), + filename + ) + .replace(/\[name]/, basename(filepath, extname(filepath))) + .replace(/\[path]/, dirname(relativePath)); + + writeCssFile(destination, css); +} diff --git a/src/utils/index.js b/src/utils/index.js index 40c7af0..56f7a2e 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,3 +1,4 @@ +export { default as extractCssFile } from './extractCssFile'; export { default as isBoolean } from './isBoolean'; export { default as isFunction } from './isFunction'; export { default as isModulePath } from './isModulePath'; @@ -5,3 +6,4 @@ export { default as isPlainObject } from './isPlainObject'; export { default as isRegExp } from './isRegExp'; export { default as isString } from './isString'; export { default as requireLocalFileOrNodeModule } from './requireLocalFileOrNodeModule'; +export { default as writeCssFile } from './writeCssFile'; diff --git a/src/utils/writeCssFile.js b/src/utils/writeCssFile.js new file mode 100644 index 0000000..82d71f8 --- /dev/null +++ b/src/utils/writeCssFile.js @@ -0,0 +1,20 @@ +import mkdirp from 'mkdirp'; +import { dirname } from 'path'; +import { appendFileSync, writeFileSync } from 'fs'; + +/** + * Writes css file to given path (and creates directories) + * + * @param {String} path + * @param {String} content + * @param {Boolean} append + */ +export default function writeCssFile(path, content, append = false) { + mkdirp.sync(dirname(path)); + + if (append) { + appendFileSync(path, content); + } else { + writeFileSync(path, content); + } +} diff --git a/test/css/child.css b/test/css/child.css new file mode 100644 index 0000000..6ff0db0 --- /dev/null +++ b/test/css/child.css @@ -0,0 +1,3 @@ +.line { + display: inline; +} diff --git a/test/fixtures/extensions.expected.js b/test/fixtures/extensions.expected.js index 9d8592c..4d2d049 100644 --- a/test/fixtures/extensions.expected.js +++ b/test/fixtures/extensions.expected.js @@ -1,7 +1,7 @@ 'use strict'; var css = { - 'className': 'styles__className___385m0 parent__block___33Sxl' + 'className': 'styles__className___385m0 parent__block___33Sxl child__line___3fweh' }; var scss = { 'sassy': 'extensions__sassy___12Yag' diff --git a/test/fixtures/extractcss.combined.expected.css b/test/fixtures/extractcss.combined.expected.css index dc3c29d..2f5cd66 100644 --- a/test/fixtures/extractcss.combined.expected.css +++ b/test/fixtures/extractcss.combined.expected.css @@ -1,3 +1,6 @@ +.child__line___3fweh { + display: inline; +} .parent__block___33Sxl { display: block; } diff --git a/test/fixtures/extractcss.css.child.expected.css b/test/fixtures/extractcss.css.child.expected.css new file mode 100644 index 0000000..5763b91 --- /dev/null +++ b/test/fixtures/extractcss.css.child.expected.css @@ -0,0 +1,3 @@ +.child__line___3fweh { + display: inline; +} diff --git a/test/fixtures/extractcss.parent-combined.expected.css b/test/fixtures/extractcss.parent-combined.expected.css new file mode 100644 index 0000000..2389715 --- /dev/null +++ b/test/fixtures/extractcss.parent-combined.expected.css @@ -0,0 +1,6 @@ +.child__line___3fweh { + display: inline; +} +.parent__block___33Sxl { + display: block; +} diff --git a/test/fixtures/import.expected.js b/test/fixtures/import.expected.js index c2d60df..27bdad2 100644 --- a/test/fixtures/import.expected.js +++ b/test/fixtures/import.expected.js @@ -1,7 +1,7 @@ 'use strict'; var _styles = { - 'className': 'styles__className___385m0 parent__block___33Sxl' + 'className': 'styles__className___385m0 parent__block___33Sxl child__line___3fweh' }; var _styles2 = _interopRequireDefault(_styles); diff --git a/test/fixtures/require.expected.js b/test/fixtures/require.expected.js index 3af7534..ed2526a 100644 --- a/test/fixtures/require.expected.js +++ b/test/fixtures/require.expected.js @@ -1,5 +1,5 @@ 'use strict'; var styles = { - 'className': 'styles__className___385m0 parent__block___33Sxl' -}; \ No newline at end of file + 'className': 'styles__className___385m0 parent__block___33Sxl child__line___3fweh' +}; diff --git a/test/index.spec.js b/test/index.spec.js index 836c5f1..f2882b8 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -126,6 +126,23 @@ describe('babel-plugin-css-modules-transform', () => { .to.be.equal(readExpected('fixtures/extractcss.styles.expected.css')); }); + it('should write a multiple css files using import preserving directory structure', () => { + expect(transform('fixtures/import.js', { + extractCss: { + dir: `${__dirname}/output/`, + filename: '[path]/[name].css', + relativeRoot: `${__dirname}` + } + }).code).to.be.equal(readExpected('fixtures/import.expected.js')); + + expect(readExpected(`${__dirname}/output/parent.css`)) + .to.be.equal(readExpected('fixtures/extractcss.parent.expected.css')); + expect(readExpected(`${__dirname}/output/styles.css`)) + .to.be.equal(readExpected('fixtures/extractcss.styles.expected.css')); + expect(readExpected(`${__dirname}/output/css/child.css`)) + .to.be.equal(readExpected('fixtures/extractcss.css.child.expected.css')); + }); + it('should write a multiple css files using require', () => { expect(transform('fixtures/require.js', { extractCss: { @@ -171,7 +188,7 @@ describe('babel-plugin-css-modules-transform', () => { stream.on('end', (err) => { if (err) return cb(err); expect(readExpected(`${__dirname}/output/combined.css`)) - .to.be.equal(readExpected('fixtures/extractcss.parent.expected.css')); + .to.be.equal(readExpected('fixtures/extractcss.parent-combined.expected.css')); return cb(); }); @@ -269,6 +286,7 @@ describe('babel-plugin-css-modules-transform', () => { } }).code).to.be.equal(readExpected('fixtures/require.expected.js')); expect(called).to.be.deep.equal([ + 'css/child.css', 'parent.css', 'styles.css' ]); diff --git a/test/parent.css b/test/parent.css index bf65f59..bd29d6d 100644 --- a/test/parent.css +++ b/test/parent.css @@ -1,3 +1,4 @@ .block { + composes: line from './css/child.css'; display: block; } From fe80fc5e075bdacd619ae6f253392e63099a24eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Sat, 17 Sep 2016 14:55:35 +0200 Subject: [PATCH 14/66] Version 1.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e5d0645..38155de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "1.0.0", + "version": "1.0.1", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { From 96a0f9b56a5c048739a4d5c372d147ed7c4f241b Mon Sep 17 00:00:00 2001 From: Pascal Duez Date: Tue, 20 Sep 2016 22:51:46 +0200 Subject: [PATCH 15/66] Add the hashPrefix option --- README.md | 1 + package.json | 2 +- src/options_resolvers/hashPrefix.js | 15 +++++++++++++++ src/options_resolvers/index.js | 1 + test/options_resolvers/hashPrefix.spec.js | 13 +++++++++++++ 5 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/options_resolvers/hashPrefix.js create mode 100644 test/options_resolvers/hashPrefix.spec.js diff --git a/README.md b/README.md index 0d991c6..73feacb 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ npm install --save-dev babel-plugin-css-modules-transform "generateScopedName": "[name]__[local]___[hash:base64:5]", // in case you don't want to use a function "generateScopedName": "./path/to/module-exporting-a-function.js", // in case you want to use a function "generateScopedName": "npm-module-name", + "hashPrefix": "string", "ignore": "*css", "ignore": "./path/to/module-exporting-a-function-or-regexp.js", "preprocessCss": "./path/to/module-exporting-a-function.js", diff --git a/package.json b/package.json index 38155de..fdbec21 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ }, "homepage": "https://github.com/michalkvasnicak/babel-plugin-css-modules-transform#readme", "dependencies": { - "css-modules-require-hook": "^4.0.2", + "css-modules-require-hook": "^4.0.3", "mkdirp": "^0.5.1" }, "devDependencies": { diff --git a/src/options_resolvers/hashPrefix.js b/src/options_resolvers/hashPrefix.js new file mode 100644 index 0000000..19d5f62 --- /dev/null +++ b/src/options_resolvers/hashPrefix.js @@ -0,0 +1,15 @@ +import { isString } from '../utils'; + +/** + * Resolves hashPrefix option for css-modules-require-hook + * + * @param {*} value + * @returns {String} + */ +export default function hashPrefix(value/* , currentConfig */) { + if (!isString(value)) { + throw new Error(`Configuration 'hashPrefix' is not a string`); + } + + return value; +} diff --git a/src/options_resolvers/index.js b/src/options_resolvers/index.js index 958de2c..3c35a13 100644 --- a/src/options_resolvers/index.js +++ b/src/options_resolvers/index.js @@ -3,6 +3,7 @@ export { default as camelCase } from './camelCase'; export { default as createImportedName } from './createImportedName'; export { default as devMode } from './devMode'; export { default as generateScopedName } from './generateScopedName'; +export { default as hashPrefix } from './hashPrefix'; export { default as ignore } from './ignore'; export { default as mode } from './mode'; export { default as prepend } from './prepend'; diff --git a/test/options_resolvers/hashPrefix.spec.js b/test/options_resolvers/hashPrefix.spec.js new file mode 100644 index 0000000..fdf2974 --- /dev/null +++ b/test/options_resolvers/hashPrefix.spec.js @@ -0,0 +1,13 @@ +import { expect } from 'chai'; + +import hashPrefix from '../../src/options_resolvers/hashPrefix'; + +describe('options_resolvers/hashPrefix', () => { + it('should throw if hashPrefix value is not a string', () => { + expect( + () => hashPrefix(null) + ).to.throw(); + + expect(hashPrefix('hashPrefix')).to.be.equal('hashPrefix'); + }); +}); From a3bd22726c7547dd0c0361dc6c01fbddd1ac3b55 Mon Sep 17 00:00:00 2001 From: Pascal Duez Date: Tue, 20 Sep 2016 23:07:42 +0200 Subject: [PATCH 16/66] Fix a few JSDoc annotations --- src/options_resolvers/mode.js | 2 +- src/options_resolvers/rootDir.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/options_resolvers/mode.js b/src/options_resolvers/mode.js index 02c0953..e0b9c7c 100644 --- a/src/options_resolvers/mode.js +++ b/src/options_resolvers/mode.js @@ -4,7 +4,7 @@ import { isString } from '../utils'; * Resolves mode option for css-modules-require-hook * * @param {*} value - * @returns {boolean} + * @returns {String} */ export default function mode(value/* , currentConfig */) { if (!isString(value)) { diff --git a/src/options_resolvers/rootDir.js b/src/options_resolvers/rootDir.js index 0507a69..65d0b06 100644 --- a/src/options_resolvers/rootDir.js +++ b/src/options_resolvers/rootDir.js @@ -3,10 +3,10 @@ import { statSync } from 'fs'; import { isString } from '../utils'; /** - * Resolves mode option for css-modules-require-hook + * Resolves rootDir option for css-modules-require-hook * * @param {*} value - * @returns {boolean} + * @returns {String} */ export default function rootDir(value/* , currentConfig */) { if (!isString(value)) { From f50cc1eb8d43bb2cc97fb5d35602a3a0f1df0f53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Wed, 21 Sep 2016 08:43:31 +0200 Subject: [PATCH 17/66] Version 1.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fdbec21..69bce37 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "1.0.1", + "version": "1.1.0", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { From eafdd08f6165637e9afeafdc18a2346de85ce567 Mon Sep 17 00:00:00 2001 From: Gabe Medrash Date: Tue, 24 Jan 2017 12:08:13 -0800 Subject: [PATCH 18/66] update babel dev dependencies --- package.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 69bce37..c507f8d 100644 --- a/package.json +++ b/package.json @@ -29,17 +29,17 @@ "mkdirp": "^0.5.1" }, "devDependencies": { - "babel-cli": "^6.1.18", - "babel-core": "^6.1.21", - "babel-eslint": "^4.1.5", - "babel-plugin-transform-es2015-destructuring": "^6.1.18", - "babel-plugin-transform-es2015-modules-commonjs": "^6.1.18", - "babel-plugin-transform-es2015-parameters": "^6.1.18", - "babel-plugin-transform-es2015-spread": "^6.1.18", - "babel-plugin-transform-export-extensions": "^6.1.18", - "babel-plugin-transform-object-rest-spread": "^6.1.18", - "babel-plugin-transform-strict-mode": "^6.1.18", - "babel-preset-es2015": "^6.5.0", + "babel-cli": "^6.22.2", + "babel-core": "^6.22.1", + "babel-eslint": "^7.1.1", + "babel-plugin-transform-es2015-destructuring": "^6.22.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.22.0", + "babel-plugin-transform-es2015-parameters": "^6.22.0", + "babel-plugin-transform-es2015-spread": "^6.22.0", + "babel-plugin-transform-export-extensions": "^6.22.0", + "babel-plugin-transform-object-rest-spread": "^6.22.0", + "babel-plugin-transform-strict-mode": "^6.22.0", + "babel-preset-es2015": "^6.22.0", "chai": "^3.4.1", "eslint": "^1.9.0", "eslint-config-airbnb-lite": "^1.0.0", From 734bc67a040202353fac0b9f6e686d5884381092 Mon Sep 17 00:00:00 2001 From: Gabe Medrash Date: Tue, 24 Jan 2017 12:10:01 -0800 Subject: [PATCH 19/66] be explicit with which transforms are applied to test cases; stop applying babel-plugin-transform-es2015-modules-commonjs --- package.json | 1 + test/fixtures/import.expected.js | 6 +----- test/index.spec.js | 5 +++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index c507f8d..a0b303f 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "babel-cli": "^6.22.2", "babel-core": "^6.22.1", "babel-eslint": "^7.1.1", + "babel-plugin-transform-es2015-block-scoping": "^6.22.0", "babel-plugin-transform-es2015-destructuring": "^6.22.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.22.0", "babel-plugin-transform-es2015-parameters": "^6.22.0", diff --git a/test/fixtures/import.expected.js b/test/fixtures/import.expected.js index 27bdad2..ed2526a 100644 --- a/test/fixtures/import.expected.js +++ b/test/fixtures/import.expected.js @@ -1,9 +1,5 @@ 'use strict'; -var _styles = { +var styles = { 'className': 'styles__className___385m0 parent__block___33Sxl child__line___3fweh' }; - -var _styles2 = _interopRequireDefault(_styles); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } diff --git a/test/index.spec.js b/test/index.spec.js index f2882b8..03f4b98 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -12,11 +12,12 @@ describe('babel-plugin-css-modules-transform', () => { if (configuration && !('devMode' in configuration)) configuration.devMode = true; return babel.transformFileSync(resolve(__dirname, path), { + babelrc: false, plugins: [ + 'transform-es2015-block-scoping', 'transform-strict-mode', 'transform-es2015-parameters', 'transform-es2015-destructuring', - 'transform-es2015-modules-commonjs', 'transform-object-rest-spread', 'transform-es2015-spread', 'transform-export-extensions', @@ -34,10 +35,10 @@ describe('babel-plugin-css-modules-transform', () => { return gulpBabel({ plugins: [ + 'transform-es2015-block-scoping', 'transform-strict-mode', 'transform-es2015-parameters', 'transform-es2015-destructuring', - 'transform-es2015-modules-commonjs', 'transform-object-rest-spread', 'transform-es2015-spread', 'transform-export-extensions', From 156a641c8b634a8acaef3d8ae08bf67f2044c31b Mon Sep 17 00:00:00 2001 From: Gabe Medrash Date: Tue, 24 Jan 2017 14:25:37 -0800 Subject: [PATCH 20/66] extract helper method for building ObjectExpression mapping original classnames to scoped classnames --- src/index.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/index.js b/src/index.js index bc43d6b..3ebe23f 100644 --- a/src/index.js +++ b/src/index.js @@ -51,6 +51,18 @@ export default function transformCssModules({ types: t }) { return new RegExp(`(${extensionsPattern})$`, 'i'); } + function buildClassNameToScopeNameMap(tokens) { + /* eslint-disable new-cap */ + return t.ObjectExpression( + Object.keys(tokens).map(token => + t.ObjectProperty( + t.StringLiteral(token), + t.StringLiteral(tokens[token]) + ) + ) + ); + } + return { visitor: { Program(path, state) { @@ -134,15 +146,7 @@ export default function transformCssModules({ types: t }) { // if parent expression is not a Program, replace expression with tokens // Otherwise remove require from file, we just want to get generated css for our output if (!t.isExpressionStatement(path.parent)) { - /* eslint-disable new-cap */ - path.replaceWith(t.ObjectExpression( - Object.keys(tokens).map( - token => t.ObjectProperty( - t.StringLiteral(token), - t.StringLiteral(tokens[token]) - ) - ) - )); + path.replaceWith(buildClassNameToScopeNameMap(tokens)); } else { path.remove(); } From 768a6a34a7547336c35053d423bf888bd70879fc Mon Sep 17 00:00:00 2001 From: Gabe Medrash Date: Tue, 24 Jan 2017 14:29:24 -0800 Subject: [PATCH 21/66] replace ImportDeclaration visitor method with ImportDefaultSpecifier to handle es6 imports --- src/index.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/index.js b/src/index.js index 3ebe23f..830d500 100644 --- a/src/index.js +++ b/src/index.js @@ -118,15 +118,21 @@ export default function transformCssModules({ types: t }) { initialized = true; }, - ImportDeclaration(path, { file }) { - // this method is called between enter and exit, so we can map css to our state - // it is then replaced with require call which will be handled in seconds pass by CallExpression - // CallExpression will then replace it or remove depending on parent node (if is Program or not) - const { value } = path.node.source; + ImportDefaultSpecifier(path, { file }) { + const { value } = path.parentPath.node.source; if (matchExtensions.test(value)) { const requiringFile = file.opts.filename; - requireCssFile(requiringFile, value); + const tokens = requireCssFile(requiringFile, value); + + path.parentPath.replaceWith( + t.variableDeclaration('var', [ + t.variableDeclarator( + t.identifier(path.node.local.name), + buildClassNameToScopeNameMap(tokens) + ) + ]), + ); } }, From c0cc8c91ef604572ac009a36b76af0099f5ed68a Mon Sep 17 00:00:00 2001 From: Gabe Medrash Date: Tue, 24 Jan 2017 14:30:44 -0800 Subject: [PATCH 22/66] comment reminders for when each visitor method would be run --- src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.js b/src/index.js index 830d500..cef6fa8 100644 --- a/src/index.js +++ b/src/index.js @@ -118,6 +118,7 @@ export default function transformCssModules({ types: t }) { initialized = true; }, + // import styles from './style.css'; ImportDefaultSpecifier(path, { file }) { const { value } = path.parentPath.node.source; @@ -136,6 +137,7 @@ export default function transformCssModules({ types: t }) { } }, + // const styles = require('./styles.css'); CallExpression(path, { file }) { const { callee: { name: calleeName }, arguments: args } = path.node; From 0053674ab2a068984373bd261624474572393ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasnic=CC=8Ca=CC=81k?= Date: Sat, 4 Feb 2017 10:26:39 +0100 Subject: [PATCH 23/66] Version 1.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a0b303f..654e964 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "1.1.0", + "version": "1.2.0", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { From 8a3d4e1841717e5c087129f4cb0a072ac6462780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Sat, 11 Feb 2017 10:37:06 +0100 Subject: [PATCH 24/66] add alternatives section and point to babel-plugin-transform-postcss --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 73feacb..284e9e4 100644 --- a/README.md +++ b/README.md @@ -202,6 +202,10 @@ require('babel-register')({ and then set this file as a compiler `--compilers js:.js` +## Alternatives + +- [babel-plugin-transform-postcss](https://github.com/wbyoung/babel-plugin-transform-postcss) - which supports async plugins and does not depend on `css-modules-require-hook`. + ## License MIT From b7f058104782d8f0857efb35ebb54c3220f14056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasnic=CC=8Ca=CC=81k?= Date: Thu, 16 Feb 2017 09:09:43 +0100 Subject: [PATCH 25/66] :bug: rename processOpts to processorOpts, closes #36 --- README.md | 4 ++-- src/options_resolvers/index.js | 2 +- .../{processOpts.js => processorOpts.js} | 6 +++--- test/options_resolvers/processOpts.spec.js | 20 ------------------- test/options_resolvers/processorOpts.spec.js | 20 +++++++++++++++++++ 5 files changed, 26 insertions(+), 26 deletions(-) rename src/options_resolvers/{processOpts.js => processorOpts.js} (64%) delete mode 100644 test/options_resolvers/processOpts.spec.js create mode 100644 test/options_resolvers/processorOpts.spec.js diff --git a/README.md b/README.md index 284e9e4..e0ce862 100644 --- a/README.md +++ b/README.md @@ -77,8 +77,8 @@ npm install --save-dev babel-plugin-css-modules-transform "preprocessCss": "npm-module-name", "processCss": "./path/to/module-exporting-a-function.js", "processCss": "npm-module-name", - "processOpts": "npm-module-name", - "processOpts": "./path/to/module/exporting-a-plain-object.js", + "processorOpts": "npm-module-name", + "processorOpts": "./path/to/module/exporting-a-plain-object.js", "mode": "string", "prepend": [ "npm-module-name", diff --git a/src/options_resolvers/index.js b/src/options_resolvers/index.js index 3c35a13..46456c3 100644 --- a/src/options_resolvers/index.js +++ b/src/options_resolvers/index.js @@ -9,6 +9,6 @@ export { default as mode } from './mode'; export { default as prepend } from './prepend'; export { default as preprocessCss } from './preprocessCss'; export { default as processCss } from './processCss'; -export { default as processOpts } from './processOpts'; +export { default as processorOpts } from './processorOpts'; export { default as rootDir } from './rootDir'; export { default as use } from './use'; diff --git a/src/options_resolvers/processOpts.js b/src/options_resolvers/processorOpts.js similarity index 64% rename from src/options_resolvers/processOpts.js rename to src/options_resolvers/processorOpts.js index f1baa71..c4188a7 100644 --- a/src/options_resolvers/processOpts.js +++ b/src/options_resolvers/processorOpts.js @@ -7,7 +7,7 @@ import { isModulePath, isPlainObject, requireLocalFileOrNodeModule } from '../ut * * @returns {String|Function} */ -export default function processOpts(value/* ,currentConfig */) { +export default function processorOpts(value/* ,currentConfig */) { if (isModulePath(value)) { const requiredModule = requireLocalFileOrNodeModule(value); @@ -15,10 +15,10 @@ export default function processOpts(value/* ,currentConfig */) { return requiredModule; } - throw new Error(`Configuration file for 'processOpts' is not exporting a plain object`); + throw new Error(`Configuration file for 'processorOpts' is not exporting a plain object`); } else if (isPlainObject(value)) { return value; } else { - throw new Error(`Configuration 'processOpts' is not a plain object nor a valid path to module`); + throw new Error(`Configuration 'processorOpts' is not a plain object nor a valid path to module`); } } diff --git a/test/options_resolvers/processOpts.spec.js b/test/options_resolvers/processOpts.spec.js deleted file mode 100644 index f53df1b..0000000 --- a/test/options_resolvers/processOpts.spec.js +++ /dev/null @@ -1,20 +0,0 @@ -import { expect } from 'chai'; - -import processOpts from '../../src/options_resolvers/processOpts'; - -describe('options_resolvers/processOpts', () => { - it('should throw if processOpts is not an object or valid module path exporting object', () => { - expect( - () => processOpts('test/fixtures/generateScopedName.function.module.js') - ).to.throw(); - - expect( - () => processOpts(null) - ).to.throw(); - }); - - it('should return object', () => { - expect(processOpts({})).to.be.deep.equal({}); - expect(processOpts('test/fixtures/processCss.module.js')).to.be.deep.equal({}); - }); -}); diff --git a/test/options_resolvers/processorOpts.spec.js b/test/options_resolvers/processorOpts.spec.js new file mode 100644 index 0000000..28cc254 --- /dev/null +++ b/test/options_resolvers/processorOpts.spec.js @@ -0,0 +1,20 @@ +import { expect } from 'chai'; + +import processorOpts from '../../src/options_resolvers/processorOpts'; + +describe('options_resolvers/processorOpts', () => { + it('should throw if processorOpts is not an object or valid module path exporting object', () => { + expect( + () => processorOpts('test/fixtures/generateScopedName.function.module.js') + ).to.throw(); + + expect( + () => processorOpts(null) + ).to.throw(); + }); + + it('should return object', () => { + expect(processorOpts({})).to.be.deep.equal({}); + expect(processorOpts('test/fixtures/processCss.module.js')).to.be.deep.equal({}); + }); +}); From b9f13d14a155f00588ae373208e0804bdb39d632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasnic=CC=8Ca=CC=81k?= Date: Thu, 16 Feb 2017 09:11:29 +0100 Subject: [PATCH 26/66] Version 1.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 654e964..263b13c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "1.2.0", + "version": "1.2.1", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { From cc5d2c570f6f4d8e83c1f4aef5495a7d64f7c4b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasnic=CC=8Ca=CC=81k?= Date: Sat, 11 Mar 2017 14:59:07 +0100 Subject: [PATCH 27/66] :racehorse: :bug: optimize plugin to initalize options only once Also fixes problems with circular dependencies when used with babel-node and babel-register, #35 Also this provides functionality to use watch mode, only thing a developer has to do is to enable devMode, #33 --- README.md | 27 --------- src/index.js | 113 ++++++++++++++++++++++-------------- src/utils/extractCssFile.js | 53 +++++++---------- 3 files changed, 90 insertions(+), 103 deletions(-) diff --git a/README.md b/README.md index e0ce862..1f9e302 100644 --- a/README.md +++ b/README.md @@ -175,33 +175,6 @@ To extract all files in a single directory, give an object: Note that `relativeRoot` is used to resolve relative directory names, available as `[path]` in `filename` pattern. -## Using a `babel-register` - -Make sure you set `ignore` option of `babel-register` to ignore all files used by css-modules-require-hook to process your css files. - -**Require `babel-register` only once otherwise it will fail** -**Be aware, you need to explicitly ignore `node_modules` if you set `ignore` option** - -```js -require('babel-register')({ - ignore: /(processCss\.js|node_modules)/ // regex matching all files used by css-modules-require-hook to process your css files -}) -``` - -## Using in mocha - -Create a js file with content - -**Be aware, you need to explicitly ignore `node_modules` if you set `ignore` option** - -```js -require('babel-register')({ - ignore: /(processCss\.js|node_modules)/ // regex matching all files used by css-modules-require-hook to process your css files -}) -``` - -and then set this file as a compiler `--compilers js:.js` - ## Alternatives - [babel-plugin-transform-postcss](https://github.com/wbyoung/babel-plugin-transform-postcss) - which supports async plugins and does not depend on `css-modules-require-hook`. diff --git a/src/index.js b/src/index.js index cef6fa8..3346442 100644 --- a/src/index.js +++ b/src/index.js @@ -43,6 +43,10 @@ export default function transformCssModules({ types: t }) { // is css modules require hook initialized? let initialized = false; + // are we requiring a module for preprocessCss, processCss, etc? + // we don't want them to be transformed using this plugin + // because it will cause circular dependency in babel-node and babel-register process + let inProcessingFunction = false; let matchExtensions = /\.css$/i; @@ -63,61 +67,80 @@ export default function transformCssModules({ types: t }) { ); } - return { - visitor: { - Program(path, state) { - if (initialized) { - return; - } - - const currentConfig = { ...defaultOptions, ...state.opts }; - // this is not a css-require-ook config - delete currentConfig.extractCss; - - // match file extensions, speeds up transform by creating one - // RegExp ahead of execution time - matchExtensions = matcher(currentConfig.extensions); + const cssMap = new Map(); + let thisPluginOptions = null; - // Add a space in current state for css filenames - state.$$css = { - styles: new Map() - }; - - const pushStylesCreator = (toWrap) => (css, filepath) => { - let processed; + const pluginApi = { + manipulateOptions(options) { + if (initialized || inProcessingFunction) { + return options; + } - if (typeof toWrap === 'function') { - processed = toWrap(css, filepath); - } + // find options for this plugin + // we have to use this hack because plugin.key does not have to be 'css-modules-transform' + // so we will identify it by comparing manipulateOptions + thisPluginOptions = options.plugins.filter( + ([plugin]) => plugin.manipulateOptions === pluginApi.manipulateOptions + )[0][1]; - if (typeof processed !== 'string') processed = css; + const currentConfig = { ...defaultOptions, ...thisPluginOptions }; + // this is not a css-require-ook config + delete currentConfig.extractCss; - if (!state.$$css.styles.has(filepath)) { - state.$$css.styles.set(filepath, processed); - extractCssFile(process.cwd(), filepath, processed, state); - } + // match file extensions, speeds up transform by creating one + // RegExp ahead of execution time + matchExtensions = matcher(currentConfig.extensions); - return processed; - }; + const pushStylesCreator = (toWrap) => (css, filepath) => { + let processed; - // resolve options - Object.keys(requireHooksOptions).forEach(key => { - // skip undefined options - if (currentConfig[key] === undefined) { - return; - } + if (typeof toWrap === 'function') { + processed = toWrap(css, filepath); + } - currentConfig[key] = requireHooksOptions[key](currentConfig[key], currentConfig); - }); + if (typeof processed !== 'string') processed = css; - // wrap or define processCss function that collect generated css - currentConfig.processCss = pushStylesCreator(currentConfig.processCss); + // set css content only if is new + if (!cssMap.has(filepath) || cssMap.get(filepath) !== processed) { + cssMap.set(filepath, processed); + } - require('css-modules-require-hook')(currentConfig); + return processed; + }; - initialized = true; - }, + // resolve options + Object.keys(requireHooksOptions).forEach(key => { + // skip undefined options + if (currentConfig[key] === undefined) { + return; + } + inProcessingFunction = true; + currentConfig[key] = requireHooksOptions[key](currentConfig[key], currentConfig); + inProcessingFunction = false; + }); + + // wrap or define processCss function that collect generated css + currentConfig.processCss = pushStylesCreator(currentConfig.processCss); + + require('css-modules-require-hook')(currentConfig); + + initialized = true; + + return options; + }, + post() { + // extract css only if is this option set + if (thisPluginOptions.extractCss) { + // always rewrite file :-/ + extractCssFile( + process.cwd(), + cssMap, + thisPluginOptions.extractCss + ); + } + }, + visitor: { // import styles from './style.css'; ImportDefaultSpecifier(path, { file }) { const { value } = path.parentPath.node.source; @@ -162,4 +185,6 @@ export default function transformCssModules({ types: t }) { } } }; + + return pluginApi; } diff --git a/src/utils/extractCssFile.js b/src/utils/extractCssFile.js index bb2c381..b1a6312 100644 --- a/src/utils/extractCssFile.js +++ b/src/utils/extractCssFile.js @@ -7,18 +7,11 @@ export const PATH_VARIABLES = ['[path]', '[name]']; * Extracts CSS to file * * @param {String} cwd - * @param {String} filepath - * @param {String} css - * @param {Object} state + * @param {Map} cssMap + * @param {String|Object} extractCss * @returns {null} */ -export default function extractCssFile(cwd, filepath, css, state) { - const { extractCss = null } = state.opts; - - if (!extractCss) { - return null; - } - +export default function extractCssFile(cwd, cssMap, extractCss) { // this is the case where a single extractCss is requested if (typeof(extractCss) === 'string') { // check if extractCss contains some from pattern variables, if yes throw! @@ -28,15 +21,9 @@ export default function extractCssFile(cwd, filepath, css, state) { } }); - // If this is the first file, then we should replace - // old content - if (state.$$css.styles.size === 1) { - return writeCssFile(extractCss, css); - } + const css = Array.from(cssMap.values()).join(''); - // this should output in a single file. - // Let's append the new file content. - return writeCssFile(extractCss, css, true); + return writeCssFile(extractCss, css); } // This is the case where each css file is written in @@ -52,18 +39,20 @@ export default function extractCssFile(cwd, filepath, css, state) { throw new Error('[name] variable has to be used in extractCss.filename option'); } - // Make css file name relative to relativeRoot - const relativePath = relative( - resolve(cwd, relativeRoot), - filepath - ); - - const destination = join( - resolve(cwd, dir), - filename - ) - .replace(/\[name]/, basename(filepath, extname(filepath))) - .replace(/\[path]/, dirname(relativePath)); - - writeCssFile(destination, css); + cssMap.forEach((css, filepath) => { + // Make css file name relative to relativeRoot + const relativePath = relative( + resolve(cwd, relativeRoot), + filepath + ); + + const destination = join( + resolve(cwd, dir), + filename + ) + .replace(/\[name]/, basename(filepath, extname(filepath))) + .replace(/\[path]/, dirname(relativePath)); + + writeCssFile(destination, css); + }); } From 6b9cfac2f12d4fb7a02fb7d0c07103d1af66ede6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasnic=CC=8Ca=CC=81k?= Date: Sat, 11 Mar 2017 15:10:07 +0100 Subject: [PATCH 28/66] Version 1.2.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 263b13c..5979933 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "1.2.1", + "version": "1.2.3", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { From 5de9916d418fb760d03fce383dd07b51b0a28118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasnic=CC=8Ca=CC=81k?= Date: Sat, 18 Mar 2017 18:45:49 +0100 Subject: [PATCH 29/66] :bug: fix checking for extractCss config option --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 3346442..a7ec42f 100644 --- a/src/index.js +++ b/src/index.js @@ -131,7 +131,7 @@ export default function transformCssModules({ types: t }) { }, post() { // extract css only if is this option set - if (thisPluginOptions.extractCss) { + if (thisPluginOptions && thisPluginOptions.extractCss) { // always rewrite file :-/ extractCssFile( process.cwd(), From e790c8ce5e0bcaf77024fb8512c48392b77fc9d1 Mon Sep 17 00:00:00 2001 From: Lawrence Wang Date: Mon, 20 Mar 2017 18:16:01 -0700 Subject: [PATCH 30/66] Fix error message for options_resolvers/ignore --- src/options_resolvers/ignore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/options_resolvers/ignore.js b/src/options_resolvers/ignore.js index 6883985..de51f53 100644 --- a/src/options_resolvers/ignore.js +++ b/src/options_resolvers/ignore.js @@ -16,7 +16,7 @@ export default function ignore(value/* , currentConfig */) { return requiredOption; } - throw new Error(`Configuration file for 'generateScopedName' is not exporting a string nor a function`); + throw new Error(`Configuration file for 'ignore' is not exporting a string nor a function`); } else if (isString(value)) { return value; } else { From 8b6522c9362e1a435a7c70a92e0c4bb116faecd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasnic=CC=8Ca=CC=81k?= Date: Tue, 21 Mar 2017 10:01:03 +0100 Subject: [PATCH 31/66] Version 1.2.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5979933..d1be96e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "1.2.3", + "version": "1.2.6", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { From d6515e830dfba18105cdb5b97324855a9dd054c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasnic=CC=8Ca=CC=81k?= Date: Wed, 22 Mar 2017 10:39:32 +0100 Subject: [PATCH 32/66] :arrow_up: update css-modules-require-hook --- package.json | 2 +- yarn.lock | 2770 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 2771 insertions(+), 1 deletion(-) create mode 100644 yarn.lock diff --git a/package.json b/package.json index d1be96e..9989f31 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ }, "homepage": "https://github.com/michalkvasnicak/babel-plugin-css-modules-transform#readme", "dependencies": { - "css-modules-require-hook": "^4.0.3", + "css-modules-require-hook": "^4.0.6", "mkdirp": "^0.5.1" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..a713313 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,2770 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +abbrev@1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" + +ajv@^4.9.1: + version "4.11.5" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.5.tgz#b6ee74657b993a01dce44b7944d56f485828d5bd" + 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: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + +ansi-regex@^2.0.0: + 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" + +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" + +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.2" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz#80e470e95a084794fe1899262c5667c6e88de1b3" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.0 || ^1.1.13" + +argparse@^1.0.2: + 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.1" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" + +array-differ@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" + +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, array-uniq@^1.0.2: + 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: + 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" + +assertion-error@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c" + +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" + +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.22.2: + version "6.24.0" + resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.24.0.tgz#a05ffd210dca0c288a26d5319c5ac8669a265ad0" + dependencies: + babel-core "^6.24.0" + babel-polyfill "^6.23.0" + babel-register "^6.24.0" + 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.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.2, babel-core@^6.22.1, babel-core@^6.24.0: + version "6.24.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.24.0.tgz#8f36a0a77f5c155aed6f920b844d23ba56742a02" + dependencies: + babel-code-frame "^6.22.0" + babel-generator "^6.24.0" + babel-helpers "^6.23.0" + babel-messages "^6.23.0" + babel-register "^6.24.0" + babel-runtime "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.1" + babel-types "^6.23.0" + 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-eslint@^7.1.1: + version "7.2.0" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.0.tgz#8941514b9dead06f0df71b29d5d5b193a92ee0ae" + dependencies: + babel-code-frame "^6.22.0" + babel-traverse "^6.23.1" + babel-types "^6.23.0" + babylon "^6.16.1" + lodash "^4.17.4" + +babel-generator@^6.24.0: + version "6.24.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.24.0.tgz#eba270a8cc4ce6e09a61be43465d7c62c1f87c56" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.23.0" + 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-call-delegate@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.22.0.tgz#119921b56120f17e9dae3f74b4f5cc7bcc1b37ef" + dependencies: + babel-helper-hoist-variables "^6.22.0" + babel-runtime "^6.22.0" + babel-traverse "^6.22.0" + babel-types "^6.22.0" + +babel-helper-define-map@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.23.0.tgz#1444f960c9691d69a2ced6a205315f8fd00804e7" + dependencies: + babel-helper-function-name "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.23.0" + lodash "^4.2.0" + +babel-helper-function-name@^6.22.0, babel-helper-function-name@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.23.0.tgz#25742d67175c8903dbe4b6cb9d9e1fcb8dcf23a6" + dependencies: + babel-helper-get-function-arity "^6.22.0" + babel-runtime "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" + +babel-helper-get-function-arity@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.22.0.tgz#0beb464ad69dc7347410ac6ade9f03a50634f5ce" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.22.0" + +babel-helper-hoist-variables@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.22.0.tgz#3eacbf731d80705845dd2e9718f600cfb9b4ba72" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.22.0" + +babel-helper-optimise-call-expression@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.23.0.tgz#f3ee7eed355b4282138b33d02b78369e470622f5" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.23.0" + +babel-helper-regex@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.22.0.tgz#79f532be1647b1f0ee3474b5f5c3da58001d247d" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.22.0" + lodash "^4.2.0" + +babel-helper-replace-supers@^6.22.0, babel-helper-replace-supers@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.23.0.tgz#eeaf8ad9b58ec4337ca94223bacdca1f8d9b4bfd" + dependencies: + babel-helper-optimise-call-expression "^6.23.0" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" + +babel-helpers@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.23.0.tgz#4f8f2e092d0b6a8808a4bde79c27f1e2ecf0d992" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.23.0" + +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-syntax-export-extensions@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" + +babel-plugin-syntax-object-rest-spread@^6.8.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + +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.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.23.0.tgz#e48895cf0b375be148cd7c8879b422707a053b51" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" + lodash "^4.2.0" + +babel-plugin-transform-es2015-classes@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.23.0.tgz#49b53f326202a2fd1b3bbaa5e2edd8a4f78643c1" + dependencies: + babel-helper-define-map "^6.23.0" + babel-helper-function-name "^6.23.0" + babel-helper-optimise-call-expression "^6.23.0" + babel-helper-replace-supers "^6.23.0" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" + +babel-plugin-transform-es2015-computed-properties@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.22.0.tgz#7c383e9629bba4820c11b0425bdd6290f7f057e7" + dependencies: + babel-runtime "^6.22.0" + babel-template "^6.22.0" + +babel-plugin-transform-es2015-destructuring@^6.22.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.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.22.0.tgz#672397031c21610d72dd2bbb0ba9fb6277e1c36b" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.22.0" + +babel-plugin-transform-es2015-for-of@^6.22.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.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.22.0.tgz#f5fcc8b09093f9a23c76ac3d9e392c3ec4b77104" + dependencies: + babel-helper-function-name "^6.22.0" + babel-runtime "^6.22.0" + babel-types "^6.22.0" + +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.24.0: + version "6.24.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.0.tgz#a1911fb9b7ec7e05a43a63c5995007557bcf6a2e" + dependencies: + babel-plugin-transform-es2015-modules-commonjs "^6.24.0" + babel-runtime "^6.22.0" + babel-template "^6.22.0" + +babel-plugin-transform-es2015-modules-commonjs@^6.22.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.0: + version "6.24.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.0.tgz#e921aefb72c2cc26cb03d107626156413222134f" + dependencies: + babel-plugin-transform-strict-mode "^6.22.0" + babel-runtime "^6.22.0" + babel-template "^6.23.0" + babel-types "^6.23.0" + +babel-plugin-transform-es2015-modules-systemjs@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.23.0.tgz#ae3469227ffac39b0310d90fec73bfdc4f6317b0" + dependencies: + babel-helper-hoist-variables "^6.22.0" + babel-runtime "^6.22.0" + babel-template "^6.23.0" + +babel-plugin-transform-es2015-modules-umd@^6.24.0: + version "6.24.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.0.tgz#fd5fa63521cae8d273927c3958afd7c067733450" + dependencies: + babel-plugin-transform-es2015-modules-amd "^6.24.0" + babel-runtime "^6.22.0" + babel-template "^6.23.0" + +babel-plugin-transform-es2015-object-super@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.22.0.tgz#daa60e114a042ea769dd53fe528fc82311eb98fc" + dependencies: + babel-helper-replace-supers "^6.22.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-es2015-parameters@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.23.0.tgz#3a2aabb70c8af945d5ce386f1a4250625a83ae3b" + dependencies: + babel-helper-call-delegate "^6.22.0" + babel-helper-get-function-arity "^6.22.0" + babel-runtime "^6.22.0" + babel-template "^6.23.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" + +babel-plugin-transform-es2015-shorthand-properties@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.22.0.tgz#8ba776e0affaa60bff21e921403b8a652a2ff723" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.22.0" + +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.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.22.0.tgz#ab316829e866ee3f4b9eb96939757d19a5bc4593" + dependencies: + babel-helper-regex "^6.22.0" + babel-runtime "^6.22.0" + babel-types "^6.22.0" + +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.22.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.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.22.0.tgz#8d9cc27e7ee1decfe65454fb986452a04a613d20" + dependencies: + babel-helper-regex "^6.22.0" + babel-runtime "^6.22.0" + regexpu-core "^2.0.0" + +babel-plugin-transform-export-extensions@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653" + dependencies: + babel-plugin-syntax-export-extensions "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-object-rest-spread@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz#875d6bc9be761c58a2ae3feee5dc4895d8c7f921" + dependencies: + babel-plugin-syntax-object-rest-spread "^6.8.0" + babel-runtime "^6.22.0" + +babel-plugin-transform-regenerator@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.22.0.tgz#65740593a319c44522157538d690b84094617ea6" + dependencies: + regenerator-transform "0.9.8" + +babel-plugin-transform-strict-mode@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.22.0.tgz#e008df01340fdc87e959da65991b7e05970c8c7c" + dependencies: + babel-runtime "^6.22.0" + babel-types "^6.22.0" + +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-es2015@^6.22.0: + version "6.24.0" + resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.0.tgz#c162d68b1932696e036cd3110dc1ccd303d2673a" + dependencies: + babel-plugin-check-es2015-constants "^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.22.0" + babel-plugin-transform-es2015-classes "^6.22.0" + babel-plugin-transform-es2015-computed-properties "^6.22.0" + babel-plugin-transform-es2015-destructuring "^6.22.0" + babel-plugin-transform-es2015-duplicate-keys "^6.22.0" + babel-plugin-transform-es2015-for-of "^6.22.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.24.0" + babel-plugin-transform-es2015-modules-commonjs "^6.24.0" + babel-plugin-transform-es2015-modules-systemjs "^6.22.0" + babel-plugin-transform-es2015-modules-umd "^6.24.0" + babel-plugin-transform-es2015-object-super "^6.22.0" + babel-plugin-transform-es2015-parameters "^6.22.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.22.0" + babel-plugin-transform-es2015-unicode-regex "^6.22.0" + babel-plugin-transform-regenerator "^6.22.0" + +babel-register@^6.24.0: + version "6.24.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.0.tgz#5e89f8463ba9970356d02eb07dabe3308b080cfd" + dependencies: + babel-core "^6.24.0" + 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.22.0, babel-template@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.23.0.tgz#04d4f270adbb3aa704a8143ae26faa529238e638" + dependencies: + babel-runtime "^6.22.0" + babel-traverse "^6.23.0" + babel-types "^6.23.0" + babylon "^6.11.0" + lodash "^4.2.0" + +babel-traverse@^6.22.0, babel-traverse@^6.23.0, babel-traverse@^6.23.1: + version "6.23.1" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48" + dependencies: + babel-code-frame "^6.22.0" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.23.0" + babylon "^6.15.0" + debug "^2.2.0" + globals "^9.0.0" + invariant "^2.2.0" + lodash "^4.2.0" + +babel-types@^6.19.0, babel-types@^6.22.0, babel-types@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.23.0.tgz#bb17179d7538bad38cd0c9e115d340f77e7e9acf" + 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.15.0, babylon@^6.16.1: + version "6.16.1" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3" + +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" + +beeper@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" + +big.js@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.1.3.tgz#4cada2193652eb3ca9ec8e55c9015669c9806978" + +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.0.0: + version "1.1.6" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" + 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" + +buffer-shims@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +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" + +chai@^3.4.1: + version "3.5.0" + resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247" + dependencies: + assertion-error "^1.0.1" + deep-eql "^0.1.3" + type-detect "^1.0.0" + +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.6.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2" + 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" + +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@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-1.1.1.tgz#a4d293ef67ebb7b88d4a4d42c0ccf00c4d1e366d" + +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" + +clone-stats@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" + +clone@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + +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" + +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@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-0.6.1.tgz#fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06" + +commander@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.3.0.tgz#fd430e889832ec353b9acd1de217c11cb3eef873" + +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" + +convert-source-map@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.4.0.tgz#e3dad195bf61bfe13a7a3c73e9876ec14a0268f3" + +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" + +css-modules-require-hook@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/css-modules-require-hook/-/css-modules-require-hook-4.0.6.tgz#70a03b0ca3784e36e5a1dc1aa82ba068d53248bf" + dependencies: + debug "^2.2.0" + generic-names "^1.0.1" + glob-to-regexp "^0.1.0" + icss-replace-symbols "^1.0.2" + lodash "^4.3.0" + postcss "^5.0.19" + postcss-modules-extract-imports "^1.0.0" + postcss-modules-local-by-default "^1.0.1" + postcss-modules-parser "^1.1.0" + postcss-modules-scope "^1.0.0" + postcss-modules-values "^1.1.1" + seekout "^1.0.1" + +css-selector-tokenizer@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.6.0.tgz#6445f582c7930d241dcc5007a43d6fcb8f073152" + dependencies: + cssesc "^0.1.0" + fastparse "^1.1.1" + regexpu-core "^1.0.0" + +cssesc@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" + +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" + +dateformat@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17" + +debug@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + +debug@^2.1.1, debug@^2.2.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" + dependencies: + ms "0.7.2" + +decamelize@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-eql@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2" + dependencies: + type-detect "0.1.1" + +deep-extend@~0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +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@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" + +doctrine@^0.7.1: + version "0.7.2" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-0.7.2.tgz#7cb860359ba3be90e040b26b729ce4bfa654c523" + dependencies: + esutils "^1.1.6" + isarray "0.0.1" + +duplexer2@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" + dependencies: + readable-stream "~1.1.9" + +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" + +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + +es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.15" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.15.tgz#c330a5934c1ee21284a7c081a86e5fd937c91ea6" + 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: + version "1.0.2" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1" + +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" + +escope@^3.3.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-airbnb-lite@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-lite/-/eslint-config-airbnb-lite-1.0.4.tgz#41364c660d4d5786c3c022330b25852d792691db" + dependencies: + eslint-config-airbnb "0.0.7" + +eslint-config-airbnb@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-0.0.7.tgz#90029a39017ba2369341b79240a2d3df42f09ea7" + dependencies: + strip-json-comments "1.0.2" + +eslint@^1.9.0: + version "1.10.3" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-1.10.3.tgz#fb19a91b13c158082bbca294b17d979bc8353a0a" + dependencies: + chalk "^1.0.0" + concat-stream "^1.4.6" + debug "^2.1.1" + doctrine "^0.7.1" + escape-string-regexp "^1.0.2" + escope "^3.3.0" + espree "^2.2.4" + estraverse "^4.1.1" + estraverse-fb "^1.3.1" + esutils "^2.0.2" + file-entry-cache "^1.1.1" + glob "^5.0.14" + globals "^8.11.0" + handlebars "^4.0.0" + inquirer "^0.11.0" + is-my-json-valid "^2.10.0" + is-resolvable "^1.0.0" + js-yaml "3.4.5" + json-stable-stringify "^1.0.0" + lodash.clonedeep "^3.0.1" + lodash.merge "^3.3.2" + lodash.omit "^3.1.0" + minimatch "^3.0.0" + mkdirp "^0.5.0" + object-assign "^4.0.1" + optionator "^0.6.0" + path-is-absolute "^1.0.0" + path-is-inside "^1.0.1" + shelljs "^0.5.3" + strip-json-comments "~1.0.1" + text-table "~0.2.0" + user-home "^2.0.0" + xml-escape "~1.0.0" + +espree@^2.2.4: + version "2.2.5" + resolved "https://registry.yarnpkg.com/espree/-/espree-2.2.5.tgz#df691b9310889402aeb29cc066708c56690b854b" + +esprima@^2.6.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +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-fb@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/estraverse-fb/-/estraverse-fb-1.3.1.tgz#160e75a80e605b08ce894bcce2fe3e429abf92bf" + +estraverse@^4.1.1: + 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@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-1.1.6.tgz#c01ccaa9ae4b897c6d0c3e210ae52f3c7a844375" + +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" + +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.0" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" + +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" + +fancy-log@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.0.tgz#45be17d02bb9917d60ccffd4995c999e6c8c9948" + dependencies: + chalk "^1.1.1" + time-stamp "^1.0.0" + +fast-levenshtein@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz#0178dcdee023b92905193af0959e8a7639cfdcb9" + +fastparse@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8" + +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@^1.1.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-1.3.1.tgz#44c61ea607ae4be9c1402f41f44270cbfe334ff8" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + +filename-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" + +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" + +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.2" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" + 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.1: + version "2.7.3" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.3.tgz#1c23855f962f17b3ad3d0dc7443f304542edfe09" + 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" + +generic-names@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/generic-names/-/generic-names-1.0.2.tgz#e25b7feceb5b5a8f28f5f972a7ccfe57e562adcd" + dependencies: + loader-utils "^0.2.16" + +getpass@^0.1.1: + version "0.1.6" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" + 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-to-regexp@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.1.0.tgz#e0369d426578fd456d47dc23b09de05c1da9ea5d" + +glob@3.2.11: + version "3.2.11" + resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.11.tgz#4a973f635b9190f715d10987d5c00fd2815ebe3d" + dependencies: + inherits "2" + minimatch "0.3" + +glob@^5.0.14: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: + 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" + +globals@^8.11.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-8.18.0.tgz#93d4a62bdcac38cfafafc47d6b034768cb0ffcb4" + +globals@^9.0.0: + version "9.16.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.16.0.tgz#63e903658171ec2d9f51b1d31de5e2b8dc01fb80" + +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" + +glogg@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.0.tgz#7fe0f199f57ac906cf512feead8f90ee4a284fc5" + dependencies: + sparkles "^1.0.0" + +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" + +growl@1.9.2: + version "1.9.2" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" + +gulp-babel@^6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/gulp-babel/-/gulp-babel-6.1.2.tgz#7c0176e4ba3f244c60588a0c4b320a45d1adefce" + dependencies: + babel-core "^6.0.2" + gulp-util "^3.0.0" + object-assign "^4.0.1" + replace-ext "0.0.1" + through2 "^2.0.0" + vinyl-sourcemaps-apply "^0.2.0" + +gulp-util@^3.0.0, gulp-util@^3.0.7: + version "3.0.8" + resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" + dependencies: + array-differ "^1.0.0" + array-uniq "^1.0.2" + beeper "^1.0.0" + chalk "^1.0.0" + dateformat "^2.0.0" + fancy-log "^1.1.0" + gulplog "^1.0.0" + has-gulplog "^0.1.0" + lodash._reescape "^3.0.0" + lodash._reevaluate "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.template "^3.0.0" + minimist "^1.1.0" + multipipe "^0.1.2" + object-assign "^3.0.0" + replace-ext "0.0.1" + through2 "^2.0.0" + vinyl "^0.5.0" + +gulplog@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" + dependencies: + glogg "^1.0.0" + +handlebars@^4.0.0: + version "4.0.6" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.6.tgz#2ce4484850537f9c97a8026d5399b935c4ed4ed7" + 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-gulplog@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" + dependencies: + sparkles "^1.0.0" + +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" + +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" + +icss-replace-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.0.2.tgz#cb0b6054eb3af6edc9ab1d62d01933e2d4c8bfa5" + +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.11.0: + version "0.11.4" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.11.4.tgz#81e3374e8361beaff2d97016206d359d0b32fa4d" + dependencies: + ansi-escapes "^1.1.0" + ansi-regex "^2.0.0" + chalk "^1.0.0" + cli-cursor "^1.0.1" + cli-width "^1.0.1" + figures "^1.3.5" + lodash "^3.3.1" + 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" + +invariant@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + dependencies: + loose-envify "^1.0.0" + +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.0.2: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" + +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-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" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +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" + +jade@0.26.3: + version "0.26.3" + resolved "https://registry.yarnpkg.com/jade/-/jade-0.26.3.tgz#8f10d7977d8d79f2f6ff862a81b0513ccb25686c" + dependencies: + commander "0.6.1" + mkdirp "0.3.0" + +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-base64@^2.1.9: + version "2.1.9" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" + +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.5: + version "3.4.5" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.4.5.tgz#c3403797df12b91866574f2de23646fe8cafb44d" + dependencies: + argparse "^1.0.2" + esprima "^2.6.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +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" + +kind-of@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" + dependencies: + is-buffer "^1.0.2" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +levn@~0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.2.5.tgz#ba8d339d0ca4a610e3a3f145b9caf48807155054" + dependencies: + prelude-ls "~1.1.0" + type-check "~0.3.1" + +loader-utils@^0.2.16: + version "0.2.17" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" + dependencies: + big.js "^3.1.3" + emojis-list "^2.0.0" + json5 "^0.5.0" + object-assign "^4.0.1" + +lodash._arraycopy@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz#76e7b7c1f1fb92547374878a562ed06a3e50f6e1" + +lodash._arrayeach@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz#bab156b2a90d3f1bbd5c653403349e5e5933ef9e" + +lodash._arraymap@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._arraymap/-/lodash._arraymap-3.0.0.tgz#1a8fd0f4c0df4b61dea076d717cdc97f0a3c3e66" + +lodash._baseassign@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" + dependencies: + lodash._basecopy "^3.0.0" + lodash.keys "^3.0.0" + +lodash._baseclone@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz#303519bf6393fe7e42f34d8b630ef7794e3542b7" + dependencies: + lodash._arraycopy "^3.0.0" + lodash._arrayeach "^3.0.0" + lodash._baseassign "^3.0.0" + lodash._basefor "^3.0.0" + lodash.isarray "^3.0.0" + lodash.keys "^3.0.0" + +lodash._basecopy@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" + +lodash._basedifference@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash._basedifference/-/lodash._basedifference-3.0.3.tgz#f2c204296c2a78e02b389081b6edcac933cf629c" + dependencies: + lodash._baseindexof "^3.0.0" + lodash._cacheindexof "^3.0.0" + lodash._createcache "^3.0.0" + +lodash._baseeach@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash._baseeach/-/lodash._baseeach-3.0.4.tgz#cf8706572ca144e8d9d75227c990da982f932af3" + dependencies: + lodash.keys "^3.0.0" + +lodash._baseflatten@^3.0.0: + version "3.1.4" + resolved "https://registry.yarnpkg.com/lodash._baseflatten/-/lodash._baseflatten-3.1.4.tgz#0770ff80131af6e34f3b511796a7ba5214e65ff7" + dependencies: + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash._basefor@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash._basefor/-/lodash._basefor-3.0.3.tgz#7550b4e9218ef09fad24343b612021c79b4c20c2" + +lodash._baseindexof@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c" + +lodash._basetostring@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5" + +lodash._basevalues@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" + +lodash._bindcallback@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" + +lodash._cacheindexof@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92" + +lodash._createassigner@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11" + dependencies: + lodash._bindcallback "^3.0.0" + lodash._isiterateecall "^3.0.0" + lodash.restparam "^3.0.0" + +lodash._createcache@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093" + dependencies: + lodash._getnative "^3.0.0" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash._isiterateecall@^3.0.0: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" + +lodash._pickbyarray@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash._pickbyarray/-/lodash._pickbyarray-3.0.2.tgz#1f898d9607eb560b0e167384b77c7c6d108aa4c5" + +lodash._pickbycallback@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._pickbycallback/-/lodash._pickbycallback-3.0.0.tgz#ff61b9a017a7b3af7d30e6c53de28afa19b8750a" + dependencies: + lodash._basefor "^3.0.0" + lodash.keysin "^3.0.0" + +lodash._reescape@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a" + +lodash._reevaluate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed" + +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + +lodash._root@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" + +lodash.clonedeep@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz#a0a1e40d82a5ea89ff5b147b8444ed63d92827db" + dependencies: + lodash._baseclone "^3.0.0" + lodash._bindcallback "^3.0.0" + +lodash.escape@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" + dependencies: + lodash._root "^3.0.0" + +lodash.foreach@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-3.0.3.tgz#6fd7efb79691aecd67fdeac2761c98e701d6c39a" + dependencies: + lodash._arrayeach "^3.0.0" + lodash._baseeach "^3.0.0" + lodash._bindcallback "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.isplainobject@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-3.2.0.tgz#9a8238ae16b200432960cd7346512d0123fbf4c5" + dependencies: + lodash._basefor "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.keysin "^3.0.0" + +lodash.istypedarray@^3.0.0: + version "3.0.6" + resolved "https://registry.yarnpkg.com/lodash.istypedarray/-/lodash.istypedarray-3.0.6.tgz#c9a477498607501d8e8494d283b87c39281cef62" + +lodash.keys@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.keysin@^3.0.0: + version "3.0.8" + resolved "https://registry.yarnpkg.com/lodash.keysin/-/lodash.keysin-3.0.8.tgz#22c4493ebbedb1427962a54b445b2c8a767fb47f" + dependencies: + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.merge@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-3.3.2.tgz#0d90d93ed637b1878437bb3e21601260d7afe994" + dependencies: + lodash._arraycopy "^3.0.0" + lodash._arrayeach "^3.0.0" + lodash._createassigner "^3.0.0" + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + lodash.isplainobject "^3.0.0" + lodash.istypedarray "^3.0.0" + lodash.keys "^3.0.0" + lodash.keysin "^3.0.0" + lodash.toplainobject "^3.0.0" + +lodash.omit@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.omit/-/lodash.omit-3.1.0.tgz#897fe382e6413d9ac97c61f78ed1e057a00af9f3" + dependencies: + lodash._arraymap "^3.0.0" + lodash._basedifference "^3.0.0" + lodash._baseflatten "^3.0.0" + lodash._bindcallback "^3.0.0" + lodash._pickbyarray "^3.0.0" + lodash._pickbycallback "^3.0.0" + lodash.keysin "^3.0.0" + lodash.restparam "^3.0.0" + +lodash.restparam@^3.0.0: + version "3.6.1" + resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" + +lodash.template@^3.0.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" + dependencies: + lodash._basecopy "^3.0.0" + lodash._basetostring "^3.0.0" + lodash._basevalues "^3.0.0" + lodash._isiterateecall "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + lodash.keys "^3.0.0" + lodash.restparam "^3.0.0" + lodash.templatesettings "^3.0.0" + +lodash.templatesettings@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5" + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + +lodash.toplainobject@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash.toplainobject/-/lodash.toplainobject-3.0.0.tgz#28790ad942d293d78aa663a07ecf7f52ca04198d" + dependencies: + lodash._basecopy "^3.0.0" + lodash.keysin "^3.0.0" + +lodash@^3.3.1: + version "3.10.1" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" + +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" + +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" + +lru-cache@2: + version "2.7.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" + +micromatch@^2.1.5: + 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.26.0: + version "1.26.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.26.0.tgz#eaffcd0e4fc6935cf8134da246e2e6c35305adff" + +mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.14" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee" + dependencies: + mime-db "~1.26.0" + +minimatch@0.3: + version "0.3.0" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.3.0.tgz#275d8edaac4f1bb3326472089e7949c8394699dd" + dependencies: + lru-cache "2" + sigmund "~1.0.0" + +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" + dependencies: + brace-expansion "^1.0.0" + +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.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +mkdirp@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.0.tgz#1bbf5ab1ba827af23575143490426455f481fe1e" + +mkdirp@0.5.1, "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" + +mocha@^2.3.4: + version "2.5.3" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-2.5.3.tgz#161be5bdeb496771eb9b35745050b622b5aefc58" + dependencies: + commander "2.3.0" + debug "2.2.0" + diff "1.4.0" + escape-string-regexp "1.0.2" + glob "3.2.11" + growl "1.9.2" + jade "0.26.3" + mkdirp "0.5.1" + supports-color "1.2.0" + to-iso-string "0.0.2" + +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + +multipipe@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" + dependencies: + duplexer2 "0.0.2" + +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.5.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.5.1.tgz#d5b01691253326a97a2bbee9e61c55d8d60351e2" + +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-path@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" + +npmlog@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.2.tgz#d03950e0e78ce1527ba26d2a7592e9348ac3e75f" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.1" + 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" + +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@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" + +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: + 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.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.6.0.tgz#b63ecbbf0e315fad4bc9827b45dc7ba45284fcb6" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~1.0.6" + levn "~0.2.5" + prelude-ls "~1.1.1" + type-check "~0.3.1" + wordwrap "~0.0.2" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +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" + +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" + +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" + +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: + 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" + +postcss-modules-extract-imports@^1.0.0, postcss-modules-extract-imports@^1.x: + version "1.0.1" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.0.1.tgz#8fb3fef9a6dd0420d3f6d4353cf1ff73f2b2a341" + dependencies: + postcss "^5.0.4" + +postcss-modules-local-by-default@^1.0.1, postcss-modules-local-by-default@^1.x: + version "1.1.1" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.1.1.tgz#29a10673fa37d19251265ca2ba3150d9040eb4ce" + dependencies: + css-selector-tokenizer "^0.6.0" + postcss "^5.0.4" + +postcss-modules-parser@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-parser/-/postcss-modules-parser-1.1.0.tgz#1797f0e5ca129bbe6120c9d3babd328e8bc7748d" + dependencies: + icss-replace-symbols "^1.0.2" + lodash.foreach "^3.0.3" + postcss "^5.0.10" + +postcss-modules-scope@^1.0.0, postcss-modules-scope@^1.x: + version "1.0.2" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.0.2.tgz#ff977395e5e06202d7362290b88b1e8cd049de29" + dependencies: + css-selector-tokenizer "^0.6.0" + postcss "^5.0.4" + +postcss-modules-values@^1.1.1, postcss-modules-values@^1.x: + version "1.2.2" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.2.2.tgz#f0e7d476fe1ed88c5e4c7f97533a3e772ad94ca1" + dependencies: + icss-replace-symbols "^1.0.2" + postcss "^5.0.14" + +postcss@^5.0.10, postcss@^5.0.14, postcss@^5.0.19, postcss@^5.0.4, postcss@^5.x: + version "5.2.16" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.16.tgz#732b3100000f9ff8379a48a53839ed097376ad57" + dependencies: + chalk "^1.1.3" + js-base64 "^2.1.9" + source-map "^0.5.6" + supports-color "^3.2.3" + +prelude-ls@~1.1.0, prelude-ls@~1.1.1, 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" + +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" + +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.1.7" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.7.tgz#c5ea564bb07aff9fd3a5b32e906c1d3a65940fea" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.2, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2: + version "2.2.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.6.tgz#8b43aed76e71483938d12a8d46c6cf1a00b1f816" + 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 "~0.10.x" + util-deprecate "~1.0.1" + +readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +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" + +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.3" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.3.tgz#8c4367a904b51ea62a908ac310bf99ff90a82a3e" + +regenerator-transform@0.9.8: + version "0.9.8" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.8.tgz#0f88bb2bc03932ddb7b6b7312e68078f01026d6c" + 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@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" + dependencies: + regenerate "^1.2.1" + regjsgen "^0.2.0" + regjsparser "^0.1.4" + +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" + +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" + +replace-ext@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" + +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" + +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.5.4, 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" + +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" + +seekout@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/seekout/-/seekout-1.0.2.tgz#09ba9f1bd5b46fbb134718eb19a68382cbb1b9c9" + +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: + 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.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.5.3.tgz#c54982b996c76ef0c1e6b59fbdc5825f5b713113" + +sigmund@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + +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" + +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.14" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.14.tgz#9d4463772598b86271b4f523f6c1f4e02a7d6aef" + 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.1, 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" + +sparkles@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" + +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.11.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.11.0.tgz#2d8d5ebb4a6fab28ffba37fa62a90f4a3ea59d77" + 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" + +string-width@^1.0.1: + 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_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +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-json-comments@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.2.tgz#5a48ab96023dbac1b7b8d0ffabf6f63f1677be9f" + +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@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-1.2.0.tgz#ff1ed1e61169d06b3cf2d588e188b18d8847e17e" + +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.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" + +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" + +text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +through2@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +time-stamp@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.0.1.tgz#9f4bd23559c9365966f3302dbba2b07c6b99b151" + +to-fast-properties@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" + +to-iso-string@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/to-iso-string/-/to-iso-string-0.0.2.tgz#4dc19e664dfccbe25bd8db508b00c6da158255d1" + +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" + +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.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +type-detect@0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822" + +type-detect@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2" + +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.14" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.14.tgz#25b15d1af39b21752ee33703adbf432e8bc8f77d" + dependencies: + source-map "~0.5.1" + uglify-to-browserify "~1.0.0" + yargs "~3.10.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" + +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.0.11" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.0.11.tgz#bca8f30f0d6d60612cc2c00641e6962d42ae6881" + dependencies: + user-home "^1.1.1" + +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" + +vinyl-sourcemaps-apply@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705" + dependencies: + source-map "^0.5.1" + +vinyl@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +wide-align@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" + dependencies: + string-width "^1.0.1" + +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" + +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-escape@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/xml-escape/-/xml-escape-1.0.0.tgz#00963d697b2adf0c185c4e04e73174ba9b288eb2" + +xtend@^4.0.0, xtend@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +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 f37983079e260f7789088ecdca9b9d66f5b05f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasnic=CC=8Ca=CC=81k?= Date: Wed, 22 Mar 2017 10:39:47 +0100 Subject: [PATCH 33/66] :rocket: :wrench: use yarn on circleci --- circle.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/circle.yml b/circle.yml index ee1c24b..36c91c7 100644 --- a/circle.yml +++ b/circle.yml @@ -1,3 +1,17 @@ machine: + environment: + PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" node: version: 6.1.0 + +dependencies: + cache_directories: + - ~/.cache/yarn + +dependencies: + override: + - yarn + +test: + override: + - yarn test From cea13849240474ec99fbd34e368766447e645a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasnic=CC=8Ca=CC=81k?= Date: Wed, 22 Mar 2017 10:47:17 +0100 Subject: [PATCH 34/66] :sparkles: introduce possibility to specify camelCase as string --- src/options_resolvers/camelCase.js | 6 ++++-- test/options_resolvers/camelCase.spec.js | 9 ++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/options_resolvers/camelCase.js b/src/options_resolvers/camelCase.js index 7d6afa7..fafb8db 100644 --- a/src/options_resolvers/camelCase.js +++ b/src/options_resolvers/camelCase.js @@ -7,8 +7,10 @@ import { isBoolean } from '../utils'; * @returns {boolean} */ export default function camelCase(value/* , currentConfig */) { - if (!isBoolean(value)) { - throw new Error(`Configuration 'camelCase' is not a boolean`); + if (!isBoolean(value) && ['dashes', 'dashesOnly', 'only'].indexOf(value) < 0) { + throw new Error( + `Configuration 'camelCase' is not a boolean or one of 'dashes'|'dashesOnly'|'only'` + ); } return value; diff --git a/test/options_resolvers/camelCase.spec.js b/test/options_resolvers/camelCase.spec.js index c6416f8..21d8e50 100644 --- a/test/options_resolvers/camelCase.spec.js +++ b/test/options_resolvers/camelCase.spec.js @@ -3,11 +3,18 @@ import { expect } from 'chai'; import camelCase from '../../src/options_resolvers/camelCase'; describe('options_resolvers/camelCase', () => { - it('should throw if camelCase value is not a boolean', () => { + it('should throw if camelCase value is not a boolean or is not in enum', () => { expect( () => camelCase(null) ).to.throw(); + expect( + () => camelCase('unknown') + ).to.throw(); + expect(camelCase(true)).to.be.equal(true); + expect(camelCase('dashes')).to.be.equal('dashes'); + expect(camelCase('dashesOnly')).to.be.equal('dashesOnly'); + expect(camelCase('only')).to.be.equal('only'); }); }); From 6bb1a19fe941d5a762bc5d603b9e1165f23b1c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasnic=CC=8Ca=CC=81k?= Date: Wed, 22 Mar 2017 10:47:56 +0100 Subject: [PATCH 35/66] Version 1.2.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9989f31..dca03f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "1.2.6", + "version": "1.2.7", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { From 759d8504160c57cdec73039d37d953071610ee7a Mon Sep 17 00:00:00 2001 From: Jason Kurian Date: Fri, 26 May 2017 20:38:16 -0400 Subject: [PATCH 36/66] chore: add mocha.opts and simplify test script --- package.json | 3 ++- test/mocha.opts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 test/mocha.opts diff --git a/package.json b/package.json index dca03f5..6e65d69 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "scripts": { "build": "node node_modules/.bin/babel src --ignore **/*.spec.js -d build", "lint": "node node_modules/.bin/eslint src", - "test": "npm run lint && node node_modules/.bin/mocha --compilers js:babel-core/register 'test/**/*.spec.js'" + "pretest": "npm run lint", + "test": "mocha" }, "repository": { "type": "git", diff --git a/test/mocha.opts b/test/mocha.opts new file mode 100644 index 0000000..c3c49c8 --- /dev/null +++ b/test/mocha.opts @@ -0,0 +1,2 @@ +--compilers js:babel-core/register +test/**/*.spec.js From 38f2d06857019c87de51fa8f2779cc69e3792463 Mon Sep 17 00:00:00 2001 From: Jason Kurian Date: Sat, 27 May 2017 13:09:50 -0400 Subject: [PATCH 37/66] chore(coverage): adds nyc for coverage - also simplifies scripts - upgrades mocha --- .babelrc | 9 +- .gitignore | 4 + .nycrc | 7 + package.json | 11 +- yarn.lock | 658 +++++++++++++++++++++++++++++++++++++++++++-------- 5 files changed, 584 insertions(+), 105 deletions(-) create mode 100644 .nycrc diff --git a/.babelrc b/.babelrc index d325741..27a84b0 100644 --- a/.babelrc +++ b/.babelrc @@ -8,5 +8,12 @@ "transform-object-rest-spread", "transform-es2015-spread", "transform-export-extensions" - ] + ], + "env": { + "test": { + "plugins": [ + "istanbul" + ] + } + } } diff --git a/.gitignore b/.gitignore index d6b6a5c..5cef7ce 100644 --- a/.gitignore +++ b/.gitignore @@ -56,6 +56,10 @@ Icon # Thumbnails ._* +# code coverage +.nyc_output +coverage + # Files that might appear in the root of a volume .DocumentRevisions-V100 .fseventsd diff --git a/.nycrc b/.nycrc new file mode 100644 index 0000000..f8fd6b0 --- /dev/null +++ b/.nycrc @@ -0,0 +1,7 @@ +{ + "require": [ + "babel-core/register" + ], + "sourceMap": false, + "instrument": false +} \ No newline at end of file diff --git a/package.json b/package.json index 6e65d69..aa30f0b 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,10 @@ "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { - "build": "node node_modules/.bin/babel src --ignore **/*.spec.js -d build", - "lint": "node node_modules/.bin/eslint src", + "build": "babel src --ignore **/*.spec.js -d build", + "lint": "eslint src", "pretest": "npm run lint", - "test": "mocha" + "test": "cross-env NODE_ENV=test nyc mocha" }, "repository": { "type": "git", @@ -33,6 +33,7 @@ "babel-cli": "^6.22.2", "babel-core": "^6.22.1", "babel-eslint": "^7.1.1", + "babel-plugin-istanbul": "^4.1.3", "babel-plugin-transform-es2015-block-scoping": "^6.22.0", "babel-plugin-transform-es2015-destructuring": "^6.22.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.22.0", @@ -43,11 +44,13 @@ "babel-plugin-transform-strict-mode": "^6.22.0", "babel-preset-es2015": "^6.22.0", "chai": "^3.4.1", + "cross-env": "^5.0.0", "eslint": "^1.9.0", "eslint-config-airbnb-lite": "^1.0.0", "gulp-babel": "^6.1.2", "gulp-util": "^3.0.7", - "mocha": "^2.3.4", + "mocha": "^3.4.2", + "nyc": "^10.3.2", "postcss": "^5.x", "postcss-modules-extract-imports": "^1.x", "postcss-modules-local-by-default": "^1.x", diff --git a/yarn.lock b/yarn.lock index a713313..142f2fa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -44,10 +44,20 @@ anymatch@^1.3.0: 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" +archy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + are-we-there-yet@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz#80e470e95a084794fe1899262c5667c6e88de1b3" @@ -89,7 +99,7 @@ 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.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -192,7 +202,7 @@ babel-eslint@^7.1.1: babylon "^6.16.1" lodash "^4.17.4" -babel-generator@^6.24.0: +babel-generator@^6.18.0, babel-generator@^6.24.0: version "6.24.0" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.24.0.tgz#eba270a8cc4ce6e09a61be43465d7c62c1f87c56" dependencies: @@ -292,6 +302,14 @@ babel-plugin-check-es2015-constants@^6.22.0: dependencies: babel-runtime "^6.22.0" +babel-plugin-istanbul@^4.1.3: + 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-syntax-export-extensions@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" @@ -551,7 +569,7 @@ babel-runtime@^6.18.0, babel-runtime@^6.22.0: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-template@^6.22.0, babel-template@^6.23.0: +babel-template@^6.16.0, babel-template@^6.22.0, babel-template@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.23.0.tgz#04d4f270adbb3aa704a8143ae26faa529238e638" dependencies: @@ -561,7 +579,7 @@ babel-template@^6.22.0, babel-template@^6.23.0: babylon "^6.11.0" lodash "^4.2.0" -babel-traverse@^6.22.0, babel-traverse@^6.23.0, babel-traverse@^6.23.1: +babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-traverse@^6.23.0, babel-traverse@^6.23.1: version "6.23.1" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48" dependencies: @@ -575,7 +593,7 @@ babel-traverse@^6.22.0, babel-traverse@^6.23.0, babel-traverse@^6.23.1: invariant "^2.2.0" lodash "^4.2.0" -babel-types@^6.19.0, babel-types@^6.22.0, babel-types@^6.23.0: +babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.22.0, babel-types@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.23.0.tgz#bb17179d7538bad38cd0c9e115d340f77e7e9acf" dependencies: @@ -584,7 +602,7 @@ babel-types@^6.19.0, babel-types@^6.22.0, babel-types@^6.23.0: lodash "^4.2.0" to-fast-properties "^1.0.1" -babylon@^6.11.0, babylon@^6.15.0, babylon@^6.16.1: +babylon@^6.11.0, babylon@^6.13.0, babylon@^6.15.0, babylon@^6.16.1: version "6.16.1" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3" @@ -637,14 +655,34 @@ braces@^1.8.2: preserve "^0.2.0" repeat-element "^1.1.2" +browser-stdout@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" + 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" + +caching-transform@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-1.0.1.tgz#6dbdb2f20f8d8fbce79f3e94e9d1742dcdf5c0a1" + dependencies: + md5-hex "^1.2.0" + mkdirp "^0.5.1" + write-file-atomic "^1.1.4" + 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" + caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -711,6 +749,14 @@ cliui@^2.1.0: 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" + clone-stats@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" @@ -733,20 +779,16 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" -commander@0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-0.6.1.tgz#fa68a14f6a945d54dbbe50d8cdb3320e9e3b1a06" - -commander@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.3.0.tgz#fd430e889832ec353b9acd1de217c11cb3eef873" - -commander@^2.8.1: +commander@2.9.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" +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -763,7 +805,7 @@ 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" -convert-source-map@^1.1.0: +convert-source-map@^1.1.0, convert-source-map@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.4.0.tgz#e3dad195bf61bfe13a7a3c73e9876ec14a0268f3" @@ -775,6 +817,28 @@ 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" +cross-env@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.0.0.tgz#565ccae4d09676441a5087f406fe7661a29c931b" + dependencies: + cross-spawn "^5.1.0" + is-windows "^1.0.0" + +cross-spawn@^4: + version "4.0.2" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + +cross-spawn@^5.1.0: + 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" @@ -826,19 +890,23 @@ dateformat@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17" -debug@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" +debug-log@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" + +debug@2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" dependencies: - ms "0.7.1" + ms "0.7.2" -debug@^2.1.1, debug@^2.2.0: +debug@^2.1.1, debug@^2.2.0, debug@^2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" dependencies: ms "0.7.2" -decamelize@^1.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" @@ -856,6 +924,12 @@ 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" + del@^2.0.2: version "2.2.2" resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" @@ -882,9 +956,9 @@ detect-indent@^4.0.0: dependencies: repeating "^2.0.0" -diff@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" +diff@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" doctrine@^0.7.1: version "0.7.2" @@ -909,6 +983,12 @@ emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" +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.15" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.15.tgz#c330a5934c1ee21284a7c081a86e5fd937c91ea6" @@ -961,11 +1041,7 @@ es6-weak-map@^2.0.1: es6-iterator "^2.0.1" es6-symbol "^3.1.1" -escape-string-regexp@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1" - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@1.0.5, 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" @@ -1143,6 +1219,27 @@ fill-range@^2.1.0: repeat-element "^1.1.2" repeat-string "^1.5.2" +find-cache-dir@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" + dependencies: + commondir "^1.0.1" + mkdirp "^0.5.1" + pkg-dir "^1.0.0" + +find-up@^1.0.0, find-up@^1.1.2: + 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" @@ -1162,6 +1259,13 @@ for-own@^0.1.4: dependencies: for-in "^1.0.1" +foreground-child@^1.3.3, foreground-child@^1.5.3: + version "1.5.6" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9" + dependencies: + cross-spawn "^4" + signal-exit "^3.0.0" + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -1235,6 +1339,10 @@ generic-names@^1.0.1: dependencies: loader-utils "^0.2.16" +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" + getpass@^0.1.1: version "0.1.6" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" @@ -1258,12 +1366,16 @@ glob-to-regexp@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.1.0.tgz#e0369d426578fd456d47dc23b09de05c1da9ea5d" -glob@3.2.11: - version "3.2.11" - resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.11.tgz#4a973f635b9190f715d10987d5c00fd2815ebe3d" +glob@7.1.1, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6: + 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 "0.3" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" glob@^5.0.14: version "5.0.15" @@ -1275,17 +1387,6 @@ glob@^5.0.14: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: - 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" - globals@^8.11.0: version "8.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-8.18.0.tgz#93d4a62bdcac38cfafafc47d6b034768cb0ffcb4" @@ -1311,7 +1412,7 @@ glogg@^1.0.0: dependencies: sparkles "^1.0.0" -graceful-fs@^4.1.2, graceful-fs@^4.1.4: +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" @@ -1363,7 +1464,7 @@ gulplog@^1.0.0: dependencies: glogg "^1.0.0" -handlebars@^4.0.0: +handlebars@^4.0.0, handlebars@^4.0.3: version "4.0.6" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.6.tgz#2ce4484850537f9c97a8026d5399b935c4ed4ed7" dependencies: @@ -1424,6 +1525,10 @@ home-or-tmp@^2.0.0: 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" + http-signature@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" @@ -1436,6 +1541,10 @@ icss-replace-symbols@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.0.2.tgz#cb0b6054eb3af6edc9ab1d62d01933e2d4c8bfa5" +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" @@ -1475,6 +1584,14 @@ invariant@^2.2.0: 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" @@ -1485,6 +1602,12 @@ is-buffer@^1.0.2: 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-dotfile@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" @@ -1574,6 +1697,14 @@ 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" + +is-windows@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.1.tgz#310db70f742d259a16a369202b51af84233310d9" + isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -1582,6 +1713,10 @@ 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" @@ -1592,12 +1727,52 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -jade@0.26.3: - version "0.26.3" - resolved "https://registry.yarnpkg.com/jade/-/jade-0.26.3.tgz#8f10d7977d8d79f2f6ff862a81b0513ccb25686c" +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.7.1: + version "1.7.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.7.1.tgz#169e31bc62c778851a99439dd99c3cc12184d360" dependencies: - commander "0.6.1" - mkdirp "0.3.0" + 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.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" jodid25519@^1.0.0: version "1.0.2" @@ -1646,6 +1821,10 @@ 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" +json3@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" + json5@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" @@ -1677,6 +1856,12 @@ 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" + levn@~0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/levn/-/levn-0.2.5.tgz#ba8d339d0ca4a610e3a3f145b9caf48807155054" @@ -1684,6 +1869,16 @@ levn@~0.2.5: prelude-ls "~1.1.0" type-check "~0.3.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" + 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" + loader-utils@^0.2.16: version "0.2.17" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348" @@ -1693,6 +1888,13 @@ loader-utils@^0.2.16: json5 "^0.5.0" object-assign "^4.0.1" +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._arraycopy@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz#76e7b7c1f1fb92547374878a562ed06a3e50f6e1" @@ -1727,6 +1929,10 @@ lodash._basecopy@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" +lodash._basecreate@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" + lodash._basedifference@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/lodash._basedifference/-/lodash._basedifference-3.0.3.tgz#f2c204296c2a78e02b389081b6edcac933cf629c" @@ -1828,6 +2034,14 @@ lodash.clonedeep@^3.0.1: lodash._baseclone "^3.0.0" lodash._bindcallback "^3.0.0" +lodash.create@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" + dependencies: + lodash._baseassign "^3.0.0" + lodash._basecreate "^3.0.0" + lodash._isiterateecall "^3.0.0" + lodash.escape@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" @@ -1957,11 +2171,30 @@ loose-envify@^1.0.0: dependencies: js-tokens "^3.0.0" -lru-cache@2: - version "2.7.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" +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" + +md5-hex@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-1.3.0.tgz#d2c4afe983c4370662179b8cad145219135046c4" + dependencies: + md5-o-matic "^0.1.1" + +md5-o-matic@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/md5-o-matic/-/md5-o-matic-0.1.1.tgz#822bccd65e117c514fab176b25945d54100a03c3" + +merge-source-map@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/merge-source-map/-/merge-source-map-1.0.3.tgz#da1415f2722a5119db07b14c4f973410863a2abf" + dependencies: + source-map "^0.5.3" -micromatch@^2.1.5: +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: @@ -1989,13 +2222,6 @@ mime-types@^2.1.12, mime-types@~2.1.7: dependencies: mime-db "~1.26.0" -minimatch@0.3: - version "0.3.0" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.3.0.tgz#275d8edaac4f1bb3326472089e7949c8394699dd" - dependencies: - lru-cache "2" - sigmund "~1.0.0" - "minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" @@ -2010,34 +2236,27 @@ minimist@^1.1.0, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -mkdirp@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.3.0.tgz#1bbf5ab1ba827af23575143490426455f481fe1e" - mkdirp@0.5.1, "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" -mocha@^2.3.4: - version "2.5.3" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-2.5.3.tgz#161be5bdeb496771eb9b35745050b622b5aefc58" +mocha@^3.4.2: + version "3.4.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.4.2.tgz#d0ef4d332126dbf18d0d640c9b382dd48be97594" dependencies: - commander "2.3.0" - debug "2.2.0" - diff "1.4.0" - escape-string-regexp "1.0.2" - glob "3.2.11" + browser-stdout "1.3.0" + commander "2.9.0" + debug "2.6.0" + diff "3.2.0" + escape-string-regexp "1.0.5" + glob "7.1.1" growl "1.9.2" - jade "0.26.3" + json3 "3.3.2" + lodash.create "3.1.1" mkdirp "0.5.1" - supports-color "1.2.0" - to-iso-string "0.0.2" - -ms@0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + supports-color "3.1.2" ms@0.7.2: version "0.7.2" @@ -2078,6 +2297,15 @@ nopt@^4.0.1: 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.0.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" @@ -2095,6 +2323,38 @@ 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" +nyc@^10.3.2: + version "10.3.2" + resolved "https://registry.yarnpkg.com/nyc/-/nyc-10.3.2.tgz#f27f4d91f2a9db36c24f574ff5c6efff0233de46" + dependencies: + archy "^1.0.0" + arrify "^1.0.1" + caching-transform "^1.0.0" + convert-source-map "^1.3.0" + debug-log "^1.0.1" + default-require-extensions "^1.0.0" + find-cache-dir "^0.1.1" + find-up "^1.1.2" + foreground-child "^1.5.3" + glob "^7.0.6" + 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" + md5-hex "^1.2.0" + merge-source-map "^1.0.2" + micromatch "^2.3.11" + mkdirp "^0.5.0" + resolve-from "^2.0.0" + rimraf "^2.5.4" + signal-exit "^3.0.1" + spawn-wrap "1.2.4" + test-exclude "^4.1.0" + yargs "^7.1.0" + yargs-parser "^5.0.0" + oauth-sign@~0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" @@ -2142,10 +2402,16 @@ optionator@^0.6.0: type-check "~0.3.1" wordwrap "~0.0.2" -os-homedir@^1.0.0: +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" +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" @@ -2165,6 +2431,16 @@ output-file-sync@^1.1.0: 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" + parse-glob@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" @@ -2174,6 +2450,22 @@ parse-glob@^3.0.4: 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" + +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" @@ -2182,6 +2474,18 @@ 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" @@ -2200,6 +2504,12 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" +pkg-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" + dependencies: + find-up "^1.0.0" + postcss-modules-extract-imports@^1.0.0, postcss-modules-extract-imports@^1.x: version "1.0.1" resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.0.1.tgz#8fb3fef9a6dd0420d3f6d4353cf1ff73f2b2a341" @@ -2260,6 +2570,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" +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" @@ -2284,6 +2598,21 @@ rc@^1.1.7: 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.0 || ^1.1.13", readable-stream@^2.0.2, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2: version "2.2.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.6.tgz#8b43aed76e71483938d12a8d46c6cf1a00b1f816" @@ -2416,6 +2745,18 @@ request@^2.81.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" + +resolve-from@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" + restore-cursor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" @@ -2429,7 +2770,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1: +rimraf@2, rimraf@^2.2.8, rimraf@^2.3.3, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: @@ -2453,11 +2794,11 @@ seekout@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/seekout/-/seekout-1.0.2.tgz#09ba9f1bd5b46fbb134718eb19a68382cbb1b9c9" -semver@^5.3.0: +"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, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -2465,15 +2806,25 @@ 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" +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + dependencies: + 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" + shelljs@^0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.5.3.tgz#c54982b996c76ef0c1e6b59fbdc5825f5b713113" -sigmund@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" +signal-exit@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-2.1.2.tgz#375879b1f92ebc3b334480d038dc546a6d558564" -signal-exit@^3.0.0: +signal-exit@^3.0.0, signal-exit@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -2481,6 +2832,10 @@ slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" +slide@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" + sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" @@ -2499,7 +2854,7 @@ source-map@^0.4.4: dependencies: amdefine ">=0.0.4" -source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.6, source-map@~0.5.1: +source-map@^0.5.0, source-map@^0.5.1, 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" @@ -2507,6 +2862,31 @@ sparkles@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" +spawn-wrap@1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.2.4.tgz#920eb211a769c093eebfbd5b0e7a5d2e68ab2e40" + dependencies: + foreground-child "^1.3.3" + mkdirp "^0.5.0" + os-homedir "^1.0.1" + rimraf "^2.3.3" + signal-exit "^2.0.0" + which "^1.2.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" @@ -2526,7 +2906,7 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" -string-width@^1.0.1: +string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" dependencies: @@ -2548,6 +2928,12 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" +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.2: version "1.0.2" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.2.tgz#5a48ab96023dbac1b7b8d0ffabf6f63f1677be9f" @@ -2560,15 +2946,17 @@ 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@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-1.2.0.tgz#ff1ed1e61169d06b3cf2d588e188b18d8847e17e" +supports-color@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" + dependencies: + has-flag "^1.0.0" supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" -supports-color@^3.2.3: +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: @@ -2595,6 +2983,16 @@ tar@^2.2.1: 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" @@ -2618,10 +3016,6 @@ to-fast-properties@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" -to-iso-string@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/to-iso-string/-/to-iso-string-0.0.2.tgz#4dc19e664dfccbe25bd8db508b00c6da158255d1" - tough-cookie@~2.3.0: version "2.3.2" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" @@ -2704,6 +3098,13 @@ v8flags@^2.0.10: 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" @@ -2724,6 +3125,16 @@ vinyl@^0.5.0: clone-stats "^0.0.1" replace-ext "0.0.1" +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.4, which@^1.2.9: + 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.0" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" @@ -2742,10 +3153,25 @@ wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" +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-file-atomic@^1.1.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.3.4.tgz#f807a4f0b1d9e913ae7a48112e6cc3af1991b45f" + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + slide "^1.1.5" + write@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" @@ -2760,6 +3186,38 @@ 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" + +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" + dependencies: + camelcase "^3.0.0" + +yargs@^7.1.0: + 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" From 79ce653873315b90dc92f1e1dacf28d5f4d098cd Mon Sep 17 00:00:00 2001 From: Jason Kurian Date: Sat, 27 May 2017 13:11:17 -0400 Subject: [PATCH 38/66] chore: adds editorconfig --- .editorconfig | 16 ++++++++++++++++ .nycrc | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7f18d61 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*] + +# Change these settings to your own preference +indent_style = space +indent_size = 2 + +# We recommend you to keep these unchanged +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.nycrc b/.nycrc index f8fd6b0..a88700b 100644 --- a/.nycrc +++ b/.nycrc @@ -4,4 +4,4 @@ ], "sourceMap": false, "instrument": false -} \ No newline at end of file +} From 01062c963ede5001d7fbc315787bc9751bb7a4a8 Mon Sep 17 00:00:00 2001 From: Ziad Saab Date: Thu, 2 Nov 2017 13:08:04 -0400 Subject: [PATCH 39/66] Enable loading CSS from external deps --- src/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index a7ec42f..3361a4c 100644 --- a/src/index.js +++ b/src/index.js @@ -37,7 +37,12 @@ export default function transformCssModules({ types: t }) { try { return require(filePathOrModuleName); } catch (e) { - return {}; // return empty object, this simulates result of ignored stylesheet file + // As a last resort, require the cssFile itself. This enables loading of CSS files from external deps + try { + return require(cssFile); + } catch (e) { + return {}; // return empty object, this simulates result of ignored stylesheet file + } } } From 60114da191ec88d0b87a81f3406867b5245c9218 Mon Sep 17 00:00:00 2001 From: Ziad Saab Date: Thu, 2 Nov 2017 13:12:12 -0400 Subject: [PATCH 40/66] Renamed error param to prevent re-declaration --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 3361a4c..7cac75f 100644 --- a/src/index.js +++ b/src/index.js @@ -40,7 +40,7 @@ export default function transformCssModules({ types: t }) { // As a last resort, require the cssFile itself. This enables loading of CSS files from external deps try { return require(cssFile); - } catch (e) { + } catch (f) { return {}; // return empty object, this simulates result of ignored stylesheet file } } From 38a908c64a1f300215baf5794fc27b65a4eeb4f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasnic=CC=8Ca=CC=81k?= Date: Sun, 12 Nov 2017 10:42:00 +0100 Subject: [PATCH 41/66] Version 1.2.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index aa30f0b..868d7a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "1.2.7", + "version": "1.2.8", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { From e04ad700f7caf645babb11758fda0593eb0acb7b Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Fri, 24 Nov 2017 01:18:31 +1030 Subject: [PATCH 42/66] fix syntax highlighting --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1f9e302..64416fd 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ console.log(styles.someClass); // prints Test__someClass___2Frqu ## Installation -``` +```console npm install --save-dev babel-plugin-css-modules-transform ``` @@ -96,7 +96,7 @@ npm install --save-dev babel-plugin-css-modules-transform When using this plugin with a preprocessor, you'll need to configure it as such: -``` +```js // ./path/to/module-exporting-a-function.js var sass = require('node-sass'); var path = require('path'); @@ -113,7 +113,7 @@ module.exports = function processSass(data, filename) { and then add any relevant extensions to your plugin config: -``` +```js { "plugins": [ [ @@ -142,7 +142,7 @@ instead. To combine all css files in a single file, give its name: -``` +```js { "plugins": [ [ @@ -156,7 +156,7 @@ To combine all css files in a single file, give its name: To extract all files in a single directory, give an object: -``` +```js { "plugins": [ [ From e85242b26629a968a1ca9b9171377c5ebdbd30b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasnic=CC=8Ca=CC=81k?= Date: Sun, 26 Nov 2017 14:57:16 +0100 Subject: [PATCH 43/66] add keepImport option, closes #65 --- README.md | 18 ++++++++++ src/index.js | 51 +++++++++++++++++++++++++--- test/fixtures/keepImport.expected.js | 16 +++++++++ test/fixtures/keepImport.js | 5 +++ test/index.spec.js | 9 +++++ 5 files changed, 95 insertions(+), 4 deletions(-) create mode 100644 test/fixtures/keepImport.expected.js create mode 100644 test/fixtures/keepImport.js diff --git a/README.md b/README.md index 64416fd..d648283 100644 --- a/README.md +++ b/README.md @@ -175,6 +175,24 @@ To extract all files in a single directory, give an object: Note that `relativeRoot` is used to resolve relative directory names, available as `[path]` in `filename` pattern. +## Keeping import + +To keep import statements you should set option `keepImport` to *true*. In this way, simultaneously with the converted values, the import will be described as unassigned call expression. + +```js +// before +const styles = require('./test.css'); +``` + +```js +// after +require('./test.css'); + +const styles = { + 'someClass': 'Test__someClass___2Frqu' +} +``` + ## Alternatives - [babel-plugin-transform-postcss](https://github.com/wbyoung/babel-plugin-transform-postcss) - which supports async plugins and does not depend on `css-modules-require-hook`. diff --git a/src/index.js b/src/index.js index 7cac75f..8715003 100644 --- a/src/index.js +++ b/src/index.js @@ -10,6 +10,21 @@ const defaultOptions = { generateScopedName: '[name]__[local]___[hash:base64:5]' }; +function findExpressionStatementChild(path, t) { + const parent = path.parentPath; + if (!parent) { + throw new Error('Invalid expression structure'); + } + if ( + t.isExpressionStatement(parent) + || t.isProgram(parent) + || t.isBlockStatement(parent) + ) { + return path; + } + return findExpressionStatementChild(parent, t); +} + export default function transformCssModules({ types: t }) { function resolveModulePath(filename) { const dir = dirname(filename); @@ -91,6 +106,7 @@ export default function transformCssModules({ types: t }) { const currentConfig = { ...defaultOptions, ...thisPluginOptions }; // this is not a css-require-ook config delete currentConfig.extractCss; + delete currentConfig.keepImport; // match file extensions, speeds up transform by creating one // RegExp ahead of execution time @@ -154,14 +170,29 @@ export default function transformCssModules({ types: t }) { const requiringFile = file.opts.filename; const tokens = requireCssFile(requiringFile, value); - path.parentPath.replaceWith( - t.variableDeclaration('var', [ + const varDeclaration = t.variableDeclaration( + 'var', + [ t.variableDeclarator( t.identifier(path.node.local.name), buildClassNameToScopeNameMap(tokens) ) - ]), + ] ); + + if (thisPluginOptions.keepImport === true) { + path.parentPath.replaceWithMultiple([ + t.expressionStatement( + t.callExpression( + t.identifier('require'), + [t.stringLiteral(value)] + ) + ), + varDeclaration + ]); + } else { + path.parentPath.replaceWith(varDeclaration); + } } }, @@ -183,7 +214,19 @@ export default function transformCssModules({ types: t }) { // Otherwise remove require from file, we just want to get generated css for our output if (!t.isExpressionStatement(path.parent)) { path.replaceWith(buildClassNameToScopeNameMap(tokens)); - } else { + + // Keeped import will places before closest expression statement child + if (thisPluginOptions.keepImport === true) { + findExpressionStatementChild(path, t).insertBefore( + t.expressionStatement( + t.callExpression( + t.identifier('require'), + [t.stringLiteral(stylesheetPath)] + ) + ) + ); + } + } else if (thisPluginOptions.keepImport !== true) { path.remove(); } } diff --git a/test/fixtures/keepImport.expected.js b/test/fixtures/keepImport.expected.js new file mode 100644 index 0000000..a1c7bd5 --- /dev/null +++ b/test/fixtures/keepImport.expected.js @@ -0,0 +1,16 @@ +'use strict'; + +require('../styles.css'); + +var css = { + 'className': 'styles__className___385m0 parent__block___33Sxl child__line___3fweh' +}; + +require('../extensions.scss'); + +var scss = { + 'sassy': 'extensions__sassy___12Yag' +}; +require('../extensions.scss'); +var foo = require('something-that-has-css-somewhere-in-the-name'); +var bar = require('something-that-has-scss-somewhere-in-the-name'); diff --git a/test/fixtures/keepImport.js b/test/fixtures/keepImport.js new file mode 100644 index 0000000..ce6e3d2 --- /dev/null +++ b/test/fixtures/keepImport.js @@ -0,0 +1,5 @@ +import css from '../styles.css'; +var scss = require('../extensions.scss'); +require('../extensions.scss'); +var foo = require('something-that-has-css-somewhere-in-the-name'); +var bar = require('something-that-has-scss-somewhere-in-the-name'); diff --git a/test/index.spec.js b/test/index.spec.js index 03f4b98..a312608 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -292,4 +292,13 @@ describe('babel-plugin-css-modules-transform', () => { 'styles.css' ]); }); + + describe('keepImport option', () => { + it('keeps requires/imports', () => { + expect(transform('fixtures/keepImport.js', { + keepImport: true, + extensions: ['.scss', '.css'] + }).code).to.be.equal(readExpected('fixtures/keepImport.expected.js')); + }); + }); }); From c12296578d483aa01e95885a339902aa3ec5de54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasnic=CC=8Ca=CC=81k?= Date: Sun, 26 Nov 2017 14:59:52 +0100 Subject: [PATCH 44/66] Version 1.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 868d7a5..f305d19 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "1.2.8", + "version": "1.3.0", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { From a427c163ed3b096c69ef3c5291d7f80ba0617e6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Fri, 1 Dec 2017 19:59:00 +0100 Subject: [PATCH 45/66] fix bug when plugin is used without options --- src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 8715003..98bd11b 100644 --- a/src/index.js +++ b/src/index.js @@ -180,7 +180,7 @@ export default function transformCssModules({ types: t }) { ] ); - if (thisPluginOptions.keepImport === true) { + if (thisPluginOptions && thisPluginOptions.keepImport === true) { path.parentPath.replaceWithMultiple([ t.expressionStatement( t.callExpression( @@ -216,7 +216,7 @@ export default function transformCssModules({ types: t }) { path.replaceWith(buildClassNameToScopeNameMap(tokens)); // Keeped import will places before closest expression statement child - if (thisPluginOptions.keepImport === true) { + if (thisPluginOptions && thisPluginOptions.keepImport === true) { findExpressionStatementChild(path, t).insertBefore( t.expressionStatement( t.callExpression( @@ -226,7 +226,7 @@ export default function transformCssModules({ types: t }) { ) ); } - } else if (thisPluginOptions.keepImport !== true) { + } else if (!thisPluginOptions || thisPluginOptions.keepImport !== true) { path.remove(); } } From 64f1f5e33e40b43f76e3cbdcaec1465864446798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Fri, 1 Dec 2017 19:59:30 +0100 Subject: [PATCH 46/66] Version 1.3.1 --- package.json | 2 +- test/index.spec.js | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f305d19..560a081 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "1.3.0", + "version": "1.3.1", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { diff --git a/test/index.spec.js b/test/index.spec.js index a312608..9a4eb33 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -301,4 +301,28 @@ describe('babel-plugin-css-modules-transform', () => { }).code).to.be.equal(readExpected('fixtures/keepImport.expected.js')); }); }); + + describe('calling without options', () => { + it('keeps requires/imports', () => { + delete require.cache[resolve(__dirname, '../src/index.js')]; + const babel = require('babel-core'); + const result = babel.transformFileSync(resolve(__dirname, 'fixtures/import.js'), { + babelrc: false, + plugins: [ + 'transform-es2015-block-scoping', + 'transform-strict-mode', + 'transform-es2015-parameters', + 'transform-es2015-destructuring', + 'transform-object-rest-spread', + 'transform-es2015-spread', + 'transform-export-extensions', + '../../src/index.js' + ] + }); + + expect(result.code).to.be.equal( + readExpected('fixtures/import.expected.js') + ); + }); + }); }); From 26d8cc5927552e751cb9b68a228bbc1830adaabb Mon Sep 17 00:00:00 2001 From: kovenliao Date: Wed, 20 Dec 2017 10:24:02 +0800 Subject: [PATCH 47/66] support babel 7 --- src/index.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 98bd11b..abbbb71 100644 --- a/src/index.js +++ b/src/index.js @@ -99,9 +99,15 @@ export default function transformCssModules({ types: t }) { // find options for this plugin // we have to use this hack because plugin.key does not have to be 'css-modules-transform' // so we will identify it by comparing manipulateOptions - thisPluginOptions = options.plugins.filter( - ([plugin]) => plugin.manipulateOptions === pluginApi.manipulateOptions - )[0][1]; + if (Array.isArray(options.plugins[0])) { // babel 6 + thisPluginOptions = options.plugins.filter( + ([plugin]) => plugin.manipulateOptions === pluginApi.manipulateOptions + )[0][1]; + } else { // babel 7 + thisPluginOptions = options.plugins.filter( + (plugin) => plugin.manipulateOptions === pluginApi.manipulateOptions + )[0].options; + } const currentConfig = { ...defaultOptions, ...thisPluginOptions }; // this is not a css-require-ook config From 2c5cdc6c2ea407a789d4cb0b5fe69a105a611b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Sat, 6 Jan 2018 11:47:26 +0100 Subject: [PATCH 48/66] use babel-preset-env instead of plugins, update istanbul plugin and fix fixtures for babel 6 --- .babelrc | 12 +- .nycrc | 2 +- circle.yml | 5 +- package.json | 18 +- test/fixtures/require.expected.js | 2 +- test/fixtures/require.ignored.expected.js | 2 +- test/index.spec.js | 27 +- test/mocha.opts | 2 +- yarn.lock | 795 +++++++++++++--------- 9 files changed, 503 insertions(+), 362 deletions(-) diff --git a/.babelrc b/.babelrc index 27a84b0..0eca355 100644 --- a/.babelrc +++ b/.babelrc @@ -1,13 +1,9 @@ { - "presets": ["es2015"], + "presets": [ + ["env", { "targets": { "node": "6.12" }}] + ], "plugins": [ - "transform-strict-mode", - "transform-es2015-parameters", - "transform-es2015-destructuring", - "transform-es2015-modules-commonjs", - "transform-object-rest-spread", - "transform-es2015-spread", - "transform-export-extensions" + "transform-object-rest-spread" ], "env": { "test": { diff --git a/.nycrc b/.nycrc index a88700b..d8d9c14 100644 --- a/.nycrc +++ b/.nycrc @@ -1,6 +1,6 @@ { "require": [ - "babel-core/register" + "babel-register" ], "sourceMap": false, "instrument": false diff --git a/circle.yml b/circle.yml index 36c91c7..d1d73c4 100644 --- a/circle.yml +++ b/circle.yml @@ -2,7 +2,7 @@ machine: environment: PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" node: - version: 6.1.0 + version: 6.12.3 dependencies: cache_directories: @@ -15,3 +15,6 @@ dependencies: test: override: - yarn test + # test with babel 7 + - yarn add -D babel-cli@^7.0.0-beta.3 babel-core@^7.0.0-beta.3 babel-register@^7.0.0-beta.3 babel-preset-env@^7.0.0-beta.3 @babel/core babel-plugin-transform-object-rest-spread@^7.0.0-beta.3 gulp-babel@7.0.0 + - yarn test diff --git a/package.json b/package.json index 560a081..40e9abc 100644 --- a/package.json +++ b/package.json @@ -30,24 +30,18 @@ "mkdirp": "^0.5.1" }, "devDependencies": { - "babel-cli": "^6.22.2", - "babel-core": "^6.22.1", + "babel-cli": "^6.26.0", + "babel-core": "^6.26.0", "babel-eslint": "^7.1.1", "babel-plugin-istanbul": "^4.1.3", - "babel-plugin-transform-es2015-block-scoping": "^6.22.0", - "babel-plugin-transform-es2015-destructuring": "^6.22.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.22.0", - "babel-plugin-transform-es2015-parameters": "^6.22.0", - "babel-plugin-transform-es2015-spread": "^6.22.0", - "babel-plugin-transform-export-extensions": "^6.22.0", - "babel-plugin-transform-object-rest-spread": "^6.22.0", - "babel-plugin-transform-strict-mode": "^6.22.0", - "babel-preset-es2015": "^6.22.0", + "babel-plugin-transform-object-rest-spread": "^6.26.0", + "babel-preset-env": "^1.6.1", + "babel-register": "^6.26.0", "chai": "^3.4.1", "cross-env": "^5.0.0", "eslint": "^1.9.0", "eslint-config-airbnb-lite": "^1.0.0", - "gulp-babel": "^6.1.2", + "gulp-babel": "7.0.0", "gulp-util": "^3.0.7", "mocha": "^3.4.2", "nyc": "^10.3.2", diff --git a/test/fixtures/require.expected.js b/test/fixtures/require.expected.js index ed2526a..1cd2538 100644 --- a/test/fixtures/require.expected.js +++ b/test/fixtures/require.expected.js @@ -1,5 +1,5 @@ 'use strict'; -var styles = { +const styles = { 'className': 'styles__className___385m0 parent__block___33Sxl child__line___3fweh' }; diff --git a/test/fixtures/require.ignored.expected.js b/test/fixtures/require.ignored.expected.js index 4e9922c..4ed132b 100644 --- a/test/fixtures/require.ignored.expected.js +++ b/test/fixtures/require.ignored.expected.js @@ -1,3 +1,3 @@ 'use strict'; -var styles = {}; +const styles = {}; diff --git a/test/index.spec.js b/test/index.spec.js index 9a4eb33..11b68b2 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -13,15 +13,10 @@ describe('babel-plugin-css-modules-transform', () => { return babel.transformFileSync(resolve(__dirname, path), { babelrc: false, + presets: [['env', { targets: { node: '6.12'} }]], plugins: [ - 'transform-es2015-block-scoping', - 'transform-strict-mode', - 'transform-es2015-parameters', - 'transform-es2015-destructuring', 'transform-object-rest-spread', - 'transform-es2015-spread', - 'transform-export-extensions', - ['../../src/index.js', configuration] + ['@babel/../../src/index.js', configuration] ] }); } @@ -34,15 +29,10 @@ describe('babel-plugin-css-modules-transform', () => { if (configuration && !('devMode' in configuration)) configuration.devMode = true; return gulpBabel({ + presets: [['env', { targets: { node: '6.12'} }]], plugins: [ - 'transform-es2015-block-scoping', - 'transform-strict-mode', - 'transform-es2015-parameters', - 'transform-es2015-destructuring', 'transform-object-rest-spread', - 'transform-es2015-spread', - 'transform-export-extensions', - ['../../src/index.js', configuration] + ['@babel/../../src/index.js', configuration] ] }); } @@ -308,15 +298,10 @@ describe('babel-plugin-css-modules-transform', () => { const babel = require('babel-core'); const result = babel.transformFileSync(resolve(__dirname, 'fixtures/import.js'), { babelrc: false, + presets: [['env', { targets: { node: '6.12'} }]], plugins: [ - 'transform-es2015-block-scoping', - 'transform-strict-mode', - 'transform-es2015-parameters', - 'transform-es2015-destructuring', 'transform-object-rest-spread', - 'transform-es2015-spread', - 'transform-export-extensions', - '../../src/index.js' + '@babel/../../src/index.js' ] }); diff --git a/test/mocha.opts b/test/mocha.opts index c3c49c8..2750eb4 100644 --- a/test/mocha.opts +++ b/test/mocha.opts @@ -1,2 +1,2 @@ ---compilers js:babel-core/register +--compilers js:babel-register test/**/*.spec.js diff --git a/yarn.lock b/yarn.lock index 142f2fa..4ab017f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -78,8 +78,8 @@ arr-diff@^2.0.0: arr-flatten "^1.0.1" arr-flatten@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" array-differ@^1.0.0: version "1.0.0" @@ -139,58 +139,58 @@ aws4@^1.2.1: version "1.6.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" -babel-cli@^6.22.2: - version "6.24.0" - resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.24.0.tgz#a05ffd210dca0c288a26d5319c5ac8669a265ad0" +babel-cli@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.26.0.tgz#502ab54874d7db88ad00b887a06383ce03d002f1" dependencies: - babel-core "^6.24.0" - babel-polyfill "^6.23.0" - babel-register "^6.24.0" - babel-runtime "^6.22.0" - commander "^2.8.1" - convert-source-map "^1.1.0" + babel-core "^6.26.0" + babel-polyfill "^6.26.0" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + commander "^2.11.0" + convert-source-map "^1.5.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" + glob "^7.1.2" + lodash "^4.17.4" + output-file-sync "^1.1.2" + path-is-absolute "^1.0.1" slash "^1.0.0" - source-map "^0.5.0" - v8flags "^2.0.10" + source-map "^0.5.6" + v8flags "^2.1.1" optionalDependencies: chokidar "^1.6.1" -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" +babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: - chalk "^1.1.0" + chalk "^1.1.3" esutils "^2.0.2" - js-tokens "^3.0.0" + js-tokens "^3.0.2" -babel-core@^6.0.2, babel-core@^6.22.1, babel-core@^6.24.0: - version "6.24.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.24.0.tgz#8f36a0a77f5c155aed6f920b844d23ba56742a02" +babel-core@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" dependencies: - babel-code-frame "^6.22.0" - babel-generator "^6.24.0" - babel-helpers "^6.23.0" + babel-code-frame "^6.26.0" + babel-generator "^6.26.0" + babel-helpers "^6.24.1" babel-messages "^6.23.0" - babel-register "^6.24.0" - babel-runtime "^6.22.0" - babel-template "^6.23.0" - babel-traverse "^6.23.1" - babel-types "^6.23.0" - 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" + babel-register "^6.26.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + convert-source-map "^1.5.0" + debug "^2.6.8" + json5 "^0.5.1" + lodash "^4.17.4" + minimatch "^3.0.4" + path-is-absolute "^1.0.1" + private "^0.1.7" slash "^1.0.0" - source-map "^0.5.0" + source-map "^0.5.6" babel-eslint@^7.1.1: version "7.2.0" @@ -202,93 +202,119 @@ babel-eslint@^7.1.1: babylon "^6.16.1" lodash "^4.17.4" -babel-generator@^6.18.0, babel-generator@^6.24.0: - version "6.24.0" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.24.0.tgz#eba270a8cc4ce6e09a61be43465d7c62c1f87c56" +babel-generator@^6.18.0, babel-generator@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" dependencies: babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-types "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" detect-indent "^4.0.0" jsesc "^1.3.0" - lodash "^4.2.0" - source-map "^0.5.0" + lodash "^4.17.4" + source-map "^0.5.6" trim-right "^1.0.1" -babel-helper-call-delegate@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.22.0.tgz#119921b56120f17e9dae3f74b4f5cc7bcc1b37ef" +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-hoist-variables "^6.22.0" + babel-helper-explode-assignable-expression "^6.24.1" babel-runtime "^6.22.0" - babel-traverse "^6.22.0" - babel-types "^6.22.0" + babel-types "^6.24.1" -babel-helper-define-map@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.23.0.tgz#1444f960c9691d69a2ced6a205315f8fd00804e7" +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-function-name "^6.23.0" + babel-helper-hoist-variables "^6.24.1" babel-runtime "^6.22.0" - babel-types "^6.23.0" - lodash "^4.2.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" -babel-helper-function-name@^6.22.0, babel-helper-function-name@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.23.0.tgz#25742d67175c8903dbe4b6cb9d9e1fcb8dcf23a6" +babel-helper-define-map@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" + dependencies: + babel-helper-function-name "^6.24.1" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +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-helper-get-function-arity "^6.22.0" babel-runtime "^6.22.0" - babel-template "^6.23.0" - babel-traverse "^6.23.0" - babel-types "^6.23.0" + babel-traverse "^6.24.1" + babel-types "^6.24.1" -babel-helper-get-function-arity@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.22.0.tgz#0beb464ad69dc7347410ac6ade9f03a50634f5ce" +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-types "^6.22.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" -babel-helper-hoist-variables@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.22.0.tgz#3eacbf731d80705845dd2e9718f600cfb9b4ba72" +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.22.0" + babel-types "^6.24.1" -babel-helper-optimise-call-expression@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.23.0.tgz#f3ee7eed355b4282138b33d02b78369e470622f5" +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.23.0" + babel-types "^6.24.1" -babel-helper-regex@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.22.0.tgz#79f532be1647b1f0ee3474b5f5c3da58001d247d" +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.22.0" - lodash "^4.2.0" + babel-types "^6.24.1" -babel-helper-replace-supers@^6.22.0, babel-helper-replace-supers@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.23.0.tgz#eeaf8ad9b58ec4337ca94223bacdca1f8d9b4bfd" +babel-helper-regex@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" dependencies: - babel-helper-optimise-call-expression "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" + +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.23.0" - babel-traverse "^6.23.0" - babel-types "^6.23.0" + babel-template "^6.24.1" + babel-traverse "^6.24.1" + babel-types "^6.24.1" -babel-helpers@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.23.0.tgz#4f8f2e092d0b6a8808a4bde79c27f1e2ecf0d992" +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.23.0" + babel-template "^6.24.1" babel-messages@^6.23.0: version "6.23.0" @@ -303,21 +329,37 @@ babel-plugin-check-es2015-constants@^6.22.0: babel-runtime "^6.22.0" babel-plugin-istanbul@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.3.tgz#6ee6280410dcf59c7747518c3dfd98680958f102" + version "4.1.5" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e" dependencies: find-up "^2.1.0" - istanbul-lib-instrument "^1.7.1" - test-exclude "^4.1.0" + istanbul-lib-instrument "^1.7.5" + test-exclude "^4.1.1" -babel-plugin-syntax-export-extensions@^6.8.0: +babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721" + 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-object-rest-spread@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" +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" @@ -330,63 +372,63 @@ babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-block-scoping@^6.22.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.23.0.tgz#e48895cf0b375be148cd7c8879b422707a053b51" +babel-plugin-transform-es2015-block-scoping@^6.23.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" dependencies: - babel-runtime "^6.22.0" - babel-template "^6.23.0" - babel-traverse "^6.23.0" - babel-types "^6.23.0" - lodash "^4.2.0" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + lodash "^4.17.4" -babel-plugin-transform-es2015-classes@^6.22.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.23.0.tgz#49b53f326202a2fd1b3bbaa5e2edd8a4f78643c1" +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.23.0" - babel-helper-function-name "^6.23.0" - babel-helper-optimise-call-expression "^6.23.0" - babel-helper-replace-supers "^6.23.0" + 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.23.0" - babel-traverse "^6.23.0" - babel-types "^6.23.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.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.22.0.tgz#7c383e9629bba4820c11b0425bdd6290f7f057e7" + 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.22.0" + babel-template "^6.24.1" -babel-plugin-transform-es2015-destructuring@^6.22.0: +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.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.22.0.tgz#672397031c21610d72dd2bbb0ba9fb6277e1c36b" + 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.22.0" + babel-types "^6.24.1" -babel-plugin-transform-es2015-for-of@^6.22.0: +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.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.22.0.tgz#f5fcc8b09093f9a23c76ac3d9e392c3ec4b77104" + 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.22.0" + babel-helper-function-name "^6.24.1" babel-runtime "^6.22.0" - babel-types "^6.22.0" + babel-types "^6.24.1" babel-plugin-transform-es2015-literals@^6.22.0: version "6.22.0" @@ -394,63 +436,63 @@ babel-plugin-transform-es2015-literals@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-modules-amd@^6.24.0: - version "6.24.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.0.tgz#a1911fb9b7ec7e05a43a63c5995007557bcf6a2e" +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.0" + babel-plugin-transform-es2015-modules-commonjs "^6.24.1" babel-runtime "^6.22.0" - babel-template "^6.22.0" + babel-template "^6.24.1" -babel-plugin-transform-es2015-modules-commonjs@^6.22.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.0: - version "6.24.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.0.tgz#e921aefb72c2cc26cb03d107626156413222134f" +babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz#0d8394029b7dc6abe1a97ef181e00758dd2e5d8a" dependencies: - babel-plugin-transform-strict-mode "^6.22.0" - babel-runtime "^6.22.0" - babel-template "^6.23.0" - babel-types "^6.23.0" + babel-plugin-transform-strict-mode "^6.24.1" + babel-runtime "^6.26.0" + babel-template "^6.26.0" + babel-types "^6.26.0" -babel-plugin-transform-es2015-modules-systemjs@^6.22.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.23.0.tgz#ae3469227ffac39b0310d90fec73bfdc4f6317b0" +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.22.0" + babel-helper-hoist-variables "^6.24.1" babel-runtime "^6.22.0" - babel-template "^6.23.0" + babel-template "^6.24.1" -babel-plugin-transform-es2015-modules-umd@^6.24.0: - version "6.24.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.0.tgz#fd5fa63521cae8d273927c3958afd7c067733450" +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.0" + babel-plugin-transform-es2015-modules-amd "^6.24.1" babel-runtime "^6.22.0" - babel-template "^6.23.0" + babel-template "^6.24.1" babel-plugin-transform-es2015-object-super@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.22.0.tgz#daa60e114a042ea769dd53fe528fc82311eb98fc" + 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.22.0" + babel-helper-replace-supers "^6.24.1" babel-runtime "^6.22.0" -babel-plugin-transform-es2015-parameters@^6.22.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.23.0.tgz#3a2aabb70c8af945d5ce386f1a4250625a83ae3b" +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.22.0" - babel-helper-get-function-arity "^6.22.0" + babel-helper-call-delegate "^6.24.1" + babel-helper-get-function-arity "^6.24.1" babel-runtime "^6.22.0" - babel-template "^6.23.0" - babel-traverse "^6.23.0" - babel-types "^6.23.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.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.22.0.tgz#8ba776e0affaa60bff21e921403b8a652a2ff723" + 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.22.0" + babel-types "^6.24.1" babel-plugin-transform-es2015-spread@^6.22.0: version "6.22.0" @@ -459,12 +501,12 @@ babel-plugin-transform-es2015-spread@^6.22.0: babel-runtime "^6.22.0" babel-plugin-transform-es2015-sticky-regex@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.22.0.tgz#ab316829e866ee3f4b9eb96939757d19a5bc4593" + 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.22.0" + babel-helper-regex "^6.24.1" babel-runtime "^6.22.0" - babel-types "^6.22.0" + babel-types "^6.24.1" babel-plugin-transform-es2015-template-literals@^6.22.0: version "6.22.0" @@ -472,114 +514,135 @@ babel-plugin-transform-es2015-template-literals@^6.22.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-transform-es2015-typeof-symbol@^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.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.22.0.tgz#8d9cc27e7ee1decfe65454fb986452a04a613d20" + 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.22.0" + babel-helper-regex "^6.24.1" babel-runtime "^6.22.0" regexpu-core "^2.0.0" -babel-plugin-transform-export-extensions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653" +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-plugin-syntax-export-extensions "^6.8.0" + 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-object-rest-spread@^6.22.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.23.0.tgz#875d6bc9be761c58a2ae3feee5dc4895d8c7f921" +babel-plugin-transform-object-rest-spread@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06" dependencies: babel-plugin-syntax-object-rest-spread "^6.8.0" - babel-runtime "^6.22.0" + babel-runtime "^6.26.0" babel-plugin-transform-regenerator@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.22.0.tgz#65740593a319c44522157538d690b84094617ea6" + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" dependencies: - regenerator-transform "0.9.8" + regenerator-transform "^0.10.0" -babel-plugin-transform-strict-mode@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.22.0.tgz#e008df01340fdc87e959da65991b7e05970c8c7c" +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.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" +babel-polyfill@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" dependencies: - babel-runtime "^6.22.0" - core-js "^2.4.0" - regenerator-runtime "^0.10.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" + regenerator-runtime "^0.10.5" -babel-preset-es2015@^6.22.0: - version "6.24.0" - resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.0.tgz#c162d68b1932696e036cd3110dc1ccd303d2673a" +babel-preset-env@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48" 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.22.0" - babel-plugin-transform-es2015-classes "^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.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.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.24.0" - babel-plugin-transform-es2015-modules-commonjs "^6.24.0" - babel-plugin-transform-es2015-modules-systemjs "^6.22.0" - babel-plugin-transform-es2015-modules-umd "^6.24.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.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.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-register@^6.24.0: - version "6.24.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.24.0.tgz#5e89f8463ba9970356d02eb07dabe3308b080cfd" +babel-register@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" dependencies: - babel-core "^6.24.0" - babel-runtime "^6.22.0" - core-js "^2.4.0" + babel-core "^6.26.0" + babel-runtime "^6.26.0" + core-js "^2.5.0" home-or-tmp "^2.0.0" - lodash "^4.2.0" + lodash "^4.17.4" mkdirp "^0.5.1" - source-map-support "^0.4.2" + source-map-support "^0.4.15" -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" +babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" dependencies: core-js "^2.4.0" - regenerator-runtime "^0.10.0" + regenerator-runtime "^0.11.0" -babel-template@^6.16.0, babel-template@^6.22.0, babel-template@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.23.0.tgz#04d4f270adbb3aa704a8143ae26faa529238e638" +babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.23.0" - babel-types "^6.23.0" - babylon "^6.11.0" - lodash "^4.2.0" + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" -babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-traverse@^6.23.0, babel-traverse@^6.23.1: +babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-traverse@^6.23.1: version "6.23.1" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48" dependencies: @@ -593,16 +656,20 @@ babel-traverse@^6.18.0, babel-traverse@^6.22.0, babel-traverse@^6.23.0, babel-tr invariant "^2.2.0" lodash "^4.2.0" -babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.22.0, babel-types@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.23.0.tgz#bb17179d7538bad38cd0c9e115d340f77e7e9acf" +babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" dependencies: - babel-runtime "^6.22.0" + babel-runtime "^6.26.0" esutils "^2.0.2" - lodash "^4.2.0" - to-fast-properties "^1.0.1" + lodash "^4.17.4" + to-fast-properties "^1.0.3" -babylon@^6.11.0, babylon@^6.13.0, babylon@^6.15.0, babylon@^6.16.1: +babylon@^6.15.0, babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + +babylon@^6.16.1: version "6.16.1" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3" @@ -610,6 +677,10 @@ 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.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + bcrypt-pbkdf@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" @@ -647,6 +718,13 @@ brace-expansion@^1.0.0: balanced-match "^0.4.1" concat-map "0.0.1" +brace-expansion@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + dependencies: + balanced-match "^1.0.0" + 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" @@ -659,6 +737,13 @@ browser-stdout@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" +browserslist@^2.1.2: + version "2.11.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.11.0.tgz#50350d6873a82ebe0f3ae5483658c571ae5f9d7d" + dependencies: + caniuse-lite "^1.0.30000784" + electron-to-chromium "^1.3.30" + buffer-shims@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" @@ -683,6 +768,10 @@ camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" +caniuse-lite@^1.0.30000784: + version "1.0.30000787" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000787.tgz#a76c4fa1d6ac00640447ec83c1e7c6b33dd615c5" + caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -702,7 +791,7 @@ chai@^3.4.1: deep-eql "^0.1.3" type-detect "^1.0.0" -chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.0.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: @@ -779,12 +868,16 @@ combined-stream@^1.0.5, combined-stream@~1.0.5: dependencies: delayed-stream "~1.0.0" -commander@2.9.0, 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: graceful-readlink ">= 1.0.0" +commander@^2.11.0: + version "2.12.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555" + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -805,13 +898,17 @@ 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" -convert-source-map@^1.1.0, convert-source-map@^1.3.0: +convert-source-map@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.4.0.tgz#e3dad195bf61bfe13a7a3c73e9876ec14a0268f3" -core-js@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" +convert-source-map@^1.5.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" + +core-js@^2.4.0, core-js@^2.5.0: + version "2.5.3" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" core-util-is@~1.0.0: version "1.0.2" @@ -900,12 +997,18 @@ debug@2.6.0: dependencies: ms "0.7.2" -debug@^2.1.1, debug@^2.2.0, debug@^2.6.3: +debug@^2.1.1, debug@^2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" dependencies: ms "0.7.2" +debug@^2.2.0, debug@^2.6.8: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + 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" @@ -979,6 +1082,16 @@ ecc-jsbn@~0.1.1: dependencies: jsbn "~0.1.0" +electron-releases@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/electron-releases/-/electron-releases-2.1.0.tgz#c5614bf811f176ce3c836e368a0625782341fd4e" + +electron-to-chromium@^1.3.30: + version "1.3.30" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.30.tgz#9666f532a64586651fc56a72513692e820d06a80" + dependencies: + electron-releases "^2.1.0" + emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" @@ -1206,8 +1319,8 @@ file-entry-cache@^1.1.1: object-assign "^4.0.1" filename-regex@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" fill-range@^2.1.0: version "2.2.3" @@ -1366,7 +1479,7 @@ glob-to-regexp@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.1.0.tgz#e0369d426578fd456d47dc23b09de05c1da9ea5d" -glob@7.1.1, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6: +glob@7.1.1, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6: version "7.1.1" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" dependencies: @@ -1387,13 +1500,24 @@ glob@^5.0.14: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.2: + 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@^8.11.0: version "8.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-8.18.0.tgz#93d4a62bdcac38cfafafc47d6b034768cb0ffcb4" -globals@^9.0.0: - version "9.16.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.16.0.tgz#63e903658171ec2d9f51b1d31de5e2b8dc01fb80" +globals@^9.0.0, globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" globby@^5.0.0: version "5.0.0" @@ -1424,13 +1548,11 @@ growl@1.9.2: version "1.9.2" resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" -gulp-babel@^6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/gulp-babel/-/gulp-babel-6.1.2.tgz#7c0176e4ba3f244c60588a0c4b320a45d1adefce" +gulp-babel@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/gulp-babel/-/gulp-babel-7.0.0.tgz#7b93c975159f7a0553e4263b4a55100ccc239b28" dependencies: - babel-core "^6.0.2" gulp-util "^3.0.0" - object-assign "^4.0.1" replace-ext "0.0.1" through2 "^2.0.0" vinyl-sourcemaps-apply "^0.2.0" @@ -1526,8 +1648,8 @@ home-or-tmp@^2.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" + version "2.5.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" http-signature@~1.1.0: version "1.1.1" @@ -1578,7 +1700,7 @@ inquirer@^0.11.0: strip-ansi "^3.0.0" through "^2.3.6" -invariant@^2.2.0: +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: @@ -1598,9 +1720,9 @@ is-binary-path@^1.0.0: dependencies: binary-extensions "^1.0.0" -is-buffer@^1.0.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" is-builtin-module@^1.0.0: version "1.0.0" @@ -1609,8 +1731,8 @@ is-builtin-module@^1.0.0: builtin-modules "^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" + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" is-equal-shallow@^0.1.3: version "0.1.3" @@ -1653,12 +1775,18 @@ is-my-json-valid@^2.10.0: jsonpointer "^4.0.0" xtend "^4.0.0" -is-number@^2.0.2, is-number@^2.1.0: +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-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + 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" @@ -1727,9 +1855,9 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" -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-coverage@^1.1.0, istanbul-lib-coverage@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" istanbul-lib-hook@^1.0.6: version "1.0.6" @@ -1737,16 +1865,16 @@ istanbul-lib-hook@^1.0.6: dependencies: append-transform "^0.4.0" -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" +istanbul-lib-instrument@^1.7.1, istanbul-lib-instrument@^1.7.5: + version "1.9.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz#250b30b3531e5d3251299fdd64b0b2c9db6b558e" 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" + babylon "^6.18.0" + istanbul-lib-coverage "^1.1.1" semver "^5.3.0" istanbul-lib-report@^1.1.0: @@ -1784,9 +1912,9 @@ js-base64@^2.1.9: version "2.1.9" resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" -js-tokens@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" +js-tokens@^3.0.0, js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" js-yaml@3.4.5: version "3.4.5" @@ -1825,7 +1953,7 @@ json3@3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" -json5@^0.5.0: +json5@^0.5.0, json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" @@ -1847,10 +1975,16 @@ jsprim@^1.2.2: verror "1.3.6" kind-of@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" dependencies: - is-buffer "^1.0.2" + is-buffer "^1.1.5" lazy-cache@^1.0.3: version "1.0.4" @@ -2228,6 +2362,12 @@ mime-types@^2.1.12, mime-types@~2.1.7: dependencies: brace-expansion "^1.0.0" +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" @@ -2262,6 +2402,10 @@ ms@0.7.2: version "0.7.2" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + multipipe@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" @@ -2298,8 +2442,8 @@ nopt@^4.0.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" + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" dependencies: hosted-git-info "^2.1.4" is-builtin-module "^1.0.0" @@ -2307,8 +2451,10 @@ normalize-package-data@^2.3.2: validate-npm-package-license "^3.0.1" normalize-path@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" + 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.0.2" @@ -2423,7 +2569,7 @@ osenv@^0.1.4: os-homedir "^1.0.0" os-tmpdir "^1.0.0" -output-file-sync@^1.1.0: +output-file-sync@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-1.1.2.tgz#d0a33eefe61a205facb90092e826598d5245ce76" dependencies: @@ -2432,8 +2578,10 @@ output-file-sync@^1.1.0: 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" + version "1.2.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" + dependencies: + p-try "^1.0.0" p-locate@^2.0.0: version "2.0.0" @@ -2441,6 +2589,10 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + parse-glob@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" @@ -2466,7 +2618,7 @@ 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: +path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -2566,6 +2718,10 @@ private@^0.1.6: version "0.1.7" resolved "https://registry.yarnpkg.com/private/-/private-0.1.7.tgz#68ce5e8a1ef0a23bb570cc28537b5332aba63ef1" +private@^0.1.7: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + 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" @@ -2583,11 +2739,11 @@ qs@~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" + version "1.1.7" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" dependencies: - is-number "^2.0.2" - kind-of "^3.0.2" + is-number "^3.0.0" + kind-of "^4.0.0" rc@^1.1.7: version "1.1.7" @@ -2655,24 +2811,27 @@ 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.3" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.3.tgz#8c4367a904b51ea62a908ac310bf99ff90a82a3e" +regenerator-runtime@^0.10.5: + version "0.10.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" -regenerator-transform@0.9.8: - version "0.9.8" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.9.8.tgz#0f88bb2bc03932ddb7b6b7312e68078f01026d6c" +regenerator-transform@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" 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" + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" dependencies: is-equal-shallow "^0.1.3" - is-primitive "^2.0.0" regexpu-core@^1.0.0: version "1.0.0" @@ -2700,6 +2859,10 @@ regjsparser@^0.1.4: dependencies: jsesc "~0.5.0" +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + repeat-element@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" @@ -2795,8 +2958,8 @@ seekout@^1.0.1: resolved "https://registry.yarnpkg.com/seekout/-/seekout-1.0.2.tgz#09ba9f1bd5b46fbb134718eb19a68382cbb1b9c9" "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" + version "5.4.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" @@ -2842,9 +3005,9 @@ sntp@1.x.x: dependencies: hoek "2.x.x" -source-map-support@^0.4.2: - version "0.4.14" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.14.tgz#9d4463772598b86271b4f523f6c1f4e02a7d6aef" +source-map-support@^0.4.15: + version "0.4.18" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" dependencies: source-map "^0.5.6" @@ -2854,7 +3017,7 @@ source-map@^0.4.4: dependencies: amdefine ">=0.0.4" -source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: +source-map@^0.5.1, 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" @@ -2983,9 +3146,9 @@ tar@^2.2.1: 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" +test-exclude@^4.1.0, test-exclude@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" dependencies: arrify "^1.0.1" micromatch "^2.3.11" @@ -3012,9 +3175,9 @@ time-stamp@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.0.1.tgz#9f4bd23559c9365966f3302dbba2b07c6b99b151" -to-fast-properties@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" tough-cookie@~2.3.0: version "2.3.2" @@ -3092,9 +3255,9 @@ 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.0.11" - resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.0.11.tgz#bca8f30f0d6d60612cc2c00641e6962d42ae6881" +v8flags@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" dependencies: user-home "^1.1.1" From 80879a666b733a351d17cfd9ec6dc32dc6c77ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Sat, 6 Jan 2018 12:12:01 +0100 Subject: [PATCH 49/66] add scripts to install babel6 and babel7 dependencies --- install-babel-6.sh | 10 ++++++++++ install-babel-7.sh | 7 +++++++ 2 files changed, 17 insertions(+) create mode 100755 install-babel-6.sh create mode 100755 install-babel-7.sh diff --git a/install-babel-6.sh b/install-babel-6.sh new file mode 100755 index 0000000..2dbf2d3 --- /dev/null +++ b/install-babel-6.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# fail on error +set -e + +# remove babel core +yarn remove @babel/core + +# install babel6 +yarn add -D babel-cli@^6.26.0 babel-core@^6.26.0 babel-plugin-transform-object-rest-spread@^6.26.0 babel-preset-env@^1.6.1 babel-register@^6.26.0 diff --git a/install-babel-7.sh b/install-babel-7.sh new file mode 100755 index 0000000..40a0bc8 --- /dev/null +++ b/install-babel-7.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +# fail on error +set -e + +# install babel7 deps +yarn add -D babel-cli@^7.0.0-beta.3 babel-core@^7.0.0-beta.3 babel-register@^7.0.0-beta.3 babel-preset-env@^7.0.0-beta.3 @babel/core babel-plugin-transform-object-rest-spread@^7.0.0-beta.3 gulp-babel@7.0.0 From bb3a5c0cd6ec54e14cbcb8d40424cadfd58b49db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Sat, 6 Jan 2018 12:12:20 +0100 Subject: [PATCH 50/66] make tests compatible with babel7 --- .../exctractcss.main.expected.babel7.js | 1 + test/fixtures/extensions.expected.babel7.js | 10 ++++++++++ test/fixtures/import.expected.babel7.js | 3 +++ test/fixtures/keepImport.expected.babel7.js | 17 +++++++++++++++++ test/fixtures/require.expected.babel7.js | 3 +++ .../fixtures/require.ignored.expected.babel7.js | 1 + test/index.spec.js | 14 ++++++++++---- 7 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 test/fixtures/exctractcss.main.expected.babel7.js create mode 100644 test/fixtures/extensions.expected.babel7.js create mode 100644 test/fixtures/import.expected.babel7.js create mode 100644 test/fixtures/keepImport.expected.babel7.js create mode 100644 test/fixtures/require.expected.babel7.js create mode 100644 test/fixtures/require.ignored.expected.babel7.js diff --git a/test/fixtures/exctractcss.main.expected.babel7.js b/test/fixtures/exctractcss.main.expected.babel7.js new file mode 100644 index 0000000..201c04d --- /dev/null +++ b/test/fixtures/exctractcss.main.expected.babel7.js @@ -0,0 +1 @@ +require('./exctractcss.include.js'); diff --git a/test/fixtures/extensions.expected.babel7.js b/test/fixtures/extensions.expected.babel7.js new file mode 100644 index 0000000..a71a2fb --- /dev/null +++ b/test/fixtures/extensions.expected.babel7.js @@ -0,0 +1,10 @@ +var css = { + "className": "styles__className___385m0 parent__block___33Sxl child__line___3fweh" +}; +var scss = { + "sassy": "extensions__sassy___12Yag" +}; + +var foo = require('something-that-has-css-somewhere-in-the-name'); + +var bar = require('something-that-has-scss-somewhere-in-the-name'); diff --git a/test/fixtures/import.expected.babel7.js b/test/fixtures/import.expected.babel7.js new file mode 100644 index 0000000..d338278 --- /dev/null +++ b/test/fixtures/import.expected.babel7.js @@ -0,0 +1,3 @@ +var styles = { + "className": "styles__className___385m0 parent__block___33Sxl child__line___3fweh" +}; diff --git a/test/fixtures/keepImport.expected.babel7.js b/test/fixtures/keepImport.expected.babel7.js new file mode 100644 index 0000000..ff6a7fd --- /dev/null +++ b/test/fixtures/keepImport.expected.babel7.js @@ -0,0 +1,17 @@ +require("../styles.css"); + +var css = { + "className": "styles__className___385m0 parent__block___33Sxl child__line___3fweh" +}; + +require("../extensions.scss"); + +var scss = { + "sassy": "extensions__sassy___12Yag" +}; + +require('../extensions.scss'); + +var foo = require('something-that-has-css-somewhere-in-the-name'); + +var bar = require('something-that-has-scss-somewhere-in-the-name'); diff --git a/test/fixtures/require.expected.babel7.js b/test/fixtures/require.expected.babel7.js new file mode 100644 index 0000000..d43daef --- /dev/null +++ b/test/fixtures/require.expected.babel7.js @@ -0,0 +1,3 @@ +const styles = { + "className": "styles__className___385m0 parent__block___33Sxl child__line___3fweh" +}; diff --git a/test/fixtures/require.ignored.expected.babel7.js b/test/fixtures/require.ignored.expected.babel7.js new file mode 100644 index 0000000..729820c --- /dev/null +++ b/test/fixtures/require.ignored.expected.babel7.js @@ -0,0 +1 @@ +const styles = {}; diff --git a/test/index.spec.js b/test/index.spec.js index 11b68b2..8c03854 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -1,5 +1,5 @@ import { expect } from 'chai'; -import { resolve, join, relative } from 'path'; +import { resolve, join, relative, basename, dirname } from 'path'; import { readFileSync } from 'fs'; import gulpUtil from 'gulp-util'; import rimraf from 'rimraf'; @@ -13,7 +13,7 @@ describe('babel-plugin-css-modules-transform', () => { return babel.transformFileSync(resolve(__dirname, path), { babelrc: false, - presets: [['env', { targets: { node: '6.12'} }]], + presets: [['env', { targets: { node: '6.12' } }]], plugins: [ 'transform-object-rest-spread', ['@babel/../../src/index.js', configuration] @@ -29,7 +29,7 @@ describe('babel-plugin-css-modules-transform', () => { if (configuration && !('devMode' in configuration)) configuration.devMode = true; return gulpBabel({ - presets: [['env', { targets: { node: '6.12'} }]], + presets: [['env', { targets: { node: '6.12' } }]], plugins: [ 'transform-object-rest-spread', ['@babel/../../src/index.js', configuration] @@ -38,12 +38,18 @@ describe('babel-plugin-css-modules-transform', () => { } function readExpected(path) { + let file = path; + + if (process.env.BABEL_7 && /\.js$/.test(file)) { + // we load fixture for babel 7, they changed few things so we need to use different fixture + file = join(dirname(file), `./${basename(file, '.js')}.babel7.js`); + } // We trim the contents of the file so that we don't have // to deal with newline issues, since some text editors // automatically inserts them. It's easier to do this than to // configure the editors to avoid inserting newlines for these // particular files. - return readFileSync(resolve(__dirname, path), 'utf8').trim(); + return readFileSync(resolve(__dirname, file), 'utf8').trim(); } beforeEach((done) => { From 20944221641fe67cfc7a5c2aa318ab3863cc8017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Sat, 6 Jan 2018 12:12:34 +0100 Subject: [PATCH 51/66] test babel7 and babel6 in circleci --- circle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index d1d73c4..9a48646 100644 --- a/circle.yml +++ b/circle.yml @@ -16,5 +16,5 @@ test: override: - yarn test # test with babel 7 - - yarn add -D babel-cli@^7.0.0-beta.3 babel-core@^7.0.0-beta.3 babel-register@^7.0.0-beta.3 babel-preset-env@^7.0.0-beta.3 @babel/core babel-plugin-transform-object-rest-spread@^7.0.0-beta.3 gulp-babel@7.0.0 - - yarn test + - ./install-babel-7.sh + - BABEL_7=1 yarn test From 749940e9f46612dd89eef3a84f2ec57b55ad7bee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Sat, 6 Jan 2018 12:16:47 +0100 Subject: [PATCH 52/66] update readme to reflect compatiblity with babel6 and babel7 --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d648283..51379bf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ -# babel-plugin-css-modules-transform [Babel 6 only] +# babel-plugin-css-modules-transform [![Circle CI](https://circleci.com/gh/michalkvasnicak/babel-plugin-css-modules-transform.svg?style=svg)](https://circleci.com/gh/michalkvasnicak/babel-plugin-css-modules-transform) -[![Circle CI](https://circleci.com/gh/michalkvasnicak/babel-plugin-css-modules-transform.svg?style=svg)](https://circleci.com/gh/michalkvasnicak/babel-plugin-css-modules-transform) +**🎉 Babel 6 and Babel 7 compatible** + +**⚠️ Babel 7 compatibility added in 1.4.0** This Babel plugin finds all `require`s for css module files and replace them with a hash where keys are class names and values are generated css class names. From aca34580fd452acd6cdffc810ad507fb3a865d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Sat, 6 Jan 2018 12:30:00 +0100 Subject: [PATCH 53/66] update dependencies --- yarn.lock | 107 ++++++++++++++++++++++++------------------------------ 1 file changed, 47 insertions(+), 60 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4ab017f..9dee869 100644 --- a/yarn.lock +++ b/yarn.lock @@ -193,14 +193,13 @@ babel-core@^6.26.0: source-map "^0.5.6" babel-eslint@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.0.tgz#8941514b9dead06f0df71b29d5d5b193a92ee0ae" + version "7.2.3" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.3.tgz#b2fe2d80126470f5c19442dc757253a897710827" dependencies: babel-code-frame "^6.22.0" babel-traverse "^6.23.1" babel-types "^6.23.0" - babylon "^6.16.1" - lodash "^4.17.4" + babylon "^6.17.0" babel-generator@^6.18.0, babel-generator@^6.26.0: version "6.26.0" @@ -628,7 +627,7 @@ babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: babylon "^6.18.0" lodash "^4.17.4" -babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: +babel-traverse@^6.18.0, babel-traverse@^6.23.1, babel-traverse@^6.24.1, babel-traverse@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" dependencies: @@ -642,20 +641,6 @@ babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: invariant "^2.2.2" lodash "^4.17.4" -babel-traverse@^6.23.1: - version "6.23.1" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48" - dependencies: - babel-code-frame "^6.22.0" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-types "^6.23.0" - 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.23.0, babel-types@^6.24.1, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" @@ -665,18 +650,10 @@ babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24 lodash "^4.17.4" to-fast-properties "^1.0.3" -babylon@^6.15.0, babylon@^6.18.0: +babylon@^6.17.0, babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" -babylon@^6.16.1: - version "6.16.1" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3" - -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.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" @@ -711,14 +688,7 @@ boom@2.x.x: dependencies: hoek "2.x.x" -brace-expansion@^1.0.0: - version "1.1.6" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" - dependencies: - balanced-match "^0.4.1" - concat-map "0.0.1" - -brace-expansion@^1.1.7: +brace-expansion@^1.0.0, brace-expansion@^1.1.7: version "1.1.8" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" dependencies: @@ -915,8 +885,8 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" cross-env@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.0.0.tgz#565ccae4d09676441a5087f406fe7661a29c931b" + version "5.1.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-5.1.3.tgz#f8ae18faac87692b0a8b4d2f7000d4ec3a85dfd7" dependencies: cross-spawn "^5.1.0" is-windows "^1.0.0" @@ -991,11 +961,11 @@ debug-log@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" -debug@2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" +debug@2.6.8: + version "2.6.8" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.8.tgz#e731531ca2ede27d188222427da17821d68ff4fc" dependencies: - ms "0.7.2" + ms "2.0.0" debug@^2.1.1, debug@^2.6.3: version "2.6.3" @@ -1479,7 +1449,7 @@ glob-to-regexp@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.1.0.tgz#e0369d426578fd456d47dc23b09de05c1da9ea5d" -glob@7.1.1, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6: +glob@7.1.1, glob@^7.0.3, glob@^7.0.6: version "7.1.1" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" dependencies: @@ -1500,7 +1470,7 @@ glob@^5.0.14: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.2: +glob@^7.0.5, glob@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -1515,7 +1485,7 @@ globals@^8.11.0: version "8.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-8.18.0.tgz#93d4a62bdcac38cfafafc47d6b034768cb0ffcb4" -globals@^9.0.0, globals@^9.18.0: +globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" @@ -1636,6 +1606,10 @@ hawk@~3.1.3: hoek "2.x.x" sntp "1.x.x" +he@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" + hoek@2.x.x: version "2.16.3" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" @@ -1700,7 +1674,7 @@ inquirer@^0.11.0: strip-ansi "^3.0.0" through "^2.3.6" -invariant@^2.2.0, invariant@^2.2.2: +invariant@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" dependencies: @@ -2291,7 +2265,7 @@ lodash@^3.3.1: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" -lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0: +lodash@^4.17.4, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -2306,11 +2280,11 @@ loose-envify@^1.0.0: 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" + version "4.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" dependencies: - pseudomap "^1.0.1" - yallist "^2.0.0" + pseudomap "^1.0.2" + yallist "^2.1.2" md5-hex@^1.2.0: version "1.3.0" @@ -2356,13 +2330,13 @@ mime-types@^2.1.12, mime-types@~2.1.7: dependencies: mime-db "~1.26.0" -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2: +"minimatch@2 || 3", minimatch@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" dependencies: brace-expansion "^1.0.0" -minimatch@^3.0.4: +minimatch@^3.0.2, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: @@ -2383,16 +2357,17 @@ mkdirp@0.5.1, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: minimist "0.0.8" mocha@^3.4.2: - version "3.4.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.4.2.tgz#d0ef4d332126dbf18d0d640c9b382dd48be97594" + version "3.5.3" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.5.3.tgz#1e0480fe36d2da5858d1eb6acc38418b26eaa20d" dependencies: browser-stdout "1.3.0" commander "2.9.0" - debug "2.6.0" + debug "2.6.8" diff "3.2.0" escape-string-regexp "1.0.5" glob "7.1.1" growl "1.9.2" + he "1.1.1" json3 "3.3.2" lodash.create "3.1.1" mkdirp "0.5.1" @@ -2726,7 +2701,7 @@ 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" -pseudomap@^1.0.1: +pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" @@ -2933,12 +2908,18 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.3.3, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1: +rimraf@2, rimraf@^2.2.8, rimraf@^2.3.3, 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" +rimraf@^2.5.4: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + 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" @@ -3292,12 +3273,18 @@ 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.4, which@^1.2.9: +which@^1.2.4: version "1.2.14" resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" dependencies: isexe "^2.0.0" +which@^1.2.9: + version "1.3.0" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" + dependencies: + isexe "^2.0.0" + wide-align@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" @@ -3353,7 +3340,7 @@ y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" -yallist@^2.0.0: +yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" From dd664e4b445b6e5cec998f011fe786ba2dd68c20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Sat, 6 Jan 2018 12:31:46 +0100 Subject: [PATCH 54/66] update postcss dev dependencies --- yarn.lock | 126 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 113 insertions(+), 13 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9dee869..c805687 100644 --- a/yarn.lock +++ b/yarn.lock @@ -37,6 +37,12 @@ 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.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" + 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" @@ -771,6 +777,14 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" +chalk@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + chokidar@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2" @@ -832,6 +846,16 @@ 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.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" + dependencies: + color-name "^1.1.1" + +color-name@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + 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" @@ -937,6 +961,14 @@ css-selector-tokenizer@^0.6.0: fastparse "^1.1.1" regexpu-core "^1.0.0" +css-selector-tokenizer@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86" + dependencies: + cssesc "^0.1.0" + fastparse "^1.1.1" + regexpu-core "^1.0.0" + cssesc@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" @@ -1587,6 +1619,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@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + has-gulplog@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" @@ -1633,9 +1669,9 @@ http-signature@~1.1.0: jsprim "^1.2.2" sshpk "^1.7.0" -icss-replace-symbols@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.0.2.tgz#cb0b6054eb3af6edc9ab1d62d01933e2d4c8bfa5" +icss-replace-symbols@^1.0.2, 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" imurmurhash@^0.1.4: version "0.1.4" @@ -1883,8 +1919,8 @@ jodid25519@^1.0.0: jsbn "~0.1.0" js-base64@^2.1.9: - version "2.1.9" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" + version "2.4.0" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.0.tgz#9e566fee624751a1d720c966cd6226d29d4025aa" js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" @@ -2637,19 +2673,32 @@ pkg-dir@^1.0.0: dependencies: find-up "^1.0.0" -postcss-modules-extract-imports@^1.0.0, postcss-modules-extract-imports@^1.x: +postcss-modules-extract-imports@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.0.1.tgz#8fb3fef9a6dd0420d3f6d4353cf1ff73f2b2a341" dependencies: postcss "^5.0.4" -postcss-modules-local-by-default@^1.0.1, postcss-modules-local-by-default@^1.x: +postcss-modules-extract-imports@^1.x: + version "1.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz#b614c9720be6816eaee35fb3a5faa1dba6a05ddb" + dependencies: + postcss "^6.0.1" + +postcss-modules-local-by-default@^1.0.1: version "1.1.1" resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.1.1.tgz#29a10673fa37d19251265ca2ba3150d9040eb4ce" dependencies: css-selector-tokenizer "^0.6.0" postcss "^5.0.4" +postcss-modules-local-by-default@^1.x: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" + dependencies: + css-selector-tokenizer "^0.7.0" + postcss "^6.0.1" + postcss-modules-parser@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/postcss-modules-parser/-/postcss-modules-parser-1.1.0.tgz#1797f0e5ca129bbe6120c9d3babd328e8bc7748d" @@ -2658,21 +2707,35 @@ postcss-modules-parser@^1.1.0: lodash.foreach "^3.0.3" postcss "^5.0.10" -postcss-modules-scope@^1.0.0, postcss-modules-scope@^1.x: +postcss-modules-scope@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.0.2.tgz#ff977395e5e06202d7362290b88b1e8cd049de29" dependencies: css-selector-tokenizer "^0.6.0" postcss "^5.0.4" -postcss-modules-values@^1.1.1, postcss-modules-values@^1.x: +postcss-modules-scope@^1.x: + version "1.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" + dependencies: + css-selector-tokenizer "^0.7.0" + postcss "^6.0.1" + +postcss-modules-values@^1.1.1: version "1.2.2" resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.2.2.tgz#f0e7d476fe1ed88c5e4c7f97533a3e772ad94ca1" dependencies: icss-replace-symbols "^1.0.2" postcss "^5.0.14" -postcss@^5.0.10, postcss@^5.0.14, postcss@^5.0.19, postcss@^5.0.4, postcss@^5.x: +postcss-modules-values@^1.x: + version "1.3.0" + resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" + dependencies: + icss-replace-symbols "^1.1.0" + postcss "^6.0.1" + +postcss@^5.0.10, postcss@^5.0.19: version "5.2.16" resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.16.tgz#732b3100000f9ff8379a48a53839ed097376ad57" dependencies: @@ -2681,6 +2744,23 @@ postcss@^5.0.10, postcss@^5.0.14, postcss@^5.0.19, postcss@^5.0.4, postcss@^5.x: source-map "^0.5.6" supports-color "^3.2.3" +postcss@^5.0.14, postcss@^5.0.4, postcss@^5.x: + version "5.2.18" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5" + dependencies: + chalk "^1.1.3" + js-base64 "^2.1.9" + source-map "^0.5.6" + supports-color "^3.2.3" + +postcss@^6.0.1: + version "6.0.16" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.16.tgz#112e2fe2a6d2109be0957687243170ea5589e146" + dependencies: + chalk "^2.3.0" + source-map "^0.6.1" + supports-color "^5.1.0" + prelude-ls@~1.1.0, prelude-ls@~1.1.1, prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -2783,8 +2863,8 @@ readline2@^1.0.1: mute-stream "0.0.5" regenerate@^1.2.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" + version "1.3.3" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" regenerator-runtime@^0.10.5: version "0.10.5" @@ -2998,10 +3078,18 @@ source-map@^0.4.4: dependencies: amdefine ">=0.0.4" -source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: +source-map@^0.5.1, source-map@^0.5.3, 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.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + sparkles@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" @@ -3106,6 +3194,18 @@ supports-color@^3.1.2, supports-color@^3.2.3: dependencies: has-flag "^1.0.0" +supports-color@^4.0.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" + dependencies: + has-flag "^2.0.0" + +supports-color@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.1.0.tgz#058a021d1b619f7ddf3980d712ea3590ce7de3d5" + dependencies: + has-flag "^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" From ac8e338771c67355bcaf8bca68bfac851500d9c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Sat, 6 Jan 2018 12:35:59 +0100 Subject: [PATCH 55/66] Version 1.4.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 40e9abc..a0fcbfa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "1.3.1", + "version": "1.4.0", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { From 2a4373f0ece66a1a2e29ebdd3b098553d24df74d Mon Sep 17 00:00:00 2001 From: Pascal Duez Date: Sun, 25 Feb 2018 10:00:42 +0100 Subject: [PATCH 56/66] Fix typo in `rootDir` option resolver --- src/options_resolvers/rootDir.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/options_resolvers/rootDir.js b/src/options_resolvers/rootDir.js index 65d0b06..117ca7e 100644 --- a/src/options_resolvers/rootDir.js +++ b/src/options_resolvers/rootDir.js @@ -14,7 +14,7 @@ export default function rootDir(value/* , currentConfig */) { } if (!isAbsolute(value) || !statSync(value).isDirectory()) { - throw new Error(`Configuration 'rootDir' is not containg a valid absolute path`); + throw new Error(`Configuration 'rootDir' is not containing a valid absolute path`); } return value; From b837ade2e0d6f30b315f6f221407589ef6f22870 Mon Sep 17 00:00:00 2001 From: Pascal Duez Date: Sun, 25 Feb 2018 10:02:52 +0100 Subject: [PATCH 57/66] Fix typo in `processorOpts` option resolver --- src/options_resolvers/processorOpts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/options_resolvers/processorOpts.js b/src/options_resolvers/processorOpts.js index c4188a7..450129c 100644 --- a/src/options_resolvers/processorOpts.js +++ b/src/options_resolvers/processorOpts.js @@ -1,7 +1,7 @@ import { isModulePath, isPlainObject, requireLocalFileOrNodeModule } from '../utils'; /** - * Resolves processOpts option for css-modules-require-hook + * Resolves processorOpts option for css-modules-require-hook * * @param {String|Function} value * From dec0409a71d4ea22a1a59fdd308d0b7b153a16cd Mon Sep 17 00:00:00 2001 From: Pascal Duez Date: Sun, 25 Feb 2018 11:34:53 +0100 Subject: [PATCH 58/66] Add a new `resolve` option resolver - Refs #76 --- src/options_resolvers/index.js | 1 + src/options_resolvers/resolve.js | 53 ++++++++++++++++++++++++++ test/options_resolvers/resolve.spec.js | 51 +++++++++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 src/options_resolvers/resolve.js create mode 100644 test/options_resolvers/resolve.spec.js diff --git a/src/options_resolvers/index.js b/src/options_resolvers/index.js index 46456c3..033aadc 100644 --- a/src/options_resolvers/index.js +++ b/src/options_resolvers/index.js @@ -11,4 +11,5 @@ export { default as preprocessCss } from './preprocessCss'; export { default as processCss } from './processCss'; export { default as processorOpts } from './processorOpts'; export { default as rootDir } from './rootDir'; +export { default as resolve } from './resolve'; export { default as use } from './use'; diff --git a/src/options_resolvers/resolve.js b/src/options_resolvers/resolve.js new file mode 100644 index 0000000..102f99a --- /dev/null +++ b/src/options_resolvers/resolve.js @@ -0,0 +1,53 @@ +import { isAbsolute } from 'path'; +import { statSync } from 'fs'; +import { isBoolean, isPlainObject, isString } from '../utils'; + +/** + * Resolves resolve option for css-modules-require-hook + * + * @param {*} value + * @returns {Object} + */ +export default function resolve(value/* , currentConfig */) { + if (!isPlainObject(value)) { + throw new Error(`Configuration 'resolve' is not an object`); + } + + if (alias in value && !isPlainObject(value.alias)) { + throw new Error(`Configuration 'resolve.alias' is not an object`); + } + + if (extensions in value) { + if (!Array.isArray(value.extensions)) { + throw new Error(`Configuration 'resolve.extensions' is not an array`); + } + + value.extensions.map((option, index) => { + if (!isString(option)) { + throw new Error(`Configuration 'resolve.extensions[${index}]' is not a string`); + } + }); + } + + if (modules in value) { + if (!Array.isArray(value.modules)) { + throw new Error(`Configuration 'resolve.modules' is not an array`); + } + + value.modules.map((option, index) => { + if (!isAbsolute(option) || !statSync(option).isDirectory()) { + throw new Error(`Configuration 'resolve.modules[${index}]' is not containing a valid absolute path`); + } + }); + } + + if (mainFile in value && !isString(value.mainFile)) { + throw new Error(`Configuration 'resolve.mainFile' is not a string`); + } + + if (preserveSymlinks in value && !isBoolean(value.preserveSymlinks)) { + throw new Error(`Configuration 'resolve.preserveSymlinks' is not a boolean`); + } + + return value; +} diff --git a/test/options_resolvers/resolve.spec.js b/test/options_resolvers/resolve.spec.js new file mode 100644 index 0000000..34cf0aa --- /dev/null +++ b/test/options_resolvers/resolve.spec.js @@ -0,0 +1,51 @@ +import { expect } from 'chai'; + +import resolve from '../../src/options_resolvers/resolve'; + +describe('options_resolvers/resolve', () => { + it('should throw if resolve is not an object', () => { + expect( + () => resolve([]) + ).to.throw(); + }); + + it('should throw if resolve.alias is not an object', () => { + expect( + () => resolve({ alias: [] }) + ).to.throw(); + }); + + it('should throw if resolve.extensions is not an array', () => { + expect( + () => resolve({ extensions: {} }) + ).to.throw(); + }); + + it('should throw if resolve.modules is not an array', () => { + expect( + () => resolve({ modules: {} }) + ).to.throw(); + }); + + it('should throw if resolve.modules.* is not an absolute directory or does not exist', () => { + expect( + () => resolve({ modules: ['/test/this/not/exists'] }) + ).to.throw(); + + expect( + () => resolve('./') + ).to.throw(); + }); + + it('should throw if resolve.mainFile is not a string', () => { + expect( + () => resolve({ mainFile: {} }) + ).to.throw(); + }); + + it('should throw if resolve.preserveSymlinks is not a boolean', () => { + expect( + () => resolve({ preserveSymlinks: 1 }) + ).to.throw(); + }); +}); From ec95cbeae128977a5198620be1b7ae9b81177b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Thu, 1 Mar 2018 14:18:06 +0100 Subject: [PATCH 59/66] Version 1.5.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a0fcbfa..f74213b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "1.4.0", + "version": "1.5.0", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { From 0291fa0e39ba68b8d7174fc0ae83dfb5f405956b Mon Sep 17 00:00:00 2001 From: "ling.dingl" Date: Mon, 2 Apr 2018 12:11:54 +0800 Subject: [PATCH 60/66] feat: add option importPathFormatter --- src/index.js | 18 +++++++++++++-- src/options_resolvers/importPathFormatter.js | 23 ++++++++++++++++++++ src/options_resolvers/index.js | 1 + 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 src/options_resolvers/importPathFormatter.js diff --git a/src/index.js b/src/index.js index abbbb71..6cc6c48 100644 --- a/src/index.js +++ b/src/index.js @@ -10,6 +10,16 @@ const defaultOptions = { generateScopedName: '[name]__[local]___[hash:base64:5]' }; +function updateStyleSheetPath(pathStringLiteral, importPathFormatter) { + if (!importPathFormatter) { return pathStringLiteral; } + + return { + ...pathStringLiteral, + value: importPathFormatter(pathStringLiteral.value) + }; +} + + function findExpressionStatementChild(path, t) { const parent = path.parentPath; if (!parent) { @@ -113,6 +123,7 @@ export default function transformCssModules({ types: t }) { // this is not a css-require-ook config delete currentConfig.extractCss; delete currentConfig.keepImport; + delete currentConfig.importPathFormatter; // match file extensions, speeds up transform by creating one // RegExp ahead of execution time @@ -139,6 +150,9 @@ export default function transformCssModules({ types: t }) { Object.keys(requireHooksOptions).forEach(key => { // skip undefined options if (currentConfig[key] === undefined) { + if (key === 'importPathFormatter' && thisPluginOptions && thisPluginOptions[key]) { + thisPluginOptions[key] = requireHooksOptions[key](thisPluginOptions[key]); + } return; } @@ -191,7 +205,7 @@ export default function transformCssModules({ types: t }) { t.expressionStatement( t.callExpression( t.identifier('require'), - [t.stringLiteral(value)] + [updateStyleSheetPath(t.stringLiteral(value), thisPluginOptions.importPathFormatter)] ) ), varDeclaration @@ -227,7 +241,7 @@ export default function transformCssModules({ types: t }) { t.expressionStatement( t.callExpression( t.identifier('require'), - [t.stringLiteral(stylesheetPath)] + [updateStyleSheetPath(t.stringLiteral(stylesheetPath), thisPluginOptions.importPathFormatter)] ) ) ); diff --git a/src/options_resolvers/importPathFormatter.js b/src/options_resolvers/importPathFormatter.js new file mode 100644 index 0000000..94064f8 --- /dev/null +++ b/src/options_resolvers/importPathFormatter.js @@ -0,0 +1,23 @@ +import { isFunction, isModulePath, requireLocalFileOrNodeModule } from '../utils'; + +/** + * Resolves importPathFormatter option + * + * @param {String|Function} value + * @returns {Function} + */ +export default function importPathFormatter(value/* , currentConfig */) { + if (isFunction(value)) { + return value; + } else if (isModulePath(value)) { + const requiredOption = requireLocalFileOrNodeModule(value); + + if (!isFunction(requiredOption)) { + throw new Error(`Configuration file for 'importPathFormatter' is not exporting a function`); + } + + return requiredOption; + } + + throw new Error(`Configuration 'importPathFormatter' is not a function nor a valid module path`); +} diff --git a/src/options_resolvers/index.js b/src/options_resolvers/index.js index 033aadc..92ba1f5 100644 --- a/src/options_resolvers/index.js +++ b/src/options_resolvers/index.js @@ -13,3 +13,4 @@ export { default as processorOpts } from './processorOpts'; export { default as rootDir } from './rootDir'; export { default as resolve } from './resolve'; export { default as use } from './use'; +export { default as importPathFormatter } from './importPathFormatter'; From 0234196f0fcbbfe81c4dd78e8f432dfb3ff818e2 Mon Sep 17 00:00:00 2001 From: "ling.dingl" Date: Tue, 24 Apr 2018 14:51:31 +0800 Subject: [PATCH 61/66] feat: update test cases --- test/index.spec.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/index.spec.js b/test/index.spec.js index 8c03854..d8a8efd 100644 --- a/test/index.spec.js +++ b/test/index.spec.js @@ -109,12 +109,13 @@ describe('babel-plugin-css-modules-transform', () => { }); it('should write a multiple css files using import', () => { - expect(transform('fixtures/import.js', { + expect(transform(`${__dirname}/fixtures/import.js`, { extractCss: { dir: `${__dirname}/output/`, - filename: '[name].css', - relativeRoot: `${__dirname}` - } + filename: '[path]/[name].css', + relativeRoot: __dirname + }, + extensions: ['.scss', '.css'] }).code).to.be.equal(readExpected('fixtures/import.expected.js')); expect(readExpected(`${__dirname}/output/parent.css`)) From 8bf788637b8e7789f50d6803caa584f73510afe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Tue, 8 May 2018 09:32:21 +0200 Subject: [PATCH 62/66] Version 1.6.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f74213b..6d9f710 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "1.5.0", + "version": "1.6.0", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { From c2c8fe99be8227497f428b910ef7b4d270102261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Tue, 8 May 2018 09:41:56 +0200 Subject: [PATCH 63/66] fix resolving resolve option --- src/options_resolvers/resolve.js | 10 +++++----- test/options_resolvers/resolve.spec.js | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/options_resolvers/resolve.js b/src/options_resolvers/resolve.js index 102f99a..007064d 100644 --- a/src/options_resolvers/resolve.js +++ b/src/options_resolvers/resolve.js @@ -13,11 +13,11 @@ export default function resolve(value/* , currentConfig */) { throw new Error(`Configuration 'resolve' is not an object`); } - if (alias in value && !isPlainObject(value.alias)) { + if ('alias' in value && !isPlainObject(value.alias)) { throw new Error(`Configuration 'resolve.alias' is not an object`); } - if (extensions in value) { + if ('extensions' in value) { if (!Array.isArray(value.extensions)) { throw new Error(`Configuration 'resolve.extensions' is not an array`); } @@ -29,7 +29,7 @@ export default function resolve(value/* , currentConfig */) { }); } - if (modules in value) { + if ('modules' in value) { if (!Array.isArray(value.modules)) { throw new Error(`Configuration 'resolve.modules' is not an array`); } @@ -41,11 +41,11 @@ export default function resolve(value/* , currentConfig */) { }); } - if (mainFile in value && !isString(value.mainFile)) { + if ('mainFile' in value && !isString(value.mainFile)) { throw new Error(`Configuration 'resolve.mainFile' is not a string`); } - if (preserveSymlinks in value && !isBoolean(value.preserveSymlinks)) { + if ('preserveSymlinks' in value && !isBoolean(value.preserveSymlinks)) { throw new Error(`Configuration 'resolve.preserveSymlinks' is not a boolean`); } diff --git a/test/options_resolvers/resolve.spec.js b/test/options_resolvers/resolve.spec.js index 34cf0aa..4bbbee0 100644 --- a/test/options_resolvers/resolve.spec.js +++ b/test/options_resolvers/resolve.spec.js @@ -48,4 +48,24 @@ describe('options_resolvers/resolve', () => { () => resolve({ preserveSymlinks: 1 }) ).to.throw(); }); + + it('works if resolve.alias is an object', () => { + expect(() => resolve({ alias: {} })).to.not.throw(); + }); + + it('works if resolve.extensions is an array of strings', () => { + expect(() => resolve({ extensions: ['a', 'b'] })).to.not.throw(); + }); + + it('works if resolve.modules is an array of valid file paths', () => { + expect(() => resolve({ modules: [__dirname] })).to.not.throw(); + }); + + it('works if resolve.mainFile is a string', () => { + expect(() => resolve({ mainFile: 'aa' })).to.not.throw(); + }); + + it('works if resolve.preserveSymlinks is a boolean', () => { + expect(() => resolve({ preserveSymlinks: true })).to.not.throw(); + }); }); From 49407e405cca6092c33f1ca88e6ed01a579eb05c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Tue, 8 May 2018 09:46:15 +0200 Subject: [PATCH 64/66] Version 1.6.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6d9f710..20f7c3b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "1.6.0", + "version": "1.6.1", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": { From ed2f91a9edab52823ef9073bbb6646805bc25ff9 Mon Sep 17 00:00:00 2001 From: Sergey Melyukov Date: Thu, 25 Oct 2018 21:02:59 +0300 Subject: [PATCH 65/66] Handle exceptions inside requiring module --- src/utils/requireLocalFileOrNodeModule.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/utils/requireLocalFileOrNodeModule.js b/src/utils/requireLocalFileOrNodeModule.js index c421272..f2d1436 100644 --- a/src/utils/requireLocalFileOrNodeModule.js +++ b/src/utils/requireLocalFileOrNodeModule.js @@ -13,7 +13,11 @@ export default function requireLocalFileOrNodeModule(path) { // first try to require local file return require(localFile); } catch (e) { - // try to require node_module - return require(path); + if (e.code === 'MODULE_NOT_FOUND') { + // try to require node_module + return require(path); + } + + throw e; } } From a30ba8e44e68f46220bf713aa6466b597cf0045e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kvasni=C4=8D=C3=A1k?= Date: Sun, 25 Nov 2018 17:41:56 +0100 Subject: [PATCH 66/66] Version 1.6.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 20f7c3b..a8c6820 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-css-modules-transform", - "version": "1.6.1", + "version": "1.6.2", "description": "Transform required css modules so one can use generated class names.", "main": "build/index.js", "scripts": {